/* Keyline Days — UI polish layer (additive).
 * Loaded after style.css / ui-theme-layout.css. Only adds the missing details:
 * design tokens, keyboard focus rings, loading skeletons, refined feedback,
 * and a reduced-motion safety net. It intentionally avoids overriding the
 * existing theme colors and component layouts. */

:root {
  /* Radii */
  --kd-radius-sm: 12px;
  --kd-radius-md: 18px;
  --kd-radius-lg: 26px;
  --kd-radius-pill: 999px;

  /* Spacing scale */
  --kd-space-1: 4px;
  --kd-space-2: 8px;
  --kd-space-3: 12px;
  --kd-space-4: 16px;
  --kd-space-5: 24px;

  /* Elevation */
  --kd-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --kd-shadow-md: 0 12px 30px rgba(15, 23, 42, 0.10);
  --kd-shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);

  /* Motion — kept short and lively (120–220ms). */
  --kd-dur-fast: 120ms;
  --kd-dur-base: 160ms;
  --kd-dur-slow: 220ms;
  --kd-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Focus ring */
  --kd-focus-ring: rgba(90, 62, 43, 0.55);
  --kd-focus-ring-contrast: rgba(255, 255, 255, 0.9);

  /* Skeleton */
  --kd-skeleton-base: rgba(15, 23, 42, 0.06);
  --kd-skeleton-shine: rgba(15, 23, 42, 0.12);

  /* Mobile status-bar / safe-area background fallbacks. The authoritative,
   * theme-reactive value is --mobile-statusbar-bg, defined per theme in
   * style.css (html.theme-*). These :root values are only used before a theme
   * class exists; they match the default cream theme so there is no green
   * flash, and they never override the per-theme values (lower specificity). */
  --mobile-statusbar-bg: #fffaf2;
  --app-bg-solid: #fffaf2;
  --app-bg-mobile: linear-gradient(180deg, #fffaf2 0%, #f5e8d4 48%, #f0dfc9 100%);
}

html,
body {
  background-color: var(--mobile-statusbar-bg, var(--app-bg-solid));
}

/* Dark-ish / night themes: soften skeleton + focus for contrast. */
.theme-night,
.theme-dark,
.theme-mid {
  --kd-skeleton-base: rgba(255, 255, 255, 0.08);
  --kd-skeleton-shine: rgba(255, 255, 255, 0.16);
  --kd-focus-ring: rgba(186, 230, 253, 0.7);
  --kd-focus-ring-contrast: rgba(8, 12, 24, 0.85);
}

/* ---------------------------------------------------------------------------
 * Keyboard focus visibility — crisp, consistent, only for keyboard users.
 * ------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
.desktop-nav-item:focus-visible,
.tab-picker-item:focus-visible,
.settings-item:focus-visible,
.category-pill:focus-visible,
.schedule-mode-btn:focus-visible {
  outline: 2px solid var(--kd-focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--kd-focus-ring-contrast);
  border-radius: var(--kd-radius-sm);
}

/* Mouse/touch users keep the existing look (no stray outlines). */
:focus:not(:focus-visible) {
  outline: none;
}

/* Inputs get a subtle, snappy focus affordance. */
input:not([type="checkbox"]):not([type="radio"]):focus-visible,
textarea:focus-visible,
select:focus-visible {
  transition: box-shadow var(--kd-dur-base) var(--kd-ease),
    border-color var(--kd-dur-base) var(--kd-ease);
}

/* ---------------------------------------------------------------------------
 * Loading skeletons — shown while heavy tab modules load on demand.
 * ------------------------------------------------------------------------- */
.kd-skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--kd-space-4);
  padding: var(--kd-space-2) 0 var(--kd-space-5);
  contain: layout paint;
}

.kd-skeleton-block {
  position: relative;
  overflow: hidden;
  border-radius: var(--kd-radius-lg);
  background: var(--kd-skeleton-base);
}

.kd-skeleton-row {
  height: 40px;
  width: 62%;
  border-radius: var(--kd-radius-pill);
}

.kd-skeleton-card {
  height: 116px;
  width: 100%;
}

.kd-skeleton-card-sm {
  height: 76px;
  width: 84%;
}

.kd-skeleton-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--kd-skeleton-shine) 50%,
    transparent 100%
  );
  animation: kd-skeleton-shimmer 1.25s ease-in-out infinite;
}

@keyframes kd-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* ---------------------------------------------------------------------------
 * Refined loading / status text for module + sync states.
 * ------------------------------------------------------------------------- */
.travel-route-status,
.module-render-error {
  border-radius: var(--kd-radius-lg);
}

/* Smoother, lighter module retry button press. */
.module-retry-btn {
  transition: transform var(--kd-dur-fast) var(--kd-ease),
    box-shadow var(--kd-dur-base) var(--kd-ease);
}
.module-retry-btn:active {
  transform: scale(0.97);
}

/* ---------------------------------------------------------------------------
 * Performance: stop continuous decorative repaints.
 *
 * The themes animate full-screen ::before/::after layers (with mix-blend-mode)
 * and an infinite background-position "shine" on every card and primary button.
 * Animating background-position forces a repaint every frame across large areas
 * — the main cause of persistent desktop jank. We keep the static gradients /
 * sparkle look but stop the perpetual animation. Short entrance/press
 * animations are untouched.
 * ------------------------------------------------------------------------- */
.page-container::before,
.page-container::after {
  animation: none !important;
}

.dashboard-card,
.calendar-panel,
.settings-panel,
.today-action-row,
.festival-hero,
.primary-btn,
.theme-btn,
.view-btn.active,
.category-pill.active,
.category-pill-active,
.schedule-mode-active,
.save-btn,
.subitem-add-btn,
.backup-main-btn,
.restore-btn {
  animation: none !important;
}

/* Isolate large scrolling lists so internal changes don't trigger
 * page-wide layout work. `layout style` is safe (no clipping of shadows,
 * sticky headers, dropdowns or the drag ghost which lives on <body>). */
.list-container {
  contain: layout style;
}

/* ---------------------------------------------------------------------------
 * Mobile: one continuous app background from the status-bar safe area down.
 *
 * Bug fixed: opening Settings / the board switcher / any modal makes the
 * full-screen scrim sit under the translucent iOS status bar. Without a single
 * status-bar color source, Safari can keep sampling that temporary darker
 * surface even after the theme changes. The root now owns the mobile status-bar
 * color via --mobile-statusbar-bg, and JS refreshes the meta theme-color from
 * the active CSS theme after init/theme/modal/page-show events.
 *
 * Fix: keep the root element in normal flow during scroll lock (only <body> is
 * pinned, which is enough to lock scrolling), and keep overlays from tinting
 * the safe-area background. Desktop is untouched (mobile breakpoint only).
 * ------------------------------------------------------------------------- */
@media (max-width: 899px) {
  /* Real top safe-area background layer. It sits above every page/mask layer so
   * the iOS status-bar strip can never keep a stale cached color. It is
   * pointer-events:none, so it never blocks the ⚙️ / switch buttons under it.
   * JS (updateMobileStatusBarTheme) recolors and re-composites it on every
   * theme / modal / page-show change. */
  #mobileStatusBarBg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* Cover the iOS status bar / notch only. The header reserves
     * (env(safe-area-inset-top) + 22px) of top padding, so +12px here can never
     * overlap real content, while still fully covering the status-bar strip. In
     * normal Safari (inset 0) this is a 12px sliver that matches the page bg. */
    height: calc(env(safe-area-inset-top) + 12px);
    background-color: var(--mobile-statusbar-bg, #fffaf2);
    z-index: 2147483000;
    pointer-events: none;
    transform: translateZ(0);
    will-change: background-color, opacity;
  }

  /* Single source of truth for the page background. Top is ultimately owned by
   * #mobileStatusBarBg; html/body are only the fallback fill below it. */
  html {
    background-color: var(--mobile-statusbar-bg, #fffaf2) !important;
    min-height: 100%;
    min-height: 100dvh;
  }

  body {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--mobile-statusbar-bg, #fffaf2) !important;
    background-image: linear-gradient(
      180deg,
      var(--bg-start, #fffaf2) 0%,
      var(--bg-mid, #f5e8d4) 48%,
      var(--bg-end, #f0dfc9) 100%
    ) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-attachment: scroll !important;
  }

  #app,
  #app.page-container,
  .page-container,
  .main-view,
  .content,
  .tab-panel,
  .tab-panel.active,
  .list-container,
  .desktop-shell,
  .desktop-layout {
    background-color: transparent !important;
  }

  .safe-area-top,
  .statusbar-spacer,
  .mobile-safe-area,
  .mobile-header,
  .header {
    background-color: transparent !important;
  }

  /* Keep the root in flow while scroll is locked. Only <body> stays pinned. */
  html.modal-scroll-locked {
    position: static !important;
    overflow: hidden !important;
    height: auto !important;
    min-height: 100% !important;
    min-height: 100dvh !important;
  }

  body.modal-scroll-locked {
    background-color: var(--mobile-statusbar-bg, #fffaf2) !important;
    background-image: linear-gradient(
      180deg,
      var(--bg-start, #fffaf2) 0%,
      var(--bg-mid, #f5e8d4) 48%,
      var(--bg-end, #f0dfc9) 100%
    ) !important;
  }

  /* Masks / overlays stay strictly below the status-bar layer and never tint the
   * iOS safe-area. Panels keep their own opaque surfaces. */
  .mask,
  .detail-overlay,
  .cloud-menu-mask {
    z-index: 999 !important;
  }

  .mask:not(.hidden),
  .mask:not(.hidden):not(.is-closing),
  .detail-overlay:not(.hidden),
  .detail-overlay:not(.hidden):not(.is-closing),
  .cloud-menu-mask:not(.hidden),
  .cloud-menu-mask:not(.hidden):not(.is-closing) {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* ---------------------------------------------------------------------------
 * Settings panel: simple top-right close button (the old "设置 / 管理外观、同步
 * 和数据" hero capsule was removed). The list now starts right at the top with
 * only a compact close button floating to the right.
 * ------------------------------------------------------------------------- */
.settings-panel {
  position: relative;
}

.settings-close-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0 0 6px;
  min-height: 32px;
}

.settings-close-row .settings-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--modal-item-bg-solid, #f1f2f4) !important;
  color: var(--text-main, #111) !important;
  font-size: 22px;
  line-height: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------------------------------------------------------------------
 * Reduced-motion safety net for anything introduced by this layer.
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .kd-skeleton-block::after {
    animation: none;
  }
  .module-retry-btn {
    transition: none;
  }
}

/* ===========================================================================
 * ===== Design System v3 =====
 * A premium, unified visual layer for Keyline Days. Additive only: it builds
 * on the existing per-theme variables (--card-bg / --primary / --text-main /
 * --text-sub / --card-border / --primary-gradient / --primary-shadow) and is
 * loaded last so it wins ties. No JS, data, or layout structure is changed.
 *
 * Design intent: clean opaque "paper" cards (Things 3 / Notion), subtle glass
 * only on shell surfaces (sidebar / header / modals), calmer elevation, tighter
 * type, and consistent motion. Reference: Apple Reminders/Calendar structure,
 * Arc / Notion Calendar whitespace, Linear state detail.
 * ======================================================================== */

/* ===== Design System v3 — tokens ===== */
:root {
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 18px;
  --space-xl: 28px;

  --transition-fast: 140ms cubic-bezier(0.2, 0.7, 0.3, 1);
  --transition-smooth: 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Theme-aware surfaces / text / borders / shadows. Derived from each theme's
 * own --primary so every theme gets a subtle matching tint automatically
 * (warm paper for cream, cool silver for diamond, soft peach for sunset, etc).
 * Opaque by design — no content bleeds through. */
.page-container {
  --surface: color-mix(in srgb, #ffffff 93%, var(--primary, #6e4d33) 7%);
  --surface-elevated: color-mix(in srgb, #ffffff 97%, var(--primary, #6e4d33) 3%);
  --surface-glass: color-mix(in srgb, #ffffff 72%, transparent);

  --text-primary: var(--text-main, #211a16);
  --text-secondary: var(--text-sub, #8d7664);
  --text-tertiary: color-mix(in srgb, var(--text-sub, #8d7664) 62%, transparent);

  --border-soft: var(--card-border, rgba(20, 24, 35, 0.07));
  --shadow-tint: rgba(22, 26, 38, 0.18);

  --shadow-soft: 0 4px 16px -6px color-mix(in srgb, var(--shadow-tint) 58%, transparent);
  --shadow-card: 0 16px 38px -16px color-mix(in srgb, var(--shadow-tint) 92%, transparent),
    0 2px 8px -3px rgba(22, 26, 38, 0.06);
}

/* Single theme material mapping. */
.page-container.theme-cream {
  --surface: #fffaf1;
  --surface-elevated: #fffdf8;
  --surface-glass: rgba(255, 250, 241, 0.74);
  --border-soft: rgba(121, 83, 50, 0.11);
  --shadow-tint: rgba(104, 73, 43, 0.18);
}

/* ===== Design System v3 — typography ===== */
body,
.page-container,
.add-page,
.mask,
.detail-overlay {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.header-title {
  letter-spacing: -0.022em !important;
  font-weight: 850 !important;
}
.header-subtitle {
  letter-spacing: -0.004em;
  font-weight: 560;
}
.count-title,
.checklist-title,
.festival-title,
.subscription-title,
.grade-course-title,
.dashboard-date,
.settings-text b,
.tab-picker-text b {
  letter-spacing: -0.012em;
}
.count-number,
.count-number-box strong,
.dashboard-date,
.year-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

@media (max-width: 899px) {
  .header-title {
    font-size: 30px !important;
    line-height: 1.12 !important;
  }
}
@media (min-width: 1100px) {
  .header-title {
    font-size: 40px !important;
  }
}

/* ===== Design System v3 — cards ===== */
.dashboard-card,
.count-card,
.checklist-card,
.festival-card,
.calendar-panel,
.timeline-card,
.subscription-card,
.subscription-summary-card,
.subscription-next-card,
.grade-course-card,
.course-tool-card,
.translation-library-card,
.translation-practice-card,
.goal-tree-card,
.goal-mobile-card,
.goal-mobile-panel {
  background: var(--surface) !important;
  background-image: none !important;
  border: 1px solid var(--border-soft) !important;
  box-shadow: var(--shadow-card) !important;
  border-radius: var(--radius-lg) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-smooth),
    border-color var(--transition-smooth) !important;
}

/* Subtle press feedback (no jumpy scale). */
.count-card:active,
.checklist-card:active,
.festival-card:active,
.subscription-card:active,
.grade-course-card:active,
.course-tool-card:active {
  transform: scale(0.992) !important;
}

/* Hover lift only on real pointer + desktop. */
@media (hover: hover) and (min-width: 900px) {
  .count-card:hover,
  .checklist-card:hover,
  .festival-card:hover,
  .subscription-card:hover,
  .grade-course-card:hover,
  .course-tool-card:hover,
  .dashboard-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 24px 54px -20px rgba(22, 26, 38, 0.26),
      0 3px 10px -3px rgba(22, 26, 38, 0.08) !important;
    border-color: color-mix(in srgb, var(--primary) 26%, var(--border-soft)) !important;
  }
}

/* Countdown card: stable right-aligned number column. */
.count-number-box {
  text-align: right !important;
}

/* ===== Design System v3 — shell: header / today / primary / pills ===== */
.page-container {
  color: var(--text-primary) !important;
}
.main-view {
  color: var(--text-primary) !important;
}
.today-action-row {
  background: var(--surface-glass) !important;
  border: 1px solid var(--border-soft) !important;
  box-shadow: var(--shadow-soft) !important;
  border-radius: var(--radius-lg) !important;
}
.dashboard-card {
  background: var(--surface-elevated) !important;
}
.dashboard-label,
.count-date,
.count-note,
.count-unit,
.checklist-sub,
.festival-date,
.festival-tag,
.subscription-meta,
.settings-text span,
.tab-picker-text span,
.form-label {
  color: var(--text-secondary) !important;
}
.primary-btn,
.add-btn,
.quick-add-btn {
  border-radius: var(--radius-md) !important;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-smooth), filter var(--transition-fast) !important;
}
.primary-btn:active,
.add-btn:active,
.quick-add-btn:active {
  transform: scale(0.98) !important;
}
@media (hover: hover) and (min-width: 900px) {
  .primary-btn:hover,
  .add-btn:hover,
  .quick-add-btn:hover {
    filter: brightness(1.04) !important;
    box-shadow: 0 18px 40px -12px var(--primary-shadow, rgba(0, 0, 0, 0.28)) !important;
  }
}

.category-pill {
  border-radius: 999px !important;
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), box-shadow var(--transition-fast),
    transform var(--transition-fast) !important;
}
.category-pill:active {
  transform: scale(0.97) !important;
}
.category-pill-active {
  box-shadow: 0 8px 20px -8px var(--primary-shadow, rgba(0, 0, 0, 0.25)) !important;
}

.add-page,
.form-card {
  background: var(--surface-elevated) !important;
  border: 1px solid var(--border-soft) !important;
  box-shadow: var(--shadow-card) !important;
  border-radius: var(--radius-xl) !important;
}
.form-row {
  gap: var(--space-sm) !important;
}
.row-input,
.row-select,
.restore-textarea,
.subitem-input {
  min-height: 44px !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface) !important;
  border: 1px solid var(--border-soft) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}
.row-input::placeholder,
.restore-textarea::placeholder,
.subitem-input::placeholder {
  color: var(--text-tertiary) !important;
}

/* ===== Design System v3 — desktop dashboard ===== */
@media (min-width: 900px) {
  .desktop-sidebar {
    background: var(--surface-glass) !important;
    border: 1px solid var(--border-soft) !important;
    box-shadow: var(--shadow-soft) !important;
  }
  .desktop-nav-item {
    background: color-mix(in srgb, var(--surface) 70%, transparent) !important;
    border: 1px solid var(--border-soft) !important;
    transition: transform var(--transition-fast),
      background var(--transition-fast), color var(--transition-fast),
      box-shadow var(--transition-smooth) !important;
  }
  .desktop-nav-item.desktop-nav-active,
  .desktop-nav-active {
    background: var(--primary-gradient, var(--primary)) !important;
    color: var(--primary-text, #fff) !important;
    border-color: transparent !important;
    box-shadow: 0 14px 30px -12px var(--primary-shadow, rgba(0, 0, 0, 0.28)) !important;
  }
  .header-top {
    background: var(--surface-glass) !important;
    border: 1px solid var(--border-soft) !important;
    box-shadow: var(--shadow-soft) !important;
  }
}

/* Two-column card grid on wide screens for the uniform card lists. Falls back
 * to one column gracefully; only targets pure card lists to avoid breaking the
 * table-based / map-based modules. */
@media (min-width: 1100px) {
  #countdownPanel #countdownList,
  #festivalPanel #festivalList {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)) !important;
    gap: 14px !important;
    align-items: start !important;
  }
  #countdownPanel #countdownList > *,
  #festivalPanel #festivalList > * {
    margin-bottom: 0 !important;
  }
}

/* ===== Design System v3 — modals / sheets ===== */
.tab-picker-panel,
.backup-panel,
.emoji-panel,
.settings-panel,
.board-manager-panel,
.calendar-detail-panel,
.cloud-menu-panel {
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--border-soft) !important;
  box-shadow: 0 32px 80px -32px rgba(10, 14, 25, 0.45),
    0 10px 28px -16px rgba(10, 14, 25, 0.22) !important;
}

/* iOS-style drag handle on mobile sheets. */
@media (max-width: 899px) {
  .mask:not(.hidden) {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom)) !important;
  }
  .tab-picker-panel,
  .backup-panel,
  .emoji-panel,
  .settings-panel,
  .board-manager-panel,
  .calendar-detail-panel {
    width: min(100%, 520px) !important;
    max-height: min(82dvh, 720px) !important;
    border-radius: 28px 28px 24px 24px !important;
  }
  .tab-picker-panel::before,
  .backup-panel::before,
  .emoji-panel::before,
  .settings-panel::before,
  .board-manager-panel::before,
  .calendar-detail-panel::before {
    content: "";
    display: block;
    width: 38px;
    height: 5px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-sub, #8d7664) 38%, transparent);
    flex: 0 0 auto;
  }
  /* The settings close button floats; keep it clear of the handle. */
  .settings-panel .settings-close-row {
    margin-top: -6px;
  }

  /* Re-introduce a gentle backdrop dim on mobile. The solid #mobileStatusBarBg
   * layer (z 2147483000) covers the safe area, so dimming no longer risks a
   * stale status-bar tint. */
  .mask:not(.hidden),
  .mask:not(.hidden):not(.is-closing) {
    background: color-mix(in srgb, var(--text-main, #1a1a1a) 24%, transparent) !important;
  }
}

/* ===== Design System v3 — motion ===== */
@media (prefers-reduced-motion: no-preference) {
  .mask:not(.hidden):not(.is-closing) {
    animation: kdMaskIn 220ms ease both;
  }
}
@keyframes kdMaskIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== Design System v3 — accessibility ===== */
:where(button, a, [role="button"], input, select, textarea):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary, #6e4d33) 72%, transparent);
  outline-offset: 2px;
}
/* Comfortable hit targets for primary controls and small round buttons. */
.settings-btn,
.primary-btn,
.add-btn,
.quick-add-btn,
.switch-tab-btn,
.category-pill,
.desktop-nav-item,
.settings-close,
.backup-close,
.calendar-nav-btn,
.calendar-jump-close {
  min-width: 44px;
  min-height: 44px;
}

/* ===========================================================================
 * ===== Dashboard v4 — cream + terracotta reference redesign =====
 * Adds an aggregated Overview ("概览") dashboard, a warm desktop window shell,
 * grouped sidebar, greeting header, and a mobile home + bottom nav. Additive:
 * built on existing theme vars (--primary / --primary-gradient / --text-main /
 * --text-sub / --card-bg / --tag-bg) plus the v3 tokens (--surface / --shadow*).
 * ======================================================================== */

/* ----- palette tokens ----- */
:root {
  --app-bg: #f7f2ea;
  --app-bg-soft: #fbf8f3;
  --surface-solid: #fffaf3;
  --primary-soft: #f1d2c5;
  --primary-dark: #a9553f;
  --border-medium: rgba(86, 63, 45, 0.16);
  --shadow-floating: 0 24px 80px rgba(76, 48, 28, 0.16);
  --radius-2xl: 34px;
  --ease-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Cream theme retuned to warm paper + soft terracotta to match the reference.
 * Overrides the legacy per-theme vars so every existing component follows. */
.page-container.theme-cream {
  --main-bg: radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.85), transparent 38%),
    radial-gradient(circle at 92% 8%, rgba(221, 154, 118, 0.16), transparent 32%),
    linear-gradient(135deg, #f4eee5 0%, #fbf7f0 52%, #f1e7dc 100%);
  --card-bg: rgba(255, 252, 247, 0.92);
  --text-main: #241b16;
  --text-sub: #6f6258;
  --primary: #c96f55;
  --primary-text: #fff;
  --primary-gradient: linear-gradient(135deg, #d8896f 0%, #b95d43 100%);
  --primary-shadow: rgba(185, 93, 67, 0.28);
  --tag-bg: rgba(201, 111, 85, 0.10);
  --card-border: rgba(86, 63, 45, 0.09);
  --theme-accent-soft: rgba(201, 111, 85, 0.26);
  /* Warm-white "cream glass" surfaces: slightly translucent so the warm
   * background reads through, without per-card blur (kept cheap on mobile). */
  --surface: rgba(255, 252, 247, 0.9);
  --surface-elevated: rgba(255, 255, 255, 0.82);
  --surface-glass: rgba(255, 252, 247, 0.72);
  --border-soft: rgba(86, 63, 45, 0.09);
  --text-tertiary: #a99b91;
  /* Lighter, more diffused warm shadows. */
  --shadow-soft: 0 8px 24px rgba(76, 48, 28, 0.05);
  --shadow-card: 0 14px 40px rgba(76, 48, 28, 0.07);
}

/* ----- shared icon button ----- */
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary, var(--text-sub));
  font-size: 17px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    border-color var(--transition-fast);
}
.icon-btn:hover {
  background: var(--tag-bg);
  border-color: var(--border-medium);
}
.icon-btn:active {
  transform: scale(0.95);
}

/* Overview dashboard uses its own hero on desktop; the global header is hidden
 * there only at desktop widths. Mobile keeps the standard header/tab picker. */
.ov-mobile-top {
  display: none;
}

/* ----- desktop window shell + grouped sidebar ----- */
@media (min-width: 1024px) {
  #app[data-current-tab="overview"] .header {
    display: none;
  }
  body {
    background:
      radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.9), transparent 36%),
      radial-gradient(circle at 90% 10%, rgba(221, 154, 118, 0.16), transparent 30%),
      linear-gradient(135deg, #f4eee5 0%, #fbf7f0 52%, #f1e7dc 100%);
  }
  /* Turn the centered main-view into a single rounded "desktop app window". */
  .main-view {
    width: min(1480px, calc(100vw - 48px)) !important;
    margin: 18px auto !important;
    padding: 0 !important;
    column-gap: 0 !important;
    grid-template-columns: 264px minmax(0, 1fr) !important;
    background: var(--surface-glass) !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: 30px !important;
    box-shadow: var(--shadow-floating) !important;
    overflow: hidden !important;
    /* Window height + the 18px top/bottom margins == viewport, so the gap is
     * identical top and bottom (no top-blank / bottom-flush imbalance). The
     * older 900px shell forces height:100vh, so we override it here. */
    height: calc(100vh - 36px) !important;
    min-height: 0 !important;
    -webkit-backdrop-filter: blur(22px) !important;
    backdrop-filter: blur(22px) !important;
  }
  /* Sidebar sits flush inside the window with a soft right divider. */
  .desktop-sidebar {
    position: sticky !important;
    top: 0 !important;
    align-self: stretch !important;
    /* Fill the window height and scroll internally so the footer / last nav
     * items are never clipped. (Overrides the 900px shell's fixed height +
     * overflow:hidden.) */
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: 0 !important;
    border-right: 1px solid var(--border-soft) !important;
    background: linear-gradient(180deg, rgba(255, 250, 243, 0.6), rgba(248, 240, 231, 0.5)) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 22px 16px !important;
    gap: 6px !important;
  }
  .desktop-brand {
    padding: 4px 8px 14px !important;
  }
  .desktop-nav {
    gap: 3px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding-right: 2px !important;
  }
  .desktop-nav::-webkit-scrollbar {
    width: 0 !important;
  }
  .desktop-nav-item {
    min-height: 44px !important;
    border-radius: 14px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--text-secondary, var(--text-sub)) !important;
    box-shadow: none !important;
    padding: 0 12px !important;
  }
  .desktop-nav-item span {
    background: transparent !important;
    font-size: 17px !important;
  }
  .desktop-nav-item b {
    font-weight: 700 !important;
    font-size: 14px !important;
  }
  .desktop-nav-item:hover {
    background: rgba(201, 111, 85, 0.07) !important;
    transform: none !important;
    box-shadow: none !important;
  }
  .desktop-nav-item.desktop-nav-active,
  .desktop-nav-active {
    background: rgba(201, 111, 85, 0.12) !important;
    color: var(--primary-dark, var(--primary)) !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }
  .desktop-nav-item.desktop-nav-active b {
    font-weight: 800 !important;
  }
  .desktop-nav-active span {
    background: transparent !important;
  }
  /* Sidebar group labels (injected by JS as .desktop-nav-section). */
  .desktop-nav-section {
    padding: 14px 12px 4px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    color: var(--text-tertiary, #a99b91) !important;
    text-transform: none !important;
    pointer-events: none !important;
  }
  .desktop-nav-section:first-child {
    padding-top: 2px !important;
  }
  /* Sidebar footer cards (injected by JS). */
  .desktop-sidebar-foot {
    margin-top: auto !important;
    padding-top: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
  }
  .desktop-today-mini {
    padding: 12px 14px !important;
    border-radius: 16px !important;
    background: var(--surface-elevated) !important;
    border: 1px solid var(--border-soft) !important;
  }
  .desktop-today-mini b {
    display: block !important;
    font-size: 12px !important;
    color: var(--text-secondary, var(--text-sub)) !important;
    font-weight: 800 !important;
  }
  .desktop-today-mini .dtm-bar {
    height: 6px !important;
    border-radius: 999px !important;
    background: var(--tag-bg) !important;
    margin-top: 8px !important;
    overflow: hidden !important;
  }
  .desktop-today-mini .dtm-bar i {
    display: block !important;
    height: 100% !important;
    border-radius: 999px !important;
    background: var(--primary-gradient) !important;
  }
  .desktop-settings-entry {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    background: transparent !important;
    border: 1px solid var(--border-soft) !important;
    color: var(--text-secondary, var(--text-sub)) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    text-align: left !important;
  }
  .desktop-settings-entry:hover {
    background: rgba(201, 111, 85, 0.07) !important;
  }
  /* Header + content padding inside the window. */
  .header {
    padding: 32px 40px 0 !important;
  }
  .content {
    padding: 0 40px 40px !important;
  }
  #app[data-current-tab="overview"] .content {
    padding-top: 30px !important;
  }
}

/* ----- Overview dashboard (all viewports) ----- */
.overview {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg, 20px);
}
.ov-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ov-greeting {
  margin: 0;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary, var(--text-main));
}
.ov-greeting-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-secondary, var(--text-sub));
}
.ov-hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Today overview big card */
.ov-today-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(180px, 1fr) auto auto;
  align-items: stretch;
  gap: 22px;
  padding: 22px 24px;
  border-radius: var(--radius-xl, 26px);
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}
.ov-today-card .ovt-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.ovt-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-tertiary, #a99b91);
}
.ovt-date {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--text-primary, var(--text-main));
}
.ovt-sub {
  font-size: 12.5px;
  color: var(--text-secondary, var(--text-sub));
}
.ovt-divider {
  width: 1px;
  background: var(--border-soft);
  align-self: stretch;
}
.ovt-year-num {
  font-size: 26px;
  font-weight: 850;
  color: var(--text-primary, var(--text-main));
  font-variant-numeric: tabular-nums;
}
.ovt-year-num small {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary, #a99b91);
}
.ovt-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--tag-bg);
  overflow: hidden;
  margin-top: 6px;
}
.ovt-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary-gradient);
}
.ovt-pct {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary, var(--text-sub));
}

/* Stat mini cards */
.ov-stat-grid {
  display: flex;
  gap: 10px;
}
.ov-stat {
  min-width: 86px;
  padding: 12px 14px;
  border-radius: var(--radius-md, 16px);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}
.ov-stat .ovs-ico {
  font-size: 15px;
}
.ov-stat .ovs-num {
  font-size: 20px;
  font-weight: 850;
  color: var(--text-primary, var(--text-main));
  font-variant-numeric: tabular-nums;
}
.ov-stat .ovs-label {
  font-size: 11.5px;
  color: var(--text-secondary, var(--text-sub));
}
.ov-today-action {
  display: flex;
  align-items: center;
}
.ov-add-btn {
  height: 100%;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-md, 16px);
  background: var(--primary-gradient);
  color: var(--primary-text, #fff);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  border: 0;
  box-shadow: 0 14px 30px -10px var(--primary-shadow, rgba(0, 0, 0, 0.25));
  transition: transform var(--transition-fast), filter var(--transition-fast);
  white-space: nowrap;
}
.ov-add-btn:hover {
  filter: brightness(1.04);
}
.ov-add-btn:active {
  transform: scale(0.98);
}

/* Section header */
.ov-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ov-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary, var(--text-main));
}
.ov-section-more {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  background: none;
  border: 0;
  cursor: pointer;
}

/* Important events grid */
.ov-event-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.ov-event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 168px;
  padding: 16px;
  border-radius: var(--radius-lg, 20px);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-smooth),
    border-color var(--transition-smooth);
}
.ov-event-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--text-secondary, var(--text-sub));
}
.ov-event-title {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary, var(--text-main));
  line-height: 1.3;
}
.ov-event-date {
  font-size: 12px;
  color: var(--text-secondary, var(--text-sub));
}
.ov-event-num {
  margin-top: auto;
  font-size: 30px;
  font-weight: 850;
  color: var(--primary-dark, var(--primary));
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ov-event-num small {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary, #a99b91);
  margin-left: 3px;
}
.ov-event-foot {
  font-size: 11.5px;
  color: var(--text-tertiary, #a99b91);
}
.ov-event-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), var(--tag-bg));
}
.ov-event-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--tag-bg);
  overflow: hidden;
}
.ov-event-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary-gradient);
}
@media (hover: hover) and (min-width: 1024px) {
  .ov-event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: var(--theme-accent-soft, var(--border-medium));
  }
}
.ov-event-card:active {
  transform: scale(0.99);
}

/* Lower 3-column dashboard */
.ov-lower {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.95fr;
  gap: 18px;
  align-items: start;
}
.overview-dashboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.overview-hero-panel {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 252, 247, 0.94), rgba(248, 231, 214, 0.66)),
    var(--surface-elevated);
  border: 1px solid rgba(120, 80, 50, 0.1);
  box-shadow: 0 18px 45px rgba(80, 55, 30, 0.06);
  overflow: hidden;
}
.overview-hero-copy,
.overview-hero-status {
  position: relative;
  min-width: 0;
}
.overview-hero-kicker,
.overview-card-kicker,
.overview-hero-status span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-tertiary, #a99b91);
}
.overview-hero-copy h2 {
  margin: 5px 0 6px;
  font-size: 27px;
  line-height: 1.15;
  font-weight: 850;
  color: var(--text-primary, var(--text-main));
}
.overview-hero-copy p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary, var(--text-sub));
}
.overview-hero-status {
  width: min(34%, 320px);
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(120, 80, 50, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.overview-hero-status strong {
  font-size: 16px;
  line-height: 1.25;
  color: var(--text-primary, var(--text-main));
}
.overview-hero-status em {
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark, var(--primary));
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 18px;
  align-items: start;
}
.overview-main-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.overview-card {
  box-sizing: border-box;
  min-width: 0;
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.86);
  border: 1px solid rgba(120, 80, 50, 0.1);
  box-shadow: 0 18px 45px rgba(80, 55, 30, 0.06);
  padding: 20px;
}
.overview-action-card {
  appearance: none;
  font: inherit;
  min-height: 168px;
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
@media (hover: hover) and (min-width: 1024px) {
  .overview-action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(120, 80, 50, 0.18);
    box-shadow: 0 20px 48px rgba(80, 55, 30, 0.08);
  }
}
.overview-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.overview-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tag-bg);
  color: var(--text-primary, var(--text-main));
  font-size: 20px;
}
.overview-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.overview-card-body strong {
  font-size: 20px;
  line-height: 1.22;
  font-weight: 850;
  color: var(--text-primary, var(--text-main));
  overflow-wrap: anywhere;
}
.overview-card-body span,
.overview-card-body small {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-secondary, var(--text-sub));
}
.overview-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.overview-card-foot b {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--primary-dark, var(--primary));
  font-size: 13px;
  font-weight: 850;
}
.overview-card-empty {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-tertiary, #a99b91);
  font-size: 13px;
  line-height: 1.45;
}
.overview-card-empty i {
  font-style: normal;
  font-size: 24px;
  opacity: 0.72;
}
.overview-checklist-card {
  grid-column: 1 / -1;
}
.overview-checklist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.overview-checklist-card .ov-task {
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
  padding: 10px 10px;
}
.overview-checklist-card .ov-task-check {
  border-radius: 50%;
}
.overview-calendar-wrap {
  min-width: 0;
}
.overview-calendar-card {
  padding: 20px;
}
.overview-calendar-card .ov-mini-grid {
  gap: 6px;
}
.overview-calendar-card .ov-mini-day {
  min-width: 36px;
  min-height: 36px;
  border-radius: 12px;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.overview-calendar-card .ov-mini-day:not(.is-today):hover {
  background: var(--tag-bg);
  color: var(--text-primary, var(--text-main));
}
.overview-calendar-card .ov-mini-day:active {
  transform: scale(0.96);
}
.ov-simple-checklist {
  min-width: 0;
}
.ov-simple-checklist .ov-task {
  cursor: pointer;
}
.ov-simple-checklist .ov-task-check {
  border: 1.5px solid var(--border-medium);
  color: transparent;
}
.ov-simple-checklist .ov-task-check:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
}
.ov-panel {
  padding: 18px;
  border-radius: var(--radius-lg, 20px);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}
.ov-panel-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-primary, var(--text-main));
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* tasks */
.ov-task-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ov-task-filter {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--text-secondary, var(--text-sub));
  border: 0;
  cursor: pointer;
}
.ov-task-filter.is-active {
  background: var(--primary-gradient);
  color: var(--primary-text, #fff);
}
.ov-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.ov-task:last-child {
  border-bottom: 0;
}
.ov-task-check {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  border: 1.5px solid var(--border-medium);
  background: var(--surface-elevated);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
}
.ov-task.is-done .ov-task-check {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
}
.ov-task-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary, var(--text-main));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-task.is-done .ov-task-name {
  color: var(--text-tertiary, #a99b91);
  text-decoration: line-through;
}
.ov-task-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--text-secondary, var(--text-sub));
  flex-shrink: 0;
}
.ov-task-add {
  margin-top: 10px;
  width: 100%;
  padding: 9px;
  border-radius: var(--radius-md, 14px);
  border: 1px dashed var(--border-medium);
  background: transparent;
  color: var(--text-secondary, var(--text-sub));
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.ov-empty {
  font-size: 12.5px;
  color: var(--text-tertiary, #a99b91);
  padding: 10px 2px;
}
/* mini calendar */
.ov-mini-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ov-mini-cal-month {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary, var(--text-sub));
}
.ov-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.ov-mini-week {
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  color: var(--text-tertiary, #a99b91);
  padding-bottom: 4px;
}
.ov-mini-day {
  border: 0;
  background: transparent;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, var(--text-sub));
  border-radius: 9px;
  cursor: pointer;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
}
.ov-mini-day.is-other {
  color: var(--text-tertiary, #a99b91);
  opacity: 0.5;
}
.ov-mini-day.is-today {
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 800;
}
.ov-mini-day .ov-mini-dot {
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}
.ov-mini-day.is-today .ov-mini-dot {
  background: #fff;
}
/* month stats + focus */
.ov-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ov-ring-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ov-ring {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--primary) calc(var(--ring) * 1%), var(--tag-bg) 0);
}
.ov-ring span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 850;
  color: var(--text-primary, var(--text-main));
}
.ov-stat-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ov-stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-secondary, var(--text-sub));
}
.ov-stat-line b {
  font-weight: 800;
  color: var(--text-primary, var(--text-main));
}
.ov-focus {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(201, 111, 85, 0.12), rgba(216, 137, 111, 0.06));
}
.ov-focus h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary, var(--text-main));
}
.ov-focus p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-secondary, var(--text-sub));
  max-width: 80%;
}
.ov-focus .ov-focus-emoji {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 38px;
  opacity: 0.85;
}

/* ----- mobile bottom nav ----- */
.mobile-bottom-nav {
  display: none;
}
.mobile-bottom-nav .mbn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text-tertiary, #a99b91);
  font-size: 10px;
  font-weight: 700;
  padding: 0;
}
.mobile-bottom-nav .mbn-item .mbn-ico {
  font-size: 19px;
}
.mobile-bottom-nav .mbn-item.is-active {
  color: var(--primary-dark, var(--primary));
}
.mobile-bottom-nav .mbn-fab {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px -8px var(--primary-shadow, rgba(0, 0, 0, 0.3));
  border: 3px solid var(--surface-solid, #fffaf3);
}

/* ----- responsive: medium desktop / tablet (<1200px) -----
 * Big screens keep the horizontal reference layout; medium widths wrap the
 * stat cards and add button onto their own rows so nothing is cramped. */
@media (max-width: 1199px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .overview-calendar-wrap {
    max-width: none;
  }
  .ov-event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ov-lower {
    grid-template-columns: 1fr 1fr;
  }
  .ov-side {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .ov-side > * {
    flex: 1;
  }
  .ov-today-card {
    grid-template-columns: 1fr 1fr;
  }
  .ovt-divider {
    display: none;
  }
  .ov-stat-grid {
    grid-column: 1 / -1;
  }
  .ov-today-action {
    grid-column: 1 / -1;
  }
  .ov-add-btn {
    width: 100%;
  }
}

/* ----- responsive: mobile — revert to pre-dashboard-chrome layout ----- */
@media (max-width: 767px) {
  .tab-picker-item[data-tab="calendar"] {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: none !important;
  }
  .ov-mobile-top,
  .ov-hero-actions {
    display: none !important;
  }
  /* Use the standard app header on overview (no duplicate mobile brand bar). */
  #app[data-current-tab="overview"] .header {
    display: block;
  }
  #app[data-current-tab="overview"] .main-view {
    padding-top: 0 !important;
  }
  #app[data-current-tab="overview"] .content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .ov-hero {
    display: none;
  }
  .overview-dashboard {
    gap: 14px;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .overview-hero-panel {
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
  }
  .overview-hero-copy h2 {
    font-size: 22px;
  }
  .overview-hero-copy p {
    font-size: 13px;
  }
  .overview-hero-status {
    width: 100%;
    padding: 13px;
    border-radius: 18px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .overview-main-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .overview-card {
    border-radius: 20px;
    padding: 16px;
  }
  .overview-action-card {
    min-height: 142px;
    gap: 13px;
  }
  .overview-card-body strong {
    font-size: 18px;
  }
  .overview-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    font-size: 18px;
  }
  .overview-calendar-card .ov-mini-day {
    min-width: 34px;
    min-height: 34px;
  }
  .ov-lower {
    display: grid;
  }
  .ov-today-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-lg, 18px);
  }
  .ovt-divider {
    display: none;
  }
  .ov-stat-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .ov-stat {
    min-width: 0;
  }
  .ov-today-action .ov-add-btn,
  .ov-add-btn {
    width: 100%;
  }
  .ov-event-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .ov-event-card {
    flex-direction: row;
    align-items: center;
    min-height: 76px;
    padding: 12px 14px;
    gap: 12px;
  }
  .ov-event-card .ov-event-badge {
    position: static;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  .ov-event-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .ov-event-num {
    margin-top: 0;
    font-size: 22px;
    text-align: right;
    flex-shrink: 0;
  }
  .ov-event-pill {
    display: none;
  }
  .ov-event-foot,
  .ov-event-progress {
    display: none;
  }
  /* No press-scale / hover lift on touch (override the v3 !important scales). */
  .count-card:active,
  .checklist-card:active,
  .festival-card:active,
  .subscription-card:active,
  .grade-course-card:active,
  .course-tool-card:active,
  .dashboard-card:active,
  .ov-event-card:active,
  .primary-btn:active,
  .category-pill:active {
    transform: none !important;
  }
}

/* ----- reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  .ov-event-card,
  .icon-btn,
  .ov-add-btn,
  .desktop-nav-item {
    transition: none !important;
  }
}

/* ========================================================================
 * Keyline Days 2.3.14 — single Morning Mist Coral theme
 * Replaces the old selectable themes with a warm glass dashboard inspired by
 * the provided reference: pearly mist, coral accents, soft dune-like light,
 * and translucent white panels.
 * ======================================================================== */

:root,
html.theme-cream,
html:has(#app.theme-cream),
#app.theme-cream,
.page-container.theme-cream {
  color-scheme: light;
  --main-bg:
    linear-gradient(168deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,0) 30%),
    linear-gradient(152deg, rgba(255,218,196,.38) 4%, rgba(255,218,196,0) 34%),
    linear-gradient(328deg, rgba(183,188,214,.24) 0%, rgba(183,188,214,0) 38%),
    linear-gradient(135deg, #fbf7f3 0%, #f4edf1 42%, #e9edf7 100%);
  --app-bg: #f6eff0;
  --bg-start: #fbf8f4;
  --bg-mid: #f4e7e5;
  --bg-end: #e7ebf6;
  --mobile-statusbar-bg: #fbf8f4;
  --card-bg: rgba(255, 255, 255, 0.56);
  --surface: rgba(255, 255, 255, 0.50);
  --surface-elevated: rgba(255, 255, 255, 0.62);
  --surface-glass: rgba(255, 255, 255, 0.42);
  --surface-solid: rgba(255, 255, 255, 0.86);
  --tag-bg: rgba(230, 103, 76, 0.12);
  --text-main: #171717;
  --text-primary: #171717;
  --text-sub: #6f6765;
  --text-secondary: #6f6765;
  --text-tertiary: #a99fa0;
  --primary: #e06a50;
  --primary-dark: #bd533e;
  --primary-text: #fffdfb;
  --primary-gradient: linear-gradient(135deg, #ef9278 0%, #dc644b 100%);
  --primary-shadow: rgba(210, 87, 61, 0.28);
  --primary-soft: rgba(238, 143, 121, 0.20);
  --theme-line: rgba(255, 255, 255, 0.58);
  --border-soft: rgba(255, 255, 255, 0.62);
  --border-medium: rgba(113, 84, 76, 0.14);
  --card-border: rgba(255, 255, 255, 0.64);
  --modal-bg-solid: rgba(255, 250, 248, 0.96);
  --modal-item-bg-solid: rgba(245, 230, 226, 0.82);
  --modal-text-solid: #171717;
  --modal-subtext-solid: #746b69;
  --shadow-soft: 0 16px 44px rgba(116, 78, 70, 0.08);
  --shadow-card: 0 20px 58px rgba(116, 78, 70, 0.10);
  --shadow-floating: 0 24px 86px rgba(92, 74, 89, 0.18);
  --theme-glow: rgba(224, 106, 80, 0.16);
  --flow-card-shine:
    linear-gradient(128deg, rgba(255,255,255,.72), transparent 34%, rgba(238,145,121,.15) 68%, transparent 90%);
}

body {
  background:
    linear-gradient(168deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,0) 32%),
    linear-gradient(152deg, rgba(255,218,196,.34) 3%, rgba(255,218,196,0) 36%),
    linear-gradient(328deg, rgba(183,188,214,.24) 0%, rgba(183,188,214,0) 40%),
    linear-gradient(135deg, #fbf7f3 0%, #f4edf1 42%, #e8edf8 100%) !important;
}

.bg-orb {
  display: none !important;
}

.page-container,
#app.page-container {
  color: var(--text-main) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.40), transparent 38%, rgba(216, 221, 237, .18) 100%),
    var(--main-bg) !important;
}

.page-container::before {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background:
    linear-gradient(168deg, transparent 0 22%, rgba(220, 174, 160, 0.20) 22.4%, transparent 30%),
    linear-gradient(171deg, transparent 0 27%, rgba(235, 197, 184, 0.28) 27.5%, rgba(255, 244, 235, 0.40) 34%, transparent 41%),
    linear-gradient(174deg, transparent 0 34%, rgba(174, 151, 155, 0.20) 34.5%, rgba(232, 211, 204, 0.26) 42%, transparent 49%),
    linear-gradient(180deg, transparent 0, rgba(255,255,255,.28) 55%, transparent 100%);
  opacity: 0.92 !important;
  filter: blur(0.2px) saturate(1.04) !important;
  transform: none !important;
  animation: none !important;
}

.page-container::after {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background:
    linear-gradient(90deg, rgba(255,255,255,.18), transparent 18%, rgba(227, 166, 150, .10) 58%, transparent 78%),
    linear-gradient(330deg, rgba(147,151,183,.24), transparent 42%);
  opacity: 0.72 !important;
  transform: none !important;
  animation: none !important;
}

.main-view,
.desktop-sidebar,
.header,
.content,
.tab-panel,
.list-container {
  position: relative;
  z-index: 1;
}

.theme-btn {
  display: none !important;
}

.header-title-row {
  padding-right: 58px !important;
}

.dashboard-card,
.count-card,
.checklist-card,
.festival-card,
.timeline-card,
.subscription-card,
.subscription-next-card,
.accounting-record,
.grade-course-card,
.grade-table-card,
.course-tool-card,
.translation-library-card,
.translation-practice-card,
.goal-card,
.goal-track-card,
.goal-stat-card,
.goal-tree-card,
.goal-mobile-card,
.overview-card,
.overview-hero-panel,
.ov-panel,
.ov-today-card,
.ov-event-card,
.calendar-panel,
.schedule-container,
.form-card,
.settings-panel,
.board-manager-panel,
.backup-panel,
.emoji-panel,
.tab-picker-panel,
.cloud-menu-panel,
.cloud-login-prompt,
.cloud-login-card {
  background-color: var(--surface-elevated) !important;
  background-image: var(--flow-card-shine) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--shadow-card) !important;
  -webkit-backdrop-filter: blur(26px) saturate(1.18) !important;
  backdrop-filter: blur(26px) saturate(1.18) !important;
}

.count-card,
.checklist-card,
.festival-card,
.subscription-card,
.accounting-record,
.grade-course-card,
.course-tool-card,
.translation-library-card,
.translation-practice-card,
.goal-card,
.goal-track-card,
.overview-card {
  border-radius: 22px !important;
}

.primary-btn,
.save-btn,
.category-pill-active,
.schedule-mode-active,
.view-btn.active,
.ov-add-btn,
.ov-task-filter.is-active,
.calendar-day.today,
.ov-mini-day.is-today,
.desktop-nav-item.desktop-nav-active,
.desktop-nav-active,
.grade-live-preview {
  background: var(--primary-gradient) !important;
  color: var(--primary-text) !important;
  box-shadow: 0 16px 36px rgba(210, 87, 61, 0.22) !important;
}

.secondary-btn,
.switch-tab-btn,
.category-pill,
.schedule-mode-btn,
.calendar-nav-btn,
.settings-btn,
.icon-btn,
.desktop-settings-entry,
.desktop-today-mini,
.overview-card-icon,
.count-icon-box,
.festival-icon-box,
.tag,
.overview-card-foot b,
.ov-event-pill,
.ov-stat,
.ov-task-tag,
.ov-task-check {
  background: rgba(255, 255, 255, 0.44) !important;
  border: 1px solid rgba(255, 255, 255, 0.54) !important;
  color: var(--text-main) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
}

.tag,
.overview-card-foot b,
.ov-event-pill,
.ov-task-tag {
  color: var(--primary-dark) !important;
  background: var(--tag-bg) !important;
}

.calendar-day,
.ov-mini-day {
  background: transparent !important;
}

.calendar-day:hover,
.ov-mini-day:not(.is-today):hover,
.desktop-nav-item:hover,
.settings-item:hover,
.tab-picker-item:hover {
  background: rgba(238, 143, 121, 0.10) !important;
}

.calendar-day.today,
.ov-mini-day.is-today {
  border-radius: 50% !important;
}

.calendar-day.today .event-dot,
.calendar-day.today .schedule-dot,
.ov-mini-day.is-today .ov-mini-dot {
  background: #fff !important;
}

.progress-inner,
.year-progress-inner,
.checklist-progress-inner,
.grade-weight-bar i,
.ovt-bar i,
.ov-event-progress i,
.desktop-today-mini .dtm-bar i {
  background: var(--primary-gradient) !important;
}

.header-title,
.ov-greeting,
.overview-hero-copy h2,
.overview-card-body strong,
.count-title,
.checklist-title,
.festival-name,
.calendar-title {
  letter-spacing: 0 !important;
}

@media (min-width: 1024px) {
  .main-view {
    width: min(1500px, calc(100vw - 42px)) !important;
    height: calc(100vh - 40px) !important;
    margin: 20px auto !important;
    grid-template-columns: 268px minmax(0, 1fr) !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.34) !important;
    border: 1px solid rgba(255, 255, 255, 0.62) !important;
    box-shadow:
      0 30px 90px rgba(84, 72, 94, 0.16),
      inset 0 1px 0 rgba(255,255,255,.72) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.18) !important;
    backdrop-filter: blur(30px) saturate(1.18) !important;
  }

  .desktop-sidebar {
    padding: 26px 22px 20px !important;
    background: rgba(255, 255, 255, 0.32) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.50) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.12) !important;
    backdrop-filter: blur(24px) saturate(1.12) !important;
  }

  .desktop-brand {
    gap: 12px !important;
    padding: 8px 8px 18px !important;
  }

  .desktop-logo {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    border: 5px solid rgba(255,255,255,.62) !important;
    box-shadow: 0 16px 32px rgba(114, 83, 75, 0.12) !important;
  }

  .desktop-brand b {
    font-size: 18px !important;
    font-weight: 760 !important;
    letter-spacing: 0 !important;
  }

  .desktop-brand span {
    font-size: 12px !important;
    color: var(--text-sub) !important;
  }

  .desktop-brand::after {
    content: "✦";
    margin-left: auto;
    color: #f0aa43;
    font-size: 16px;
  }

  .desktop-nav {
    gap: 4px !important;
  }

  .desktop-nav-section {
    padding: 16px 12px 6px !important;
    font-size: 11px !important;
    color: #9d9291 !important;
    letter-spacing: 0 !important;
  }

  .desktop-nav-item {
    min-height: 46px !important;
    border-radius: 10px !important;
    padding: 0 12px !important;
    background: transparent !important;
    border-color: transparent !important;
    color: #5f5757 !important;
  }

  .desktop-nav-item span {
    width: 26px !important;
    height: 26px !important;
    background: transparent !important;
    border: 0 !important;
    font-size: 16px !important;
    filter: saturate(.72);
  }

  .desktop-nav-item b {
    font-weight: 650 !important;
    font-size: 14px !important;
  }

  .desktop-nav-item.desktop-nav-active,
  .desktop-nav-active {
    position: relative;
    background: rgba(238, 143, 121, 0.12) !important;
    color: var(--primary-dark) !important;
    box-shadow: none !important;
  }

  .desktop-nav-item.desktop-nav-active::before,
  .desktop-nav-active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 9px;
    bottom: 9px;
    width: 2px;
    border-radius: 999px;
    background: var(--primary);
  }

  .header {
    padding: 42px 44px 0 !important;
  }

  .content {
    padding: 0 38px 40px !important;
  }

  #app[data-current-tab="overview"] .content {
    padding-top: 42px !important;
  }

  #app[data-current-tab="overview"] .header {
    display: none !important;
  }

  .overview-dashboard {
    gap: 24px !important;
  }

  .overview-hero-panel {
    min-height: 132px !important;
    padding: 28px 30px !important;
    background:
      linear-gradient(170deg, rgba(255,255,255,.58), rgba(255,255,255,.24)),
      linear-gradient(173deg, transparent 0 30%, rgba(230, 173, 156, .18) 31%, transparent 48%),
      linear-gradient(177deg, transparent 0 42%, rgba(154, 132, 141, .12) 43%, transparent 58%) !important;
    border-radius: 24px !important;
    box-shadow: none !important;
  }

  .overview-hero-kicker {
    font-size: 16px !important;
    color: var(--text-sub) !important;
    font-weight: 500 !important;
  }

  .overview-hero-copy h2 {
    margin-top: 10px !important;
    font-size: clamp(36px, 4.1vw, 48px) !important;
    font-weight: 790 !important;
  }

  .overview-hero-copy p {
    font-size: 16px !important;
  }

  .overview-hero-status {
    width: min(36%, 390px) !important;
    border-radius: 20px !important;
    padding: 22px 24px !important;
    background: rgba(255,255,255,.56) !important;
    border: 1px solid rgba(255,255,255,.62) !important;
    box-shadow: 0 20px 58px rgba(116, 78, 70, 0.12) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.14) !important;
    backdrop-filter: blur(24px) saturate(1.14) !important;
  }

  .overview-hero-status strong {
    font-size: 23px !important;
    font-weight: 780 !important;
  }

  .overview-main-cards {
    gap: 18px !important;
  }

  .overview-card,
  .overview-calendar-card {
    min-height: 168px !important;
    border-radius: 22px !important;
    padding: 22px 24px !important;
  }

  .overview-checklist-card {
    min-height: 142px !important;
  }

  .overview-card-icon,
  .ov-event-badge {
    width: 54px !important;
    height: 54px !important;
    border-radius: 15px !important;
    font-size: 23px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 12px 26px rgba(198, 104, 80, .12) !important;
  }

  .overview-card-kicker,
  .overview-card-body span,
  .overview-card-body small {
    color: var(--text-sub) !important;
  }

  .overview-card-body strong {
    font-size: 23px !important;
    font-weight: 760 !important;
  }

  .ov-mini-grid {
    gap: 8px !important;
  }

  .ov-mini-day {
    min-height: 38px !important;
    font-size: 15px !important;
  }
}

@media (max-width: 899px) {
  .page-container,
  #app.page-container {
    background:
      linear-gradient(160deg, rgba(255,255,255,.48), transparent 48%),
      var(--main-bg) !important;
  }

  .main-view {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .header-top.page-hero,
  .today-action-row,
  .dashboard-card,
  .count-card,
  .checklist-card,
  .festival-card,
  .calendar-panel,
  .schedule-container,
  .overview-card,
  .overview-hero-panel,
  .ov-panel {
    border-radius: 22px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-container::before,
  .page-container::after {
    animation: none !important;
    transform: none !important;
  }
}

/* ========================================================================
 * Keyline Days 2.3.14 — reference-match desktop pass
 * Tightens the shell, removes the oversized white hero card, hides desktop
 * scrollbars, and restores the calendar + quote right rail from the mockup.
 * ======================================================================== */

@media (min-width: 1024px) {
  body {
    background:
      linear-gradient(116deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,0) 31%),
      linear-gradient(153deg, rgba(255,222,205,.34) 4%, rgba(255,222,205,0) 34%),
      linear-gradient(327deg, rgba(198,203,224,.34) 0%, rgba(198,203,224,0) 43%),
      linear-gradient(135deg, #fbf8f4 0%, #f3ebef 46%, #e8edf8 100%) !important;
  }

  .main-view {
    width: calc(100vw - 40px) !important;
    max-width: none !important;
    height: calc(100vh - 40px) !important;
    margin: 20px !important;
    grid-template-columns: 268px minmax(0, 1fr) !important;
    border-radius: 22px !important;
    background:
      linear-gradient(135deg, rgba(255,255,255,.43), rgba(255,255,255,.18) 46%, rgba(222,226,240,.20)),
      rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255,255,255,.72) !important;
    box-shadow:
      0 28px 86px rgba(84, 72, 94, 0.17),
      inset 0 1px 0 rgba(255,255,255,.78) !important;
    overflow: hidden !important;
  }

  .desktop-sidebar,
  .content {
    scrollbar-width: none !important;
  }

  .desktop-sidebar::-webkit-scrollbar,
  .content::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }

  .desktop-sidebar {
    padding: 28px 24px 18px !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.56), rgba(255,255,255,.28)) !important;
    border-right: 1px solid rgba(255,255,255,.56) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.12) !important;
    backdrop-filter: blur(24px) saturate(1.12) !important;
  }

  .desktop-brand {
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 4px 2px 24px !important;
  }

  .desktop-brand > div {
    min-width: 0 !important;
  }

  .desktop-brand b {
    display: block !important;
    white-space: nowrap !important;
    font-size: 18px !important;
    line-height: 1.08 !important;
    font-weight: 760 !important;
  }

  .desktop-brand span {
    display: block !important;
    white-space: nowrap !important;
    margin-top: 4px !important;
    font-size: 12px !important;
  }

  .desktop-brand::after {
    justify-self: end !important;
    margin: 0 !important;
  }

  .desktop-logo {
    width: 50px !important;
    height: 50px !important;
  }

  .desktop-nav-section {
    padding: 16px 0 8px !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    color: #9c9292 !important;
  }

  .desktop-nav-item {
    min-height: 46px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
  }

  .desktop-nav-item.desktop-nav-active::before,
  .desktop-nav-active::before {
    left: -18px !important;
    top: 10px !important;
    bottom: 10px !important;
    width: 2px !important;
  }

  #app[data-current-tab="overview"] .content {
    padding: 34px 40px 28px 44px !important;
    overflow-y: auto !important;
  }

  .overview-dashboard {
    gap: 24px !important;
    min-height: 100% !important;
  }

  .overview-hero-panel {
    min-height: 154px !important;
    padding: 18px 34px 16px 22px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    overflow: visible !important;
  }

  .overview-hero-panel::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    height: 154px !important;
    z-index: 0 !important;
    pointer-events: none !important;
    border-radius: 22px !important;
    background-image:
      linear-gradient(90deg, rgba(255,255,255,.80), rgba(255,255,255,.22) 42%, rgba(255,255,255,.08)),
      url("../assets/kd-theme-dune.png") !important;
    background-size: cover, cover !important;
    background-position: center, center 58% !important;
    background-repeat: no-repeat, no-repeat !important;
    opacity: .96 !important;
  }

  .overview-hero-copy,
  .overview-hero-status {
    z-index: 1 !important;
  }

  .overview-hero-kicker {
    font-size: 15px !important;
    font-weight: 560 !important;
    color: #6f6765 !important;
  }

  .overview-hero-copy h2 {
    margin: 10px 0 8px !important;
    font-size: clamp(40px, 4.2vw, 56px) !important;
    line-height: 1 !important;
    font-weight: 780 !important;
  }

  .overview-hero-copy p {
    font-size: 16px !important;
    color: #6f6765 !important;
  }

  .overview-hero-status {
    align-self: center !important;
    width: min(34%, 408px) !important;
    min-height: 102px !important;
    padding: 20px 24px !important;
    border-radius: 20px !important;
    background: rgba(255,255,255,.58) !important;
    border: 1px solid rgba(255,255,255,.72) !important;
    box-shadow: 0 18px 52px rgba(88, 72, 88, 0.13) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.12) !important;
    backdrop-filter: blur(22px) saturate(1.12) !important;
  }

  .overview-hero-status strong {
    font-size: 24px !important;
    line-height: 1.1 !important;
    font-weight: 760 !important;
  }

  .overview-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 426px) !important;
    gap: 28px !important;
    align-items: start !important;
  }

  .overview-main-cards {
    gap: 20px 22px !important;
  }

  .overview-card {
    background:
      linear-gradient(128deg, rgba(255,255,255,.70), rgba(255,255,255,.36) 44%, rgba(236,150,128,.12) 72%, rgba(255,255,255,.42)) !important;
    border: 1px solid rgba(255,255,255,.72) !important;
    box-shadow: 0 22px 62px rgba(90, 72, 86, .12) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.14) !important;
    backdrop-filter: blur(24px) saturate(1.14) !important;
  }

  .overview-action-card {
    min-height: 168px !important;
    padding: 22px 24px !important;
    border-radius: 22px !important;
    gap: 18px !important;
  }

  .overview-checklist-card {
    min-height: 146px !important;
    padding: 22px 24px !important;
  }

  .overview-card-body strong {
    font-size: 24px !important;
    line-height: 1.12 !important;
    font-weight: 760 !important;
  }

  .overview-card-body span,
  .overview-card-body small {
    font-size: 14px !important;
    color: #716967 !important;
  }

  .overview-card-icon {
    width: 54px !important;
    height: 54px !important;
    border-radius: 16px !important;
  }

  .overview-card-foot b {
    min-height: 30px !important;
    padding: 5px 12px !important;
    font-size: 13px !important;
  }

  .overview-calendar-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 26px !important;
  }

  .overview-calendar-card {
    min-height: 316px !important;
    padding: 24px 28px !important;
    border-radius: 22px !important;
  }

  .ov-mini-cal-head {
    margin-bottom: 18px !important;
  }

  .ov-mini-grid {
    gap: 8px 10px !important;
  }

  .ov-mini-week {
    font-size: 13px !important;
    color: #938b8a !important;
  }

  .ov-mini-day {
    min-width: 0 !important;
    min-height: 36px !important;
    font-size: 16px !important;
    font-weight: 650 !important;
  }

  .ov-mini-day.is-today {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    justify-self: center !important;
  }

  .overview-quote-card {
    position: relative !important;
    min-height: 176px !important;
    padding: 28px 30px 24px !important;
    border-radius: 22px !important;
    color: rgba(255,255,255,.94) !important;
    overflow: hidden !important;
    cursor: pointer !important;
    border: 1px solid rgba(255,255,255,.36) !important;
    box-shadow: 0 22px 58px rgba(70, 66, 96, .18) !important;
    background-image:
      linear-gradient(90deg, rgba(58, 56, 88, .58), rgba(91, 76, 105, .18) 52%, rgba(255, 169, 143, .08)),
      linear-gradient(180deg, rgba(255, 178, 161, .18), rgba(46, 51, 82, .22)),
      url("../assets/kd-theme-mountain.png") !important;
    background-size: cover, cover, cover !important;
    background-position: center, center, center 58% !important;
    background-repeat: no-repeat, no-repeat, no-repeat !important;
  }

  .overview-quote-card::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(180deg, transparent 46%, rgba(35, 39, 66, .24) 100%) !important;
    opacity: 1 !important;
  }

  .overview-quote-mark {
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    height: 26px !important;
    font-size: 54px !important;
    line-height: .8 !important;
    font-weight: 800 !important;
  }

  .overview-quote-card p {
    position: relative !important;
    z-index: 1 !important;
    width: min(72%, 286px) !important;
    margin: 16px 0 22px !important;
    font-size: 20px !important;
    line-height: 1.28 !important;
    font-weight: 520 !important;
  }

  .overview-quote-foot {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    font-size: 13px !important;
  }

  .overview-quote-foot button {
    appearance: none !important;
    border: 1px solid rgba(255,255,255,.28) !important;
    border-radius: 999px !important;
    padding: 8px 13px !important;
    color: #fff !important;
    background: rgba(255,255,255,.16) !important;
    font: inherit !important;
    cursor: pointer !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
  }
}

/* ========================================================================
 * Keyline Days 2.3.14 — Sunset Coral theme
 * A second selectable theme using the sunset coast artwork supplied by the
 * user. Kept separate from legacy theme-sunset to avoid old CSS collisions.
 * ======================================================================== */

html.theme-coral,
html:has(#app.theme-coral),
#app.theme-coral,
.page-container.theme-coral {
  color-scheme: light;
  --main-bg:
    linear-gradient(145deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,0) 38%),
    linear-gradient(152deg, rgba(255, 176, 136, .48) 0%, rgba(255,176,136,0) 42%),
    linear-gradient(328deg, rgba(235, 97, 77, .20) 0%, rgba(235,97,77,0) 40%),
    linear-gradient(135deg, #fff5ed 0%, #ffe3d6 46%, #f4c2b8 100%);
  --app-bg: #fff0e8;
  --bg-start: #fff7f0;
  --bg-mid: #ffe1d1;
  --bg-end: #f5c3b8;
  --mobile-statusbar-bg: #fff2ea;
  --card-bg: rgba(255, 250, 247, 0.58);
  --surface: rgba(255, 248, 244, 0.52);
  --surface-elevated: rgba(255, 248, 244, 0.66);
  --surface-glass: rgba(255, 244, 238, 0.44);
  --surface-solid: rgba(255, 247, 242, 0.88);
  --tag-bg: rgba(244, 92, 65, 0.13);
  --text-main: #1c1614;
  --text-primary: #1c1614;
  --text-sub: #745e59;
  --text-secondary: #745e59;
  --text-tertiary: #ad8e87;
  --primary: #f25f45;
  --primary-dark: #db4d38;
  --primary-text: #fffdfb;
  --primary-gradient: linear-gradient(135deg, #ff9470 0%, #f25a42 100%);
  --primary-shadow: rgba(226, 75, 52, 0.30);
  --primary-soft: rgba(255, 147, 111, 0.22);
  --theme-line: rgba(255, 255, 255, 0.62);
  --border-soft: rgba(255, 255, 255, 0.66);
  --border-medium: rgba(122, 66, 53, 0.14);
  --card-border: rgba(255, 255, 255, 0.68);
  --modal-bg-solid: rgba(255, 244, 238, 0.96);
  --modal-item-bg-solid: rgba(255, 224, 211, 0.82);
  --modal-text-solid: #1c1614;
  --modal-subtext-solid: #745e59;
  --shadow-soft: 0 16px 44px rgba(150, 73, 58, 0.08);
  --shadow-card: 0 20px 58px rgba(150, 73, 58, 0.11);
  --shadow-floating: 0 28px 86px rgba(168, 80, 64, 0.18);
  --theme-glow: rgba(242, 95, 69, 0.18);
  --flow-card-shine:
    linear-gradient(128deg, rgba(255,255,255,.72), transparent 34%, rgba(255, 139, 99, .18) 68%, transparent 90%);
}

html.theme-coral body {
  background:
    linear-gradient(116deg, rgba(255,255,255,.82) 0%, rgba(255,255,255,0) 32%),
    linear-gradient(153deg, rgba(255,181,139,.50) 3%, rgba(255,181,139,0) 38%),
    linear-gradient(327deg, rgba(238,93,73,.24) 0%, rgba(238,93,73,0) 42%),
    linear-gradient(135deg, #fff8f1 0%, #ffe2d3 48%, #f4b8ac 100%) !important;
}

#app.theme-coral.page-container,
.page-container.theme-coral {
  background:
    linear-gradient(135deg, rgba(255,255,255,.35), transparent 38%, rgba(242, 112, 84, .14) 100%),
    var(--main-bg) !important;
}

@media (min-width: 1024px) {
  #app.theme-coral .main-view {
    background:
      linear-gradient(135deg, rgba(255,255,255,.42), rgba(255,233,224,.22) 46%, rgba(246,150,126,.20)),
      rgba(255, 237, 229, 0.25) !important;
    box-shadow:
      0 30px 88px rgba(170, 80, 63, 0.17),
      inset 0 1px 0 rgba(255,255,255,.78) !important;
  }

  #app.theme-coral .desktop-sidebar {
    background:
      linear-gradient(180deg, rgba(255,248,244,.62), rgba(255,231,219,.34)) !important;
    border-right-color: rgba(255,255,255,.62) !important;
  }

  #app.theme-coral .desktop-logo {
    box-shadow: 0 16px 32px rgba(222, 87, 61, 0.18) !important;
  }

  #app.theme-coral .desktop-brand::after {
    content: "☀" !important;
    color: #f25f45 !important;
  }

  #app.theme-coral .desktop-nav-item.desktop-nav-active,
  #app.theme-coral .desktop-nav-active {
    background: rgba(242, 95, 69, 0.13) !important;
    color: var(--primary-dark) !important;
  }

  #app.theme-coral .overview-hero-panel::before {
    background-image:
      linear-gradient(90deg, rgba(255, 248, 244, .66), rgba(255, 238, 229, .16) 43%, rgba(255, 214, 196, .10)),
      url("../assets/kd-theme-sunset-coral.png") !important;
    background-size: cover, cover !important;
    background-position: center, center 50% !important;
    background-repeat: no-repeat, no-repeat !important;
    opacity: .98 !important;
  }

  #app.theme-coral .overview-card {
    background:
      linear-gradient(128deg, rgba(255,255,255,.72), rgba(255,247,243,.42) 44%, rgba(255,134,96,.14) 72%, rgba(255,255,255,.46)) !important;
    box-shadow: 0 22px 62px rgba(153, 73, 61, .13) !important;
  }

  #app.theme-coral .overview-hero-status {
    background: rgba(255, 247, 243, .58) !important;
    box-shadow: 0 18px 52px rgba(153, 73, 61, 0.13) !important;
  }

  #app.theme-coral .overview-quote-card {
    background-image:
      linear-gradient(90deg, rgba(117, 49, 43, .48), rgba(178, 77, 61, .14) 52%, rgba(255, 174, 128, .06)),
      linear-gradient(180deg, rgba(255, 160, 121, .18), rgba(91, 45, 57, .28)),
      url("../assets/kd-theme-sunset-coral.png") !important;
    background-size: cover, cover, cover !important;
    background-position: center, center, center 63% !important;
    background-repeat: no-repeat, no-repeat, no-repeat !important;
    box-shadow: 0 22px 58px rgba(161, 74, 62, .20) !important;
  }

  #app.theme-coral .overview-quote-card::after {
    background: linear-gradient(180deg, transparent 46%, rgba(96, 43, 54, .28) 100%) !important;
  }
}

/* ========================================================================
 * Sunset Coral final override: warm coastal glass theme.
 * Kept last so legacy cream/sunset rules cannot wash out theme-coral.
 * ======================================================================== */

html.theme-coral,
html:has(#app.theme-coral),
#app.theme-coral,
.page-container.theme-coral {
  color-scheme: light;
  --main-bg:
    radial-gradient(circle at 64% 8%, rgba(255, 222, 170, .42), transparent 28%),
    radial-gradient(circle at 76% 22%, rgba(255, 132, 96, .24), transparent 34%),
    linear-gradient(135deg, #fff8f2 0%, #ffe5d7 45%, #f6b9aa 100%);
  --app-bg: #fff2ea;
  --app-bg-solid: #fff2ea;
  --bg-start: #fff8f2;
  --bg-mid: #ffe5d7;
  --bg-end: #f6b9aa;
  --mobile-statusbar-bg: #fff2ea;
  --card-bg: rgba(255, 249, 245, .58);
  --surface: rgba(255, 246, 241, .52);
  --surface-elevated: rgba(255, 248, 244, .66);
  --surface-glass: rgba(255, 246, 241, .48);
  --surface-solid: rgba(255, 247, 242, .90);
  --modal-bg-solid: rgba(255, 247, 242, .96);
  --modal-item-bg-solid: rgba(255, 226, 216, .84);
  --modal-text-solid: #1f1714;
  --modal-subtext-solid: #7a625b;
  --text-main: #1f1714;
  --text-primary: #1f1714;
  --text-sub: #7a625b;
  --text-secondary: #7a625b;
  --text-tertiary: #aa8b82;
  --primary: #f2664b;
  --primary-dark: #db5139;
  --primary-text: #fffdfb;
  --primary-gradient: linear-gradient(135deg, #ff9b73 0%, #f25f45 100%);
  --primary-shadow: rgba(226, 75, 52, .26);
  --primary-soft: rgba(255, 155, 115, .22);
  --tag-bg: rgba(242, 95, 69, .13);
  --theme-line: rgba(255, 255, 255, .66);
  --border-soft: rgba(255, 255, 255, .72);
  --border-medium: rgba(151, 77, 60, .16);
  --card-border: rgba(255, 255, 255, .72);
  --shadow-soft: 0 18px 48px rgba(155, 74, 60, .10);
  --shadow-card: 0 22px 62px rgba(155, 74, 60, .13);
  --shadow-floating: 0 30px 90px rgba(170, 78, 60, .20);
  --theme-glow: rgba(255, 198, 128, .30);
  --flow-card-shine:
    linear-gradient(128deg, rgba(255,255,255,.74), transparent 32%, rgba(255, 166, 112, .18) 68%, transparent 91%);
}

html.theme-coral body {
  background:
    radial-gradient(circle at 62% 7%, rgba(255, 229, 179, .40), transparent 30%),
    radial-gradient(circle at 82% 22%, rgba(255, 133, 96, .22), transparent 34%),
    linear-gradient(135deg, #fff8f2 0%, #ffe5d7 45%, #f6b9aa 100%) !important;
}

#app.theme-coral.page-container,
.page-container.theme-coral {
  background:
    radial-gradient(circle at 66% 8%, rgba(255, 231, 184, .42), transparent 29%),
    radial-gradient(circle at 80% 28%, rgba(255, 137, 102, .20), transparent 35%),
    var(--main-bg) !important;
}

#app.theme-coral .primary-btn,
#app.theme-coral .save-btn,
#app.theme-coral .backup-main-btn,
#app.theme-coral .restore-btn,
#app.theme-coral .category-pill-active,
#app.theme-coral .schedule-mode-active,
#app.theme-coral .calendar-day.today {
  background: var(--primary-gradient) !important;
  color: var(--primary-text) !important;
  box-shadow: 0 12px 28px rgba(226, 75, 52, .22) !important;
}

#app.theme-coral .secondary-btn,
#app.theme-coral .switch-tab-btn,
#app.theme-coral .theme-btn,
#app.theme-coral .settings-btn,
#app.theme-coral .category-pill,
#app.theme-coral .schedule-mode-btn,
#app.theme-coral .dashboard-card,
#app.theme-coral .count-card,
#app.theme-coral .checklist-card,
#app.theme-coral .festival-card,
#app.theme-coral .schedule-container,
#app.theme-coral .form-card,
#app.theme-coral .calendar-container,
#app.theme-coral .festival-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.68), rgba(255,247,243,.42) 52%, rgba(255,146,105,.10)) !important;
  border: 1px solid rgba(255,255,255,.70) !important;
  box-shadow: 0 18px 48px rgba(155, 74, 60, .10) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.14) !important;
  backdrop-filter: blur(22px) saturate(1.14) !important;
}

@media (min-width: 1024px) {
  #app.theme-coral .main-view {
    background:
      radial-gradient(circle at 62% 10%, rgba(255, 231, 184, .30), transparent 28%),
      linear-gradient(135deg, rgba(255,255,255,.46), rgba(255,234,225,.25) 46%, rgba(246,150,126,.22)),
      rgba(255, 237, 229, .28) !important;
    box-shadow:
      0 34px 96px rgba(170, 80, 63, .18),
      inset 0 1px 0 rgba(255,255,255,.82) !important;
    border: 1px solid rgba(255,255,255,.72) !important;
  }

  #app.theme-coral .desktop-sidebar {
    background:
      linear-gradient(180deg, rgba(255,249,245,.66), rgba(255,229,216,.38)) !important;
    border-right: 1px solid rgba(255,255,255,.68) !important;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.42) !important;
  }

  #app.theme-coral .desktop-logo {
    background: var(--primary-gradient) !important;
    color: #fffdfb !important;
    box-shadow:
      0 16px 34px rgba(226, 75, 52, .20),
      inset 0 1px 0 rgba(255,255,255,.36) !important;
  }

  #app.theme-coral .desktop-brand::after {
    content: "☀" !important;
    color: #d84f38 !important;
    background: transparent !important;
    border: 0 !important;
  }

  #app.theme-coral .desktop-nav-item.desktop-nav-active,
  #app.theme-coral .desktop-nav-active {
    background:
      linear-gradient(135deg, rgba(255,255,255,.66), rgba(255,210,196,.42)) !important;
    color: #d84f38 !important;
    box-shadow: 0 14px 34px rgba(226, 75, 52, .12) !important;
  }

  #app.theme-coral .desktop-nav-item.desktop-nav-active::before,
  #app.theme-coral .desktop-nav-active::before {
    content: "" !important;
    background: #f2664b !important;
  }

  #app.theme-coral .desktop-nav-item:hover {
    background: rgba(255,255,255,.46) !important;
    color: #d84f38 !important;
  }

  #app.theme-coral .overview-hero-panel {
    background:
      linear-gradient(135deg, rgba(255,255,255,.70), rgba(255,239,231,.40) 48%, rgba(255,154,113,.16)) !important;
    border: 1px solid rgba(255,255,255,.74) !important;
    box-shadow: 0 26px 70px rgba(153, 73, 61, .13) !important;
    overflow: hidden !important;
  }

  #app.theme-coral .overview-hero-panel::before {
    background-image:
      linear-gradient(90deg, rgba(255, 248, 244, .72), rgba(255, 238, 229, .20) 42%, rgba(255, 190, 150, .10)),
      linear-gradient(180deg, rgba(255, 246, 240, .10), rgba(255, 214, 196, .12)),
      url("../assets/kd-theme-sunset-coral.png") !important;
    background-size: cover, cover, cover !important;
    background-position: center, center, center 46% !important;
    background-repeat: no-repeat, no-repeat, no-repeat !important;
    opacity: .98 !important;
  }

  #app.theme-coral .overview-quote-card {
    color: rgba(255,255,255,.96) !important;
    background-image:
      linear-gradient(90deg, rgba(104, 48, 43, .54), rgba(180, 74, 56, .18) 52%, rgba(255, 174, 128, .08)),
      linear-gradient(180deg, rgba(255, 144, 102, .14), rgba(76, 42, 55, .32)),
      url("../assets/kd-theme-sunset-coral.png") !important;
    background-size: cover, cover, cover !important;
    background-position: center, center, right 62% !important;
    background-repeat: no-repeat, no-repeat, no-repeat !important;
    border: 1px solid rgba(255,255,255,.38) !important;
    box-shadow: 0 24px 62px rgba(151, 70, 58, .24) !important;
  }

  #app.theme-coral .overview-quote-card::after {
    background: linear-gradient(180deg, transparent 42%, rgba(82, 39, 48, .30) 100%) !important;
  }

  #app.theme-coral .overview-quote-card p,
  #app.theme-coral .overview-quote-mark,
  #app.theme-coral .overview-quote-foot {
    color: rgba(255,255,255,.96) !important;
    text-shadow: 0 2px 14px rgba(62, 31, 38, .30) !important;
  }

  #app.theme-coral .overview-card,
  #app.theme-coral .overview-calendar-card,
  #app.theme-coral .overview-hero-status {
    background:
      linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,247,243,.44) 48%, rgba(255,139,99,.12)) !important;
    border: 1px solid rgba(255,255,255,.74) !important;
    box-shadow: 0 22px 62px rgba(153, 73, 61, .13) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.16) !important;
    backdrop-filter: blur(24px) saturate(1.16) !important;
  }

  #app.theme-coral .overview-card-icon {
    background:
      linear-gradient(135deg, rgba(255,255,255,.76), rgba(255,226,214,.50)) !important;
    border: 1px solid rgba(255,255,255,.80) !important;
    box-shadow:
      0 12px 28px rgba(222, 87, 61, .16),
      inset 0 1px 0 rgba(255,255,255,.86) !important;
  }

  #app.theme-coral .overview-card-foot b,
  #app.theme-coral .tag,
  #app.theme-coral .ov-mini-day.is-today {
    background: var(--primary-gradient) !important;
    color: #fffdfb !important;
    box-shadow: 0 10px 24px rgba(226, 75, 52, .24) !important;
  }

  #app.theme-coral .ov-mini-day:not(.is-empty):not(.is-today):hover,
  #app.theme-coral .overview-card:hover {
    border-color: rgba(255,255,255,.82) !important;
    box-shadow: 0 26px 68px rgba(153, 73, 61, .16) !important;
  }
}

/* Fix: prevent random opacity flicker on yearly festival cards */
#festivalList.festival-list-stable .festival-card,
#festivalList.festival-list-stable .festival-card.kd-item-enter,
#festivalList.festival-list-stable .festival-card.kd-will-animate,
#festivalList.festival-list-stable .festival-card.kd-enter,
#festivalList.festival-list-stable .festival-card.kd-removing,
#app .festival-card.kd-no-enter,
#app .festival-card.kd-no-enter.kd-item-enter,
#app .festival-card.kd-no-enter.kd-will-animate,
#festivalList.festival-list-stable .festival-card:hover,
#festivalList.festival-list-stable .festival-card:active,
#festivalList.festival-list-stable .festival-card.kd-pressed,
#app .festival-card.kd-no-enter:hover,
#app .festival-card.kd-no-enter:active,
#app .festival-card.kd-no-enter.kd-pressed {
  opacity: 1 !important;
  animation: none !important;
  transition-property: transform, box-shadow, border-color, background-color !important;
}

#festivalList.festival-list-stable .festival-card.kd-item-enter,
#app .festival-card.kd-no-enter.kd-item-enter {
  transform: none !important;
}

/* ========================================================================
 * Keyline Days — 悠悠山苗 theme (theme-shanmiao)
 * Sage-mist mountain glass UI. Mountain / ridge line textures only.
 * ======================================================================== */

html.theme-shanmiao,
html:has(#app.theme-shanmiao),
#app.theme-shanmiao,
.page-container.theme-shanmiao {
  color-scheme: light;
  --main-bg:
    radial-gradient(circle at 70% 6%, rgba(255, 236, 198, .28), transparent 32%),
    radial-gradient(circle at 88% 34%, rgba(176, 214, 202, .18), transparent 36%),
    linear-gradient(145deg, #faf8f2 0%, #f5f3ec 48%, #e8efe9 100%);
  --app-bg: #faf8f2;
  --app-bg-solid: #faf8f2;
  --bg-start: #faf8f2;
  --bg-mid: #f3f1e8;
  --bg-end: #e5ebe6;
  --mobile-statusbar-bg: #faf8f2;
  --card-bg: rgba(255, 252, 247, .62);
  --surface: rgba(255, 250, 244, .54);
  --surface-elevated: rgba(255, 252, 248, .68);
  --surface-glass: rgba(255, 250, 244, .46);
  --surface-solid: rgba(255, 252, 248, .90);
  --modal-bg-solid: rgba(250, 248, 244, .96);
  --modal-item-bg-solid: rgba(232, 240, 236, .84);
  --modal-text-solid: #2a332f;
  --modal-subtext-solid: #6a7a73;
  --text-main: #2a332f;
  --text-primary: #2a332f;
  --text-sub: #6a7a73;
  --text-secondary: #6a7a73;
  --text-tertiary: #9aaba3;
  --primary: #5e827a;
  --primary-dark: #4a6b64;
  --primary-text: #f8fcfa;
  --primary-gradient: linear-gradient(135deg, #7ba396 0%, #5e827a 100%);
  --primary-shadow: rgba(78, 110, 102, .28);
  --primary-soft: rgba(123, 163, 150, .20);
  --tag-bg: rgba(94, 130, 122, .12);
  --theme-line: rgba(255, 255, 255, .72);
  --border-soft: rgba(255, 255, 255, .76);
  --border-medium: rgba(94, 130, 122, .14);
  --card-border: rgba(255, 255, 255, .76);
  --shadow-soft: 0 18px 48px rgba(84, 116, 108, .08);
  --shadow-card: 0 22px 62px rgba(84, 116, 108, .10);
  --shadow-floating: 0 28px 86px rgba(68, 92, 84, .16);
  --theme-glow: rgba(218, 176, 95, .18);
  --shanmiao-mountain-ink: rgba(94, 130, 122, .18);
  --shanmiao-mountain-soft: rgba(123, 160, 151, .13);
  --shanmiao-mountain-gold: rgba(218, 176, 95, .12);
  --shanmiao-glass-line: rgba(255, 255, 255, .72);
  --flow-card-shine:
    linear-gradient(128deg, rgba(255,255,255,.76), transparent 32%, rgba(176, 214, 202, .16) 68%, transparent 91%);
}

html.theme-shanmiao body {
  background:
    radial-gradient(circle at 68% 5%, rgba(255, 236, 198, .32), transparent 30%),
    radial-gradient(circle at 84% 28%, rgba(176, 214, 202, .20), transparent 34%),
    linear-gradient(145deg, #faf8f2 0%, #f5f3ec 48%, #e8efe9 100%) !important;
}

#app.theme-shanmiao.page-container,
.page-container.theme-shanmiao {
  background:
    radial-gradient(circle at 66% 7%, rgba(255, 236, 198, .26), transparent 28%),
    radial-gradient(circle at 82% 30%, rgba(176, 214, 202, .16), transparent 34%),
    var(--main-bg) !important;
}

#app.theme-shanmiao .primary-btn,
#app.theme-shanmiao .save-btn,
#app.theme-shanmiao .backup-main-btn,
#app.theme-shanmiao .restore-btn,
#app.theme-shanmiao .category-pill-active,
#app.theme-shanmiao .schedule-mode-active,
#app.theme-shanmiao .calendar-day.today {
  background: var(--primary-gradient) !important;
  color: var(--primary-text) !important;
  box-shadow: 0 12px 28px rgba(78, 110, 102, .22) !important;
}

#app.theme-shanmiao .secondary-btn,
#app.theme-shanmiao .switch-tab-btn,
#app.theme-shanmiao .theme-btn,
#app.theme-shanmiao .settings-btn,
#app.theme-shanmiao .category-pill:not(.category-pill-active),
#app.theme-shanmiao .schedule-mode-btn,
#app.theme-shanmiao .dashboard-card,
#app.theme-shanmiao .count-card,
#app.theme-shanmiao .checklist-card,
#app.theme-shanmiao .festival-card,
#app.theme-shanmiao .schedule-container,
#app.theme-shanmiao .form-card,
#app.theme-shanmiao .calendar-container,
#app.theme-shanmiao .festival-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(250,248,242,.48) 52%, rgba(207,229,220,.12)) !important;
  border: 1px solid rgba(255,255,255,.76) !important;
  box-shadow: 0 18px 48px rgba(84, 116, 108, .08) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.10) !important;
  backdrop-filter: blur(22px) saturate(1.10) !important;
}

@media (min-width: 1024px) {
  html.theme-shanmiao body {
    background:
      radial-gradient(circle at 64% 6%, rgba(255, 236, 198, .30), transparent 28%),
      radial-gradient(circle at 82% 24%, rgba(176, 214, 202, .18), transparent 32%),
      linear-gradient(145deg, #faf8f2 0%, #f3f1e8 46%, #e5ebe6 100%) !important;
  }

  #app.theme-shanmiao .main-view {
    position: relative !important;
    overflow: hidden !important;
    background:
      linear-gradient(135deg, rgba(255,255,255,.56), rgba(250,248,242,.32) 46%, rgba(240,246,242,.22)),
      rgba(255, 252, 247, .34) !important;
    border: 1px solid rgba(255,255,255,.82) !important;
    box-shadow:
      0 32px 92px rgba(68, 92, 84, .12),
      inset 0 1px 0 rgba(255,255,255,.88) !important;
  }

  /* Mockup: cream glass shell only — no full-bleed mountain on main-view */
  #app.theme-shanmiao .main-view::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
      radial-gradient(circle at 72% 10%, rgba(255, 236, 198, .14), transparent 28%),
      radial-gradient(circle at 88% 42%, rgba(176, 214, 202, .10), transparent 32%);
    opacity: 1;
  }

  #app.theme-shanmiao .desktop-content,
  #app.theme-shanmiao .content-area,
  #app.theme-shanmiao .page-content,
  #app.theme-shanmiao .content {
    position: relative;
    z-index: 1;
  }

  #app.theme-shanmiao .desktop-sidebar {
    background:
      linear-gradient(180deg, rgba(255,252,248,.66), rgba(245,243,236,.38)) !important;
    border-right: 1px solid rgba(255,255,255,.68) !important;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.42) !important;
  }

  #app.theme-shanmiao .desktop-logo {
    box-shadow: 0 14px 30px rgba(94, 130, 122, .14) !important;
  }

  #app.theme-shanmiao .desktop-brand::after {
    content: "✦" !important;
    color: #c9a45a !important;
    background: transparent !important;
    border: 0 !important;
    font-size: 14px !important;
  }

  #app.theme-shanmiao .desktop-nav-item.desktop-nav-active,
  #app.theme-shanmiao .desktop-nav-active {
    background:
      linear-gradient(135deg, rgba(255,255,255,.68), rgba(220, 236, 228, .52)) !important;
    color: var(--primary-dark) !important;
    box-shadow: 0 12px 30px rgba(94, 130, 122, .10) !important;
  }

  #app.theme-shanmiao .desktop-nav-item.desktop-nav-active::before,
  #app.theme-shanmiao .desktop-nav-active::before {
    content: "" !important;
    background: #5e827a !important;
  }

  #app.theme-shanmiao .desktop-nav-item:hover {
    background: rgba(255,255,255,.48) !important;
    color: var(--primary-dark) !important;
  }

  #app.theme-shanmiao .overview-hero-panel {
    position: relative !important;
    min-height: 154px !important;
    padding: 18px 34px 16px 22px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    overflow: hidden !important;
  }

  #app.theme-shanmiao .overview-hero-panel::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    height: 154px !important;
    z-index: 0 !important;
    pointer-events: none !important;
    border-radius: 22px !important;
    background-color: rgba(255, 252, 247, .42) !important;
    background-image:
      linear-gradient(90deg, rgba(255, 255, 255, .94) 0%, rgba(255, 252, 247, .78) 34%, rgba(255, 249, 244, .42) 56%, rgba(222, 239, 232, .14) 100%),
      url("../assets/shanmiao-mountain-hero.png") !important;
    background-size: cover, auto 100% !important;
    background-position: center, right 2% center !important;
    background-repeat: no-repeat, no-repeat !important;
    opacity: 1 !important;
  }

  #app.theme-shanmiao .overview-hero-panel::after {
    display: none !important;
  }

  #app.theme-shanmiao .overview-hero-copy,
  #app.theme-shanmiao .overview-hero-status {
    z-index: 1 !important;
  }

  #app.theme-shanmiao .overview-hero-kicker {
    color: #6a7a73 !important;
  }

  #app.theme-shanmiao .overview-hero-copy p {
    color: #6a7a73 !important;
  }

  #app.theme-shanmiao .overview-hero-status {
    background: rgba(255,255,255,.62) !important;
    border: 1px solid rgba(255,255,255,.78) !important;
    box-shadow: 0 16px 44px rgba(84, 116, 108, .10) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.08) !important;
    backdrop-filter: blur(20px) saturate(1.08) !important;
  }

  #app.theme-shanmiao .overview-card,
  #app.theme-shanmiao .overview-calendar-card,
  #app.theme-shanmiao .overview-checklist-card {
    position: relative !important;
    overflow: hidden !important;
    background:
      linear-gradient(145deg, rgba(255,255,255,.78), rgba(255,252,247,.58) 52%, rgba(236,244,240,.14)) !important;
    border: 1px solid rgba(255,255,255,.80) !important;
    box-shadow:
      0 18px 52px rgba(84, 116, 108, .08),
      inset 0 1px 0 rgba(255,255,255,.90) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.08) !important;
    backdrop-filter: blur(22px) saturate(1.08) !important;
  }

  #app.theme-shanmiao .overview-card-empty {
    color: #8a9690 !important;
  }

  #app.theme-shanmiao .overview-card-empty i {
    font-size: 42px !important;
    opacity: .42 !important;
    font-style: normal !important;
  }

  #app.theme-shanmiao .overview-card:not(.overview-checklist-card):not(.overview-calendar-card)::after {
    content: "";
    position: absolute;
    inset: auto 0 0 auto;
    width: 54%;
    height: 46%;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    opacity: .17;
    filter: saturate(.88) contrast(.98);
    -webkit-mask-image: linear-gradient(225deg, transparent 8%, rgba(0,0,0,.92) 72%);
    mask-image: linear-gradient(225deg, transparent 8%, rgba(0,0,0,.92) 72%);
  }

  #app.theme-shanmiao .overview-card-schedule::after,
  #app.theme-shanmiao .overview-main-cards > button.overview-card:nth-of-type(1)::after {
    background-image: url("../assets/shanmiao-mountain-card-1.png");
    background-size: 240px auto;
    background-position: right 0 bottom 0;
    opacity: .18;
  }

  #app.theme-shanmiao .overview-card-countdown::after,
  #app.theme-shanmiao .overview-main-cards > button.overview-card:nth-of-type(2)::after {
    background-image: url("../assets/shanmiao-mountain-card-2.png");
    background-size: 250px auto;
    background-position: right -4px bottom -2px;
    opacity: .19;
  }

  #app.theme-shanmiao .overview-card-festival::after,
  #app.theme-shanmiao .overview-main-cards > button.overview-card:nth-of-type(3)::after {
    background-image: url("../assets/shanmiao-mountain-card-3.png");
    background-size: 270px auto;
    background-position: right -8px bottom -4px;
    opacity: .17;
  }

  #app.theme-shanmiao .overview-card-subscription::after,
  #app.theme-shanmiao .overview-main-cards > button.overview-card:nth-of-type(4)::after {
    background-image: url("../assets/shanmiao-mountain-card-4.png");
    background-size: 220px auto;
    background-position: right 0 bottom 0;
    opacity: .15;
  }

  #app.theme-shanmiao .overview-checklist-card::after,
  #app.theme-shanmiao .checklist-overview-card::after,
  #app.theme-shanmiao .overview-list-card::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 0;
    bottom: 0;
    height: 52%;
    pointer-events: none;
    z-index: 0;
    background-image: url("../assets/shanmiao-mountain-list.png");
    background-size: 100% auto;
    background-position: center bottom;
    background-repeat: no-repeat;
    opacity: .16;
    filter: saturate(.86) contrast(.96);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.9) 68%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.9) 68%);
  }

  #app.theme-shanmiao .overview-calendar-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32%;
    pointer-events: none;
    z-index: 0;
    background-image: url("../assets/shanmiao-mountain-calendar.png");
    background-size: 100% auto;
    background-position: center bottom;
    background-repeat: no-repeat;
    opacity: .12;
    filter: saturate(.82) contrast(.94);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.85) 70%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.85) 70%);
    mix-blend-mode: normal;
  }

  #app.theme-shanmiao .overview-quote-card {
    position: relative !important;
    overflow: hidden !important;
    color: rgba(255,255,255,.96) !important;
    background-color: #4a5f59 !important;
    background-image:
      linear-gradient(90deg, rgba(52, 68, 64, .82) 0%, rgba(78, 102, 94, .48) 46%, rgba(255, 232, 190, .08) 100%),
      linear-gradient(180deg, rgba(255,255,255,.06), rgba(32, 44, 40, .52)),
      url("../assets/shanmiao-mountain-quote.png") !important;
    background-size: cover, cover, cover !important;
    background-position: center, center, right center !important;
    border: 1px solid rgba(255,255,255,.36) !important;
    box-shadow:
      0 24px 62px rgba(52, 68, 64, .24),
      inset 0 1px 0 rgba(255,255,255,.28) !important;
  }

  #app.theme-shanmiao .overview-quote-card::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background:
      linear-gradient(180deg, rgba(42, 57, 54, .08) 0%, rgba(32, 44, 40, .42) 100%) !important;
    opacity: 1 !important;
    pointer-events: none !important;
  }

  #app.theme-shanmiao .overview-quote-card p,
  #app.theme-shanmiao .overview-quote-mark,
  #app.theme-shanmiao .overview-quote-foot {
    color: rgba(255,255,255,.96) !important;
    text-shadow: 0 2px 14px rgba(42, 57, 54, .28) !important;
  }

  #app.theme-shanmiao .overview-quote-card p {
    font-family: Georgia, "Times New Roman", "Songti SC", serif !important;
  }

  #app.theme-shanmiao .overview-card-icon {
    background:
      linear-gradient(135deg, rgba(255,255,255,.78), rgba(232, 240, 236, .48)) !important;
    border: 1px solid rgba(255,255,255,.80) !important;
    box-shadow:
      0 12px 28px rgba(94, 130, 122, .12),
      inset 0 1px 0 rgba(255,255,255,.86) !important;
  }

  #app.theme-shanmiao .overview-card-foot b,
  #app.theme-shanmiao .tag,
  #app.theme-shanmiao .ov-mini-day.is-today {
    background: var(--primary-gradient) !important;
    color: #f8fcfa !important;
    box-shadow: 0 10px 24px rgba(78, 110, 102, .22) !important;
  }

  #app.theme-shanmiao .overview-card-body span,
  #app.theme-shanmiao .overview-card-body small,
  #app.theme-shanmiao .ov-mini-week {
    color: #6a7a73 !important;
  }

  #app.theme-shanmiao .ov-mini-day:not(.is-empty):not(.is-today):hover,
  #app.theme-shanmiao .overview-card:hover {
    border-color: rgba(255,255,255,.84) !important;
    box-shadow: 0 26px 68px rgba(84, 116, 108, .14) !important;
  }

  #app.theme-shanmiao .overview-card > *,
  #app.theme-shanmiao .overview-calendar-card > *,
  #app.theme-shanmiao .overview-checklist-card > *,
  #app.theme-shanmiao .checklist-overview-card > *,
  #app.theme-shanmiao .overview-list-card > *,
  #app.theme-shanmiao .overview-quote-card > * {
    position: relative;
    z-index: 1;
  }
}

/* Desktop calendar panel: today = gray square cell (not dark circle pill) */
@media (min-width: 900px) {
  #calendarPanel .calendar-grid .calendar-day.today,
  #app #calendarPanel .calendar-grid .calendar-day.today,
  #app.theme-coral #calendarPanel .calendar-grid .calendar-day.today,
  #app.theme-shanmiao #calendarPanel .calendar-grid .calendar-day.today,
  .theme-mono #calendarPanel .calendar-grid .calendar-day.today {
    background: rgba(17, 24, 39, 0.08) !important;
    color: var(--text-main) !important;
    border-color: rgba(17, 24, 39, 0.14) !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    animation: none !important;
  }

  #calendarPanel .calendar-grid .calendar-day.today .calendar-day-num {
    background: transparent !important;
    color: inherit !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

/* Academic year board */
.academic-year-board {
  display: grid;
  gap: 16px;
}

.academic-year-hero {
  padding: 22px;
}

.academic-year-hero.dashboard-card {
  animation: none !important;
  background-image: none !important;
  background-color: rgba(255, 255, 255, .72) !important;
}

.academic-year-hero.dashboard-card::before,
.academic-year-hero.dashboard-card::after {
  content: none !important;
  display: none !important;
}

.academic-year-hero h2 {
  margin: 8px 0 6px;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.academic-year-hero p {
  margin: 0;
  color: var(--muted, #6b7280);
}

.academic-year-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.academic-year-card {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 24px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
  padding: 20px;
}

.academic-year-holidays {
  grid-column: 1 / -1;
}

.academic-year-card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.academic-year-card-head h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.academic-year-badge {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: rgba(15, 23, 42, .72);
  font-size: 13px;
  font-weight: 700;
}

.academic-year-timeline,
.academic-year-holiday-list {
  display: grid;
  gap: 10px;
}

.academic-year-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,23,42,.06);
}

.academic-year-row span {
  color: rgba(15,23,42,.56);
  font-size: 14px;
  font-weight: 700;
}

.academic-year-row b {
  color: rgba(15,23,42,.92);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 650;
}

@media (max-width: 767px) {
  .academic-year-board {
    gap: 12px;
  }

  .academic-year-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .academic-year-holidays {
    grid-column: auto;
  }

  .academic-year-card,
  .academic-year-hero {
    border-radius: 22px;
    padding: 17px;
  }

  .academic-year-card-head h3 {
    font-size: 19px;
  }

  .academic-year-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 12px;
  }

  .academic-year-row b {
    font-size: 14px;
  }
}
