/* ============ Tokens ============ */
:root {
  --paper: #f5f1e8;
  --surface: #fffdf8;
  --surface-2: #ece6d8;
  --surface-3: #e2dac8;
  --ink: #1e261d;
  --ink-2: #5a6155;
  --ink-3: #8a8c80;
  --line: #ddd4c2;
  --line-strong: #c9bfa9;
  --brand: #2f5233;
  --brand-2: #3d6b42;
  --brand-ink: #e8c779;
  --brand-soft: #e3eadb;
  --wheat: #b8862b;
  --wheat-soft: #f4e7c8;
  --up: #2c7a3a;
  --up-soft: #e1efdf;
  --down: #b0362c;
  --down-soft: #f6e1dc;
  --warn: #a96a0b;
  --warn-soft: #f8e9c9;
  --good: #2c7a3a;
  --fair: #b8862b;
  --poor: #b0362c;
  --shadow: 0 1px 2px rgba(40, 35, 20, .06), 0 2px 8px rgba(40, 35, 20, .05);
  --radius: 10px;
  --radius-sm: 7px;
  --nav-h: 64px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: only light;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.45 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
svg { flex-shrink: 0; }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--wheat); outline-offset: 2px; }

/* ============ Shell / nav ============ */
.shell { min-height: 100dvh; }
.view { padding: 0 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); max-width: 1240px; margin: 0 auto; outline: none; }

.nav {
  position: fixed; inset: auto 0 0 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
}
.nav .brand, .nav .nav-foot { display: none; }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-2); text-decoration: none; font: 600 13px/1 var(--font-cond); letter-spacing: .04em; text-transform: uppercase;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--brand); }
.tab[aria-current="page"] svg { stroke-width: 2.2; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 232px 1fr; }
  .nav {
    position: sticky; top: 0; height: 100dvh; inset: auto; padding: 20px 14px;
    display: flex; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--line);
  }
  .nav .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; color: var(--ink); }
  .brand-mark { color: var(--brand); width: 34px; height: 34px; display: block; }
  .brand-mark svg { width: 100%; height: 100%; }
  .brand-text { font: 700 22px/1 var(--font-cond); letter-spacing: .02em; text-transform: uppercase; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 12px; border-radius: var(--radius-sm); font-size: 17px; }
  .tab:hover { background: var(--surface-2); color: var(--ink); }
  .tab[aria-current="page"] { background: var(--brand-soft); }
  .nav .nav-foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding: 12px; font-size: 13px; }
  .nav-foot a { font-weight: 600; text-decoration: none; }
  .view { padding: 0 32px 48px; width: 100%; }
}

/* ============ Page header ============ */
.page-head {
  position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  background: var(--paper); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.page-head h1 { margin: 0; font: 700 28px/1.1 var(--font-cond); letter-spacing: .01em; text-transform: uppercase; }
.page-head .sub { font-size: 13px; color: var(--ink-2); }
.page-head .spacer { flex: 1; }
.page-head > div:first-child { min-width: 0; flex: 1 1 auto; }
@media (max-width: 420px) { .page-head .btn .lbl-wide { display: none; } .page-head .btn:has(.lbl-wide) { width: 40px; padding: 0; } }
@media (min-width: 960px) { .page-head { margin: 0 -32px; padding: 22px 32px 14px; } .page-head h1 { font-size: 34px; } }

/* ============ Buttons / chips / inputs ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink); white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { width: 40px; padding: 0; }
.btn.danger { color: var(--down); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 14px; }
.btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; min-height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font: 600 15px/1 var(--font-cond); letter-spacing: .03em; color: var(--ink-2);
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 5px; font: 600 15px/1 var(--font-cond); letter-spacing: .03em; color: var(--ink-2); min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.field { position: relative; display: flex; align-items: center; }
.field svg { position: absolute; left: 12px; width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; pointer-events: none; }
.input {
  width: 100%; min-height: 44px; padding: 0 12px 0 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 16px;
}
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
select.input, input[type="date"].input { padding-left: 12px; }

/* ============ Cards ============ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0; }
.card-h h2, .card-h h3 { margin: 0; font: 700 17px/1.2 var(--font-cond); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.card-h .spacer { flex: 1; }
.card-b { padding: 12px 16px 16px; }
.section-label { margin: 22px 0 10px; font: 700 15px/1 var(--font-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 10px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }
.empty h3 { font: 700 20px/1.2 var(--font-cond); text-transform: uppercase; color: var(--ink); margin: 0 0 6px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============ Markets ============ */
.mkt-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 6px; }
.mkt-toolbar .chips { flex: 1; min-width: 0; }
.mkt-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .mkt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .mkt-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1500px) { .mkt-grid { grid-template-columns: repeat(4, 1fr); } }

.quote {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; gap: 2px 12px;
  padding: 14px 14px 10px; text-align: left; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; position: relative;
}
.quote:hover { border-color: var(--line-strong); }
.quote .q-name { font: 700 19px/1.15 var(--font-cond); letter-spacing: .02em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote .q-meta { font-size: 13px; color: var(--ink-3); display: flex; gap: 6px; white-space: nowrap; overflow: hidden; }
.quote .q-price { grid-column: 2; grid-row: 1; text-align: right; font: 600 22px/1.15 var(--font-cond); font-variant-numeric: tabular-nums; }
.quote .q-chg { grid-column: 2; grid-row: 2; text-align: right; font: 600 15px/1.2 var(--font-cond); font-variant-numeric: tabular-nums; }
.quote .q-spark { grid-column: 1 / -1; height: 54px; margin-top: 6px; }
.quote .q-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--ink-2); }
.pill { display: inline-block; padding: 2px 7px; border-radius: 5px; font: 600 14px/1.3 var(--font-cond); font-variant-numeric: tabular-nums; }
.pill.up { background: var(--up-soft); } .pill.down { background: var(--down-soft); } .pill.flat { background: var(--surface-2); }
.tag { font: 600 11px/1 var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); padding: 2px 5px; border-radius: 4px; }

/* list layout */
.mkt-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.mkt-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 84px auto; align-items: center; gap: 12px;
  padding: 11px 14px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left;
}
.mkt-row:last-child { border-bottom: 0; }
.mkt-row:hover { background: var(--surface-2); }
.mkt-row .q-name { font: 700 17px/1.15 var(--font-cond); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-row .q-meta { font-size: 12px; color: var(--ink-3); }
.mkt-row .r-right { text-align: right; min-width: 92px; }
.mkt-row .q-price { font: 600 18px/1.1 var(--font-cond); font-variant-numeric: tabular-nums; }
.mkt-row svg.spark { height: 30px; width: 84px; }
@media (max-width: 380px) { .mkt-row { grid-template-columns: minmax(0,1fr) auto; } .mkt-row svg.spark { display: none; } }

.updated { font-size: 13px; color: var(--ink-3); margin: 14px 0 0; text-align: center; }

/* detail */
.detail-top { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.detail-price { font: 700 40px/1 var(--font-cond); font-variant-numeric: tabular-nums; }
.detail-chg { font: 600 18px/1.2 var(--font-cond); }
.detail-unit { color: var(--ink-3); font-size: 14px; }
.chart-wrap { position: relative; height: 340px; margin: 14px -4px 4px; }
@media (min-width: 960px) { .chart-wrap { height: 440px; } }
.chart-wrap.tall { height: calc(100dvh - 300px); min-height: 300px; }
.chart-legend { position: absolute; top: 4px; left: 8px; z-index: 3; font: 500 13px/1.3 var(--font); color: var(--ink-2); pointer-events: none; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 2px 6px; border-radius: 4px; }
.chart-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); margin-top: 10px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 10px 2px; border-bottom: 1px solid var(--line); }
.stat dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.stat dd { margin: 2px 0 0; font: 600 17px/1.2 var(--font-cond); font-variant-numeric: tabular-nums; }

/* customize */
.cz-group { margin-bottom: 18px; }
.cz-group h4 { margin: 0 0 6px; font: 700 14px/1 var(--font-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cz-item { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.cz-item label { flex: 1; display: flex; align-items: center; gap: 12px; cursor: pointer; min-width: 0; }
.cz-item .nm { font-weight: 600; }
.cz-item .sy { font-size: 13px; color: var(--ink-3); }
.cz-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; }
.cz-order { display: flex; gap: 2px; }
.row-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.row-opt .lbl { font-weight: 600; }
.row-opt .hint { font-size: 13px; color: var(--ink-3); }
.search-results { margin-top: 8px; }
.search-results button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.search-results button:hover { background: var(--surface-2); }

/* ============ Dialog / sheet ============ */
dialog.sheet {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%;
  background: var(--surface); color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(20, 18, 10, .45); }
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheetUp .22s ease-out; }
@keyframes sheetUp { from { transform: translateY(24px); opacity: .4; } }
.sheet-h { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; border-bottom: 1px solid var(--line); }
.sheet-h h2 { margin: 0; flex: 1; font: 700 22px/1.15 var(--font-cond); text-transform: uppercase; letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-b { flex: 1; overflow-y: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
@media (min-width: 760px) {
  dialog.sheet { margin: auto; width: min(760px, calc(100vw - 64px)); height: auto; max-height: calc(100dvh - 64px); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
  dialog.sheet.wide { width: min(1080px, calc(100vw - 64px)); }
  dialog.sheet.narrow { width: min(560px, calc(100vw - 64px)); }
}

/* ============ Toast ============ */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font-weight: 500; transition: .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
@media (min-width: 960px) { .toast { bottom: 24px; } }

/* ============ Weather ============ */
.loc-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; font: 600 15px/1.2 var(--font); color: var(--ink-2); text-align: left; max-width: 100%; }
.loc-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.loc-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.wx-grid > .card { min-width: 0; }
@media (min-width: 760px) { .wx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wx-span { grid-column: 1 / -1; } }
@media (min-width: 1240px) { .wx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .wx-span2 { grid-column: span 2; } }

.wx-now { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center; padding: 18px 16px; }
.wx-now .ico { width: 72px; height: 72px; color: var(--wheat); }
.wx-now .temp { font: 700 64px/0.9 var(--font-cond); font-variant-numeric: tabular-nums; }
.wx-now .cond { font: 600 20px/1.2 var(--font-cond); text-transform: uppercase; letter-spacing: .03em; }
.wx-now .hl { color: var(--ink-2); font-size: 15px; }
.wx-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 10px; }
@media (min-width: 560px) { .wx-facts { grid-template-columns: repeat(6, 1fr); } }
.fact { padding: 10px 4px 0; }
.fact dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.fact dd { margin: 2px 0 0; font: 600 18px/1.2 var(--font-cond); font-variant-numeric: tabular-nums; }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; align-items: flex-start; }
.alert svg { width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--ink); }
.alert.warn svg { color: var(--warn); }
.alert.danger { background: var(--down-soft); border-color: color-mix(in srgb, var(--down) 35%, transparent); }
.alert.danger svg { color: var(--down); }
.alert b { display: block; font: 700 16px/1.2 var(--font-cond); text-transform: uppercase; letter-spacing: .03em; }
.alert details summary { cursor: pointer; font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.alert pre { white-space: pre-wrap; font: 14px/1.45 var(--font); margin: 8px 0 0; }
.alerts { display: grid; gap: 8px; }

.rating { display: inline-flex; align-items: center; gap: 6px; font: 700 22px/1 var(--font-cond); text-transform: uppercase; letter-spacing: .03em; }
.rating::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: currentColor; }
.r-good { color: var(--good); } .r-fair { color: var(--fair); } .r-poor { color: var(--poor); }
.spray-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; margin-top: 12px; }
.spray-bar span { height: 26px; border-radius: 3px; position: relative; }
.spray-bar span.good { background: var(--good); } .spray-bar span.fair { background: var(--fair); } .spray-bar span.poor { background: var(--poor); opacity: .85; }
.spray-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.reasons { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.reasons li { padding: 2px 0; }
.legend-dots { display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); margin-top: 8px; flex-wrap: wrap; }
.legend-dots i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

.metric-rows { display: grid; gap: 0; }
.metric { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: center; }
.metric:last-child { border-bottom: 0; }
.metric .m-l { font-weight: 500; }
.metric .m-s { font-size: 12px; color: var(--ink-3); grid-column: 1; }
.metric .m-v { grid-row: 1 / span 2; grid-column: 2; font: 600 20px/1.1 var(--font-cond); font-variant-numeric: tabular-nums; text-align: right; }
.metric .m-v small { font: 500 13px var(--font); color: var(--ink-3); }
.bar { height: 7px; background: var(--surface-2); border-radius: 4px; overflow: hidden; grid-column: 1 / -1; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }

.big-stat { font: 700 38px/1 var(--font-cond); font-variant-numeric: tabular-nums; }
.big-stat small { font: 500 15px var(--font); color: var(--ink-3); margin-left: 4px; }

.hourly { display: flex; overflow-x: auto; gap: 0; padding: 4px 0 6px; scrollbar-width: thin; }
.hour { flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hour:last-child { border-right: 0; }
.hour .t { font-size: 12px; color: var(--ink-3); }
.hour svg.wico { width: 28px; height: 28px; color: var(--ink-2); }
.hour .tp { font: 600 18px/1 var(--font-cond); }
.hour .pp { font-size: 12px; color: #3a76b0; min-height: 15px; }
.hour .wd { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.hour .sp { width: 26px; height: 5px; border-radius: 3px; }
.hour .sp.good { background: var(--good); } .hour .sp.fair { background: var(--fair); } .hour .sp.poor { background: var(--poor); }

.daily { display: grid; }
.day { display: grid; grid-template-columns: 54px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.day:last-child { border-bottom: 0; }
.day .dn { font: 700 16px/1.1 var(--font-cond); text-transform: uppercase; }
.day .dn small { display: block; font: 400 12px var(--font); color: var(--ink-3); text-transform: none; }
.day svg.wico { width: 28px; height: 28px; color: var(--ink-2); }
.day .range { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 6px; font: 600 16px/1 var(--font-cond); }
.day .range .lo { color: var(--ink-3); text-align: right; }
.day .track { height: 6px; border-radius: 3px; background: var(--surface-2); position: relative; }
.day .track i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #6f9fc8, #c9a24a, #c0643a); }
.day .extra { text-align: right; font-size: 13px; color: var(--ink-2); line-height: 1.35; min-width: 76px; }
.day .extra .rain { color: #3a76b0; font-weight: 600; }
.frost-flag { color: #3a76b0; font-weight: 700; font-size: 11px; letter-spacing: .05em; }

.loc-list button.loc { display: flex; width: 100%; align-items: center; gap: 10px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.loc-list button.loc:hover { background: var(--surface-2); }
.loc-list .loc svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; }
.loc-list .loc .nm { font-weight: 600; }
.loc-list .loc .sub { font-size: 13px; color: var(--ink-3); }
.loc-row { display: flex; align-items: center; }
.loc-row .loc { flex: 1; }
.footnote { font-size: 12px; color: var(--ink-3); margin-top: 18px; }

/* ============ News ============ */
.news-tools { display: grid; gap: 10px; margin-bottom: 12px; }
@media (min-width: 760px) { .news-tools { grid-template-columns: minmax(240px, 360px) 1fr; align-items: center; } }
.news-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.post { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.post:hover { border-color: var(--line-strong); }
.post:hover .p-title { color: var(--brand); }
.post .p-img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--surface-2); }
.post .p-img.ph { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font: 700 22px var(--font-cond); text-transform: uppercase; letter-spacing: .05em; background: var(--brand-soft); }
.post .p-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.post .p-cat { font: 700 13px/1 var(--font-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--wheat); }
.post .p-title { margin: 0; font: 700 20px/1.2 var(--font-cond); letter-spacing: .01em; }
.post .p-ex { margin: 0; font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post .p-meta { font-size: 13px; color: var(--ink-3); display: flex; gap: 10px; align-items: center; }
.post .p-meta .listen { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 600; }
.post .p-meta svg { width: 14px; height: 14px; fill: currentColor; }
@media (min-width: 640px) {
  .news-grid .post.lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; }
  .news-grid .post.lead .p-img { aspect-ratio: auto; height: 100%; min-height: 260px; }
  .news-grid .post.lead .p-title { font-size: 28px; }
  .news-grid .post.lead .p-body { padding: 22px; justify-content: center; }
}
.reader-meta { color: var(--ink-3); font-size: 14px; margin-bottom: 12px; }
.reader-title { font: 700 30px/1.15 var(--font-cond); margin: 0 0 6px; }
.reader-hero { border-radius: var(--radius); margin: 8px 0 14px; width: 100%; max-height: 420px; object-fit: cover; }
.reader-frame { width: 100%; border: 0; display: block; min-height: 200px; }
.reader audio { width: 100%; margin: 6px 0 12px; }
.reader-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.load-more { display: flex; justify-content: center; margin: 18px 0; }

/* ============ Market picker (first visit + Customize) ============ */
.btn:disabled { opacity: .5; cursor: not-allowed; }
.onb { padding-bottom: 8px; }
.onb-head { padding: calc(22px + env(safe-area-inset-top)) 0 2px; max-width: 680px; }
.onb-kicker { font: 700 14px/1 var(--font-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--wheat); }
.onb-head h1 { font: 700 34px/1.05 var(--font-cond); text-transform: uppercase; margin: 8px 0; }
.onb-head p { color: var(--ink-2); margin: 0 0 14px; max-width: 560px; }
.onb-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-label .link-btn { order: 2; border: 0; background: none; color: var(--brand); font: 600 14px/1 var(--font); letter-spacing: 0; text-transform: none; padding: 6px 2px; min-height: 32px; }
.section-label .link-btn:hover { text-decoration: underline; }
.pick-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 380px) { .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pick {
  position: relative; display: flex; flex-direction: column; padding: 0; text-align: left; overflow: hidden;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color .12s, box-shadow .12s, transform .08s;
}
.pick:hover { border-color: var(--line-strong); }
.pick:active { transform: scale(.98); }
.pick-art { display: flex; align-items: center; justify-content: center; height: 92px; }
.pick-art svg { width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-grains .pick-art { background: #f4e7c8; color: #8a6420; }
.g-livestock .pick-art { background: #e6ead9; color: #4b5a2f; }
.g-dairy .pick-art { background: #e3ebf1; color: #3d5f7a; }
.g-softs .pick-art { background: #f2e3d7; color: #8a4f2c; }
.g-energy .pick-art { background: #e9e6df; color: #4a4a42; }
.g-stocks .pick-art { background: #e3eadb; color: #2f5233; }
.pick-ticker { font: 700 24px/1 var(--font-cond); letter-spacing: .04em; border: 2px solid currentColor; border-radius: 8px; padding: 6px 10px; }
.pick-txt { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px 11px; min-width: 0; }
.pick-name { font: 700 17px/1.15 var(--font-cond); text-transform: uppercase; letter-spacing: .02em; }
.pick-sub { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-check {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--surface); display: flex; align-items: center; justify-content: center;
}
.pick-check svg { width: 15px; height: 15px; stroke-width: 3; color: #fff; opacity: 0; }
.pick[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pick[aria-pressed="true"] .pick-check { background: var(--brand); border-color: var(--brand); }
.pick[aria-pressed="true"] .pick-check svg { opacity: 1; }
.onb-bar {
  position: sticky; z-index: 15; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px;
  background: var(--ink); color: var(--paper); border-radius: 12px; box-shadow: 0 8px 24px rgba(30, 30, 20, .25);
}
.onb-bar span { font-weight: 600; }
.onb-bar .btn.primary { background: #e8c779; border-color: #e8c779; color: #1e261d; }
.onb-bar .btn.primary:hover { background: #f0d48f; }
@media (min-width: 960px) { .onb-bar { bottom: 16px; } .onb-head h1 { font-size: 44px; } }
