:root {
  --bg: #fbfbf7; --fg: #121212; --muted: #6b6b66; --line: #e3e2dc; --card: #ffffff; --ink: #121212;
  --yellow: #ffeb3b; --green: #63d47e; --lime: #b9e769; --amber: #f8c944; --orange: #ff9f45; --red: #ff6b6b; --blue: #2f8cff; --ice: #e8f3ff;
  --shadow: 3px 3px 0 var(--ink); --r: 10px;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
[data-theme='dark'] {
  --bg: #15171a; --fg: #ecebe6; --muted: #9a9a94; --line: #2c3036; --card: #1d2024; --ink: #000; --ice: #18263a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--sans); font-feature-settings: 'tnum' 1; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.025em; font-weight: 800; }
h2 { font-size: 1.35rem; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 1000; }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a.on { color: var(--fg); text-decoration: underline; }
.nav .theme { background: none; border: 0; cursor: pointer; font-size: 1rem; padding: 0; }
.spacer { flex: 1; }
@media (max-width: 640px) { .top .wrap { gap: 6px 14px; padding-top: 8px; padding-bottom: 8px; } .nav { gap: 10px; font-size: .88rem; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--yellow); color: #111; border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); font: 700 .95rem var(--sans); text-decoration: none; cursor: pointer; transition: transform .06s, box-shadow .06s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.white { background: #fff; }
.btn.small { padding: 5px 10px; font-size: .8rem; box-shadow: 2px 2px 0 var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; }
.link { background: none; border: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* score badges */
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 8px; font-weight: 800; color: #111; background: #ddd; }
.score.big { font-size: 2.6rem; min-width: 120px; padding: 6px 16px; border-radius: 14px; box-shadow: var(--shadow); }
.score.mid { font-size: 1.3rem; min-width: 64px; }
.s-great { background: var(--green); } .s-good { background: var(--lime); } .s-ok { background: var(--amber); } .s-bad { background: var(--red); } .na { background: #ccc; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: .78rem; white-space: nowrap; background: var(--card); }
.pill.dark { background: #111; color: #fff; border-color: #111; font-weight: 700; letter-spacing: .03em; }
.pill.snow { background: var(--ice); border-color: #b9d8ff; color: #0b4a99; }
[data-theme='dark'] .pill.snow { color: #9cc8ff; border-color: #24456f; }
.pill.warn { background: #ffe9a8; border-color: #e7c55a; color: #4a3800; }
.pill.ok { background: #d9f7df; border-color: #8fdca0; color: #0c4a1b; }
.pill.off { background: transparent; color: var(--muted); }
.pill.epic { background: #222; color: #fff; border-color: #222; }
.pill.ikon { background: #0b3a66; color: #fff; border-color: #0b3a66; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--amber); border: 1px solid #d8a92b; color: #3a2c00; font-size: .8rem; margin: 2px 4px 2px 0; }

/* hero (home) */
.hero { padding: 34px 0 10px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.hero p { max-width: 760px; margin: .2em 0 0; }
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 22px 0 8px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.panel h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.panel ol { margin: 0; padding-left: 1.3em; }
.panel li { margin: 2px 0; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 0; position: sticky; top: 58px; background: var(--bg); z-index: 900; border-bottom: 1px solid var(--line); }
.filters input[type=search], .filters select, .field input, .field select, .field textarea { font: inherit; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--fg); }
.filters input[type=search] { flex: 1 1 220px; min-width: 160px; }
.chip { font: inherit; font-size: .85rem; padding: 6px 11px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--card); color: var(--fg); cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--fg); color: var(--bg); }
.count { color: var(--muted); font-size: .85rem; margin-left: auto; }
@media (max-width: 640px) { .filters { top: 0; position: static; } }

/* resort cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; padding: 18px 0 40px; }
.card { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: transform .08s, box-shadow .08s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.card .img { position: relative; aspect-ratio: 16/10; background: linear-gradient(160deg, #9cc9ff, #e9f3ff 55%, #fff); overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .img .mtn { position: absolute; inset: auto 0 0 0; height: 70%; }
.card .img .score { position: absolute; top: 10px; left: 10px; font-size: 1.15rem; }
.card .img .fresh { position: absolute; top: 10px; right: 10px; }
.card .img .status { position: absolute; bottom: 10px; left: 10px; }
.card .body { padding: 11px 13px 13px; }
.card .name { font-weight: 800; font-size: 1.04rem; display: flex; gap: 6px; align-items: baseline; justify-content: space-between; }
.card .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.card .pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* resort page */
.rhero { position: relative; min-height: 340px; color: #fff; display: flex; align-items: flex-end; background: #234 center/cover no-repeat; }
.rhero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.65)); }
.rhero .wrap { position: relative; width: 100%; padding-top: 40px; padding-bottom: 26px; display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.rhero h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.rhero .sub { opacity: .92; margin-top: 4px; }
.rhero .actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.rhero .credit { position: absolute; right: 8px; bottom: 4px; font-size: .65rem; opacity: .7; z-index: 1; }
.rhero .credit a { color: #fff; }
.tabs { position: sticky; top: 58px; z-index: 950; background: var(--bg); border-bottom: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 13px 0; text-decoration: none; font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a.on { color: #e5483b; border-color: #e5483b; }
@media (max-width: 640px) { .tabs { top: 0; } }
section.sec { padding: 34px 0 6px; scroll-margin-top: 120px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.facts { width: 100%; border-collapse: collapse; }
.facts td { padding: 7px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.facts td:last-child { text-align: right; font-weight: 700; }
.bars .row { display: grid; grid-template-columns: 92px 1fr 42px; gap: 10px; align-items: center; margin: 7px 0; }
.bars .track { height: 14px; background: var(--line); border-radius: 7px; overflow: hidden; border: 1px solid var(--ink); }
.bars .fill { height: 100%; }
.bars .num { text-align: right; font-weight: 800; }
.callout { border: 2px solid var(--ink); border-radius: 12px; padding: 14px 16px; background: var(--card); box-shadow: var(--shadow); }
.callout.yellow { background: #fff8c4; color: #111; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi .l { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi .v { font-size: 1.35rem; font-weight: 800; }
.kpi .v.snow { color: var(--blue); }

/* charts */
.chart { width: 100%; overflow-x: auto; }
.forecast { display: grid; grid-template-columns: repeat(8, minmax(64px, 1fr)); gap: 6px; min-width: 560px; }
.fday { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; font-size: .8rem; }
.fday .bar { height: 90px; display: flex; align-items: flex-end; justify-content: center; margin: 6px 0; }
.fday .bar div { width: 60%; background: linear-gradient(180deg, #7fb8ff, var(--blue)); border-radius: 4px 4px 0 0; min-height: 2px; }
.fday .cm { font-weight: 800; color: var(--blue); }
.heat { display: grid; gap: 2px; font-size: .7rem; min-width: 620px; }
.heat .c { height: 22px; border-radius: 3px; }
.heat .lbl { color: var(--muted); display: flex; align-items: center; }

/* lifts */
.lifts { display: grid; gap: 6px; }
.lift { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.lift .n { font-weight: 700; }
.lift .t { font-size: .75rem; color: var(--muted); }
.wait { min-width: 92px; text-align: center; font-weight: 800; border: 2px solid var(--ink); border-radius: 8px; padding: 3px 8px; color: #111; }
.wait small { display: block; font-weight: 500; font-size: .65rem; }
.q-walk { background: var(--green); } .q-short { background: var(--lime); } .q-medium { background: var(--orange); } .q-long { background: var(--red); } .q-closed { background: #ddd; color: #555; } .q-hold { background: repeating-linear-gradient(45deg, #ffd166, #ffd166 6px, #fff1c2 6px, #fff1c2 12px); }
.rep { display: flex; gap: 3px; }
.rep button { font: 700 .72rem var(--mono); border: 1.5px solid var(--ink); background: var(--card); color: var(--fg); border-radius: 6px; padding: 3px 6px; cursor: pointer; }
.rep button:hover { background: var(--yellow); color: #111; }
@media (max-width: 640px) { .lift { grid-template-columns: 1fr auto; } .lift .rep { grid-column: 1 / -1; } }
.simbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 14px; }
.simbar input { font: inherit; padding: 5px 8px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--fg); }
.map { height: 460px; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; z-index: 1; }
.map.tall { height: calc(100vh - 140px); min-height: 480px; }

/* hotels */
.hotels { display: grid; gap: 8px; }
.hotel { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.hotel .h { font-weight: 800; }
.hotel .h a { text-decoration: none; }
.hotel .h a:hover { text-decoration: underline; }
.hotel .meta { font-size: .78rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
@media (max-width: 640px) { .hotel { grid-template-columns: auto 1fr; } .hotel .go { grid-column: 1 / -1; } }

/* reviews */
.review { border-top: 1px solid var(--line); padding: 16px 0; }
.review .head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .9rem; }
.review .body { white-space: pre-wrap; margin-top: 8px; }
.vote { display: inline-flex; gap: 4px; align-items: center; }
.vote button { background: none; border: 0; cursor: pointer; font-size: .95rem; color: var(--muted); padding: 0 2px; }
.vote button.on { color: #e5483b; }
.form { display: grid; gap: 12px; max-width: 640px; }
.field { display: grid; gap: 4px; }
.field label { font-weight: 700; font-size: .85rem; }
.field textarea { min-height: 140px; resize: vertical; }
.err { color: #c0392b; font-weight: 700; }
.ok { color: #1f8a3b; font-weight: 700; }

/* tables */
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th { text-align: left; font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; padding: 6px 8px; border-bottom: 2px solid var(--ink); }
table.list td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.list td.num, table.list th.num { text-align: right; }
.tablewrap { overflow-x: auto; }
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.award { border: 2px solid var(--ink); border-radius: 14px; padding: 14px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; display: block; }
.award .e { font-size: 1.8rem; }
.award .k { font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.award .w { font-weight: 800; font-size: 1.1rem; }

footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 26px 0 40px; font-size: .8rem; color: var(--muted); }
footer a { color: var(--muted); }
.maplibregl-map { font-family: var(--sans) !important; }
.maplibregl-popup-content { font-family: var(--sans); color: #111; }
.mk { width: 30px; height: 22px; border-radius: 6px; border: 2px solid #111; font: 800 11px var(--mono); display: flex; align-items: center; justify-content: center; color: #111; }
.profile { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 30px 0 10px; }
.avatar { width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; background: var(--yellow); color: #111; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 5000; font-size: .9rem; }
.field { min-width: 0; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; }
@media (max-width: 640px) {
  .top .wrap { flex-wrap: nowrap; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .rhero { min-height: 0; }
  .rhero .wrap { flex-direction: column-reverse; align-items: flex-start; gap: 10px; padding-top: 28px; }
  .rhero .wrap > div:last-child { display: flex; align-items: center; gap: 10px; }
  .score.big { font-size: 1.7rem; min-width: 76px; padding: 4px 10px; }
  .rhero .actions .btn { padding: 8px 12px; font-size: .85rem; }
}

/* numbers in mono so columns line up */
.score, .wait, .kpi .v, .num, td.num, .fday .cm, .count { font-family: var(--mono); }
