@layer legacy {
/* Everywhen — map page base: the page and canvas rules, keyframes, theme sizes. The map's parts are Tailwind classes in
   their components (MapPage, MapHeader, ZoomDeck, TimeBar, MapCityCard, AmbientDock, FocusHud …). The notes that stood
   beside each part's rules (the user's decisions, with dates) are in this file's history: git show 081518b:styles/style.css */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
      -webkit-user-select: none;
    }

    /* Global Modern Custom Scrollbar */
    ::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }
    ::-webkit-scrollbar-track {
      background: transparent;
    }
    ::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--accent);
    }

    html, body {
      width: 100%;
      height: 100%;
      overflow: hidden;
      background-color: var(--bg-color);
      background-image: var(--bg-gradient);
      color: var(--text-main);
      font-family: var(--hud-font);
      transition: background-color 0.4s ease, color 0.4s ease;
    }
    /* the map itself stays hidden while loading and fades in once the bar is full (user 11-20: "로딩이 끝나고 페이드 인으로") */
    #dots-gl-canvas { transition: opacity 0.3s ease; } /* 0.3 s (user 11-26, was 0.4 s); the map canvas: MapPage.tsx */
    html:not(.map-shown) #dots-gl-canvas { opacity: 0; }
    /* land dots on the graphics card (js/map/dots-gl.js) sit under the map canvas: borders, cities and names stay on top */
    #dots-gl-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
    /* until then the time slider sits at its HTML default (12:00), not the real time, so keep it hidden (space kept, nothing moves) */

    canvas {
      display: block;
      width: 100%;
      height: 100%;
      cursor: grab;
      touch-action: none;
    }

    /* Zen Ambient Focus Mode */

    body.zen-active {
      cursor: default !important;
    }

    /* the sound dock: Tailwind, in AmbientDock.tsx (11-29); its slide-up: */

    @keyframes ambientDeckSlideUp {
      from { opacity: 0; transform: translate(-50%, 20px); }
      to { opacity: 0.95; transform: translate(-50%, 0); }
    }
/* the support window: Tailwind, in MapSupport.tsx (11-29); its opening animation: */
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* the ambient timer and its two length popovers: Tailwind, in FocusHud.tsx (11-29); their animations: */
@keyframes pulseBreak {
  0%, 100% { box-shadow: 0 0 8px rgba(56, 189, 248, 0.5); }
  50% { box-shadow: 0 0 16px rgba(56, 189, 248, 0.9); }
}
@keyframes pulseCompleted {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}
@keyframes pulsePause {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 0.45; }
}
@keyframes timerChangePulse {
  0% {
    transform: scale(1);
    color: var(--accent);
    text-shadow: 0 0 24px var(--accent-glow);
    filter: brightness(1.4);
  }
  20% {
    transform: scale(1.10);
    color: var(--accent);
    text-shadow: 0 0 32px var(--accent-glow);
    filter: brightness(1.6) drop-shadow(0 0 16px var(--accent-glow));
  }
  50% {
    transform: scale(1.05);
    color: var(--accent);
    text-shadow: 0 0 26px var(--accent-glow);
    filter: brightness(1.35) drop-shadow(0 0 10px var(--accent-glow));
  }
  80% {
    transform: scale(1.02);
    color: var(--accent);
    text-shadow: 0 0 18px var(--accent-glow);
    filter: brightness(1.15);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}
@keyframes oledSubtleBreath {
  0%, 100% { opacity: 0.98; }
  50% { opacity: 0.88; }
}
/* Mobile browsers: size to the visible viewport so the toolbar doesn't cover the bottom deck */
@supports (height: 100dvh) {
  html, body {
    height: 100dvh;
  }
}

@media (max-width: 768px) {

}

/* ==========================================================================
   MOBILE SIMPLE MODE (<=768px)
   One-row header (search + icon buttons), collapsed timeline, pinch replaces
   zoom buttons, slimmer ambient controls. Desktop is untouched.
   ========================================================================== */

@media (max-width: 768px) {

}

/* Theme rules (e.g. retro) pin some sizes with higher specificity; phones must win */
@media (max-width: 768px) {
}
/* Map page ads sit OUTSIDE the map (user 11-21; AdSense: no ads close to elements that need heavy mouse or touch
   interaction). Screens 1024+ wide that are landscape or have a mouse (every PC window, landscape tablet): only side ads
   ("양옆에만"), by the same rule as the world clock and the meeting planner (see below and css/ui.css). Portrait and narrower
   screens: one strip at the bottom, under the time bar (24 px gap, 8 px from the screen edge): 728x90 from 744 px wide,
   320x50 below. Very short screens (under 500 px high) and Zen mode: no ads, no space kept. */
:root { --ad-bottom: 0px; }
@media (min-height: 500px) { :root { --ad-bottom: 82px; } }
@media (min-height: 500px) and (min-width: 744px) { :root { --ad-bottom: 122px; } }
@media (min-width: 1024px) and (min-height: 500px) and (orientation: landscape), (min-width: 1024px) and (min-height: 500px) and (pointer: fine) { :root { --ad-bottom: 0px; } }
/* bottom strip: the whole page (header, map, decks) ends above it. Side columns: only the MAP gets narrower; the header
   and the decks keep the full window width as before (11-21: squeezing them into the middle broke the time bar) */
html body:not(.zen-active) {
  position: relative;
  height: calc(100% - var(--ad-bottom));
}
/* The map page in the world clock's / meeting planner's boxes (11-21, user), at every window width:
   - header: the world clock's header box, 968 px wide, centred, at least 16 px from the window edges (css/ui.css), the same
     scrollbar room on the right (scrollbar-gutter: stable, as time.css), so it lands on the same pixels on all three pages
   - map: the same box on small windows (sides cut, never the whole window); from where 16 + 160 + 24 = 200 px are free on
     each side of it (page 1368 px, window 1383 with the 15 px scrollbar room) it grows with the window and keeps those
     200 px for the side ads. One smooth size, no jumps.
   - side ads: the world clock's rule (css/ui.css), fixed 24 px outside the map, shown only while 16 px or more stay to the
     window edge: 160x600 from a 1383 px window, 120x600 from 1303 px (16 + 120 + 24 = 160 px free); 720 px high or more
   - time bar and zoom deck: inside the header box (time bar from its left edge, zoom deck to its right edge) */
html { scrollbar-gutter: stable; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; } /* a scrollbar-color turns off the thin 5 px ::-webkit-scrollbar style above for the page, so its room is the browser's own width, as on the world clock */
:root { --col-x: max(16px, calc(50% - 484px)); --map-x: min(var(--col-x), 200px); }
/* 768 px and less: the time bar across the box (was 10 px from the window edges) */
@media (max-width: 768px) {
}

}
