/* 3D snow view: peak-page entry, Explore tile, area chooser and full-screen view. */
.snow3d-entry { width: 100%; min-height: 72px; display: grid; grid-template-columns: 64px minmax(0, 1fr) 20px; gap: 12px; align-items: center; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); box-shadow: var(--shadow); font: inherit; text-align: left; cursor: pointer; }
.snow3d-entry-art { width: 64px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: #4f6b82; background: linear-gradient(#cfe3f1, #eef5fa); }
.snow3d-entry-art svg { width: 52px; height: 34px; }
.snow3d-entry b, .snow3d-entry small { display: block; }
.snow3d-entry b { font-size: var(--type-body); }
.snow3d-entry small { margin-top: 2px; color: var(--ink-soft); font-size: var(--type-support); }
.snow3d-entry-chevron { color: var(--accent); font-size: 28px; line-height: 1; }
.snow3d-tile-art svg { width: 96px; height: 60px; fill: #4f6b82; }
.snow3d-tile-art svg .cap { fill: #fff; }

.snow3d-chooser h4 { margin: 16px 0 8px; color: var(--ink-soft); font-size: var(--type-label); letter-spacing: .04em; text-transform: uppercase; }
.snow3d-chooser-list { display: grid; gap: 6px; }
.snow3d-chooser-list button { min-height: 52px; display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); background: var(--surface); font: inherit; text-align: left; cursor: pointer; }
.snow3d-chooser-list small { color: var(--ink-soft); font-size: var(--type-label); }

body.snow3d-open { overflow: hidden; }
/* Full-screen view, styled after the Mountain Conditions New Zealand app:
   dark navy chrome floating over the terrain, cyan selection, coral caution. */
.snow3d {
    --sn-bg: #111820; --sn-card: rgba(17, 26, 52, .94); --sn-line: rgba(255, 255, 255, .1);
    --sn-ink: #f4f7ff; --sn-muted: #a9b6cf; --sn-cyan: #1fb5ea; --sn-lime: #c8f33a; --sn-coral: #ff5c3b;
    position: fixed; inset: 0; z-index: 60; overflow: hidden; color: var(--sn-ink); background: var(--sn-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.snow3d-stage, .snow3d-canvas { position: absolute; inset: 0; }
.snow3d-canvas { touch-action: none; }
.snow3d-canvas canvas { display: block; }
.snow3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
/* Labels follow Mountain Conditions' map labels: pale bold name with a dark
   outline, and a green-grey subtitle line (height, or the kind of feature). */
.snow3d-label { position: absolute; left: 0; top: 0; display: grid; justify-items: center; white-space: nowrap; line-height: 1.15; text-align: center;
    --sn-halo: rgba(10, 15, 12, .92); text-shadow: 0 0 2px var(--sn-halo), 0 0 2px var(--sn-halo), 0 0 3px var(--sn-halo), 0 1px 2px #000; }
.snow3d-label[hidden] { display: none; }
.snow3d-label b { color: #f3f5ed; font-size: 12.5px; font-weight: 700; }
.snow3d-label small { color: #c7d9c8; font-size: 10.5px; font-weight: 650; }
.snow3d-label.kind-peak b { font-size: 13.5px; }
.snow3d-label.focus b { color: #8fe3ff; }
.snow3d-label.kind-hut b, .snow3d-label.kind-shelter b { color: #ffd38a; }
.snow3d-label.kind-water b { color: #a9d6f2; font-style: italic; font-size: 11.5px; }
.snow3d-label.kind-feature b, .snow3d-label.kind-ridge b, .snow3d-label.kind-crag b, .snow3d-label.kind-path b { font-size: 11.5px; }

.snow3d-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--app-safe-top) + 10px) 12px 0; display: grid; gap: 8px; pointer-events: none; }
.snow3d-top > * { pointer-events: auto; }
.snow3d-warning { justify-self: center; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px; border-radius: 999px; color: #fff; background: var(--sn-coral); font-size: 10.5px; font-weight: 800; letter-spacing: .07em; white-space: nowrap; text-transform: uppercase; box-shadow: 0 6px 18px rgba(255, 92, 59, .35); }
.snow3d-warning svg { width: 16px; height: 16px; }
.snow3d-toprow { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
.snow3d-round { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--sn-line); border-radius: 18px; color: var(--sn-ink); background: var(--sn-card); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); cursor: pointer; }
.snow3d-round svg { width: 24px; height: 24px; }
.snow3d-round.small { width: 40px; height: 40px; border-radius: 14px; }
.snow3d-days { display: flex; gap: 4px; padding: 5px; overflow-x: auto; border: 1px solid var(--sn-line); border-radius: 18px; background: var(--sn-card); scrollbar-width: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.snow3d-days::-webkit-scrollbar { display: none; }
.snow3d-days button { flex: 0 0 auto; min-width: 64px; min-height: 42px; display: grid; place-items: center; gap: 1px; padding: 4px 10px; border: 0; border-radius: 13px; color: var(--sn-ink); background: none; font: inherit; cursor: pointer; }
.snow3d-days button b { font-size: 13px; }
.snow3d-days button small { color: var(--sn-muted); font-size: 11px; }
.snow3d-days button[aria-pressed="true"] { color: #04263a; background: var(--sn-cyan); }
.snow3d-days button[aria-pressed="true"] small { color: #063b57; }
.snow3d-attrib { justify-self: start; max-width: 100%; margin: 0; padding: 3px 9px; border-radius: 8px; color: var(--sn-muted); background: rgba(11, 20, 38, .72); font-size: 10.5px; }
.snow3d-attrib a { color: var(--sn-ink); }
.snow3d-area { justify-self: start; max-width: calc(100% - 64px); display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 16px 8px 12px; border: 1.5px solid var(--sn-lime); border-radius: 16px; background: var(--sn-card); }
.snow3d-area i { width: 22px; height: 6px; border-radius: 3px; background: var(--sn-lime); }
.snow3d-area small { display: block; color: var(--sn-lime); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.snow3d-area b { display: block; font-size: 15px; line-height: 1.2; }

.snow3d-side { position: absolute; right: 12px; top: calc(var(--app-safe-top) + 172px); display: grid; gap: 10px; }
.snow3d-status { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); max-width: calc(100% - 48px); margin: 0; padding: 10px 14px; border: 1px solid var(--sn-line); border-radius: 14px; color: var(--sn-ink); background: var(--sn-card); font-size: 14px; text-align: center; }
.snow3d-status[hidden] { display: none; }
.snow3d-retry { min-height: 40px; margin-top: 8px; padding: 0 16px; border: 0; border-radius: 12px; color: #04263a; background: var(--sn-cyan); font: inherit; font-weight: 800; cursor: pointer; }
.snow3d-status { pointer-events: auto; }

.snow3d-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px calc(var(--app-safe-bottom) + 10px); display: grid; gap: 6px; pointer-events: none; }
.snow3d-bottom > * { pointer-events: auto; }
.snow3d-key { padding: 14px 16px; border: 1px solid var(--sn-line); border-radius: 26px; background: var(--sn-card); box-shadow: 0 10px 28px rgba(0, 0, 0, .4); }
.snow3d-key header { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.snow3d-key-icon { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--sn-line); border-radius: 14px; color: var(--sn-ink); }
.snow3d-key-icon svg { width: 26px; height: 26px; }
.snow3d-key small { display: block; color: var(--sn-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
/* The website's heading styles must not restyle the viewer. */
html body .snow3d h2, html body .snow3d h3 { font-family: inherit !important; font-weight: 800 !important; text-transform: none; letter-spacing: -.01em !important; }
.snow3d-key h2 { margin: 2px 0 0; color: var(--sn-ink); font-size: 22px !important; line-height: 1.1; letter-spacing: -.01em; }
.snow3d-key-toggle { min-height: 44px; padding: 0 4px; border: 0; color: var(--sn-ink); background: none; font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.snow3d-key-toggle span { display: inline-block; margin-left: 6px; transform: rotate(180deg); transition: transform .2s ease; }
.snow3d-key.open .snow3d-key-toggle span { transform: none; }
.snow3d-summary { margin: 10px 0 0; color: var(--sn-ink); font-size: 14px; font-weight: 700; }
.snow3d-key-body { display: none; }
.snow3d-key.open .snow3d-key-body { display: block; }
.snow3d-date { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; color: var(--sn-ink); font-size: 14px; }
.snow3d-date svg { width: 18px; height: 18px; color: var(--sn-cyan); }
.snow3d-detail { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--sn-line); color: var(--sn-muted); font-size: 13.5px; line-height: 1.45; }
.snow3d-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--sn-ink); font-size: 12.5px; }
.snow3d-legend span { display: inline-flex; align-items: center; gap: 6px; }
.snow3d-legend i { width: 15px; height: 15px; border-radius: 4px; background: #f6faff; }
.snow3d-legend.cover i.faint { background: rgba(246, 250, 255, .4); }
.snow3d-legend i.line { width: 18px; height: 4px; border-radius: 2px; }
.snow3d-legend i.path { background: repeating-linear-gradient(90deg, #ff5a2c 0 6px, transparent 6px 9px); }
.snow3d-legend i.stream { background: #4a9be0; }
.snow3d-legend i.cliff { background: #1e1a18; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.snow3d-footnote { justify-self: center; margin: 0; color: var(--sn-muted); font-size: 11.5px; text-shadow: 0 1px 2px #000; }

.snow3d-layers { position: absolute; inset: 0; z-index: 2; }
.snow3d-layers[hidden] { display: none; }
.snow3d-layers-backdrop { position: absolute; inset: 0; background: rgba(4, 8, 18, .5); }
.snow3d-layers-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow-y: auto; padding: 18px 16px calc(var(--app-safe-bottom) + 18px); border-radius: 26px 26px 0 0; background: #111a33; }
.snow3d-layers-sheet header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.snow3d-layers-sheet header small { color: var(--sn-muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.snow3d-layers-sheet h2 { margin: 2px 0 0; color: var(--sn-ink); font-size: 24px !important; }
.snow3d-layers-sheet h3 { margin: 18px 0 8px; color: var(--sn-muted); font-size: 11px !important; letter-spacing: .12em; text-transform: uppercase; }
.snow3d-modes { display: grid; gap: 8px; }
.snow3d-modes button { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--sn-line); border-radius: 16px; color: var(--sn-ink); background: rgba(255, 255, 255, .04); font: inherit; text-align: left; cursor: pointer; }
.snow3d-modes button b { font-size: 15px; }
.snow3d-modes button small { color: var(--sn-muted); font-size: 12.5px; line-height: 1.4; }
.snow3d-modes button[aria-pressed="true"] { border-color: var(--sn-cyan); background: rgba(31, 181, 234, .14); }
.snow3d-switch { min-height: 48px; display: flex; align-items: center; gap: 12px; color: var(--sn-ink); font-size: 15px; }
.snow3d-switch input { flex: 0 0 auto; width: 22px; height: 22px; accent-color: var(--sn-cyan); }
.snow3d-switch small { display: block; color: var(--sn-muted); font-size: 12px; }
.snow3d-about { margin-top: 12px; }
.snow3d-about > summary { min-height: 44px; display: flex; align-items: center; color: var(--sn-cyan); font-weight: 700; cursor: pointer; }
.snow3d-about p { margin: 6px 0; color: var(--sn-muted); font-size: 13px; line-height: 1.45; }
.snow3d-about .credit { color: var(--sn-muted); }
.snow3d :focus-visible, .snow3d-entry:focus-visible { outline: 3px solid var(--sn-cyan, var(--accent)); outline-offset: 2px; }
@media (max-height: 700px) { .snow3d-warning { display: none; } .snow3d-side { top: calc(var(--app-safe-top) + 130px); } }
