/* =========================================================
   森林主题个人执行工作台 · style.css
   ========================================================= */

:root {
  --bg: #f2f5ef;
  --bg-deep: #e6ece2;
  --surface: #ffffff;
  --surface-2: #fbfcf9;
  --line: rgba(46, 92, 66, .14);
  --line-strong: rgba(46, 92, 66, .26);

  --moss: #2e5c42;
  --moss-2: #3f8f63;
  --leaf: #7fb77e;
  --sage: #a8c3a3;
  --bark: #6b5344;
  --amber: #d99a3d;
  --sky: #7ba2c4;

  --text: #22362a;
  --text-2: #4a6152;
  --muted: #7f9488;

  --up: #c0392b;    /* 涨 · 红 */
  --down: #2e7d52;  /* 跌 · 绿 */
  --danger: #b7503c;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(34, 54, 42, .04), 0 8px 24px rgba(34, 54, 42, .06);
  --shadow-2: 0 12px 40px rgba(34, 54, 42, .14);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, #e9f1e6 0%, rgba(233, 241, 230, 0) 60%),
    radial-gradient(900px 420px at 100% 0%, #eef3e4 0%, rgba(238, 243, 228, 0) 55%),
    var(--bg);
}

button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--moss-2); }

/* ---------------- 外壳 ---------------- */
.app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 14px calc(28px + var(--safe-b));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-t)) 0 10px;
  background: linear-gradient(to bottom, var(--bg) 62%, rgba(242, 245, 239, .86) 100%);
  backdrop-filter: saturate(1.2) blur(8px);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand__mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  font-size: 19px;
  border-radius: 11px;
  background: linear-gradient(160deg, var(--moss-2), var(--moss));
  box-shadow: 0 4px 12px rgba(46, 92, 66, .22);
}
.brand__name {
  font-size: 16px; font-weight: 700; letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__date { font-size: 12px; color: var(--muted); margin-top: -2px; }
.topbar__spacer { flex: 1; }
.icon-btn {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 11px;
  cursor: pointer;
  font-size: 16px;
  transition: transform .12s ease, background .12s ease;
}
.icon-btn:active { transform: scale(.94); }

/* 导航胶囊 */
.nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav__item {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13.5px;
  color: var(--text-2);
  transition: all .16s ease;
}
.nav__item:active { transform: scale(.96); }
.nav__item.is-active {
  background: linear-gradient(150deg, var(--moss-2), var(--moss));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(46, 92, 66, .24);
}
.nav__item.is-active .nav__emoji { filter: none; }
.nav__emoji { font-size: 15px; line-height: 1; }

/* 子导航 */
.subnav { display: flex; gap: 8px; overflow-x: auto; padding: 0 2px 14px; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav__item {
  flex: none; padding: 5px 12px; font-size: 13px;
  border-radius: 999px; cursor: pointer;
  border: 1px dashed var(--line-strong);
  background: transparent; color: var(--text-2);
}
.subnav__item.is-active { background: var(--sage); border-style: solid; border-color: transparent; color: #1f3b2c; font-weight: 600; }

.view { animation: fade .22s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.grid { display: grid; gap: 12px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 720px) {
  .grid--2, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card + .card { margin-top: 12px; }
.card__head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px 0;
}
.card__icon {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  font-size: 16px;
  border-radius: 9px;
  background: var(--bg-deep);
}
.card__titles { flex: 1; min-width: 0; }
.card__title { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.card__sub { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.card__right { flex: none; display: flex; align-items: center; gap: 6px; }
.card__body { padding: 12px 16px 16px; }
.card__body--flush { padding: 0; }
.card--danger { border-color: rgba(183, 80, 60, .34); background: #fdf6f4; }
.card--moss { background: linear-gradient(170deg, #f3f8f1, #ffffff); }
.card--flat { box-shadow: none; }

/* ---------------- 落地页头部 ---------------- */
.landing {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--r-lg);
  color: #fff;
  background: linear-gradient(140deg, #3f8f63, #2e5c42 70%);
  box-shadow: 0 10px 26px rgba(46, 92, 66, .22);
}
.landing--amber { background: linear-gradient(140deg, #d99a3d, #a86f22 70%); box-shadow: 0 10px 26px rgba(168, 111, 34, .22); }
.landing--sky { background: linear-gradient(140deg, #7ba2c4, #4d7ba1 70%); box-shadow: 0 10px 26px rgba(77, 123, 161, .22); }
.landing--bark { background: linear-gradient(140deg, #8a6b53, #5f4534 70%); box-shadow: 0 10px 26px rgba(95, 69, 52, .22); }
.landing--violet { background: linear-gradient(140deg, #8d7fc0, #5b4c94 70%); box-shadow: 0 10px 26px rgba(91, 76, 148, .22); }
.landing__icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; font-size: 23px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .18);
}
.landing__titles { flex: 1; min-width: 0; }
.landing__title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .4px; }
.landing__sub { margin: 2px 0 0; font-size: 12.5px; opacity: .88; }
.landing__right { flex: none; }

/* ---------------- 按钮 / 输入 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(150deg, var(--moss-2), var(--moss));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 14px rgba(46, 92, 66, .2);
}
.btn--danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn--ghost { background: transparent; }
.btn--amber { background: linear-gradient(150deg, #e0a94f, #c48a2c); border-color: transparent; color: #fff; }
.btn--sm { padding: 5px 10px; font-size: 12.5px; border-radius: 9px; }
.btn--block { width: 100%; }

.input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.input:focus { border-color: var(--moss-2); box-shadow: 0 0 0 3px rgba(63, 143, 99, .14); }
.input--area { resize: vertical; min-height: 78px; line-height: 1.6; }
select.input { appearance: none; background-image: none; }

.field { display: block; }
.field + .field { margin-top: 12px; }
.field__label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field__hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: all .14s ease;
}
.chip:active { transform: scale(.96); }
.chip.is-active {
  background: var(--moss); border-color: transparent; color: #fff;
  box-shadow: 0 5px 12px rgba(46, 92, 66, .2);
}
.chip__icon { font-size: 13px; line-height: 1; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2px;
  background: var(--bg-deep);
  color: var(--moss);
}
.badge--moss { background: rgba(63, 143, 99, .14); color: var(--moss); }
.badge--amber { background: rgba(217, 154, 61, .16); color: #96691b; }
.badge--sky { background: rgba(123, 162, 196, .18); color: #3f6b8f; }
.badge--danger { background: rgba(183, 80, 60, .14); color: var(--danger); }

/* ---------------- 行 / 列表 ---------------- */
.row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: none; }
.row__left { flex: 1; min-width: 0; }
.row__right { flex: none; display: flex; align-items: center; gap: 6px; }
.row--tap { cursor: pointer; }
.row--tap:active { background: var(--surface-2); }

.list-title { font-size: 13.5px; font-weight: 600; }
.list-sub { font-size: 12px; color: var(--muted); }
.is-done .list-title, .is-done .list-sub { text-decoration: line-through; color: var(--muted); }

.check {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  display: grid; place-items: center;
  font-size: 12px; color: #fff;
  cursor: pointer;
  padding: 0;
  transition: all .14s ease;
}
.check.is-on { background: var(--moss-2); border-color: transparent; }
.check--square { border-radius: 7px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
  cursor: pointer;
  transition: all .14s ease;
}
.tag:active { transform: scale(.96); }
.tag__x { font-size: 11px; color: var(--muted); }

/* ---------------- 空状态 / 错误 ---------------- */
.empty { padding: 26px 12px; text-align: center; color: var(--muted); }
.empty__icon { font-size: 30px; opacity: .6; }
.empty__text { margin: 6px 0 0; font-size: 13px; }

.error-box {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fff5f3;
  border: 1px dashed rgba(183, 80, 60, .3);
  border-radius: var(--r);
  font-size: 12px;
  color: #8c3b2c;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow: auto;
}
.error-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 进度 ---------------- */
.ring-wrap { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring { display: block; }
.ring__value { transition: stroke-dashoffset .5s cubic-bezier(.4, 0, .2, 1); }
.ring-center {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center;
  pointer-events: none;
}
.ring__label { display: block; font-size: 17px; font-weight: 700; line-height: 1.1; }
.ring__sub { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }

.bar-wrap { width: 100%; }
.bar-label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.bar { width: 100%; border-radius: 999px; overflow: hidden; }
.bar__fill { height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.4, 0, .2, 1); }

/* ---------------- 日历 ---------------- */
.cal { user-select: none; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal__month { font-size: 13.5px; font-weight: 650; }
.cal__week, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__wd { text-align: center; font-size: 11px; color: var(--muted); padding-bottom: 2px; }
.cal__cell {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface-2);
  font-size: 13px;
  cursor: pointer;
  transition: all .14s ease;
}
.cal__cell:active { transform: scale(.94); }
.cal__cell.is-blank { background: transparent; cursor: default; }
.cal__cell.is-today { border-color: var(--line-strong); font-weight: 700; }
.cal__cell.is-selected {
  background: linear-gradient(150deg, var(--moss-2), var(--moss));
  color: #fff;
  box-shadow: 0 6px 14px rgba(46, 92, 66, .22);
}
.cal__dots {
  position: absolute; bottom: 4px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 2px;
}
.cal__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--leaf); }
.cal__cell.is-selected .cal__dot { background: rgba(255, 255, 255, .9); }
.cal__n { font-size: 10px; opacity: .8; }

/* 部位池 */
.pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pool__item {
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: all .14s ease;
}
.pool__item:active { transform: scale(.96); }
.pool__item.is-on { border-color: transparent; background: rgba(63, 143, 99, .14); box-shadow: inset 0 0 0 1px var(--leaf); }
.pool__emoji { display: block; font-size: 15px; font-weight: 650; }
.pool__hint { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }

/* ---------------- 行情 ---------------- */
.quote-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.quote-meta { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.quote-list { display: grid; gap: 6px; }
.quote-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.quote__name { font-size: 13.5px; font-weight: 600; }
.quote__code { font-size: 11px; color: var(--muted); }
.quote__price { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.quote__chg { font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; min-width: 66px; }
.quote__up { color: var(--up); }
.quote__down { color: var(--down); }
.quote__flat { color: var(--muted); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--moss-2); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .32; } }

/* ---------------- 心情 / 鸡汤 ---------------- */
.mood-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.mood {
  padding: 10px 4px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2);
  text-align: center; cursor: pointer; transition: all .14s ease;
}
.mood:active { transform: scale(.96); }
.mood.is-on { border-color: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.mood__emoji { display: block; font-size: 21px; line-height: 1.2; }
.mood__label { display: block; font-size: 11.5px; color: var(--text-2); }

.soup {
  padding: 14px 16px;
  border-radius: var(--r);
  background: linear-gradient(160deg, #fdf8ec, #f7f1e2);
  border: 1px dashed rgba(217, 154, 61, .4);
  font-size: 14px;
  color: #6b5330;
  line-height: 1.7;
}

.timeline { display: grid; gap: 10px; }
.tl-item {
  display: flex; gap: 10px;
  padding: 11px 13px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.tl__emoji { font-size: 19px; line-height: 1.2; flex: none; }
.tl__body { flex: 1; min-width: 0; }
.tl__meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.tl__text { margin: 3px 0 0; font-size: 13.5px; word-break: break-word; white-space: pre-wrap; }

/* ---------------- 聊天气泡（AI） ---------------- */
.chat { display: grid; gap: 10px; }
.bubble {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble--me { justify-self: end; background: linear-gradient(150deg, var(--moss-2), var(--moss)); color: #fff; border-bottom-right-radius: 5px; }
.bubble--ai { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.chat-form .input { flex: 1; }

/* ---------------- Toast ---------------- */
.toast-host {
  position: fixed;
  left: 50%; bottom: calc(26px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 200;
  display: grid; gap: 8px; justify-items: center;
  pointer-events: none;
  width: max-content; max-width: 88vw;
}
.toast {
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(34, 54, 42, .93);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
  text-align: center;
}
.toast.is-in { opacity: 1; transform: none; }
.toast--ok { background: rgba(46, 125, 82, .95); }
.toast--warn { background: rgba(168, 111, 34, .95); }
.toast--err { background: rgba(160, 63, 47, .95); }

/* ---------------- Modal ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(24, 40, 31, .42);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 18px;
  opacity: 0;
  transition: opacity .2s ease;
}
.modal-backdrop.is-in { opacity: 1; }
.modal__panel {
  width: 100%;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  padding: 18px;
  transform: translateY(12px) scale(.98);
  transition: transform .22s cubic-bezier(.3, 1.2, .5, 1);
  max-height: 86vh;
  overflow: auto;
}
.modal-backdrop.is-in .modal__panel { transform: none; }
.modal__title { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.modal__body { margin-bottom: 14px; }
.modal__text { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ---------------- 今日总览聚合卡 ---------------- */
.ov-ring { display: flex; gap: 14px; align-items: center; }
.ov-desc__main {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--moss-2);
  line-height: 1.45;
}
.ov-desc .spread { padding: 3px 0; }
.ov-card { transition: transform .14s ease, border-color .14s ease; }
.ov-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }

/* ---------------- 杂项 ---------------- */
.lp { -webkit-touch-callout: none; user-select: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hr { height: 1px; background: var(--line); margin: 12px 0; border: 0; }
.stack { display: grid; gap: 10px; }
.stack--sm { display: grid; gap: 6px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

.kpi { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.kpi__item { text-align: center; padding: 10px 6px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.kpi__v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi__k { font-size: 11.5px; color: var(--muted); }

.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 8px; }
.sec-title h4 { margin: 0; font-size: 13.5px; font-weight: 650; }

.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  background: var(--bg-deep); color: var(--text-2); border: 1px solid transparent;
}
.pill--on { background: rgba(63, 143, 99, .14); color: var(--moss); }

.link { color: var(--moss-2); text-decoration: none; font-size: 12.5px; word-break: break-all; }
.link:active { opacity: .6; }

.scroll-x { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { flex: none; }

.stat-strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.stat-strip::-webkit-scrollbar { display: none; }
.stat {
  flex: none; min-width: 104px;
  padding: 10px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
}
.stat__k { font-size: 11.5px; color: var(--muted); }
.stat__v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a15;
    --bg-deep: #18231c;
    --surface: #1a241d;
    --surface-2: #202c23;
    --line: rgba(140, 190, 155, .16);
    --line-strong: rgba(140, 190, 155, .3);
    --text: #e7efe8;
    --text-2: #c3d3c5;
    --muted: #90a496;
    --moss: #79bd94;
    --moss-2: #56a577;
    --leaf: #8fd0a8;
    --sage: #3c5b47;
    --amber: #e0b368;
    --up: #ef6a58;
    --down: #4fc08a;
    --danger: #e07a68;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .32);
    --shadow-2: 0 12px 40px rgba(0, 0, 0, .45);
  }
  body {
    background:
      radial-gradient(1200px 500px at 10% -10%, #1b2a20 0%, rgba(27, 42, 32, 0) 60%),
      var(--bg);
  }
  .topbar { background: linear-gradient(to bottom, var(--bg) 62%, rgba(18, 26, 21, .86) 100%); }
  .soup { background: linear-gradient(160deg, #2a2417, #241f14); color: #dcc492; }
  .error-box { background: #2a1a17; color: #efa193; }
}
