/* Calm midnight theme, loaded after the playful light palette. */
[data-theme='dark']{color-scheme:dark;--bg:#0f151b;--bg-2:#151d25;--surface:#19222b;--surface-soft:#202b35;--text:#edf3f7;--text-muted:#a8b5bf;--text-dim:#74838f;--border:rgba(222,235,244,.09);--border-strong:rgba(222,235,244,.15);--fill:rgba(222,235,244,.07);--chip-bg:rgba(102,183,158,.14);--nav-bg:rgba(15,21,27,.88);--accent:#ff8067;--accent-3:#67b79f;--shadow:0 12px 34px rgba(0,0,0,.2);--shadow-hover:0 18px 44px rgba(0,0,0,.3);--park-ink:#edf3f7;--park-muted:#a8b5bf;--park-cream:#0f151b;--park-paper:#19222b;--park-ground:#15231f;--park-line:rgba(222,235,244,.11);--park-shadow:0 12px 34px rgba(0,0,0,.2)}
[data-theme='dark'] body.subpage-body,[data-theme='dark'] body.home-body.map-home{color:var(--text)!important;background:radial-gradient(circle at 82% 5%,rgba(78,145,126,.09),transparent 29rem),radial-gradient(circle at 8% 14%,rgba(98,130,170,.07),transparent 25rem),var(--bg)!important;background-attachment:fixed!important}
[data-theme='dark'] body.subpage-body::before{opacity:.05;filter:saturate(.5) brightness(.7)}[data-theme='dark'] .home-landscape{opacity:.1;filter:saturate(.45) brightness(.75)}

/* Navigation */
[data-theme='dark'] .topbar,[data-theme='dark'] .subpage-header,[data-theme='dark'] .ai-page-body .subpage-header{color:var(--text)!important;background:var(--nav-bg)!important;border-color:var(--border)!important;box-shadow:inset 0 -1px var(--border)!important}
[data-theme='dark'] .topbar-title,[data-theme='dark'] .subpage-header .topbar-title,[data-theme='dark'] .home-nav-link{color:var(--text)!important}[data-theme='dark'] .topbar-subtitle,[data-theme='dark'] .subpage-header .topbar-subtitle{color:var(--text-dim)!important}
[data-theme='dark'] .site-nav-more-panel{border-color:var(--border-strong)!important;background:#1b252e!important;box-shadow:0 18px 40px rgba(0,0,0,.32)!important}[data-theme='dark'] .site-nav-more-panel a{color:var(--text-muted)!important}[data-theme='dark'] .site-nav-more-panel a:hover,[data-theme='dark'] .site-nav-more-panel a.is-active{color:var(--text)!important;background:var(--fill)!important}

/* Home */
[data-theme='dark'] .map-home .site-hero-title,[data-theme='dark'] .map-home .today-panel h2,[data-theme='dark'] .map-home .search-label,[data-theme='dark'] .map-home .category-name,[data-theme='dark'] .map-home .link-name{color:var(--text)!important}
[data-theme='dark'] .map-home .site-hero-sub,[data-theme='dark'] .map-home .hero-eyebrow,[data-theme='dark'] .map-home .hero-meta,[data-theme='dark'] .map-home .category-count,[data-theme='dark'] .map-home .link-desc{color:var(--text-muted)!important}
[data-theme='dark'] .map-home .today-panel,[data-theme='dark'] .map-home .search-box,[data-theme='dark'] .map-home .unit-inner{color:var(--text)!important;border-color:var(--border)!important;background:rgba(25,34,43,.9)!important;box-shadow:var(--shadow)!important}
[data-theme='dark'] .map-home .link-card{color:var(--text)!important;border-color:transparent!important;background:rgba(255,255,255,.035)!important;box-shadow:none!important}[data-theme='dark'] .map-home .link-card:hover{border-color:var(--border)!important;background:rgba(255,255,255,.07)!important}[data-theme='dark'] .map-home .search-box input{color:var(--text)!important;background:transparent!important}[data-theme='dark'] .map-home .home-note{background:rgba(255,255,255,.035)!important}

/* Shared cards and controls */
[data-theme='dark'] .menu-hero,[data-theme='dark'] .messages-hero,[data-theme='dark'] .account-hero{border-color:rgba(111,164,185,.18)!important;background:linear-gradient(135deg,#1b2932,#1a242c)!important}
[data-theme='dark'] .menu-hero-title,[data-theme='dark'] .messages-display,[data-theme='dark'] .edit-section-title,[data-theme='dark'] .modal-title{color:var(--text)!important}[data-theme='dark'] .menu-hero-desc,[data-theme='dark'] .messages-unread,[data-theme='dark'] .modal-hint{color:var(--text-muted)!important}
[data-theme='dark'] .edit-card,[data-theme='dark'] .messages-card,[data-theme='dark'] .meal-panel,[data-theme='dark'] .menu-gate,[data-theme='dark'] .bakery-gate,[data-theme='dark'] .ai-page-gate,[data-theme='dark'] .modal{color:var(--text)!important;border-color:var(--border)!important;background:var(--surface)!important;box-shadow:var(--shadow)!important}
[data-theme='dark'] .dish-card,[data-theme='dark'] .dish-card:nth-child(n),[data-theme='dark'] .dish-tile,[data-theme='dark'] .message-item,[data-theme='dark'] .category-editor,[data-theme='dark'] .link-editor,[data-theme='dark'] .dish-item,[data-theme='dark'] .meal-summary-item,[data-theme='dark'] .slot-row{color:var(--text)!important;border-color:var(--border)!important;background:var(--surface-soft)!important;box-shadow:none!important}
[data-theme='dark'] .message-item:hover,[data-theme='dark'] .dish-card:hover{background:#26333e!important}
[data-theme='dark'] .meal-tab,[data-theme='dark'] .dish-cat-btn,[data-theme='dark'] .bakery-filter,[data-theme='dark'] .recipe-tab,[data-theme='dark'] .btn-secondary,[data-theme='dark'] .btn-ghost{color:var(--text-muted)!important;border-color:var(--border)!important;background:rgba(255,255,255,.045)!important;box-shadow:none!important}
[data-theme='dark'] input,[data-theme='dark'] select,[data-theme='dark'] textarea,[data-theme='dark'] .field input,[data-theme='dark'] .field select{color:var(--text)!important;border-color:var(--border-strong)!important;background:#121a21!important;box-shadow:none!important}[data-theme='dark'] input::placeholder,[data-theme='dark'] textarea::placeholder{color:var(--text-dim)!important}[data-theme='dark'] .modal-overlay{background:rgba(4,8,11,.74)!important}

/* Bakery: restrained warm accents */
[data-theme='dark'] .bakery-body.subpage-body{background:radial-gradient(circle at 85% 7%,rgba(217,139,87,.08),transparent 30rem),var(--bg)!important}
[data-theme='dark'] .bakery-body .bakery-hero{border-color:rgba(222,161,106,.22)!important;background:radial-gradient(circle at 78% 15%,rgba(255,255,255,.045) 0 74px,transparent 76px),linear-gradient(135deg,#263039,#2d2928)!important;box-shadow:var(--shadow)!important}
[data-theme='dark'] .bakery-body .bakery-brand,[data-theme='dark'] .bakery-series-intro h3,[data-theme='dark'] .bakery-body .series-card-title,[data-theme='dark'] .bakery-body .lesson-card-title,[data-theme='dark'] .bakery-body .lesson-stage .lesson-title{color:var(--text)!important}
[data-theme='dark'] .bakery-body .bakery-hero-title,[data-theme='dark'] .bakery-body .series-card-desc,[data-theme='dark'] .bakery-body .series-card-meta,[data-theme='dark'] .bakery-body .lesson-intro{color:var(--text-muted)!important}
[data-theme='dark'] .bakery-body .bakery-hero-desc,[data-theme='dark'] .bakery-body .bakery-crumb,[data-theme='dark'] .bakery-body .series-card-kind,[data-theme='dark'] .bakery-body .lesson-stage .lesson-number{color:#e8b084!important;background:rgba(232,176,132,.09)!important}
[data-theme='dark'] .bakery-body .bakery-search,[data-theme='dark'] .bakery-body .series-card,[data-theme='dark'] .bakery-body .series-card:nth-child(n),[data-theme='dark'] .bakery-body .lesson-card,[data-theme='dark'] .bakery-body .series-header,[data-theme='dark'] .bakery-body .lesson-stage,[data-theme='dark'] .bakery-body .recipe-section,[data-theme='dark'] .bakery-body .recipe-block{color:var(--text)!important;border-color:var(--border)!important;background:var(--surface)!important;box-shadow:var(--shadow)!important}
[data-theme='dark'] .bakery-body .bakery-search input{color:var(--text)!important}[data-theme='dark'] .bakery-body .lesson-sidebar{border-color:rgba(222,161,106,.16)!important;background:linear-gradient(155deg,#28323a,#2b2929)!important}[data-theme='dark'] .bakery-body .recipe-section-header{border-color:var(--border)!important}

/* AI */
[data-theme='dark'] .ai-page-body{background:var(--bg)!important}[data-theme='dark'] .ai-page-chat .ai-chat-messages{background:transparent!important}
[data-theme='dark'] .ai-page-chat .ai-starter{border-color:rgba(150,130,220,.18)!important;background:radial-gradient(circle at 8% 18%,rgba(255,255,255,.04) 0 35px,transparent 36px),linear-gradient(125deg,#222c35 0 31%,#19222b 31% 69%,#202b29 100%)!important;box-shadow:var(--shadow)!important}
[data-theme='dark'] .ai-page-chat .ai-starter h2{color:var(--text)!important}[data-theme='dark'] .ai-page-chat .ai-starter>p{color:var(--text-muted)!important}
[data-theme='dark'] .ai-page-chat .ai-starter-prompts button,[data-theme='dark'] .ai-page-chat .ai-starter-prompts button:nth-child(n),[data-theme='dark'] .ai-page-chat .ai-chat-tools,[data-theme='dark'] .ai-page-chat .ai-chat-form,[data-theme='dark'] .ai-page-chat .ai-tool-button,[data-theme='dark'] .ai-page-chat .ai-model-select-label select,[data-theme='dark'] .ai-page-chat .ai-search-toggle{color:var(--text)!important;border-color:var(--border)!important;background:var(--surface)!important;box-shadow:none!important}
[data-theme='dark'] .ai-message-content{color:var(--text)!important;border-color:var(--border)!important;background:var(--surface-soft)!important}[data-theme='dark'] .ai-message-user .ai-message-content{color:#fff!important;background:linear-gradient(145deg,#765bd1,#5d43b9)!important}[data-theme='dark'] .ai-page-chat .ai-chat-note{color:var(--text-dim)!important}
@media(max-width:700px){[data-theme='dark'] .shared-site-nav .site-nav-more-trigger{color:var(--text)!important;border-color:var(--border)!important;background:var(--surface-soft)!important}}

/* Home uses a higher-specificity illustrated header/search skin. */
[data-theme='dark'] .home-body.map-home .topbar {
  color:var(--text)!important;
  background:rgba(15,21,27,.92)!important;
  border-color:var(--border)!important;
  box-shadow:inset 0 -1px var(--border)!important;
}
[data-theme='dark'] .home-body.map-home .topbar-title,
[data-theme='dark'] .home-body.map-home .home-nav-link,
[data-theme='dark'] .home-body.map-home .topbar-clock,
[data-theme='dark'] .home-body.map-home .topbar-weather { color:var(--text)!important; }
[data-theme='dark'] .home-body.map-home .topbar-subtitle { color:var(--text-dim)!important; }
[data-theme='dark'] .home-body.map-home .hero-search .search-box {
  color:var(--text-muted)!important;
  border-color:var(--border-strong)!important;
  background:#19222b!important;
  box-shadow:0 10px 28px rgba(0,0,0,.18)!important;
}
[data-theme='dark'] .home-body.map-home .hero-search .search-box input {
  color:var(--text)!important;
  background:transparent!important;
}
[data-theme='dark'] .home-body.map-home .hero-search .search-box input::placeholder { color:var(--text-dim)!important; }
[data-theme='dark'] .home-body.map-home .topbar .auth-actions .btn.btn-ghost {
  color:var(--text)!important;
  border-color:var(--border-strong)!important;
  background:rgba(255,255,255,.055)!important;
  box-shadow:none!important;
}

/* Page identities: dark mode should retain the colourful family character. */
[data-theme='dark'] body.home-body.map-home {
  background:
    radial-gradient(circle at 76% 10%,rgba(93,86,186,.13),transparent 27rem),
    radial-gradient(circle at 15% 32%,rgba(61,137,117,.12),transparent 30rem),
    linear-gradient(180deg,#151827,#111722 72%,#111a1b) !important;
}
[data-theme='dark'] .map-home .site-hero {
  border-color:transparent !important;
  background:transparent !important;
  box-shadow:none !important;
}
[data-theme='dark'] .map-home .today-panel {
  background:linear-gradient(145deg,rgba(36,49,60,.94),rgba(31,42,55,.94)) !important;
}
[data-theme='dark'] .map-home .unit:nth-child(4n+1) .unit-inner { background:linear-gradient(145deg,#1d2937,#1a2530) !important; }
[data-theme='dark'] .map-home .unit:nth-child(4n+2) .unit-inner { background:linear-gradient(145deg,#25243b,#1e2734) !important; }
[data-theme='dark'] .map-home .unit:nth-child(4n+3) .unit-inner { background:linear-gradient(145deg,#1b302d,#1a2830) !important; }
[data-theme='dark'] .map-home .unit:nth-child(4n+4) .unit-inner { background:linear-gradient(145deg,#30272b,#242733) !important; }
[data-theme='dark'] .map-home .category-icon,
[data-theme='dark'] .map-home .link-icon { filter:saturate(.86) brightness(.98); }

[data-theme='dark'] body.menu-body {
  background:radial-gradient(circle at 86% 12%,rgba(239,132,75,.12),transparent 28rem),linear-gradient(180deg,#171923,#11161d) !important;
}
[data-theme='dark'] .menu-body .menu-hero {
  border-color:rgba(242,151,91,.18) !important;
  background:linear-gradient(135deg,#342825,#252532) !important;
}
[data-theme='dark'] .menu-body .edit-card,
[data-theme='dark'] .menu-body .meal-panel { background:linear-gradient(145deg,#1d2630,#1a222b) !important; }
[data-theme='dark'] .menu-body .dish-card:nth-child(4n+1) { background:#28282f !important; }
[data-theme='dark'] .menu-body .dish-card:nth-child(4n+2) { background:#202d2b !important; }
[data-theme='dark'] .menu-body .dish-card:nth-child(4n+3) { background:#202a35 !important; }
[data-theme='dark'] .menu-body .dish-card:nth-child(4n+4) { background:#30272a !important; }

[data-theme='dark'] body.messages-body {
  background:radial-gradient(circle at 84% 12%,rgba(194,100,145,.12),transparent 28rem),linear-gradient(180deg,#171821,#11161d) !important;
}
[data-theme='dark'] .messages-body .messages-hero {
  border-color:rgba(213,133,172,.18) !important;
  background:linear-gradient(135deg,#322633,#242734) !important;
}
[data-theme='dark'] .messages-body .messages-card { background:linear-gradient(145deg,#202632,#19232c) !important; }
[data-theme='dark'] .messages-body .message-item.is-unread { background:rgba(189,104,151,.1) !important; }

[data-theme='dark'] body.bakery-body.subpage-body {
  background:radial-gradient(circle at 84% 9%,rgba(229,147,82,.14),transparent 29rem),linear-gradient(180deg,#1b191c,#13171d) !important;
}
[data-theme='dark'] .bakery-body .bakery-hero {
  background:radial-gradient(circle at 78% 15%,rgba(255,255,255,.055) 0 74px,transparent 76px),linear-gradient(135deg,#3a2a27,#2d2933) !important;
}
[data-theme='dark'] .bakery-body .bakery-gate {
  border-color:var(--border)!important;
  background:linear-gradient(145deg,#1f2730,#1b222a)!important;
}
[data-theme='dark'] .bakery-body .series-card:nth-child(4n+1) { background:#2e2928 !important; }
[data-theme='dark'] .bakery-body .series-card:nth-child(4n+2) { background:#222e2a !important; }
[data-theme='dark'] .bakery-body .series-card:nth-child(4n+3) { background:#202b36 !important; }
[data-theme='dark'] .bakery-body .series-card:nth-child(4n+4) { background:#32272c !important; }

[data-theme='dark'] body.ai-page-body {
  background:radial-gradient(circle at 18% 8%,rgba(116,86,209,.14),transparent 29rem),radial-gradient(circle at 88% 20%,rgba(65,148,125,.1),transparent 30rem),#12151e !important;
}
[data-theme='dark'] .ai-page-chat .ai-starter {
  background:radial-gradient(circle at 8% 18%,rgba(255,255,255,.05) 0 35px,transparent 36px),linear-gradient(125deg,#292443 0 31%,#1d2231 31% 69%,#1e302e 100%) !important;
}
[data-theme='dark'] .ai-page-chat .ai-starter-prompts button:nth-child(1) { background:#28283b !important; }
[data-theme='dark'] .ai-page-chat .ai-starter-prompts button:nth-child(2) { background:#30272d !important; }
[data-theme='dark'] .ai-page-chat .ai-starter-prompts button:nth-child(3) { background:#22302d !important; }
[data-theme='dark'] .ai-page-chat .ai-starter-prompts button:nth-child(4) { background:#232c39 !important; }
[data-theme='dark'] .home-body .ai-float-launcher {
  border-color:rgba(232,226,255,.68)!important;
  background:linear-gradient(145deg,#6550bf,#4d389f)!important;
  box-shadow:0 8px 24px rgba(22,12,60,.34)!important;
}

/* Dark theme v2: neutral, high-contrast surfaces shared by every main page. */
[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-2: #10161d;
  --surface: #151c24;
  --surface-soft: #1b2530;
  --text: #f4f7fa;
  --text-muted: #c3ccd6;
  --text-dim: #96a4b2;
  --border: #303d4a;
  --border-strong: #465565;
  --fill: #202b36;
  --chip-bg: #203a36;
  --nav-bg: rgba(11, 15, 20, .96);
  --accent: #ffb454;
  --accent-3: #64d4b2;
  --park-ink: #f4f7fa;
  --park-muted: #c3ccd6;
  --park-cream: #0b0f14;
  --park-paper: #151c24;
  --park-ground: #10161d;
  --park-line: #303d4a;
  --shadow: 0 12px 30px rgba(0, 0, 0, .34);
  --shadow-hover: 0 18px 42px rgba(0, 0, 0, .46);
}

[data-theme='dark'] body.home-body.map-home,
[data-theme='dark'] body.menu-body,
[data-theme='dark'] body.messages-body,
[data-theme='dark'] body.bakery-body.subpage-body,
[data-theme='dark'] body.ai-page-body,
[data-theme='dark'] body.subpage-body {
  color: var(--text) !important;
  background: #0b0f14 !important;
}
[data-theme='dark'] body::before,
[data-theme='dark'] .home-landscape { opacity: .035 !important; }

[data-theme='dark'] .topbar,
[data-theme='dark'] .home-body.map-home .topbar,
[data-theme='dark'] .subpage-header,
[data-theme='dark'] .ai-page-body .subpage-header {
  color: var(--text) !important;
  border-color: var(--border) !important;
  background: var(--nav-bg) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.035) !important;
}
[data-theme='dark'] .topbar-title,
[data-theme='dark'] .topbar-clock,
[data-theme='dark'] .topbar-weather,
[data-theme='dark'] .home-nav-link,
[data-theme='dark'] .site-nav-more-trigger { color: var(--text) !important; }
[data-theme='dark'] .topbar-subtitle { color: var(--text-muted) !important; }

[data-theme='dark'] .map-home .site-hero-title,
[data-theme='dark'] .menu-hero-title,
[data-theme='dark'] .messages-display,
[data-theme='dark'] .bakery-hero-title,
[data-theme='dark'] .ai-starter h2,
[data-theme='dark'] h1,
[data-theme='dark'] h2,
[data-theme='dark'] h3,
[data-theme='dark'] strong { color: var(--text) !important; }
[data-theme='dark'] .site-hero-sub,
[data-theme='dark'] .hero-eyebrow,
[data-theme='dark'] .hero-meta,
[data-theme='dark'] .menu-hero-desc,
[data-theme='dark'] .messages-unread,
[data-theme='dark'] .bakery-hero-desc,
[data-theme='dark'] .ai-starter > p,
[data-theme='dark'] .link-desc,
[data-theme='dark'] small { color: var(--text-muted) !important; }

[data-theme='dark'] .map-home .today-panel,
[data-theme='dark'] .map-home .unit-inner,
[data-theme='dark'] .menu-hero,
[data-theme='dark'] .messages-hero,
[data-theme='dark'] .bakery-body .bakery-hero,
[data-theme='dark'] .ai-page-chat .ai-starter,
[data-theme='dark'] .edit-card,
[data-theme='dark'] .messages-card,
[data-theme='dark'] .meal-panel,
[data-theme='dark'] .menu-gate,
[data-theme='dark'] .bakery-gate,
[data-theme='dark'] .ai-page-gate,
[data-theme='dark'] .bakery-body .series-card,
[data-theme='dark'] .bakery-body .lesson-card,
[data-theme='dark'] .bakery-body .series-header,
[data-theme='dark'] .bakery-body .lesson-stage,
[data-theme='dark'] .bakery-body .recipe-section,
[data-theme='dark'] .bakery-body .recipe-block,
[data-theme='dark'] .modal {
  color: var(--text) !important;
  border-color: var(--border) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow) !important;
}

[data-theme='dark'] .map-home .unit:nth-child(n) .unit-inner,
[data-theme='dark'] .menu-body .dish-card:nth-child(n),
[data-theme='dark'] .bakery-body .series-card:nth-child(n),
[data-theme='dark'] .dish-tile,
[data-theme='dark'] .message-item,
[data-theme='dark'] .dish-item,
[data-theme='dark'] .meal-summary-item,
[data-theme='dark'] .slot-row {
  color: var(--text) !important;
  border-color: var(--border) !important;
  background: var(--surface-soft) !important;
  box-shadow: none !important;
}
[data-theme='dark'] .link-card,
[data-theme='dark'] .home-body .link-card {
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  background: #18212a !important;
}
[data-theme='dark'] .link-card:hover,
[data-theme='dark'] .message-item:hover,
[data-theme='dark'] .dish-card:hover { background: #24313d !important; }

[data-theme='dark'] input,
[data-theme='dark'] select,
[data-theme='dark'] textarea,
[data-theme='dark'] .map-home .hero-search .search-box,
[data-theme='dark'] .ai-page-chat .ai-chat-form,
[data-theme='dark'] .ai-page-chat .ai-chat-tools {
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
  background: #10161d !important;
  box-shadow: none !important;
}
[data-theme='dark'] input::placeholder,
[data-theme='dark'] textarea::placeholder { color: #8998a7 !important; opacity: 1; }
[data-theme='dark'] input:focus,
[data-theme='dark'] select:focus,
[data-theme='dark'] textarea:focus {
  border-color: #72b7ff !important;
  box-shadow: 0 0 0 3px rgba(114,183,255,.2) !important;
}

[data-theme='dark'] .btn-ghost,
[data-theme='dark'] .btn-secondary,
[data-theme='dark'] .meal-tab,
[data-theme='dark'] .dish-cat-btn,
[data-theme='dark'] .bakery-filter,
[data-theme='dark'] .recipe-tab,
[data-theme='dark'] .ai-starter-prompts button,
[data-theme='dark'] .ai-tool-button {
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
  background: #202b36 !important;
}
[data-theme='dark'] .btn-primary,
[data-theme='dark'] button[type='submit'] {
  color: #101418 !important;
  background: #ffb454 !important;
}

[data-theme='dark'] .ai-message-content {
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  background: var(--surface-soft) !important;
}
[data-theme='dark'] .ai-message-user .ai-message-content {
  color: #fff !important;
  border-color: #316e62 !important;
  background: #24584f !important;
}
[data-theme='dark'] .ai-message-content code { color: #ffd08a !important; background: #10161d !important; }
[data-theme='dark'] .ai-message-content pre { color: #edf4fa !important; background: #080b0f !important; }
[data-theme='dark'] .ai-chat-note { color: var(--text-muted) !important; }

[data-theme='dark'] a { text-decoration-color: currentColor; }
[data-theme='dark'] :focus-visible { outline-color: #72b7ff !important; }

/* Dark theme v3: a warm evening palette that belongs to the family site. */
[data-theme='dark'] {
  --bg: #151310;
  --bg-2: #1a1713;
  --surface: #211e1a;
  --surface-soft: #29251f;
  --text: #f5ecdf;
  --text-muted: #c9bdad;
  --text-dim: #9f9384;
  --border: rgba(243, 224, 196, .14);
  --border-strong: rgba(243, 224, 196, .24);
  --fill: rgba(245, 230, 207, .08);
  --chip-bg: rgba(126, 168, 139, .16);
  --nav-bg: rgba(21, 19, 16, .94);
  --accent: #e58b68;
  --accent-3: #8eb49a;
  --park-ink: #f5ecdf;
  --park-muted: #c9bdad;
  --park-cream: #151310;
  --park-paper: #211e1a;
  --park-ground: #191c17;
  --park-line: rgba(243, 224, 196, .14);
  --shadow: 0 14px 38px rgba(4, 3, 2, .26);
  --shadow-hover: 0 20px 48px rgba(4, 3, 2, .36);
}

[data-theme='dark'] body.home-body.map-home,
[data-theme='dark'] body.menu-body,
[data-theme='dark'] body.messages-body,
[data-theme='dark'] body.bakery-body.subpage-body,
[data-theme='dark'] body.ai-page-body,
[data-theme='dark'] body.subpage-body {
  background:
    radial-gradient(circle at 86% 4%, rgba(151, 110, 76, .09), transparent 25rem),
    radial-gradient(circle at 8% 26%, rgba(90, 131, 105, .075), transparent 27rem),
    #151310 !important;
}

[data-theme='dark'] .topbar,
[data-theme='dark'] .home-body.map-home .topbar,
[data-theme='dark'] .subpage-header,
[data-theme='dark'] .ai-page-body .subpage-header {
  background: rgba(21, 19, 16, .9) !important;
  border-color: rgba(243, 224, 196, .1) !important;
  backdrop-filter: blur(20px) saturate(115%);
  -webkit-backdrop-filter: blur(20px) saturate(115%);
}

[data-theme='dark'] .map-home .today-panel,
[data-theme='dark'] .map-home .unit:nth-child(n) .unit-inner,
[data-theme='dark'] .edit-card,
[data-theme='dark'] .messages-card,
[data-theme='dark'] .meal-panel,
[data-theme='dark'] .menu-gate,
[data-theme='dark'] .bakery-gate,
[data-theme='dark'] .ai-page-gate,
[data-theme='dark'] .bakery-body .series-card:nth-child(n),
[data-theme='dark'] .bakery-body .lesson-card,
[data-theme='dark'] .bakery-body .series-header,
[data-theme='dark'] .bakery-body .lesson-stage,
[data-theme='dark'] .bakery-body .recipe-section,
[data-theme='dark'] .bakery-body .recipe-block,
[data-theme='dark'] .modal {
  border-color: var(--border) !important;
  background: rgba(33, 30, 26, .94) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.025), var(--shadow) !important;
}

[data-theme='dark'] .menu-hero,
[data-theme='dark'] .messages-hero,
[data-theme='dark'] .bakery-body .bakery-hero,
[data-theme='dark'] .ai-page-chat .ai-starter {
  border-color: rgba(229, 139, 104, .16) !important;
  background:
    radial-gradient(circle at 84% 12%, rgba(229, 139, 104, .08), transparent 13rem),
    linear-gradient(135deg, #29241f, #211f1b) !important;
  box-shadow: var(--shadow) !important;
}

[data-theme='dark'] .menu-body .dish-card:nth-child(n),
[data-theme='dark'] .dish-tile,
[data-theme='dark'] .message-item,
[data-theme='dark'] .dish-item,
[data-theme='dark'] .meal-summary-item,
[data-theme='dark'] .slot-row {
  border-color: rgba(243, 224, 196, .1) !important;
  background: #29251f !important;
}

[data-theme='dark'] .home-body .link-card,
[data-theme='dark'] .link-card {
  border-color: rgba(243, 224, 196, .08) !important;
  background: rgba(245, 230, 207, .045) !important;
  box-shadow: none !important;
}
[data-theme='dark'] .home-body .link-card:hover,
[data-theme='dark'] .link-card:hover,
[data-theme='dark'] .message-item:hover,
[data-theme='dark'] .dish-card:hover {
  border-color: rgba(229, 139, 104, .2) !important;
  background: rgba(229, 139, 104, .085) !important;
}

[data-theme='dark'] input,
[data-theme='dark'] select,
[data-theme='dark'] textarea,
[data-theme='dark'] .map-home .hero-search .search-box,
[data-theme='dark'] .ai-page-chat .ai-chat-form,
[data-theme='dark'] .ai-page-chat .ai-chat-tools {
  color: var(--text) !important;
  border-color: var(--border) !important;
  background: rgba(24, 21, 18, .92) !important;
}
[data-theme='dark'] input:focus,
[data-theme='dark'] select:focus,
[data-theme='dark'] textarea:focus {
  border-color: rgba(142, 180, 154, .7) !important;
  box-shadow: 0 0 0 3px rgba(142, 180, 154, .12) !important;
}

[data-theme='dark'] .btn-ghost,
[data-theme='dark'] .btn-secondary,
[data-theme='dark'] .meal-tab,
[data-theme='dark'] .dish-cat-btn,
[data-theme='dark'] .bakery-filter,
[data-theme='dark'] .recipe-tab,
[data-theme='dark'] .ai-starter-prompts button,
[data-theme='dark'] .ai-tool-button {
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
  background: rgba(245, 230, 207, .065) !important;
}
[data-theme='dark'] .btn-primary,
[data-theme='dark'] button[type='submit'] {
  color: #24150f !important;
  background: #e58b68 !important;
  box-shadow: 0 7px 18px rgba(121, 61, 40, .22) !important;
}

[data-theme='dark'] .ai-message-content {
  color: var(--text) !important;
  border-color: rgba(243, 224, 196, .1) !important;
  background: #29251f !important;
}
[data-theme='dark'] .ai-message-user .ai-message-content {
  color: #f7f2e9 !important;
  border-color: rgba(142, 180, 154, .3) !important;
  background: #496b59 !important;
}
[data-theme='dark'] .ai-message-content code { color: #efaa8f !important; background: #181512 !important; }
[data-theme='dark'] .ai-message-content pre { color: #eee7dc !important; background: #100e0c !important; }
[data-theme='dark'] :focus-visible { outline-color: #8eb49a !important; }

/* Homepage dark-mode repairs for the highly specific illustrated layout. */
html[data-theme='dark'] body.home-body.map-home .home-nav-link svg {
  color: #c9bdad !important;
  fill: none !important;
  stroke: currentColor !important;
}
html[data-theme='dark'] body.home-body.map-home .home-nav-link.is-active,
html[data-theme='dark'] body.home-body.map-home .home-nav-link.is-active svg {
  color: #ffb51a !important;
}
html[data-theme='dark'] body.home-body.map-home .topbar .topbar-clock,
html[data-theme='dark'] body.home-body.map-home .topbar .topbar-clock .clock-time,
html[data-theme='dark'] body.home-body.map-home .topbar .topbar-clock .clock-time > span {
  color: #c9bdad !important;
  border-color: transparent !important;
  background: transparent !important;
}

html[data-theme='dark'] body.home-body.map-home .discovery-search .search-label {
  color: #f5ecdf !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box {
  border-color: rgba(243,224,196,.22) !important;
  background: #201d19 !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.24) !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box:focus-within {
  border-color: #8eb49a !important;
  background: #24211c !important;
  box-shadow: 0 0 0 4px rgba(142,180,154,.12),0 12px 30px rgba(0,0,0,.26) !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search {
  color: #f5ecdf !important;
  background: transparent !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search::placeholder {
  color: #9f9384 !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-icon,
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-hint {
  color: #d8aa63 !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-hint {
  border-color: rgba(243,224,196,.18) !important;
  background: rgba(245,230,207,.08) !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .hero-meta,
html[data-theme='dark'] body.home-body.map-home .discovery-search .hero-meta strong {
  color: #a99c8d !important;
}

html[data-theme='dark'] body.home-body.map-home .today-panel {
  border-color: rgba(229,139,104,.34) !important;
  background: #27221d !important;
  box-shadow: 0 8px 0 rgba(0,0,0,.16),0 20px 38px rgba(0,0,0,.24) !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel::after {
  background: rgba(245,230,207,.055) !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel h2 {
  color: #f5ecdf !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel .home-note {
  color: #f5ecdf !important;
  border-color: rgba(243,224,196,.14) !important;
  background: rgba(245,230,207,.065) !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel .home-note strong {
  color: #efaa8f !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel .home-note small {
  color: #c9bdad !important;
}

html[data-theme='dark'] body.home-body.map-home .link-card:nth-child(n) {
  color: #f5ecdf !important;
  border-color: rgba(243,224,196,.1) !important;
  background: rgba(245,230,207,.055) !important;
  box-shadow: none !important;
}
html[data-theme='dark'] body.home-body.map-home .link-card:nth-child(4n + 1) { background: rgba(211,125,133,.10) !important; }
html[data-theme='dark'] body.home-body.map-home .link-card:nth-child(4n + 2) { background: rgba(102,157,193,.11) !important; }
html[data-theme='dark'] body.home-body.map-home .link-card:nth-child(4n + 3) { background: rgba(209,169,88,.11) !important; }
html[data-theme='dark'] body.home-body.map-home .link-card:nth-child(4n + 4) { background: rgba(112,163,126,.11) !important; }
html[data-theme='dark'] body.home-body.map-home .link-card:nth-child(n):hover {
  border-color: rgba(229,139,104,.36) !important;
  background: rgba(229,139,104,.13) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.2) !important;
}
html[data-theme='dark'] body.home-body.map-home .link-card .link-name {
  color: #f5ecdf !important;
}
html[data-theme='dark'] body.home-body.map-home .link-card .link-desc,
html[data-theme='dark'] body.home-body.map-home .link-card .link-domain {
  color: #b7aa9b !important;
}

/* Screenshot corrections: clean header edge, complete icon rings, navy canvas. */
html[data-theme='dark'] body.home-body.map-home {
  background: #11192d !important;
}
html[data-theme='dark'] body.home-body.map-home .topbar {
  border-bottom: 0 !important;
  background: #0d1426 !important;
  box-shadow: none !important;
}
html[data-theme='dark'] body.home-body.map-home .topbar::after {
  display: none !important;
  content: none !important;
}
html[data-theme='dark'] body.home-body.map-home .category:nth-child(n) .category-icon {
  box-sizing: border-box !important;
  overflow: hidden !important;
  border: 3px solid #f5ecdf !important;
  border-radius: 50% !important;
  box-shadow: 0 0 0 2px rgba(17, 25, 45, .72) !important;
}

/* Deep navy foundation: remove visually pure-black regions site-wide. */
html[data-theme='dark'] {
  --bg: #11192d;
  --bg-2: #141f35;
  --surface: #18233a;
  --surface-soft: #202d47;
  --nav-bg: #0d1426;
  --fill: rgba(190, 208, 235, .09);
  --border: rgba(190, 208, 235, .15);
  --border-strong: rgba(190, 208, 235, .25);
  --park-cream: #11192d;
  --park-paper: #18233a;
  --park-ground: #141f35;
}
html[data-theme='dark'] body.home-body.map-home,
html[data-theme='dark'] body.menu-body,
html[data-theme='dark'] body.messages-body,
html[data-theme='dark'] body.bakery-body.subpage-body,
html[data-theme='dark'] body.ai-page-body,
html[data-theme='dark'] body.subpage-body {
  background: #11192d !important;
}
html[data-theme='dark'] .topbar,
html[data-theme='dark'] .subpage-header,
html[data-theme='dark'] .ai-page-body .subpage-header,
html[data-theme='dark'] body.home-body.map-home .topbar {
  background: #0d1426 !important;
}
html[data-theme='dark'] .site-nav-more-panel,
html[data-theme='dark'] .user-menu-panel,
html[data-theme='dark'] .modal,
html[data-theme='dark'] .edit-card,
html[data-theme='dark'] .messages-card,
html[data-theme='dark'] .meal-panel,
html[data-theme='dark'] .menu-gate,
html[data-theme='dark'] .bakery-gate,
html[data-theme='dark'] .ai-page-gate,
html[data-theme='dark'] .bakery-body .series-card:nth-child(n),
html[data-theme='dark'] .bakery-body .lesson-card,
html[data-theme='dark'] .bakery-body .series-header,
html[data-theme='dark'] .bakery-body .lesson-stage,
html[data-theme='dark'] .bakery-body .recipe-section,
html[data-theme='dark'] .bakery-body .recipe-block {
  background: #18233a !important;
}
html[data-theme='dark'] .dish-card:nth-child(n),
html[data-theme='dark'] .dish-tile,
html[data-theme='dark'] .message-item,
html[data-theme='dark'] .dish-item,
html[data-theme='dark'] .meal-summary-item,
html[data-theme='dark'] .slot-row,
html[data-theme='dark'] .ai-message-content {
  background: #202d47 !important;
}
html[data-theme='dark'] input,
html[data-theme='dark'] select,
html[data-theme='dark'] textarea,
html[data-theme='dark'] .ai-chat-form,
html[data-theme='dark'] .ai-chat-tools,
html[data-theme='dark'] .ai-message-content code {
  background: #141f35 !important;
}
html[data-theme='dark'] .ai-message-content pre {
  background: #0b1222 !important;
}
html[data-theme='dark'] .modal-overlay {
  background: rgba(8, 14, 28, .78) !important;
}

/* Birthday memo: a clean navy keepsake card, without decorative clutter. */
html[data-theme='dark'] body.home-body.map-home .today-panel {
  border: 1px solid #52698f !important;
  background: #182641 !important;
  box-shadow: 0 18px 42px rgba(4, 10, 24, .28) !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel::after {
  display: none !important;
  content: none !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel h2 {
  color: #f5ecdf !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel .home-note {
  border: 1px solid rgba(176, 199, 232, .2) !important;
  background: #213252 !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel .home-note::after {
  display: none !important;
  content: none !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel .reminder-copy #family-reminder-prefix {
  color: #f1d8ca !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel .reminder-count b {
  color: #ff7650 !important;
  text-shadow: none !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel .reminder-count em {
  color: #d9e3f2 !important;
}
html[data-theme='dark'] body.home-body.map-home .today-panel .birthday-cake svg {
  filter: drop-shadow(0 8px 8px rgba(5, 10, 20, .22));
}

/* Homepage navy components: search and navigation groups. */
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box {
  border: 1px solid #405579 !important;
  background: #18233a !important;
  box-shadow: 0 12px 28px rgba(4, 10, 24, .24) !important;
}

body.home-body.map-home .discovery-search .search-box #search,
body.home-body.map-home .discovery-search .search-box #search:focus {
  background: #fffdf8 !important;
  background-color: #fffdf8 !important;
  caret-color: #77658c !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search,
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search:focus {
  background: #18233a !important;
  background-color: #18233a !important;
  caret-color: #9db9df !important;
}
body.home-body.map-home .discovery-search #search {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-clip: padding-box !important;
  filter: none !important;
}
body.home-body.map-home .discovery-search #search::-webkit-search-decoration,
body.home-body.map-home .discovery-search #search::-webkit-search-cancel-button,
body.home-body.map-home .discovery-search #search::-webkit-search-results-button,
body.home-body.map-home .discovery-search #search::-webkit-search-results-decoration {
  display: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
body.home-body.map-home .discovery-search .search-box .search-icon {
  display: block !important;
  z-index: 3 !important;
  left: 18px !important;
  color: #675d7c !important;
  opacity: 1 !important;
}
body.home-body.map-home .discovery-search .search-box #search,
body.home-body.map-home .discovery-search .search-box #search:focus {
  position: relative;
  z-index: 1;
  padding-left: 2.25rem !important;
  background: transparent !important;
  background-color: transparent !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box .search-icon {
  color: #9db9df !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search,
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search:focus {
  background: transparent !important;
  background-color: transparent !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box:focus-within {
  border-color: #7193c5 !important;
  background: #1c2943 !important;
  box-shadow: 0 0 0 4px rgba(113,147,197,.13),0 14px 30px rgba(4,10,24,.26) !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search {
  color: #f3f6fb !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search::placeholder {
  color: #9aa9bd !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-hint {
  color: #bed0eb !important;
  border-color: #405579 !important;
  background: #22314d !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .hero-meta,
html[data-theme='dark'] body.home-body.map-home .discovery-search .hero-meta strong {
  color: #aab7c9 !important;
}

html[data-theme='dark'] body.home-body.map-home .category:nth-child(n) {
  overflow: hidden !important;
  border: 1px solid #344a6d !important;
  background: #18233a !important;
  box-shadow: 0 16px 38px rgba(4, 10, 24, .22) !important;
}
html[data-theme='dark'] body.home-body.map-home .category:nth-child(4n + 1) { border-top: 3px solid #d8a63e !important; }
html[data-theme='dark'] body.home-body.map-home .category:nth-child(4n + 2) { border-top: 3px solid #6fa7e2 !important; }
html[data-theme='dark'] body.home-body.map-home .category:nth-child(4n + 3) { border-top: 3px solid #80b58e !important; }
html[data-theme='dark'] body.home-body.map-home .category:nth-child(4n + 4) { border-top: 3px solid #df8064 !important; }
html[data-theme='dark'] body.home-body.map-home .category .category-header {
  min-height: 82px !important;
  padding: 16px 58px 14px 84px !important;
  border-bottom: 1px solid rgba(190,208,235,.13) !important;
}
html[data-theme='dark'] body.home-body.map-home .category:nth-child(n) .category-icon {
  top: 14px !important;
  left: 18px !important;
  width: 52px !important;
  height: 52px !important;
  border: 2px solid rgba(236,242,250,.9) !important;
  background: #243554 !important;
  box-shadow: none !important;
  font-size: 1.45rem !important;
}
html[data-theme='dark'] body.home-body.map-home .category .category-name {
  color: #f3f6fb !important;
}
html[data-theme='dark'] body.home-body.map-home .category .category-count {
  color: #aab7c9 !important;
}
html[data-theme='dark'] body.home-body.map-home .category .category-arrow {
  color: #94b6e5 !important;
}
html[data-theme='dark'] body.home-body.map-home .category .links {
  background: transparent !important;
}
html[data-theme='dark'] body.home-body.map-home .category .link-card:nth-child(n) {
  border-color: rgba(190,208,235,.13) !important;
  background: #202d47 !important;
}
html[data-theme='dark'] body.home-body.map-home .category .link-card:nth-child(3n + 2) {
  background: #22314d !important;
}
html[data-theme='dark'] body.home-body.map-home .category .link-card:nth-child(3n + 3) {
  background: #1e2b43 !important;
}
html[data-theme='dark'] body.home-body.map-home .category .link-card:hover {
  border-color: #6689bb !important;
  background: #293a5a !important;
}
html[data-theme='dark'] body.home-body.map-home .category .link-card .link-name {
  color: #f3f6fb !important;
}
html[data-theme='dark'] body.home-body.map-home .category .link-card .link-desc {
  color: #aab7c9 !important;
}

/* Let every category end with its content instead of stretching to the row height. */
html[data-theme='dark'] body.home-body.map-home .nav-grid {
  align-items: start !important;
}
html[data-theme='dark'] body.home-body.map-home .category:nth-child(n) {
  align-self: start !important;
  height: auto !important;
  min-height: 0 !important;
  background: #18233a !important;
}
html[data-theme='dark'] body.home-body.map-home .category:nth-child(n) .unit-inner {
  height: auto !important;
  min-height: 0 !important;
  background: #18233a !important;
  box-shadow: none !important;
}

html[data-theme='dark'] body.home-body.map-home .category .category-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 18px !important;
  padding: 18px 22px !important;
}
html[data-theme='dark'] body.home-body.map-home .category:nth-child(n) .category-icon {
  position: static !important;
  flex: 0 0 52px !important;
  margin: 0 !important;
}
html[data-theme='dark'] body.home-body.map-home .category .category-heading {
  align-self: flex-start !important;
  padding-top: 0 !important;
}
html[data-theme='dark'] body.home-body.map-home .category .category-name {
  margin-top: 0 !important;
  line-height: 1.15 !important;
}
html[data-theme='dark'] body.home-body.map-home .category .category-arrow {
  align-self: flex-start !important;
  margin: 8px 0 0 auto !important;
}

/* Keep the improved category layout in light mode as well. */
body.home-body.map-home .nav-grid {
  align-items: start !important;
}
body.home-body.map-home .category:nth-child(n) {
  align-self: start !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body.home-body.map-home .category:nth-child(n) .unit-inner {
  height: auto !important;
  min-height: 0 !important;
}
body.home-body.map-home .category .category-header {
  display: flex !important;
  min-height: 82px !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 18px !important;
  padding: 18px 22px !important;
}
body.home-body.map-home .category:nth-child(n) .category-icon {
  position: static !important;
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border-radius: 50% !important;
}
body.home-body.map-home .category .category-heading {
  align-self: flex-start !important;
  padding-top: 0 !important;
}
body.home-body.map-home .category .category-name {
  margin-top: 0 !important;
  line-height: 1.15 !important;
}
body.home-body.map-home .category .category-arrow {
  align-self: flex-start !important;
  margin: 8px 0 0 auto !important;
}

.home-body .site-footer .public-security-record {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  font-size: .76rem;
  line-height: 1.4;
  text-decoration: none;
  opacity: .82;
  transition: opacity .16s ease;
}
.home-body .site-footer .footer-records {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  white-space: nowrap;
}
.home-body .site-footer .public-security-record:hover { opacity: 1; }
.home-body .site-footer .icp-record {
  color: inherit;
  font-size: .76rem;
  line-height: 1.4;
  text-decoration: none;
  opacity: .82;
  transition: opacity .16s ease;
}
.home-body .site-footer .icp-record:hover { opacity: 1; }
.home-body .site-footer .public-security-record img {
  width: 18px;
  height: 20px;
  flex: 0 0 auto;
  object-fit: contain;
}
@media (max-width: 700px) {
  .home-body .site-footer {
    align-items: center !important;
    gap: 10px !important;
    text-align: center;
  }
  .home-body .site-footer .footer-records {
    flex-direction: column;
    gap: 8px;
    white-space: normal;
  }
}

html[data-theme='dark'] body.home-body.map-home .site-footer {
  color: #9fadc2 !important;
  border-top-color: rgba(190, 208, 235, .14) !important;
}
html[data-theme='dark'] body.home-body.map-home .site-footer .footer-copy {
  color: #e1e8f3 !important;
}
html[data-theme='dark'] body.home-body.map-home .site-footer .footer-note {
  color: #9fadc2 !important;
}
html[data-theme='dark'] body.home-body.map-home .site-footer .public-security-record {
  color: #b9c6d9 !important;
  opacity: .9;
}
html[data-theme='dark'] body.home-body.map-home .site-footer .public-security-record:hover {
  color: #eef3fa !important;
  opacity: 1;
}
html[data-theme='dark'] body.home-body.map-home .site-footer .icp-record {
  color: #b9c6d9 !important;
  opacity: .9;
}
html[data-theme='dark'] body.home-body.map-home .site-footer .icp-record:hover {
  color: #eef3fa !important;
  opacity: 1;
}

/* The speech-bubble PNG supplies the entire launcher shape. */
html[data-theme='dark'] body.home-body .ai-float-launcher,
html[data-theme='dark'] body.home-body .ai-float-launcher:hover,
html[data-theme='dark'] body.home-body .ai-float-launcher:focus-visible {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Scale the landscape fade with the 1487:1058 artwork and page height. */
body.home-body.map-home .home-landscape {
  bottom: 0 !important;
  height: auto !important;
  min-height: calc(100vh - 70px) !important;
}
body.home-body.map-home .home-landscape::after {
  inset: max(0px, calc(71.15vw - 250px)) 0 0 !important;
  background: linear-gradient(to bottom, transparent, var(--map-ground) 250px) !important;
}
@media (max-width: 700px) {
  body.home-body.map-home .home-landscape {
    min-height: calc(100vh - 64px) !important;
  }
  body.home-body.map-home .home-landscape::after {
    inset: 540px 0 0 !important;
    background: linear-gradient(to bottom, transparent, var(--map-ground) 180px) !important;
  }
}

/* The search input is only a text layer; its wrapper owns the visual fill. */
body.home-body.map-home .discovery-search .search-box #search,
body.home-body.map-home .discovery-search .search-box #search:focus,
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search,
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box #search:focus {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
}

/* Keep the whole search field hollow so the artwork continues through it. */
body.home-body.map-home .discovery-search .search-box,
body.home-body.map-home .discovery-search .search-box:focus-within,
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box,
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box:focus-within {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.home-body.map-home .discovery-search .search-box > *:not(.search-hint) {
  background-color: transparent !important;
  background-image: none !important;
}
body.home-body.map-home .discovery-search .search-box #search:-webkit-autofill,
body.home-body.map-home .discovery-search .search-box #search:-webkit-autofill:hover,
body.home-body.map-home .discovery-search .search-box #search:-webkit-autofill:focus {
  -webkit-text-fill-color: currentColor !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  transition: background-color 9999s ease-out 0s;
}

/* One calm surface: opaque wrapper, transparent input, no nested colour block. */
body.home-body.map-home .discovery-search .search-box {
  border: 2px solid rgba(67, 55, 83, .78) !important;
  background: #fffdf8 !important;
  background-color: #fffdf8 !important;
  box-shadow: 0 8px 22px rgba(67, 55, 83, .09) !important;
}
body.home-body.map-home .discovery-search .search-box:focus-within {
  border-color: #77658c !important;
  background: #fffdf8 !important;
  background-color: #fffdf8 !important;
  box-shadow: 0 0 0 4px rgba(119, 101, 140, .12), 0 10px 24px rgba(67, 55, 83, .1) !important;
}
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box,
html[data-theme='dark'] body.home-body.map-home .discovery-search .search-box:focus-within {
  border-color: #405579 !important;
  background: #18233a !important;
  background-color: #18233a !important;
  box-shadow: 0 12px 28px rgba(4, 10, 24, .24) !important;
}

/* Search results: keep the message readable over the illustrated landscape. */
body.home-body.map-home #nav-grid > .empty-state {
  border: 1px solid rgba(67, 55, 83, .18) !important;
  color: #40394e !important;
  background: #fffdf8 !important;
  box-shadow: 0 14px 34px rgba(67, 55, 83, .14) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.home-body.map-home .empty-state-icon {
  border-color: #ead9b5 !important;
  color: #a96b12 !important;
  background: #fff3d8 !important;
}
body.home-body.map-home .empty-state-title {
  color: #332d40 !important;
}
body.home-body.map-home .empty-state-hint {
  color: #746b7e !important;
}
body.home-body.map-home .empty-state-clear {
  border-color: #d8c9ad !important;
  color: #493f55 !important;
  background: #f7eedc !important;
}
body.home-body.map-home .empty-state-clear:hover {
  border-color: #bd974d !important;
  color: #30283b !important;
  background: #f2e2c2 !important;
}
html[data-theme='dark'] body.home-body.map-home #nav-grid > .empty-state {
  border-color: #405579 !important;
  color: #dce4f0 !important;
  background: #18233a !important;
  box-shadow: 0 16px 38px rgba(4, 10, 24, .3) !important;
}
html[data-theme='dark'] body.home-body.map-home .empty-state-icon {
  border-color: #52678c !important;
  color: #f0bd5c !important;
  background: #243554 !important;
}
html[data-theme='dark'] body.home-body.map-home .empty-state-title {
  color: #f3f6fb !important;
}
html[data-theme='dark'] body.home-body.map-home .empty-state-hint {
  color: #aebbd0 !important;
}
html[data-theme='dark'] body.home-body.map-home .empty-state-clear {
  border-color: #52678c !important;
  color: #eef3fa !important;
  background: #243554 !important;
}
html[data-theme='dark'] body.home-body.map-home .empty-state-clear:hover {
  border-color: #6f86ad !important;
  background: #2d4266 !important;
}

/* Menu page: prevent the playful light palette from leaking into dark mode. */
html[data-theme='dark'] body.menu-body .menu-page .edit-card,
html[data-theme='dark'] body.menu-body .menu-page .meal-panel,
html[data-theme='dark'] body.menu-body .menu-page #dish-manage-section {
  border-color: #405579 !important;
  color: #eef3fa !important;
  background: #18233a !important;
  box-shadow: 0 16px 38px rgba(4, 10, 24, .26) !important;
}
html[data-theme='dark'] body.menu-body .menu-page #order-section,
html[data-theme='dark'] body.menu-body .menu-page #slot-manage-section {
  border-color: #405579 !important;
  color: #eef3fa !important;
  background: #18233a !important;
  box-shadow: 0 16px 38px rgba(4, 10, 24, .26) !important;
}
html[data-theme='dark'] body.menu-body .menu-page #order-section .dish-cat-nav {
  border-color: #354967 !important;
  background: #141f35 !important;
}
html[data-theme='dark'] body.menu-body .menu-page .edit-section-title,
html[data-theme='dark'] body.menu-body .menu-page .dish-cat-heading,
html[data-theme='dark'] body.menu-body .menu-page .dish-name,
html[data-theme='dark'] body.menu-body .menu-page .pick-name {
  color: #f3f6fb !important;
}
html[data-theme='dark'] body.menu-body .menu-page .meal-meta,
html[data-theme='dark'] body.menu-body .menu-page .menu-hint,
html[data-theme='dark'] body.menu-body .menu-page .dish-cat,
html[data-theme='dark'] body.menu-body .menu-page .dish-cat-link-count,
html[data-theme='dark'] body.menu-body .menu-page .pick-by,
html[data-theme='dark'] body.menu-body .menu-page .field > span {
  color: #aebbd0 !important;
}
html[data-theme='dark'] body.menu-body .menu-page .dish-cat-link {
  border-color: #354967 !important;
  color: #c2cde0 !important;
  background: #141f35 !important;
}
html[data-theme='dark'] body.menu-body .menu-page .dish-cat-link:hover,
html[data-theme='dark'] body.menu-body .menu-page .dish-cat-link.is-active {
  border-color: #e7a72d !important;
  color: #f2bd55 !important;
  background: #202d47 !important;
}
html[data-theme='dark'] body.menu-body .menu-page .dish-tile:nth-child(n) {
  border-color: #405579 !important;
  color: #eef3fa !important;
  background: #202d47 !important;
  box-shadow: none !important;
}
html[data-theme='dark'] body.menu-body .menu-page .dish-tile:hover:not(:disabled) {
  border-color: #6680aa !important;
  background: #263653 !important;
}
html[data-theme='dark'] body.menu-body .menu-page .dish-tile.is-picked {
  border-color: #e7a72d !important;
  background: #2c3850 !important;
  box-shadow: 0 0 0 2px rgba(231, 167, 45, .16) !important;
}
html[data-theme='dark'] body.menu-body .menu-page .dish-remove-btn {
  border-color: #536683 !important;
  color: #c4cede !important;
  background: #8190a7 !important;
}
html[data-theme='dark'] body.menu-body .menu-page select,
html[data-theme='dark'] body.menu-body .menu-page input,
html[data-theme='dark'] body.menu-body .menu-page textarea {
  border-color: #405579 !important;
  color: #eef3fa !important;
  background: #141f35 !important;
}

/* Messages page: explicit contrast for every text and state layer. */
html[data-theme='dark'] body.messages-body .messages-hero {
  border-color: #4e4665 !important;
  background: linear-gradient(135deg, #292438, #20253a) !important;
  box-shadow: 0 16px 38px rgba(4, 10, 24, .25) !important;
}
html[data-theme='dark'] body.messages-body .messages-kicker,
html[data-theme='dark'] body.messages-body .messages-list-intro > div > p {
  color: #b8a5ff !important;
}
html[data-theme='dark'] body.messages-body .messages-display,
html[data-theme='dark'] body.messages-body .messages-list-intro h3 {
  color: #f4f1fb !important;
}
html[data-theme='dark'] body.messages-body .messages-hero-desc,
html[data-theme='dark'] body.messages-body .messages-list-intro > span {
  color: #b4aec1 !important;
}
html[data-theme='dark'] body.messages-body .messages-unread {
  border-color: #5f5678 !important;
  color: #ded6f5 !important;
  background: #332e47 !important;
}
html[data-theme='dark'] body.messages-body .messages-card {
  border-color: #405579 !important;
  background: #18233a !important;
  box-shadow: 0 16px 38px rgba(4, 10, 24, .26) !important;
}
html[data-theme='dark'] body.messages-body .messages-list .message-item {
  border-bottom-color: #354967 !important;
  color: #eef3fa !important;
  background: #18233a !important;
}
html[data-theme='dark'] body.messages-body .messages-list .message-item:hover {
  border-bottom-color: #4b6286 !important;
  background: #202d47 !important;
  box-shadow: none !important;
}
html[data-theme='dark'] body.messages-body .messages-list .message-item.is-unread {
  background: #222d49 !important;
  box-shadow: inset 4px 0 0 #9a84ec !important;
}
html[data-theme='dark'] body.messages-body .message-kind {
  color: #d9cffc !important;
  background: #3b3260 !important;
}
html[data-theme='dark'] body.messages-body .message-title,
html[data-theme='dark'] body.messages-body .message-item:not(.is-unread) .message-title {
  color: #f0edf7 !important;
}
html[data-theme='dark'] body.messages-body .message-body {
  color: #b9c4d6 !important;
}
html[data-theme='dark'] body.messages-body .message-time {
  color: #9eabc0 !important;
}
html[data-theme='dark'] body.messages-body .message-dot {
  background: #8292ac !important;
}
html[data-theme='dark'] body.messages-body .message-item.is-unread .message-dot {
  background: #b9a6ff !important;
  box-shadow: 0 0 0 4px rgba(185, 166, 255, .14) !important;
}
html[data-theme='dark'] body.messages-body .messages-empty {
  color: #aebbd0 !important;
  background: #18233a !important;
}
