/* Night theme. Switched by <html data-theme="dark"> (the moon / sun button; the choice is remembered).
   Unlayered on purpose: it wins over the layered component rules without needing higher specificity.
   Idea: the page becomes a deep harbour at night; the teal bands, the footer and the engraved plates stay as they are,
   text on paper turns light teal, and the lime accent keeps marking what is picked. */
html[data-theme="dark"] {
  color-scheme: dark;

  /* surfaces and text */
  --color-paper: #04202B;
  --color-foam: #072B38;
  --color-tint: #0B3445;
  --color-ink: #E8F4F8;
  --color-ink-soft: #AECFDB;
  --color-line: #123F50;
  --color-line-strong: #356F85;
  --color-focus: #9CCBDB;
  --color-chip-bg: #0E3F50;

  /* the teal fields (cover, toppings card) go a shade deeper at night; "brand-strong" is text/borders on paper, so it turns light */
  --color-brand: #174C5F;
  --color-brand-strong: #8EBDCE;
  --color-mid: #6AA3B8;

  /* component tokens */
  --nav-bg: #04202B; --nav-fg: #BEDDE8; --nav-active-bg: #8EBDCE; --nav-active-fg: #072B38;
  --chip-bg: #0E3F50; --chip-fg: #BEDDE8; --chip-border: #356F85; --chip-selected-bg: #8EBDCE; --chip-selected-fg: #072B38;
  --dish-name: #A9D5E5; --dish-price: #EAF6FA; --dish-leader: #356F85; --dish-desc: #D7E9F0; --dish-meta: #9DC2D0;
  --button-bg: #8EBDCE; --button-fg: #072B38; --button-bg-hover: #B4D6E3;
  --sheet-bg: #082B38; --sheet-shadow: 0 -18px 48px -12px rgb(0 0 0 / 0.6), 0 8px 16px -8px rgb(0 0 0 / 0.4);
  --chart-water: #072B38; --chart-water-line: #12404F; --chart-land: #0E3F50; --chart-coast: #8EBDCE; --chart-route: #5E9BB1;
  --chart-pin: #E8F4F8; --chart-pin-active: #D5EC67;
}

/* cover: dark card, light pill */
html[data-theme="dark"] .cover-title { color: #A9D5E5; }
html[data-theme="dark"] .cta { background: var(--color-ink); color: #123F4F; }

/* section titles sit on paper from 1024 px up (below that they sit on the teal band and stay white) */
@media (min-width: 1024px) { html[data-theme="dark"] .sec-title { color: #A9D5E5; } }

/* things that used "brand-strong" as a background with white text: light teal background, dark text */
html[data-theme="dark"] .count,
html[data-theme="dark"] .sl-n { background: #8EBDCE; color: #072B38; }
html[data-theme="dark"] .ctl:not([data-q="0"]) { background: #8EBDCE; border-color: #8EBDCE; color: #072B38; }
html[data-theme="dark"] .peek-btn { background: #8EBDCE; color: #072B38; }
html[data-theme="dark"] .peek-btn:focus-visible { outline-color: #D5EC67; }
@media (hover: hover) and (pointer: fine) {
  html[data-theme="dark"] .ctl:not([data-q="0"]) .ctl-b:hover { background: #B4D6E3; }
}

/* toast: lifted off the dark page */
html[data-theme="dark"] .toast { background: #12495D; box-shadow: 0 14px 34px -10px rgb(0 0 0 / 0.6); }

/* map tag shown when a pin is tapped: light tag, dark text */
html[data-theme="dark"] .chart .tag-t,
html[data-theme="dark"] .tag-n { fill: #04202B; }
html[data-theme="dark"] .tag-p { fill: #12404F; }

/* dish pictures and the detail sheet at night */
html[data-theme="dark"] .dish-thumb { background: #0B3445; }
html[data-theme="dark"] .dish-thumb--mark, html[data-theme="dark"] .dd-media--mark { color: #356F85; }
html[data-theme="dark"] .dd-media { background: #0B3445; }
html[data-theme="dark"] .dd-close { background: color-mix(in oklab, #021922 62%, transparent); }
