@layer page {
  /* ===== Hub layout ===== */
  .agenda-hub {
    padding-bottom: calc(var(--nav-bar-height) + 16px);
    display: flex;
    flex-direction: column;
  }

  /* ===== Schedule section ===== */
  .agenda-schedule-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 var(--content-padding);
  }

  /* ===== Schedule card ===== */
  .agenda-schedule {
    overflow: hidden;
  }

  .agenda-schedule-day {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .agenda-schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .agenda-schedule-date {
    font-size: var(--text-normal);
    font-weight: 600;
  }

  .agenda-schedule-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-caption);
    font-weight: 500;
    color: var(--color-muted);
    text-decoration: none;

    svg {
      width: 16px;
      height: 16px;
    }

    &:active {
      opacity: 0.7;
    }
  }

  .agenda-schedule-list {
    max-height: 280px;
    overflow-y: auto;
    background: var(--color-bg-white);
  }

  .agenda-schedule-item {
    display: flex;
    align-items: center;
    gap: var(--row-gap);
    padding: var(--row-padding) 0;
    text-decoration: none;
    color: var(--color-text);
    border-top: 1px solid var(--color-border);

    &:first-child {
      border-top: none;
    }

    &:active {
      background: var(--color-bg-tertiary);
    }
  }

  .agenda-schedule-item-time {
    font-size: var(--text-body);
    font-weight: 600;
    flex-shrink: 0;
    width: 48px;
  }

  .agenda-schedule-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-body);
  }

  .agenda-schedule-item-badge {
    flex-shrink: 0;
    font-size: var(--text-label);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: hsl(0 60% 94%);
    color: hsl(0 60% 40%);
  }

  /* Schedule item variants */
  .agenda-schedule-item--current {
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  }

  .agenda-schedule-item--done {
    color: var(--color-muted);

    .agenda-schedule-item-time {
      font-weight: 400;
    }
  }

  .agenda-schedule-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--color-muted);
    font-size: var(--text-small);
    background: var(--color-bg-white);
    border-radius: 12px;
  }

  .agenda-schedule-nav {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 8px 16px 12px;
  }

  .agenda-schedule-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg-white);
    color: var(--color-text);
    cursor: pointer;

    svg {
      width: 18px;
      height: 18px;
    }

    &:active {
      background: var(--color-bg-secondary);
    }
  }



  /* ===== Schedule Day Detail ===== */
  .schedule-day-detail {
    padding: 0;
  }

  .schedule-detail-item {
    display: flex;
    align-items: center;
    gap: var(--row-gap);
    padding: var(--row-padding) var(--content-padding);
    text-decoration: none;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);

    > svg {
      width: 18px;
      height: 18px;
      color: var(--color-muted);
      flex-shrink: 0;
    }

    &:active {
      background: var(--color-bg-secondary);
    }
  }

  .schedule-detail-item-time {
    font-size: var(--text-body);
    font-weight: 600;
    flex-shrink: 0;
    width: 48px;
  }

  .schedule-detail-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .schedule-detail-item-name {
    font-size: var(--text-body);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .schedule-detail-item-meta {
    font-size: var(--text-caption);
    color: var(--color-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ===== Month calendar (kept for wizard) ===== */
  .month-calendar {
    padding: 8px var(--content-padding) var(--content-padding);
  }

  .month-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 16px;
  }

  .month-calendar-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;

    svg {
      width: 18px;
      height: 18px;
      stroke: var(--color-muted);
      fill: none;
      stroke-width: 2;
    }
  }

  .month-calendar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
  }

  .month-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: var(--text-label);
    color: var(--color-muted);
    font-weight: 600;
    padding-bottom: 8px;
    text-transform: capitalize;
  }

  .month-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }

  .month-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    text-decoration: none;
    color: var(--color-text);
    position: relative;

    &.empty {
      pointer-events: none;
    }

    &.is-today {
      font-weight: 700;
      background: var(--color-primary);
      color: #fff;
    }

    &.has-dot::after {
      content: '';
      position: absolute;
      bottom: 4px;
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: var(--color-primary);
    }

    &.is-today.has-dot::after {
      background: #fff;
    }
  }

  .month-calendar-loading {
    height: 200px;
  }
}
