.tb-band {
  max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 6px 16px; font-size: 15px; color: var(--muted); text-decoration: none;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.tb-band b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.tb-band .tb-sp { flex: 1; }
.tb-pill {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px;
  font-size: 14px; font-weight: 600; background: var(--neutral-bg, rgba(127,127,127,.14)); color: var(--muted);
}
.tb-pill.real { background: var(--warn-bg); color: var(--warn); }
.tb-entry { display: flex; gap: 8px; margin: 12px 0 4px; }
.tb-entry .tb-go {
  flex: 1; min-height: 52px; border-radius: 14px; border: 0; font-size: 19px; font-weight: 700;
  background: var(--up); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.tb-entry .tb-go.sell { background: var(--down); }
.tb-entry .tb-go .tb-pill { background: rgba(255,255,255,.22); color: #fff; }
.tb-back { position: fixed; inset: 0; z-index: 60; background: var(--backdrop, rgba(0,0,0,.45)); opacity: 0; transition: opacity .2s; }
.tb-back.open { opacity: 1; }
.tb-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 560px; margin: 0 auto; max-height: 90vh; overflow-y: auto;
  background: var(--card); color: var(--text); border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .22s ease-out;
  overscroll-behavior: contain;
}
.tb-sheet.open { transform: none; }
.tb-handle { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 4px auto 10px; }
.tb-hd { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tb-hd h2 { font-size: 20px; font-weight: 700; margin: 0; }
.tb-hd .code { color: var(--muted); font-size: 15px; }
.tb-hd .tb-sp { flex: 1; }
.tb-px { margin: 6px 0 12px; }
.tb-px .big { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.tb-px .sub { font-size: 15px; color: var(--muted); }
.tb-seg { display: flex; background: var(--neutral-bg, rgba(127,127,127,.12)); border-radius: 12px; padding: 3px; margin: 8px 0; }
.tb-seg button {
  flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  font-size: 17px; font-weight: 600; cursor: pointer;
}
.tb-seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tb-seg.buy button[aria-pressed="true"].side { color: var(--up); }
.tb-seg.sell button[aria-pressed="true"].side { color: var(--down); }
.tb-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; font-size: 17px; }
.tb-row + .tb-row { border-top: 1px solid var(--line); }
.tb-row .k { color: var(--muted); }
.tb-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.tb-in {
  width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
  padding: 0 14px; font-size: 19px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; box-sizing: border-box;
}
.tb-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tb-lab { display: block; font-size: 15px; color: var(--muted); margin: 10px 0 4px; }
.tb-lab2 { display: flex; justify-content: space-between; align-items: baseline; }
.tb-lab2 small { font-size: 14px; color: var(--muted); }
.tb-est { margin: 4px 0 0; min-height: 1.2em; }
.tb-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.tb-chips button {
  flex: 1 1 0; min-width: 56px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer;
}
.tb-chips button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.tb-big {
  width: 100%; min-height: 58px; border: 0; border-radius: 16px; margin-top: 14px; cursor: pointer;
  font-size: 20px; font-weight: 800; color: #fff; background: var(--up);
}
.tb-big.sell { background: var(--down); }
.tb-big[disabled] { opacity: .45; cursor: default; }
.tb-big.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); min-height: 48px; font-size: 17px; font-weight: 600; margin-top: 8px; }
.tb-note { font-size: 15px; color: var(--muted); margin: 8px 0 0; }
.tb-warn { font-size: 15px; color: var(--bad); margin: 8px 0 0; font-weight: 600; }
.tb-ok { font-size: 17px; color: var(--ok); font-weight: 700; margin: 10px 0 0; }
.tb-confirm { border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; margin-top: 10px; }
.tb-timer { font-variant-numeric: tabular-nums; }
.tb-toast {
  position: fixed; left: 50%; top: 64px; transform: translate(-50%, -20px); z-index: 70; opacity: 0; transition: all .2s;
  max-width: 440px; width: calc(100% - 32px); box-sizing: border-box; padding: 12px 16px; border-radius: 14px;
  background: var(--text); color: var(--bg); font-size: 17px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.tb-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tb-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 0 0 12px; }
.tb-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.tb-hero .big { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tb-hero .sub { font-size: 15px; color: var(--muted); }
.tb-brk { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tb-brk button {
  min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; padding: 6px 12px;
}
.tb-brk button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.tb-brk button[disabled] { color: var(--muted); cursor: default; }
.tb-brk small { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
.tb-pos { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.tb-pos + .tb-pos { border-top: 1px solid var(--line); }
.tb-pos .nm { flex: 1; min-width: 0; }
.tb-pos .nm b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-pos .nm span { font-size: 15px; color: var(--muted); }
.tb-pos .pct { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tb-pos .tb-x {
  min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--down); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.tb-up { color: var(--up); }
.tb-dn { color: var(--down); }
.tb-ord { display: flex; gap: 8px; align-items: center; padding: 8px 0; font-size: 15px; }
.tb-ord + .tb-ord { border-top: 1px solid var(--line); }
.tb-ord .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-ord .tb-cx { min-height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.tb-form .tb-in { text-align: left; font-size: 17px; font-weight: 500; }
.tb-caps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tb-caps label { font-size: 14px; color: var(--muted); }
.tb-caps .tb-in { font-size: 17px; min-height: 44px; }
.tb-sw { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 10px 0; }
.tb-sw input { width: 22px; height: 22px; }
.tb-link { display: inline-block; margin: 4px 0; font-size: 15px; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
@media (max-width: 360px) { .tb-px .big, .tb-hero .big { font-size: 30px; } }
.tb-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin: 6px 0 10px; }
.tb-tabs button { min-height: 44px; border: 0; background: var(--card); color: var(--muted); font-size: 17px; font-weight: 700; cursor: pointer; }
.tb-tabs button.buy[aria-selected="true"] { background: var(--up); color: #fff; }
.tb-tabs button.sell[aria-selected="true"] { background: var(--down); color: #fff; }
.tb-cur { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 6px; }
.tb-cur .k { font-size: 15px; color: var(--muted); }
.tb-cur b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tb-cur small { font-size: 14px; color: var(--muted); margin-left: auto; }
.tb-seg.sm button { min-height: 34px; font-size: 15px; }
.tb-pr { display: grid; grid-template-columns: 48px 1fr 48px; gap: 6px; align-items: stretch; margin: 6px 0 4px; }
.tb-pr > button { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 22px; font-weight: 700; cursor: pointer; }
.tb-field { position: relative; display: block; min-width: 0; }
.tb-field .tb-in { padding-right: 34px; }
.tb-field .u { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--muted); pointer-events: none; }
.tb-field.big { margin: 6px 0 2px; }
.tb-field.big .tb-in { min-height: 52px; font-size: 22px; }
.tb-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 6px; }
.tb-pills button { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
.tb-pills small { font-size: 14px; color: var(--muted); }
.tb-sum { border-top: 1px solid var(--line); margin-top: 10px; }
.tb-sum .tb-row { padding: 6px 0; }
.tb-sum .tb-row + .tb-row { border-top: 0; }
.tb-sum .tb-row.sub { font-size: 15px; color: var(--muted); padding: 2px 0; }
.tb-sum .tb-row .v { font-size: 20px; }
.tb-big .tb-pill { background: rgba(255,255,255,.22); color: #fff; margin-left: 6px; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
