    /* ==========================================================================
       Calendar Toolbar & Views
       ========================================================================== */
    /* Shared control metrics: 44px also gives a full touch target. */
    .cal-toolbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: var(--space-2);
      min-width: 0;
      position: relative;
    }
    #panelCalendar [hidden] { display: none !important; }
    .cal-nav-group {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
      align-items: center;
      gap: var(--space-2);
      min-width: 0;
    }
    .cal-title {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-main);
      text-align: center;
      white-space: nowrap;
      min-width: 0;
    }
    .cal-view-tabs {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: var(--space-2);
      min-width: 0;
    }
    .cal-search-row {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      min-width: 0;
      position: relative;
    }
    .cal-toolbar button, .cal-toolbar .search-input {
      height: var(--header-touch-target);
      min-height: var(--header-touch-target);
      box-sizing: border-box;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 0 10px;
      margin: 0;
      background: var(--bg-card);
      color: var(--text-secondary);
      font: inherit;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
    }
    .cal-toolbar .search-input { flex: 1; width: 0; min-width: 0; cursor: text; }
    .cal-toolbar .month-expand-toggle { min-width: 0; flex-shrink: 0; }
    .cal-toolbar button.active, .cal-toolbar button.is-active,
    .cal-toggle-chip[aria-pressed="true"] {
      color: var(--accent);
      background: var(--info-bg);
      border-color: var(--accent);
    }
    .cal-toolbar button:hover { border-color: var(--accent); }
    .cal-toolbar :focus-visible, .cal-date-pill:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .cal-filter-popover {
      position: absolute;
      right: 0;
      top: calc(100% + var(--space-2));
      z-index: 20;
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
      padding: 8px;
      background: var(--bg-panel);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow);
      max-width: 100%;
    }
    .cal-toggle-chip { text-align: left; }

    /* ==========================================================================
       1. Monthly View Grid (Guaranteed 7 Columns, minmax(0, 1fr), min-width: 0)
       ========================================================================== */
    .calendar-month,
    .cal-month-header,
    .cal-month-grid,
    .cal-month-cell,
    .cal-chip,
    .cal-chip-text {
      min-width: 0;
      min-inline-size: 0;
      box-sizing: border-box;
    }

    .calendar-month {
      width: 100%;
      max-width: 100%;
      overflow: hidden;
    }

    .cal-month-header {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 3px;
      text-align: center;
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
      padding: 6px 0;
      border-bottom: 1px solid var(--border);
      width: 100%;
      max-width: 100%;
    }
    .cal-month-header .sun { color: var(--weekend-sun); }
    .cal-month-header .sat { color: var(--weekend-sat); }

    .cal-month-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 3px;
      margin-top: 4px;
      width: 100%;
      max-width: 100%;
      touch-action: pan-y;
      transition: all 0.2s ease;
    }

    .cal-month-cell {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      min-height: 52px;
      height: 52px;
      padding: 3px 2px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      transition: all 0.15s ease;
      cursor: pointer;
      position: relative;
      overflow: hidden;
      min-width: 0;
    }
    .cal-month-cell:hover {
      border-color: var(--text-muted);
    }
    .cal-month-cell.other-month {
      opacity: 0.3;
      background: var(--bg-inset);
    }
    .cal-month-cell.is-today {
      border-color: var(--accent);
      background: var(--info-bg);
    }
    .cal-month-cell.is-selected {
      border-color: var(--info) !important;
      box-shadow: var(--shadow);
      background: var(--info-bg) !important;
      z-index: 2;
    }

    .calendar-month.is-expanded .cal-month-cell {
      min-height: 94px;
      height: auto;
      padding: 3px;
    }

    .cal-cell-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11px;
      font-weight: 700;
      padding: 1px 2px;
      min-width: 0;
    }
    .cal-day-num {
      color: var(--text-muted);
      font-size: 11px;
    }
    .cal-month-cell:not(.other-month) .cal-day-num.sun { color: var(--weekend-sun); }
    .cal-month-cell:not(.other-month) .cal-day-num.sat { color: var(--weekend-sat); }
    .cal-today-badge {
      background: var(--accent);
      color: var(--on-accent);
      border-radius: 9999px;
      width: 17px;
      height: 17px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
    }

    .cal-cell-chips-container {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
      overflow: hidden;
    }

    .cal-chip {
      font-size: 10px;
      padding: 2px 4px;
      border-radius: 3px;
      cursor: pointer;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 3px;
      width: 100%;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
      border: 1px solid transparent;
      transition: all 0.1s ease;
      text-align: left;
    }
    .cal-chip.unassigned {
      background: var(--warning-bg);
      border-color: var(--warning-border);
      color: var(--warning);
    }
    .cal-chip.assigned {
      background: var(--indigo-bg);
      border-color: var(--indigo-border);
      color: var(--indigo);
    }
    .cal-chip.released {
      background: var(--success-bg);
      border-color: var(--success-border);
      color: var(--success);
    }
    .cal-chip.cancelled {
      background: var(--danger-bg);
      border-color: var(--danger-border);
      color: var(--danger-fg);
    }
    .cal-chip.selected {
      background: var(--bg-card-selected) !important;
      border-color: var(--info) !important;
      color: var(--text-on-selected) !important;
      box-shadow: var(--shadow);
      font-weight: 700;
    }
    .cal-chip:hover {
      filter: brightness(1.2);
    }

    .cal-chip-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .cal-chip-dot.unassigned { background: var(--warning); }
    .cal-chip-dot.assigned { background: var(--indigo); }
    .cal-chip-dot.released { background: var(--success); }
    .cal-chip-dot.cancelled { background: var(--danger); }

    .cal-chip-text {
      display: block;
      flex: 1 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
    }

    .cal-chip-memo {
      display: block;
      width: 100%;
      flex-basis: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 9px;
      line-height: 1.2;
      color: var(--text-main);
    }

    .cal-overflow-btn {
      font-size: 10px;
      color: var(--accent);
      cursor: pointer;
      padding: 1px 2px;
      text-align: right;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }
    .cal-overflow-btn:hover {
      text-decoration: underline;
      color: var(--accent);
    }

    /* Collapsed mode chip bars (ref5) */
    .calendar-month:not(.is-expanded) .cal-cell-chips-container {
      display: flex;
      flex-direction: column;
      gap: 2px;
      margin-top: 2px;
      overflow: hidden;
      max-height: 26px;
    }
    .calendar-month:not(.is-expanded) .cal-chip {
      height: 4px;
      min-height: 4px;
      padding: 0;
      border-radius: 2px;
      border: none;
      margin: 1px 0;
      cursor: pointer;
    }
    .calendar-month:not(.is-expanded) .cal-chip-text {
      display: none;
    }
    .calendar-month:not(.is-expanded) .cal-chip-dot {
      display: none;
    }
    .calendar-month:not(.is-expanded) .cal-chip-memo {
      display: none;
    }
    .calendar-month:not(.is-expanded) .cal-overflow-btn {
      display: none;
    }

    /* Month header expansion control */
    .cal-month-controls {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      min-width: 0;
      margin-bottom: 4px;
    }
    .month-expand-toggle {
      min-width: 132px;
      min-height: 44px;
      padding: 8px 12px;
      background: transparent;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 8px;
      color: var(--text-muted);
      transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }
    .month-expand-toggle:hover {
      color: var(--text-main);
      border-color: var(--accent);
      background: var(--info-bg);
    }
    .month-expand-toggle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .month-toggle-grip {
      width: 38px;
      height: 4px;
      background: var(--border);
      border-radius: 9999px;
      transition: background 0.15s ease;
    }
    .month-expand-toggle:hover .month-toggle-grip {
      background: var(--accent);
    }
    .month-toggle-label {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: -0.2px;
    }

    /* Bottom Day Schedule List (#monthDayScheduleList) */
    .month-day-schedule {
      margin-top: 6px;
      padding-top: 8px;
      border-top: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .month-day-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      padding: 4px 2px;
    }

    .month-day-title-wrap {
      display: flex;
      align-items: baseline;
      gap: 8px;
    }

    .month-day-large-num {
      font-size: 24px;
      font-weight: 800;
      color: var(--text-main);
      line-height: 1;
    }

    .month-day-name {
      font-size: 15px;
      font-weight: 700;
      color: var(--text-main);
    }

    .month-day-count-badge {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 600;
    }

    .month-day-cards {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .month-day-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 11px 13px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      cursor: pointer;
      transition: all 0.15s ease;
      position: relative;
    }

    .month-day-card:hover {
      background: var(--bg-card);
      border-color: var(--accent);
      transform: translateY(-1px);
    }

    .month-day-card.selected {
      border-color: var(--info);
      box-shadow: var(--shadow);
      background: var(--bg-card);
    }

    .month-day-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
    }

    .month-day-card-icon-title {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      flex: 1;
      min-width: 0;
    }

    .month-day-card-icon {
      font-size: 15px;
      margin-top: 1px;
      flex-shrink: 0;
    }

    .month-day-card-title {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text-main);
      word-break: keep-all;
      line-height: 1.35;
    }

    .month-day-card-sub {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 2px;
      line-height: 1.3;
    }

    .month-day-card-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      padding-top: 4px;
      border-top: 1px solid var(--border);
    }

    .month-day-card-badges {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-wrap: wrap;
    }

    .month-day-card-action-btn {
      background: var(--info-bg);
      border: 1px solid var(--info-border);
      color: var(--accent);
      font-size: 11px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 4px;
      cursor: pointer;
      white-space: nowrap;
    }

    .month-day-card-action-btn:hover {
      background: var(--accent);
      color: var(--on-accent);
    }

    /* ==========================================================================
       2. Weekly View Grid
       ========================================================================== */
    .cal-week-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 4px;
      width: 100%;
      min-width: 0;
    }

    .cal-week-col {
      background: var(--bg-inset);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-width: 0;
    }
    .cal-week-col.is-today {
      border-color: var(--accent);
    }

    .cal-week-col-header {
      padding: 6px 4px;
      text-align: center;
      background: var(--bg-card);
      border-bottom: 1px solid var(--border);
      font-size: 11px;
      min-width: 0;
    }
    .cal-week-col-header .day-name {
      font-weight: 700;
      color: var(--text-muted);
      font-size: 11px;
    }
    .cal-week-col-header .day-name.sun { color: var(--weekend-sun); }
    .cal-week-col-header .day-name.sat { color: var(--weekend-sat); }
    .cal-week-col-header .day-date {
      font-size: 11px;
      font-weight: 700;
      margin-top: 2px;
      color: var(--text-main);
    }
    .cal-week-col-header.is-today .day-date {
      color: var(--accent);
    }

    .cal-week-col-content {
      flex: 1;
      padding: 4px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      overflow-y: var(--schedule-weekly-column-overflow-y, visible);
      max-height: var(--schedule-weekly-column-max-height, none);
      min-width: 0;
    }

    .cal-week-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 6px;
      cursor: pointer;
      transition: all 0.12s ease;
      font-size: 11px;
      min-width: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .cal-week-card:hover {
      background: var(--bg-card-hover);
      border-color: var(--text-muted);
    }
    .cal-week-card.selected {
      background: var(--bg-card-selected);
      border-color: var(--border-highlight);
      box-shadow: 0 0 0 1px var(--border-highlight);
    }
    .cal-week-card.assigned {
      border-left: 3px solid var(--indigo);
    }
    .cal-week-card.unassigned {
      border-left: 3px solid var(--warning);
    }
    .cal-week-card.released {
      border-left: 3px solid var(--success);
    }
    .cal-week-card.cancelled {
      border-left: 3px solid var(--danger);
    }

    .cal-week-card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 4px;
      min-width: 0;
    }
    .cal-week-card-customer {
      font-weight: 750;
      color: var(--text-main);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
      font-size: 11px;
    }
    .cal-week-card-model {
      color: var(--accent);
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
      font-size: 10px;
    }
    .cal-week-card-badges {
      display: flex;
      flex-direction: column;
      gap: 2px;
      margin-top: 2px;
      min-width: 0;
    }

    /* ==========================================================================
       3. Daily / Agenda View Cards
       ========================================================================== */
    .cal-day-container {
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 0;
    }
    .cal-day-summary {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 8px 12px;
      font-size: 12px;
      flex-wrap: wrap;
      gap: 6px;
      min-width: 0;
    }

    .card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 12px 14px;
      cursor: pointer;
      transition: all 0.12s ease;
      position: relative;
      min-width: 0;
      overflow: hidden;
    }
    .card:hover {
      background: var(--bg-card-hover);
      border-color: var(--text-muted);
    }
    .card.selected {
      background: var(--bg-card-selected);
      border-color: var(--border-highlight);
      box-shadow: 0 0 0 1px var(--border-highlight);
    }
    .card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 6px;
      gap: 8px;
      min-width: 0;
    }
    .req-contract {
      font-size: 11px;
      color: var(--text-subtle);
    }
    .req-customer {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-main);
      margin-top: 1px;
    }
    .req-meta {
      display: flex;
      gap: 14px;
      font-size: 11px;
      color: var(--text-muted);
      margin: 6px 0;
      flex-wrap: wrap;
    }
    .req-meta-item {
      display: flex;
      gap: 4px;
      align-items: center;
    }
    .req-remark {
      font-size: 11px;
      color: var(--text-subtle);
      background: var(--bg-inset);
      padding: 4px 8px;
      border-radius: var(--radius-sm);
      margin-top: 4px;
      line-height: 1.4;
    }

    .card-badges-row {
      display: flex;
      gap: 4px;
      align-items: center;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .mobile-assign-btn {
      display: none;
      margin-top: 8px;
      width: 100%;
      background: var(--accent);
      color: var(--on-accent);
      border: none;
      padding: 8px;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
    }

    /* ==========================================================================
       4. Continuous Chronological Scroll View (Google Calendar "일정" Agenda)
       ========================================================================== */
    .cal-agenda-container {
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
      padding: 4px 0 24px 0;
    }

    .cal-agenda-month-banner {
      background: var(--bg-panel);
      border: 1px solid var(--info-border);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 8px;
      margin-bottom: 2px;
      box-shadow: var(--shadow);
    }
    .month-banner-title {
      font-size: 13px;
      font-weight: 800;
      color: var(--accent);
      letter-spacing: -0.2px;
    }
    .month-banner-sub {
      font-size: 11px;
      color: var(--text-main);
      font-weight: 500;
    }

    .cal-agenda-day-group {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 6px 6px 12px 6px;
      border-bottom: 1px solid var(--border);
      transition: background 0.15s ease;
      border-radius: var(--radius-sm);
    }
    .cal-agenda-day-group.is-selected {
      background: var(--info-bg);
    }

    .cal-agenda-date-rail {
      width: 44px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding-top: 2px;
      user-select: none;
    }
    .rail-day-name {
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
    }
    .rail-day-name.sun { color: var(--weekend-sun); }
    .rail-day-name.sat { color: var(--weekend-sat); }

    .rail-day-badge {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 800;
      color: var(--text-main);
      margin: 2px 0;
      background: var(--bg-card-hover);
      border: 1px solid transparent;
    }
    .rail-day-badge.is-today {
      background: var(--accent);
      color: var(--on-accent);
      box-shadow: var(--shadow);
      border-color: var(--accent);
    }

    .rail-count-label {
      font-size: 10px;
      color: var(--text-subtle);
      font-weight: 600;
    }

    .cal-agenda-cards-rail {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .cal-agenda-card {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 9px 12px;
      border-radius: var(--radius-sm);
      background: var(--bg-card);
      border: 1px solid var(--border);
      cursor: pointer;
      transition: all 0.12s ease;
      min-width: 0;
    }
    .cal-agenda-card:hover {
      background: var(--bg-card-hover);
      border-color: var(--text-muted);
    }
    .cal-agenda-card.selected {
      background: var(--bg-card-selected) !important;
      border-color: var(--info) !important;
      box-shadow: var(--shadow);
    }
    .cal-agenda-card.unassigned {
      border-left: 3px solid var(--warning);
    }
    .cal-agenda-card.assigned {
      border-left: 3px solid var(--indigo);
      background: var(--indigo-bg);
    }
    .cal-agenda-card.released {
      border-left: 3px solid var(--success);
      background: var(--success-bg);
    }
    .cal-agenda-card.cancelled {
      border-left: 3px solid var(--danger);
      background: var(--danger-bg);
      opacity: 0.7;
    }

    .agenda-card-main {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      min-width: 0;
      flex: 1 1 auto;
    }

    .agenda-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      flex-shrink: 0;
      margin-top: 5px;
    }
    .agenda-dot.unassigned { background: var(--warning); }
    .agenda-dot.assigned { background: var(--indigo); }
    .agenda-dot.released { background: var(--success); }
    .agenda-dot.cancelled { background: var(--danger); }

    .agenda-card-text {
      display: flex;
      flex-direction: column;
      min-width: 0;
      flex: 1 1 auto;
      gap: 2px;
    }

    .agenda-title {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--text-main);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
      line-height: 1.3;
    }
    .cal-agenda-card.cancelled .agenda-title {
      text-decoration: line-through;
      color: var(--text-muted);
    }

    .agenda-remark {
      font-size: 11px;
      font-weight: 400;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
      line-height: 1.3;
    }

    .agenda-card-meta {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-shrink: 0;
    }

    .agenda-sidekick-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 3px 8px;
      font-size: 11px;
      font-weight: 700;
      background: var(--bg-card-hover);
      border: 1px solid var(--border);
      border-radius: 3px;
      color: var(--accent);
      cursor: pointer;
      transition: all 0.12s ease;
      white-space: nowrap;
    }
    .agenda-sidekick-btn:hover {
      background: var(--accent);
      color: var(--on-accent);
      border-color: var(--accent);
    }

    .schedule-memo {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 11.5px;
      line-height: 1.35;
      color: var(--text-main);
      white-space: pre-line;
      word-break: break-word;
      overflow-wrap: break-word;
      width: 100%;
      flex: 1 0 100%;
      box-sizing: border-box;
      background: var(--bg-inset);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm, 4px);
      padding: 3px 6px;
      margin-top: 4px;
    }

    .schedule-memo.schedule-memo-week {
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      -webkit-line-clamp: unset;
      line-clamp: unset;
      -webkit-box-orient: unset;
      flex: 0 0 auto;
      font-size: 10px;
      padding: 1px 4px;
      margin-top: 2px;
    }

    /* Daily selector is part of the view, below the three-row toolbar. */
    .cal-date-strip {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      flex-shrink: 0;
      gap: 6px;
      padding: 0;
      min-width: 0;
    }
    .cal-date-pill {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2px;
      min-width: 0;
      height: 64px;
      padding: 4px 0;
      background: var(--bg-card);
      color: var(--text-primary);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      cursor: pointer;
    }
    .cal-date-pill:hover { border-color: var(--accent); }
    .cal-date-pill.is-quiet { color: var(--text-muted); }
    .cal-date-pill.active {
      background: var(--info-bg);
      color: var(--accent);
      border-color: var(--accent);
      box-shadow: var(--shadow);
    }
    .pill-day, .pill-count { font-size: 10px; }
    .pill-date { font-size: 17px; font-weight: 700; }
    .cal-week-col.is-selected { border-color: var(--accent); background: var(--info-bg); }

    /* ==========================================================================
       Agenda View Floating Action Buttons (FAB) & Hide Past Row
       ========================================================================== */
    .cal-agenda-hide-past-row {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      padding: 0 4px 6px 4px;
      min-width: 0;
    }
    .cal-agenda-hide-past-label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 44px;
      padding: 0 8px;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
      user-select: none;
      box-sizing: border-box;
    }
    .cal-agenda-hide-past-label input[type="checkbox"] {
      cursor: pointer;
      width: 16px;
      height: 16px;
      accent-color: var(--accent);
      margin: 0;
    }
    .cal-agenda-hide-past-label:hover {
      color: var(--text-primary);
    }
    .cal-agenda-hide-past-label:focus-within {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
      border-radius: var(--radius-sm);
    }

    #panelCalendar {
      position: relative;
    }

    .cal-agenda-fab {
      position: absolute;
      right: 16px;
      bottom: 16px;
      z-index: 30;
      display: grid;
      grid-template-columns: repeat(2, 44px);
      grid-template-rows: repeat(2, 44px);
      gap: 6px;
      box-sizing: border-box;
      pointer-events: auto;
    }

    .cal-fab-btn {
      width: 44px;
      height: 44px;
      min-width: 44px;
      min-height: 44px;
      box-sizing: border-box;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 0;
      margin: 0;
      background: var(--bg-card);
      color: var(--text-primary);
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow);
      transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    }

    .cal-fab-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .cal-fab-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .cal-agenda-container {
      padding-bottom: 110px;
    }

    body.has-open-modal .cal-agenda-fab {
      display: none !important;
    }

    @media (max-width: 768px) {
      .cal-agenda-fab {
        position: fixed;
        right: calc(12px + env(safe-area-inset-right, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        z-index: 30;
      }
    }
