/* market & tracker UI — 8px grid, flat, no brand */
:root, [data-theme="dark"] {
  --bg: #000000;
  --bg-2: #161616;
  --elev: #1A1A1A;
  --card: #181818;
  --card-2: #1C1C1C;
  --text: #EDEDED;
  --text-2: #8E8E8E;
  --text-3: #6A6A6A;
  --green: #2EBD85;
  --green-2: #249A6C;
  --green-dim: rgba(46, 189, 133, 0.14);
  --red: #F6465D;
  --red-dim: rgba(246, 70, 93, 0.14);
  --yellow: #D4A017;
  --line: #2A2A2A;
  --line-2: #3A3A3A;
  --search: #1C1C1C;
  --overlay: rgba(0, 0, 0, 0.55);
  --header: var(--bg);
  --tabbar: var(--bg);
  --accent: #2EBD85;
  --danger: #F6465D;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-h: 50px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-2: #F5F5F5;
  --elev: #FFFFFF;
  --card: #FFFFFF;
  --card-2: #F0F0F0;
  --text: #1A1A1A;
  --text-2: #6B6B6B;
  --text-3: #8A8A8A;
  --green: #2EBD85;
  --green-2: #249A6C;
  --green-dim: rgba(46, 189, 133, 0.12);
  --red: #F6465D;
  --red-dim: rgba(246, 70, 93, 0.10);
  --line: #EBEBEB;
  --line-2: #DDDDDD;
  --search: #F5F5F5;
  --overlay: rgba(0, 0, 0, 0.4);
  --header: #FFFFFF;
  --tabbar: #FFFFFF;
  --accent: #2EBD85;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
img { display: block; }

#app {
  height: 100%;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}
.page { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.page-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 16px;
  padding-bottom: calc(16px + var(--tab-h) + var(--safe-bottom));
}
.page-scroll.no-tab { padding-bottom: calc(16px + var(--safe-bottom)); }
.page-scroll.root-content {
  padding-block-start: max(var(--safe-top), var(--tg-safe-area-inset-top, 0px));
}

.topbar, .subbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(8px + var(--safe-top)) 16px 8px;
  background: var(--header);
  min-height: 44px;
  position: relative;
  z-index: 5;
}
.topbar { justify-content: space-between; }
.brand { font-weight: 600; font-size: 18px; letter-spacing: 0; }
.subbar h1 { flex: 1; text-align: center; font-size: 16px; font-weight: 600; padding-right: 36px; }
.subbar .side { width: 36px; flex: 0 0 36px; display: flex; justify-content: center; }
.subbar .side-right { margin-left: auto; width: auto; flex: 0 0 auto; display: flex; gap: 0; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 4px;
  display: grid; place-items: center; color: var(--text);
  position: relative; background: transparent;
}
.icon-btn:active { background: var(--card-2); }
.icon-btn svg { width: 20px; height: 20px; }
.badge-num {
  position: absolute; top: 2px; right: 2px;
  min-width: 14px; height: 14px; padding: 0 3px;
  background: var(--red); color: #fff; border-radius: 7px;
  font-size: 9px; line-height: 14px; text-align: center; font-weight: 600;
}

/* Market home */
.market-page {
  --market-gutter: max(clamp(14px, 4.6vw, 20px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px),
    var(--tg-safe-area-inset-left, 0px), var(--tg-safe-area-inset-right, 0px));
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}
.market-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  flex-shrink: 0;
  padding: calc(4px + var(--safe-top)) var(--market-gutter) 8px;
  background: var(--header);
}
.market-header h1 { grid-area: 1 / 2; display: flex; justify-content: center; }
.market-header .logo-word { height: 26px; }
.market-header .icon-btn { grid-area: 1 / 3; justify-self: end; width: 44px; height: 44px; }
.market-header .badge-num { top: 5px; right: 5px; }
.market-page button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

.search-wrap { padding: 0 var(--market-gutter) 8px; flex-shrink: 0; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--search); border-radius: 10px;
  padding: 0 12px; height: 44px; color: var(--text-2);
}
.search:focus-within { box-shadow: inset 0 0 0 1px var(--accent); }
.search input { flex: 1; height: 100%; min-width: 0; color: var(--text); font-size: 16px; }
.search input::placeholder { color: var(--text-2); }
.search svg { width: 16px; height: 16px; flex-shrink: 0; }

.market-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin: 4px var(--market-gutter) 0;
  padding: 3px;
  background: var(--search);
  border-radius: 10px;
  flex-shrink: 0;
}
.market-type {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 37px;
  color: var(--text-2);
  font-weight: 600;
}
.market-type.active { background: var(--bg); color: var(--text); border-color: var(--line); }
.mtabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(max-content, 1fr));
  margin-inline: var(--market-gutter);
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.mtabs::-webkit-scrollbar { display: none; }
.mtab {
  min-height: 44px; padding: 0 4px;
  font-size: 14px; color: var(--text-2); font-weight: 500;
  position: relative; white-space: nowrap;
}
.mtab.active { color: var(--text); font-weight: 600; }
.mtab.active::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0;
  width: 24px; height: 2px; margin-inline: auto; background: var(--green);
}
.detail-market-type {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--card-2);
  color: var(--text-2);
  font-size: 11px;
  white-space: nowrap;
}
.book-unit { padding: 8px 16px 2px; color: var(--text-2); font-size: 12px; }
.page[data-page="coin"] .trade-row { grid-template-columns: 1fr 1fr; }
.page[data-page="coin"] .trade-row span:last-child { text-align: right; }

.market-quotes { padding-inline: var(--market-gutter); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content) 68px;
  gap: clamp(8px, 2.5vw, 12px);
  align-items: center;
  padding-block: 8px;
  min-height: 62px; width: 100%; text-align: left; color: inherit;
  border-bottom: 1px solid var(--line);
}
.row:active { background: var(--bg-2); }
.row .coin { gap: 10px; }
.row .coin-ic, .row .coin-ic img { width: 32px; height: 32px; border-radius: 50%; }
.market-coin-label { display: grid; min-width: 0; gap: 3px; }
.market-coin-heading { display: flex; align-items: center; gap: 5px; min-width: 0; }
.market-swap-row .coin-name { white-space: nowrap; }
.market-kind-badge {
  flex-shrink: 0;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--card-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}
.market-coin-label .coin-name, .row .px { font-size: 15px; }
.market-coin-label .coin-sub { margin: 0; font-size: 12px; line-height: 1.3; color: var(--text-2); }
.market-volume { white-space: nowrap; }
.row .px { text-align: right; }
.row .chg-box { height: 28px; border-radius: 5px; }

@media (max-width: 400px) {
  .market-swap-row .coin { gap: 8px; }
  .market-swap-row .coin-name { font-size: 14px; }
  .market-swap-row .px { max-inline-size: 6.25rem; }
}

@media (max-width: 360px) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, max-content) 60px; }
  .row .coin { gap: 7px; }
  .row .coin-ic, .row .coin-ic img { width: 28px; height: 28px; }
  .market-coin-label .coin-sub { font-size: 11px; }
  .row .px { max-inline-size: 6rem; font-size: 14px; }
  .row .chg-box { min-width: 0; }
  .market-swap-row { column-gap: 6px; grid-template-columns: minmax(0, 1fr) minmax(0, max-content) 56px; }
  .market-swap-row .coin { gap: 6px; }
  .market-swap-row .coin-ic, .market-swap-row .coin-ic img { width: 26px; height: 26px; }
  .market-swap-row .coin-name, .market-swap-row .px { font-size: 13px; }
  .market-swap-row .px { max-inline-size: 5rem; }
  .market-swap-row .market-coin-heading { gap: 4px; }
  .market-kind-badge { padding-inline: 3px; font-size: 10px; }
}

.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 8px; font-size: 14px; font-weight: 600;
}
.coin { display: flex; align-items: center; gap: 8px; min-width: 0; }
.coin-ic {
  width: 28px; height: 28px; border-radius: 14px;
  flex-shrink: 0; overflow: hidden; background: var(--card-2);
}
.coin-ic img { width: 28px; height: 28px; }
.coin-ic.letter { display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 600; }
.coin-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.coin-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.px { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.sub-r { font-size: 11px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.chg, .up { color: var(--green); }
.down { color: var(--red); }
.chg.flat { color: var(--text-2); }
.chg-box {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 68px; height: 28px; border-radius: 4px;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: #fff;
}
.chg-box.up { background: var(--green); }
.chg-box.down { background: var(--red); }
.chg-box.flat { background: #3A3A3A; color: #C8C8C8; }
[data-theme="light"] .chg-box.flat { background: #D0D0D0; color: #333; }

.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--tabbar);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
  z-index: 8; max-width: 560px; margin: 0 auto;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-3); font-size: 10px; font-weight: 500; height: var(--tab-h);
}
.tab svg { width: 20px; height: 20px; }
.tab.active { color: var(--green); }

/* coin detail */
.detail-headline h1 { flex: none; padding: 0; text-align: left; }
.detail-head { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.detail-head .coin-ic { width: 22px; height: 22px; border-radius: 11px; }
.detail-head .coin-ic img { width: 22px; height: 22px; }
.detail-title { font-weight: 600; font-size: 16px; }
.pair-head { padding: 8px 16px 0; display: grid; grid-template-columns: 1fr auto; gap: 16px; }
.big-price .num { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.big-price .meta { margin-top: 6px; font-size: 13px; font-weight: 500; }
.kv-side { display: grid; grid-template-columns: auto auto; gap: 4px 12px; font-size: 11px; align-content: start; }
.kv-side .k { color: var(--text-3); }
.kv-side .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
@media (max-width: 390px) {
  .pair-head { gap: 10px; grid-template-columns: minmax(0, 1fr) auto; }
  .big-price .num { font-size: 22px; overflow-wrap: anywhere; }
  .kv-side { gap: 4px 6px; }
}

#chart-wrap { height: 220px; position: relative; margin-top: 8px; }
#vol-wrap { height: 56px; position: relative; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 12px; }
.tf-bar { display: flex; gap: 0; padding: 0 8px; border-bottom: 1px solid var(--line); }
.tf {
  flex: 1; height: 32px; color: var(--text-2); font-size: 12px; font-weight: 500; position: relative;
}
.tf.active { color: var(--text); font-weight: 600; }
.tf.active::after {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 2px; background: var(--green);
}
.vol-label { padding: 6px 16px 0; font-size: 11px; color: var(--text-2); }
.vol-label b { color: var(--text); font-weight: 500; margin-left: 6px; }

.book-tabs { display: flex; border-bottom: 1px solid var(--line); margin-top: 8px; }
.book-tab {
  flex: 1; height: 36px; font-size: 13px; color: var(--text-2); font-weight: 500; position: relative;
}
.book-tab.active { color: var(--text); font-weight: 600; }
.book-tab.active::after {
  content: ""; position: absolute; left: 30%; right: 30%; bottom: 0; height: 2px; background: var(--green);
}
.order-book { margin-inline: 16px; }
.order-book-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 48px;
  color: var(--text-2);
  font-size: 12px;
  padding-inline: 6px;
}
.order-book-head > :last-child { text-align: right; }
.order-book-controls { display: flex; align-items: center; gap: 5px; }
.order-book-currency { color: var(--text-2); font-size: 10px; }
.order-book-precision {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding-inline: 8px;
  border-radius: 6px;
  background: var(--card-2);
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.order-book-precision i {
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}
.order-book-levels { border-top: 1px solid var(--line); overflow-anchor: none; }
.order-book-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.order-book-side {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding-inline: 6px;
}
.order-book-side::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 0;
  width: var(--size);
}
.order-book-side.bid { grid-template-columns: minmax(0, 1fr) auto; }
.order-book-side.ask { grid-template-columns: auto minmax(0, 1fr); }
.order-book-side.bid::before { inset-inline-end: 0; background: var(--green-dim); }
.order-book-side.ask::before { inset-inline-start: 0; background: var(--red-dim); }
.order-book-side.bid .order-book-price { color: var(--green); }
.order-book-side.ask .order-book-price { color: var(--red); }
[data-theme="light"] .order-book-side.bid .order-book-price { color: #187555; }
[data-theme="light"] .order-book-side.ask .order-book-price { color: #b53449; }
.order-book-price { font-weight: 600; white-space: nowrap; }
.order-book-qty { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-book-side.ask .order-book-qty { text-align: right; }
@media (max-width: 360px) {
  .order-book { margin-inline: 12px; }
  .order-book-row { font-size: 11px; }
  .order-book-side { gap: 4px; padding-inline: 4px; }
}
.precision-sheet {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  width: min(100%, 440px);
  max-width: 100%;
  padding: 14px 18px calc(12px + var(--safe-bottom));
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: var(--elev);
  color: var(--text);
}
.precision-sheet::backdrop { background: var(--overlay); }
.precision-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.precision-sheet-head h2 { font-size: 16px; }
.precision-sheet-head p { color: var(--text-2); font-size: 12px; }
.precision-sheet-close {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--card-2); color: var(--text-2); font-size: 22px;
}
.precision-option {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 46px; padding-inline: 10px;
  border-top: 1px solid var(--line);
  font-size: 15px; text-align: left; font-variant-numeric: tabular-nums;
}
.precision-option.selected { font-weight: 600; background: var(--green-dim); }
.order-book-precision:focus-visible, .precision-sheet button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.trades { padding: 8px 16px 0; }
.trades .th, .trade-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; height: 22px; align-items: center;
  font-size: 11px; font-variant-numeric: tabular-nums;
}
.trades .th { color: var(--text-3); margin-bottom: 4px; }
.trade-row .t { color: var(--text-3); text-align: right; }

/* assets */
.asset-hero { padding: 16px 16px 12px; background: var(--bg); }
.asset-hero-head { display: flex; align-items: center; justify-content: space-between; }
.asset-hero .k { font-size: 12px; color: var(--text-2); }
.asset-hero .total { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.hero-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; }
.hero-row .k { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.hero-row .v { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.split-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px; margin: 0 0 8px; }
.split {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; text-align: left; color: inherit; width: 100%;
}
.split .k { font-size: 11px; color: var(--text-3); margin-bottom: 8px; }
.split .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.split .bar { height: 3px; background: var(--card-2); border-radius: 1px; margin-top: 8px; overflow: hidden; }
.split .bar > i { display: block; height: 100%; background: var(--green); }
.split.debt .bar > i { background: var(--red); }
.split .pct { font-size: 11px; color: var(--text-3); margin-top: 6px; }

.hold-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  width: 100%; text-align: left; color: inherit;
  padding: 10px 16px; border-bottom: 1px solid var(--line); min-height: 56px;
}
.hold-row:active { background: var(--bg-2); }
.hold-amt { text-align: right; font-variant-numeric: tabular-nums; }
.hold-amt .n { font-weight: 600; font-size: 13px; }
.hold-amt .v { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.hold-chg { width: 76px; text-align: right; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 8px; font-weight: 600; font-size: 14px;
}
.btn-primary { background: var(--green); color: #062016; width: 100%; }
[data-theme="light"] .btn-primary { color: #fff; }
.btn-ghost { background: var(--bg-2); color: var(--text); width: 100%; border: 1px solid var(--line); }
.btn-danger { background: var(--red-dim); color: var(--red); width: 100%; }
.btn-row { display: flex; flex-direction: column; gap: 8px; margin: 16px; }
.field { margin: 0 16px 12px; }
.field label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; height: 40px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 0 12px; color: var(--text);
}
.field input:focus, .field select:focus { border-color: var(--line-2); }
.hint { font-size: 11px; color: var(--text-3); margin: 0 16px 12px; }

/* discover */
.news { }
.news-item {
  display: block; width: 100%; text-align: left; color: inherit;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.news-item:active { background: var(--bg-2); }
.news-item h3 { font-size: 14px; font-weight: 500; line-height: 1.45; }
.news-item .meta { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.article-body { padding: 8px 16px 16px; font-size: 15px; line-height: 1.7; }
.article-body p { margin-bottom: 12px; }
.guide-step { border-bottom: 1px solid var(--line); padding: 12px 16px; }
.guide-step b { display: block; margin-bottom: 4px; font-size: 13px; }
.guide-step p { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* mine / account */
.profile-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left; color: inherit;
  padding: 16px; border-bottom: 1px solid var(--line);
}
.avatar {
  width: 48px; height: 48px; border-radius: 24px; background: var(--bg-2);
  display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--line);
}
.avatar svg { width: 24px; height: 24px; color: var(--text-2); }
.profile-card h3 { font-size: 16px; font-weight: 600; }
.profile-card p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.menu { background: var(--bg); margin-bottom: 8px; }
.menu + .menu { border-top: 8px solid var(--bg-2); }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; color: inherit;
  padding: 14px 16px; border-bottom: 1px solid var(--line); min-height: 48px;
}
.menu-item:active { background: var(--bg-2); }
.menu-item .ic { display: none; }
.menu-item .t { flex: 1; font-weight: 400; font-size: 14px; }
.menu-item .arr, .chev { color: var(--text-3); }
.menu-item .val { color: var(--text-3); font-size: 13px; }
.menu-item.danger { color: var(--red); }
.radio-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  width: 100%; text-align: left; color: inherit;
}
.radio-row .desc { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.dot-check { width: 16px; height: 16px; border-radius: 8px; border: 1px solid var(--line-2); }
.radio-row.active .dot-check {
  border-color: var(--green);
  background: radial-gradient(circle at center, var(--green) 0 4px, transparent 5px);
}
.ver { text-align: center; font-size: 11px; color: var(--text-3); padding: 24px 16px; }

.empty { text-align: center; color: var(--text-3); padding: 48px 16px; font-size: 13px; }
.notice {
  display: block; width: 100%; text-align: left; color: inherit;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.notice .t { font-weight: 500; font-size: 14px; }
.notice .t.unread::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  background: var(--green); border-radius: 50%; margin-right: 6px; vertical-align: middle;
}
.notice p { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.notice .when { font-size: 11px; color: var(--text-3); margin-top: 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(16px + var(--tab-h) + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--elev); color: var(--text); border: 1px solid var(--line-2);
  padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 50;
  max-width: 86%;
}
#overlay { position: fixed; inset: 0; z-index: 40; display: none; }
#overlay.show { display: block; }
.mask { position: absolute; inset: 0; background: var(--overlay); }
.sheet, .modal {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--card); border-radius: 8px 8px 0 0;
  padding: 12px 16px calc(16px + var(--safe-bottom));
  max-width: 560px; margin: 0 auto;
}
.modal.center {
  top: 50%; bottom: auto; left: 16px; right: 16px; border-radius: 8px;
  transform: translateY(-50%); padding: 16px;
}
.sheet .handle { width: 32px; height: 3px; background: var(--line-2); border-radius: 1px; margin: 0 auto 12px; }
.sheet h3, .modal h3 { font-size: 16px; margin-bottom: 6px; }
.sheet p, .modal p { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.sheet-item {
  display: flex; align-items: center; width: 100%; text-align: left; color: inherit;
  padding: 14px 0; border-top: 1px solid var(--line); font-weight: 500;
}
.calc-result { margin: 0; padding: 8px 16px 16px; }
.calc-result .k { font-size: 12px; color: var(--text-2); }
.calc-result .big { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.calc-kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.calc-kv:last-child { border-bottom: 0; }
.calc-kv .k { color: var(--text-3); }
.footnote { font-size: 10px; color: var(--text-3); text-align: center; padding: 16px; line-height: 1.5; }
.about-logo { padding: 24px 16px 8px; text-align: center; }
.about-logo p { font-size: 12px; color: var(--text-3); }
.star.filled { color: var(--yellow); }
.chip {
  height: 24px; padding: 0 8px; border-radius: 4px; color: var(--text-2);
  font-size: 12px; font-weight: 500; border: 1px solid var(--line);
  display: inline-flex; align-items: center;
}
@media (min-width: 561px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* brand mark — transparent wordmark, theme-swapped */
.logo-box { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.logo-word { display: none; height: 22px; width: auto; }
[data-theme="dark"] .logo-word.logo-dark { display: block; }
[data-theme="light"] .logo-word.logo-light { display: block; }
.logo-box.logo-about .logo-word { height: 40px; margin: 0 auto 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.demo-label, .chart-credit { color: var(--text-2); font-size: 11px; }
.chart-credit { padding: 6px 16px; text-align: center; }
.big-price .demo-label { margin-top: 6px; }
.chart-credit a { color: inherit; text-decoration: underline; }
