/* The map page: a full-height stage with controls floating over it. */
.mappage { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.top.slim { padding-top: 8px; grid-template-columns: auto 1fr; align-items: center; }
.top.slim .home { grid-column: auto; }
.top.slim .brand h1 { font-size: 20px; margin: 0; }
.top.slim .views { margin-top: 4px; }
.stage { position: relative; flex: 1; min-height: 0; background: var(--water); touch-action: none; user-select: none; -webkit-user-select: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
:root { --water: #dfe8ee; --land: #f4f1e8; --border: rgba(60, 60, 50, 0.35); --coast: rgba(40, 50, 60, 0.55); --isobar: rgba(30, 30, 30, 0.72); --flow: 20, 32, 52; }
@media (prefers-color-scheme: dark) { :root { --water: #10161c; --land: #1d1f1d; --border: rgba(220, 220, 210, 0.22); --coast: rgba(220, 225, 230, 0.45); --isobar: rgba(235, 235, 230, 0.75); --flow: 235, 240, 248; } }

.status { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--rule); border-radius: 99px; padding: 5px 12px; font-size: 13px; color: var(--ink-2); box-shadow: 0 2px 10px rgba(0,0,0,0.08); pointer-events: none; }
.status:empty { display: none; }

.guide { position: absolute; top: 10px; left: 10px; width: 300px; max-height: calc(100% - 110px); overflow: auto; background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,0.10); font-size: 14px; line-height: 1.45; backdrop-filter: blur(6px); }
.guide-toggle { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 10px 14px; font-weight: 600; cursor: pointer; }
.guide-toggle::after { content: "–"; float: right; color: var(--ink-3); }
.guide.closed .guide-toggle::after { content: "+"; }
.guide.closed .guide-body { display: none; }
.guide-body { padding: 0 14px 6px; }
.guide-body p { margin: 0 0 9px; }
.guide .fine { font-size: 12px; color: var(--ink-3); }
.hl-L { color: #dc2626; } .hl-H { color: #2563eb; }
.sw { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin: 0 3px 0 4px; }
.sw.cold { background: #2563eb; } .sw.warm { background: #dc2626; } .sw.stat { background: linear-gradient(90deg, #2563eb 50%, #dc2626 50%); }
.sw.occl { background: #9333ea; } .sw.trof { background: repeating-linear-gradient(90deg, #b45309 0 4px, transparent 4px 7px); }

.layers, .regions { position: absolute; right: 10px; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.layers { top: 10px; max-width: 420px; }
.regions { top: 52px; }
.layers label, .regions button { background: var(--panel); border: 1px solid var(--rule-2); border-radius: 8px; padding: 5px 9px; font-size: 13px; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.layers input { margin: 0; accent-color: var(--ink); }
.regions button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.timebar { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); width: min(720px, calc(100% - 20px)); display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; background: color-mix(in srgb, var(--panel) 95%, transparent); border: 1px solid var(--rule); border-radius: 14px; padding: 8px 14px 9px; box-shadow: 0 4px 18px rgba(0,0,0,0.12); backdrop-filter: blur(6px); }
.play { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule-2); background: var(--panel); cursor: pointer; font-size: 13px; }
.slider { width: 100%; accent-color: var(--temp); }
.tlabel { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.tlabel b { color: var(--ink); font-size: 15px; }
.tsrc { color: var(--ink-3); font-size: 12.5px; margin-left: auto; }

@media (max-width: 700px) {
  .guide { width: auto; right: 10px; top: auto; bottom: 128px; max-height: 42%; }
  .guide.closed { right: auto; }
  .layers { top: 8px; left: 8px; right: 8px; max-width: none; justify-content: flex-start; }
  .regions { top: auto; bottom: 128px; right: 10px; flex-direction: column; }
  .guide:not(.closed) ~ .regions { display: none; }
  .layers label, .regions button { padding: 4px 7px; font-size: 12.5px; }
  .top.slim .views a { padding: 6px 9px; font-size: 14px; }
  .tsrc { margin-left: 0; width: 100%; }
}
.nw { white-space: nowrap; }
.probe { position: absolute; z-index: 6; background: var(--panel); color: var(--ink); border: 1px solid var(--rule-2); border-radius: 8px; padding: 6px 10px; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,0.15); pointer-events: none; white-space: nowrap; }
.probe span { display: block; font-size: 12px; color: var(--ink-3); }

/* Credit, map page (base rules in app.css). */
/* The map page: the credit sits beside the title; its note floats over the map rather than pushing it down. */
.top.slim { position: relative; }
.top.slim .brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.top.slim .brand .credit { margin: 0; font-size: 13px; }
.top.slim .brand .credit summary { padding: 2px 0; }
.top.slim .brand .credit .cnote { position: absolute; z-index: 20; left: 20px; right: 20px; top: 100%; max-width: 26rem; margin: 6px 0 0; box-shadow: 0 4px 18px rgba(0,0,0,0.12); }
@media print { .credit .cnote { display: none; } .cfoot { display: block; position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; margin: 0; padding: .4em .6em; font-size: 9pt; color: #333; background: #fff; border-top: 1px solid #999; } }
@media print { .mappage { height: calc(100vh - 3.6em); } }
