@layer legacy {
/* Everywhen — subpages (world clock, meeting planner, credits, privacy): the page base only since 11-30. The parts are
   Tailwind classes in their components (ClockApp, WorldClock, PageSub, Planner, TextPages, SiteHeaderClient, SiteChrome).
   The notes that stood beside each part's rules (the user's decisions, with dates) are in this file's history:
   git show 740f01b^:styles/time.css
   Colours, fonts, radii and glows come from the main map's theme tokens in /css/ui.css (CYBER / MONO / 8-BIT),
   mapped here to the short names the subpages use. */
body {
  --bg: var(--bg-color);
  --card: var(--card-bg);
  --border: var(--card-border);
  --accent-2: var(--accent-secondary);
  --amber: var(--amber-gold);
  --text: var(--text-main);
  --muted: var(--text-muted);
  --font: var(--font-mono);
  --radius: var(--border-radius);
  --line: rgba(255, 255, 255, 0.08);
}
body[data-theme="mono"] { --font: var(--font-sans); }
body[data-theme="retro"] { --line: rgba(255, 255, 255, 0.18); }

* { box-sizing: border-box; }

/* Always reserve the scrollbar track, so pages with and without a scrollbar line up exactly */
html { background-color: #03070d; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 {
  font-size: var(--fs-h1);
  margin: 0 0 18px;
  line-height: 1.25;
}
h2 { font-size: var(--fs-h2); margin: var(--space-section) 0 12px; }
body[data-city]:not([data-theme="retro"]) :is(main > h2, .city-facts > h2) { font-size: 24px; margin-top: 40px; } /* user 11-14: city page section titles stand apart more (were 18px, 30px above) */
body[data-theme="retro"] :is(h1, h2, .clock) { font-family: var(--font-pixel); }
body[data-theme="retro"] h1 { font-size: 18px; line-height: 1.6; }
body[data-theme="retro"] h2 { font-size: 12px; line-height: 1.7; }

footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
footer a { color: var(--muted); }

/* the base card's day bar colours (the bar itself is Tailwind in ClockApp.tsx) */
body { --db-night: #0d1b2e; --db-twilight: color-mix(in srgb, var(--amber) 55%, var(--db-night)); --db-day: color-mix(in srgb, var(--accent) 55%, transparent); }
body[data-theme="mono"] { --db-night: #1b2230; --db-day: rgba(255, 255, 255, 0.55); }
body[data-theme="retro"] { --db-night: #2a2152; --db-day: var(--accent); }

/* phones and tablets: a fixed page background and blur behind the header buttons repaint the whole screen on every scroll and drag */
@media (max-width: 900px) {
  body { background-attachment: scroll; }
}

/* the favourites row's ‹ › and mouse dragging (12-03) */
.favorites { position: relative; }
.fav-nav { position: absolute; z-index: 2; width: 36px; height: 36px; margin-top: -18px; display: flex; align-items: center; justify-content: center; padding: 0 0 3px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text); font: 700 22px/1 var(--font); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.fav-nav:hover { color: var(--accent); border-color: var(--accent); }
.fav-nav[hidden] { display: none; }
.fav-nav-prev { left: -18px; }
.fav-nav-next { right: -18px; }
body[data-theme="retro"] .fav-nav { border-radius: 0; font-size: 16px; }
.fav-grid.dragging { scroll-snap-type: none !important; cursor: grabbing; user-select: none; }
.fav-grid.dragging * { cursor: grabbing; }

/* 12-03 (user): no page scrolling behind an open window (the city window here, the planner's calendar window); the scrollbar's
   room is kept so the page does not shift */
html:has(dialog:modal), html:has(.mp-dlg-back:not([hidden])) { overflow: hidden; scrollbar-gutter: stable; }
/* the current time as a thin line: the base card's bar (its handle moves on its own) and the window's hour cells (12-03, user) */
.db-real, .cp-real { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); pointer-events: none; }
/* 12-03 (user): "Now" is the strong mark while the page shows the current time; once the bar is dragged away, "Not the current
   time" is the strong one and "Now" with its line turns quiet grey (option E) */
.day-bar:has(#yz-sim:not([hidden])) .db-real, .cp-bar:has(#cp-sim:not([hidden])) .cp-real { background: var(--muted); opacity: .8; box-shadow: none; }
.cp-cells { position: relative; }
.cp-real { top: -4px; bottom: -4px; }
/* "Not the current time" is a filled label now: its classes in ClockApp (12-03) */
/* the base card's note takes the half away from "Now": its inline style in ClockApp (12-03) */
#db-now { z-index: 1; } /* the handle over the "Now" line (the line comes after it in this page) */

/* 12-04 (user "그냥 2장씩 해"): two favourite cards across at 601–800 px, and the stacked sun table keeps a long label
   whole with its value under it — same as the current site's time.css. !important: the card's own Tailwind classes
   come later in the cascade (layer order). */
@media (min-width: 601px) and (max-width: 800px) {
  .fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .fav-grid:has(> :nth-child(4)) > .fav-card { flex: 0 0 calc((100% - 12px) / 2) !important; }
}
.fav-strip.stack > div { flex-wrap: wrap !important; row-gap: 0 !important; }
.fav-strip.stack .fav-k { overflow-wrap: normal !important; min-width: auto !important; }
.fav-strip.stack strong { margin-inline-start: auto !important; }

}
