:root {
  --bg: #0b0d10;
  --card: #181b20;
  --card-2: #20242b;
  --line: #2b3038;
  --text: #f3f5f8;
  --muted: #98a2ae;
  --faint: #5d6672;
  --blue: #4d9cff;
  --blue-deep: #2a6fd1;
  --blue-ghost: rgba(77, 156, 255, 0.18);
  --violet: #9b8cff;
  --violet-deep: #6f5ee0;
  --excellent: #ff9a3c;
  --good: #4d9cff;
  --okay: #8a929c;
  --accent: #7fd1ff;
  --radius: 16px;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 10px;
  background: rgba(11, 13, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.brand img { border-radius: 7px; }

.updated {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 0 6px 10px;
  cursor: pointer;
}
.updated.spin::before { content: "↻ "; display: inline-block; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 6px var(--gutter) calc(env(safe-area-inset-bottom) + 32px);
}

.loading, .error { color: var(--muted); text-align: center; padding: 60px 0; }

h2.section {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 22px 0 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
h2.section small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

/* ---------- Daily Snow ---------- */
.post .kicker { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.post h3 { font-size: 21px; line-height: 1.22; margin: 6px 0 10px; letter-spacing: -0.01em; }
.pick {
  display: flex;
  gap: 10px;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 154, 60, 0.16), rgba(77, 156, 255, 0.12));
  border: 1px solid rgba(255, 154, 60, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.pick svg { flex: none; }
.pick b { display: block; font-size: 15px; }
.pick span { color: var(--muted); font-size: 13px; }
.post .body { color: #d9dee5; }
.post .body h4 { font-size: 15px; margin: 14px 0 4px; color: var(--text); }
.post .body p { margin: 0 0 10px; }
.post .body ul { margin: 0 0 10px; padding-left: 18px; }
.post .body.clamped { max-height: 7.2em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.more { background: none; border: 0; color: var(--blue); font-weight: 600; padding: 4px 0 0; cursor: pointer; }
.post .byline { color: var(--faint); font-size: 12px; margin-top: 10px; }

/* ---------- Home ---------- */
.pills { display: flex; gap: 8px; margin: 12px 0 12px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.pill.on { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.hs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.hs-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.hs-head .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.hs-head .link { font-size: 14px; white-space: nowrap; padding-top: 4px; }

/* ---------- Resort page ---------- */
.r-head { margin: 4px 0 4px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.star { display: inline-flex; align-items: center; gap: 6px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 10px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.star.on { color: #ffc94d; border-color: rgba(255, 201, 77, 0.4); }
.pill svg { vertical-align: -1px; margin-right: 5px; }
.back { color: var(--blue); font-size: 14px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.r-head h1 { font-size: 28px; margin: 4px 0 2px; letter-spacing: -0.02em; }
.r-head .meta { color: var(--muted); font-size: 13px; }

.seg { display: inline-flex; background: var(--card-2); border-radius: 10px; padding: 3px; margin-top: 12px; border: 1px solid var(--line); }
.seg button { background: none; border: 0; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--blue-deep); color: #fff; }

.now { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.now .big { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.now .big small { font-size: 15px; font-weight: 600; color: var(--muted); }
.now .lbl { font-size: 12px; color: var(--muted); }

/* Snow summary timeline */
.timeline-wrap { overflow-x: auto; margin: 0 -14px; padding: 0 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.timeline-wrap::-webkit-scrollbar { display: none; }
.timeline { display: flex; gap: 0; width: max-content; }
.grp { display: flex; flex-direction: column; padding: 0 4px; }
.grp + .grp { border-left: 1px solid var(--line); }
.grp-h { text-align: center; padding: 2px 0 8px; white-space: nowrap; }
.grp-h .t { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.grp-h .v { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.grp-h .r { font-size: 11px; color: var(--faint); }
.grp.past .grp-h .v { color: var(--violet); }
.cols { display: flex; gap: 4px; }
.c { width: 30px; display: flex; flex-direction: column; align-items: center; border-radius: 8px; padding-bottom: 4px; cursor: pointer; }
.c.sel { background: rgba(255, 255, 255, 0.07); }
.c .amt { font-size: 12px; font-weight: 700; height: 16px; }
.c .amt.dim { color: var(--faint); font-weight: 500; }
.c .area { position: relative; width: 22px; height: 96px; display: flex; flex-direction: column; justify-content: flex-end; }
.c .ghost { position: absolute; bottom: 0; left: 0; right: 0; background: var(--blue-ghost); border-radius: 4px 4px 0 0; }
.c .seg-day, .c .seg-night { position: relative; width: 100%; }
.c .seg-day { background: var(--blue); border-radius: 4px 4px 0 0; }
.c .seg-night { background: var(--blue-deep); }
.c .seg-night:first-child { border-radius: 4px 4px 0 0; }
.c .seg-obs { background: var(--violet); border-radius: 4px 4px 0 0; width: 100%; }
.c .seg-obs.est { background: repeating-linear-gradient(135deg, var(--violet) 0 4px, var(--violet-deep) 4px 7px); opacity: 0.75; }
.c .base0 { height: 2px; width: 100%; background: var(--line); border-radius: 1px; }
.c .dow { font-size: 12px; color: var(--muted); margin-top: 6px; }
.c .dom { font-size: 12px; color: var(--muted); }
.c.we .dow, .c.we .dom { color: var(--text); font-weight: 800; }
.c.today .dow { color: var(--accent); }
.c .q { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; }
.q.excellent { background: var(--excellent); }
.q.good { background: var(--good); }
.q.okay { background: var(--okay); }
.q.none { background: transparent; }
.box24 { width: 96px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--card-2); border-radius: 12px; margin: 0 2px; padding: 10px 6px; align-self: stretch; text-align: center; }
.box24 .t { font-size: 12px; font-weight: 700; }
.box24 .v { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; color: var(--violet); line-height: 1.15; margin: 6px 0; }
.box24 .s { font-size: 11px; color: var(--muted); }
.detail { background: var(--card-2); border-radius: 12px; padding: 10px 12px; margin-top: 10px; min-height: 76px; }
.dt-top { display: flex; gap: 14px; align-items: center; }
.dt-chart { margin-top: 10px; }
.dt-chart svg { width: 100%; height: auto; display: block; }
.dt-chart text { fill: var(--muted); font-size: 8.5px; }
.dt-chart text.pk { fill: var(--text); font-weight: 700; font-size: 9px; }
.dt-cap { font-size: 11px; color: var(--faint); margin-top: 2px; }
.dt-l { flex: none; min-width: 74px; }
.dt-d { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.dt-v { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--blue); }
.dt-v.obs { color: var(--violet); }
.dt-v small { font-size: 17px; }
.dt-s { font-size: 11px; color: var(--faint); }
.dt-f { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: #d9dee5; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Daily strip */
.days { display: flex; overflow-x: auto; margin: 0 -14px; padding: 0 14px; gap: 0; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none;
  width: 78px;
  text-align: center;
  padding: 8px 4px 10px;
  border-right: 1px solid var(--line);
  background: none;
  border-top: 0; border-bottom: 0; border-left: 0;
  cursor: pointer;
}
.day.on { background: var(--card-2); border-radius: 10px; }
.day .dn { font-size: 13px; color: var(--muted); }
.day.we .dn { color: var(--text); font-weight: 700; }
.day .ic { margin: 6px auto 2px; height: 30px; }
.day .hi { font-weight: 700; font-size: 16px; }
.day .lo { color: var(--muted); font-size: 14px; }
.day .sn { margin-top: 6px; font-weight: 800; font-size: 15px; color: var(--blue); min-height: 20px; }
.day .sn.zero { color: var(--faint); font-weight: 500; }
.day .wd { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Hourly chart */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.hourly-wrap { overflow-x: auto; margin: 0 -14px; padding: 0 14px; scrollbar-width: none; }
.hourly-wrap::-webkit-scrollbar { display: none; }
.hourly-wrap svg { display: block; overflow: visible; }
.hourly-wrap text { fill: var(--muted); font-size: 10.5px; }
.hourly-wrap text.v { fill: var(--text); font-weight: 600; }
.hourly-wrap text.day { fill: var(--text); font-weight: 700; font-size: 12px; }

/* Forecast range */
.range svg { width: 100%; height: auto; display: block; }
.range text { fill: var(--muted); font-size: 10px; }
.model-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 14px; margin-top: 10px; font-size: 13px; }
.model-list div { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.model-list i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.model-list b { font-variant-numeric: tabular-nums; }
.model-list .blend { font-weight: 800; }
.range-tabs { display: flex; gap: 6px; margin-bottom: 8px; }

/* Observed */
.obs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.obs-grid div { background: var(--card-2); border-radius: 10px; padding: 8px 10px; }
.obs-grid .lbl { font-size: 11px; color: var(--muted); white-space: nowrap; }
.obs-grid .v { font-size: 20px; font-weight: 800; }
.note { color: var(--muted); font-size: 12.5px; }
.note a, a.link { color: var(--blue); font-weight: 600; }
.foot { color: var(--faint); font-size: 11.5px; text-align: center; margin: 28px 0 0; line-height: 1.6; }

@media (min-width: 600px) {
  .c { width: 34px; }
  .c .area { width: 26px; }
}

/* ---------- Mountains (add / remove) ---------- */
.pill.add { color: var(--blue); border-style: dashed; display: inline-flex; align-items: center; padding: 8px 13px; }
.list { padding: 0 14px; }
.list .row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list .row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main b svg { vertical-align: -1px; }
.row-main span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remove, .add-btn {
  flex: none;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.remove { color: #ff8a7a; }
.add-btn { color: #fff; background: var(--blue-deep); border-color: var(--blue-deep); }
.add-btn.done { background: none; color: var(--muted); border-color: var(--line); cursor: default; }
.search {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  -webkit-appearance: none;
  appearance: none;
}
.search:focus { outline: none; border-color: var(--blue); }
.search:disabled { opacity: 0.5; }
.notice { color: #ffc94d; font-size: 13.5px; margin: 0 0 6px; }
.r-head .meta { margin-top: 2px; }

/* ---------- Account and Pro ---------- */
.top-right { display: flex; align-items: center; gap: 12px; }
.acct { font-size: 13.5px; font-weight: 700; color: var(--text); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.acct.pro { color: #ffc94d; border-color: rgba(255, 201, 77, 0.4); }
.signin { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.signin label { font-size: 13px; color: var(--muted); font-weight: 600; }
.signin .search { margin-bottom: 0; }
.signin .search.code { font-size: 22px; letter-spacing: 6px; font-variant-numeric: tabular-nums; }
.add-btn.big { padding: 11px 16px; font-size: 15px; border-radius: 12px; }
.add-btn[disabled] { opacity: 0.55; cursor: default; }
a.add-btn { display: inline-block; }
.notice.ok { color: #7ddc8a; }
.acct-actions { display: flex; gap: 10px; margin-top: 18px; }
.remove.plain { color: var(--text); }
.pro-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.pro-list b { display: block; font-size: 15.5px; }
.pro-list span { color: var(--muted); font-size: 13.5px; }
.plans { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 6px 0 8px; }
.plan { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--blue-deep); border: 1px solid var(--blue-deep); color: #fff; border-radius: 14px; padding: 14px; cursor: pointer; }
.plan[disabled] { background: var(--card-2); border-color: var(--line); color: var(--muted); cursor: default; }
.plan-name { font-weight: 700; font-size: 15px; }
.plan-name i { font-style: normal; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.18); padding: 2px 7px; border-radius: 999px; margin-left: 4px; }
.plan-price { font-size: 22px; font-weight: 800; }
.plan-price small { font-size: 13px; font-weight: 500; opacity: .8; }
