/* Canton Bot — Telegram-style mock prototype. System font, peachy coral accent. */

:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --coral: #E07A5F;
  --coral-press: #C85A45;
  --coral-ink: #C14D38;
  --on-coral: #FFFFFF;
  --coral-soft: #FDECE7;
  --coral-line: #F3C8BC;
  --up: #16A34A;
  --up-soft: #DCFCE7;
  --down: #DC2626;
  --down-soft: #FEE2E2;
  --stage-bg: #F4ECE7;
  --stage-ink: #1C1412;
  --stage-muted: #6B574F;
  --stage-card: #FFFAF8;
  --tg-bar: #FFFFFF;
  --tg-bar-ink: #111111;
  --tg-sub: #8E8E93;
  --tg-bg: #E7EEF5;
  --tg-hair: rgba(0, 0, 0, 0.08);
  --bubble: #FFFFFF;
  --bubble-ink: #1C1C1E;
  --bubble-meta: #8E8E93;
  --out-bubble: #D8F5C8;
  --key: #FFFFFF;
  --key-ink: #1C1C1E;
  --key-line: rgba(0, 0, 0, 0.06);
  --key-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  --composer: #FFFFFF;
  --input-bg: #F2F3F5;
  --overlay: rgba(20, 12, 10, 0.42);
  --sheet: #FFFFFF;
  --mini-bg: #F7F4F2;
  --mini-card: #FFFFFF;
  --grid: rgba(28, 20, 18, 0.07);
  --chart-axis: #8A7B75;
  --focus: #E07A5F;
  --shadow-phone: 0 18px 50px rgba(80, 40, 28, 0.18), 0 2px 8px rgba(80, 40, 28, 0.08);
  --radius-phone: 40px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --coral: #F08A72;
  --coral-press: #FF9D88;
  --coral-ink: #F3A090;
  --on-coral: #1A1210;
  --coral-soft: #3A221C;
  --coral-line: #5A342C;
  --up: #34D399;
  --up-soft: #0E2A20;
  --down: #F87171;
  --down-soft: #3A1418;
  --stage-bg: #141110;
  --stage-ink: #F4ECE7;
  --stage-muted: #B9A49C;
  --stage-card: #1E1917;
  --tg-bar: #1C242F;
  --tg-bar-ink: #F5F5F5;
  --tg-sub: #8B9AAB;
  --tg-bg: #0E1621;
  --tg-hair: rgba(255, 255, 255, 0.08);
  --bubble: #182533;
  --bubble-ink: #F1F5F9;
  --bubble-meta: #8B9AAB;
  --out-bubble: #2B5278;
  --key: #233040;
  --key-ink: #F1F5F9;
  --key-line: rgba(255, 255, 255, 0.06);
  --key-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  --composer: #17212B;
  --input-bg: #242F3D;
  --overlay: rgba(0, 0, 0, 0.55);
  --sheet: #17212B;
  --mini-bg: #0F141A;
  --mini-card: #182533;
  --grid: rgba(241, 245, 249, 0.08);
  --chart-axis: #8B9AAB;
  --focus: #F08A72;
  --shadow-phone: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--stage-bg);
  color: var(--stage-ink);
  min-height: 100%;
}
button, input { font-family: inherit; }
/* Keep the hidden attribute winning over display:flex / grid. */
[hidden] { display: none !important; }
button { cursor: pointer; }
img, svg { display: block; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--bubble-meta); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; overflow-wrap: anywhere; word-break: normal; }

/* ---------- Stage (desktop / tablet frame) ---------- */
.stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 24px;
}
.stage-panel {
  width: 280px;
  flex: 0 0 280px;
  color: var(--stage-ink);
}
.stage-brand {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stage-lead {
  margin: 10px 0 22px;
  color: var(--stage-muted);
  font-size: 14px;
  line-height: 1.45;
}
.jumps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.jumps button {
  appearance: none;
  background: var(--stage-card);
  color: var(--stage-ink);
  border: 1px solid var(--coral-line);
  border-radius: 12px;
  text-align: left;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s, transform 0.12s;
}
.jumps button:hover { background: var(--coral-soft); }
.jumps button:active { transform: scale(0.99); }
.theme-toggle {
  margin-top: 18px;
  appearance: none;
  background: var(--coral);
  color: var(--on-coral);
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}
.theme-toggle:active { background: var(--coral-press); }

.phone-wrap { display: flex; align-items: center; justify-content: center; }
.phone {
  width: 390px;
  height: 844px;
  max-height: calc(100vh - 32px);
  background: #0A0A0A;
  border-radius: var(--radius-phone);
  padding: 10px;
  box-shadow: var(--shadow-phone);
}
.tg {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--tg-bg);
  color: var(--tg-bar-ink);
  border-radius: 32px;
  overflow: hidden;
}

/* Narrow screens: the Telegram app is the viewport */
@media (max-width: 480px) {
  .stage { display: block; padding: 0; background: var(--tg-bg); }
  .stage-panel { display: none; }
  .phone-wrap { display: block; }
  .phone {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: var(--tg-bg);
  }
  .tg { border-radius: 0; }
}

@media (min-width: 481px) and (max-width: 900px) {
  .stage {
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    padding: 20px 16px 28px;
  }
  .stage-panel {
    width: min(390px, 100%);
    flex: none;
    text-align: center;
  }
  .jumps { display: grid; grid-template-columns: 1fr 1fr; }
  .theme-toggle { margin-top: 14px; }
}

/* ---------- Status bar + header ---------- */
.status-bar {
  flex: 0 0 46px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  padding: 10px 22px 4px;
  background: var(--tg-bar);
  color: var(--tg-bar-ink);
  font-size: 15px;
  font-weight: 650;
}
.sb-time { justify-self: start; padding-left: 4px; }
.sb-island {
  width: 96px;
  height: 28px;
  background: #0A0A0A;
  border-radius: 16px;
  margin-bottom: 2px;
}
.sb-icons {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tg-bar-ink);
  padding-right: 2px;
}

.tg-head {
  position: relative;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 0 2px;
  background: var(--tg-bar);
  border-bottom: 1px solid var(--tg-hair);
  z-index: 5;
}
.icon-btn {
  appearance: none;
  background: none;
  border: 0;
  color: var(--coral-ink);
  width: 44px;
  height: 44px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
}
.icon-btn:active { background: var(--coral-soft); }
.head-ident {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 4px 0;
  cursor: pointer;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--on-coral);
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 18px;
  flex: 0 0 40px;
  letter-spacing: -0.03em;
}
.head-name {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--tg-bar-ink);
}
.head-sub {
  font-size: 13px;
  color: var(--tg-sub);
  line-height: 1.2;
}

.more-menu {
  position: absolute;
  top: 52px;
  right: 8px;
  background: var(--sheet);
  color: var(--tg-bar-ink);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  min-width: 180px;
  padding: 6px;
  z-index: 20;
  overflow: hidden;
}
.more-menu button {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 15px;
}
.more-menu button:hover { background: var(--coral-soft); }

/* ---------- Chat ---------- */
.chat {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.day-chip {
  align-self: center;
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 4px 0 2px;
}
[data-theme="dark"] .day-chip { background: rgba(255, 255, 255, 0.12); }

.msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  animation: rise 0.18s ease-out;
}
.msg.user { align-items: flex-end; }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.bubble {
  max-width: 100%;
  width: min(346px, 100%);
  background: var(--bubble);
  color: var(--bubble-ink);
  border-radius: 16px 16px 16px 6px;
  padding: 9px 11px 6px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  line-height: 1.35;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.msg.user .bubble {
  width: auto;
  max-width: 82%;
  background: var(--out-bubble);
  border-radius: 16px 16px 6px 16px;
}
.bubble p { margin: 0 0 8px; }
.bubble p:last-child { margin-bottom: 0; }
.msg-time {
  float: right;
  margin: 4px 0 0 10px;
  font-size: 11px;
  color: var(--bubble-meta);
  font-variant-numeric: tabular-nums;
}

.keyboard {
  width: min(346px, 100%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-top: 5px;
}
.keyboard.cols-3 { grid-template-columns: repeat(3, 1fr); }
.keyboard.cols-4 { grid-template-columns: repeat(4, 1fr); }
.keyboard.cols-1 { grid-template-columns: 1fr; }
.kbtn {
  appearance: none;
  border: 0;
  background: var(--key);
  color: var(--key-ink);
  box-shadow: var(--key-shadow);
  border: 1px solid var(--key-line);
  border-radius: 10px;
  min-height: 42px;
  padding: 8px 8px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  width: 100%;
}
.kbtn:active { transform: scale(0.98); }
.kbtn.primary {
  background: var(--coral);
  color: var(--on-coral);
  border-color: transparent;
}
.kbtn.primary:active { background: var(--coral-press); }
.kbtn.danger { color: var(--down); }
.kbtn.muted { color: var(--bubble-meta); font-weight: 550; }
.kbtn:disabled, .kbtn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.kbtn.span-2 { grid-column: span 2; }
.kbtn.span-3 { grid-column: span 3; }
.kbtn.span-4 { grid-column: span 4; }
.kbtn.active {
  background: var(--coral-soft);
  color: var(--coral-ink);
  border-color: var(--coral-line);
}

/* Cards inside bubbles */
.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.2;
}
.card-title .lane {
  font-weight: 600;
  font-size: 12px;
  color: var(--coral-ink);
  background: var(--coral-soft);
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: 1px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 12px;
  margin: 3px 0;
  flex-wrap: wrap;
}
.row .k { color: var(--bubble-meta); flex: 0 1 auto; }
.row .v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.div { height: 1px; background: var(--tg-hair); margin: 8px 0; }
.party {
  background: var(--input-bg);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.4;
}
.party .lab { color: var(--bubble-meta); font-size: 12px; margin-bottom: 1px; }
.ol { margin: 0 0 8px; padding-left: 18px; }
.ol li { margin: 2px 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.pill {
  font-size: 11px;
  font-weight: 600;
  background: var(--coral-soft);
  color: var(--coral-ink);
  border-radius: 999px;
  padding: 2px 8px;
}
.pos {
  padding: 8px 0;
  border-top: 1px solid var(--tg-hair);
}
.pos:first-of-type { border-top: 0; padding-top: 0; }
.pos-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
}
.pos-meta { font-size: 13px; color: var(--bubble-meta); margin: 3px 0 8px; }
.token-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--tg-hair);
  width: 100%;
  appearance: none;
  background: none;
  border-left: 0; border-right: 0; border-bottom: 0;
  color: inherit;
  text-align: left;
}
.token-row:first-of-type { border-top: 0; }
.token-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--coral-soft); color: var(--coral-ink);
  display: grid; place-items: center;
  font-weight: 750; font-size: 12px; flex: 0 0 34px;
}
.token-row .nm { font-weight: 700; line-height: 1.15; }
.token-row .sm { font-size: 12px; color: var(--bubble-meta); }
.token-row .rt { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.fee-box { margin: 6px 0 2px; font-size: 13.5px; }
.big-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 2px 0 4px;
}

/* ---------- Reply keyboard + composer ---------- */
.reply-kb {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 6px 8px 4px;
  background: var(--composer);
  border-top: 1px solid var(--tg-hair);
}
.rbtn {
  appearance: none;
  background: var(--input-bg);
  color: var(--tg-bar-ink);
  border: 0;
  border-radius: 10px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px;
}
.rbtn:active { background: var(--coral-soft); color: var(--coral-ink); }

.composer {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 12px;
  background: var(--composer);
}
.composer-plus { color: var(--tg-sub); }
#composerInput {
  flex: 1;
  min-width: 0;
  border: 0;
  background: var(--input-bg);
  color: var(--tg-bar-ink);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 16px; /* avoid iOS zoom */
  outline: none;
}
#composerInput::placeholder { color: var(--bubble-meta); }
.send-btn {
  appearance: none;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: var(--coral);
  color: var(--on-coral);
  display: grid;
  place-items: center;
  flex: 0 0 40px;
}
.send-btn:active { background: var(--coral-press); }

.slash-menu {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 62px;
  background: var(--sheet);
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  padding: 6px;
  z-index: 15;
  max-height: 280px;
  overflow: auto;
}
.slash-menu button {
  appearance: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--tg-bar-ink);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
}
.slash-menu button:hover { background: var(--coral-soft); }
.slash-menu .cmd { font-weight: 700; }
.slash-menu .hint { color: var(--bubble-meta); font-size: 13px; }

/* ---------- Mini App + sheets ---------- */
.miniap, .sheet {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--mini-bg);
  color: var(--tg-bar-ink);
  animation: slide 0.22s ease-out;
}
.sheet {
  inset: auto 0 0;
  max-height: min(92%, 760px);
  background: var(--sheet);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 29;
  border-radius: inherit;
  animation: fade 0.18s ease-out;
}
@keyframes slide {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.mini-head, .sheet-head {
  flex: 0 0 52px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  background: var(--tg-bar);
  border-bottom: 1px solid var(--tg-hair);
}
.sheet-head {
  background: transparent;
  border-bottom: 0;
  padding-top: 6px;
}
.sheet-grab {
  width: 36px;
  height: 4px;
  background: var(--tg-hair);
  border-radius: 2px;
  margin: 8px auto 0;
}
.mini-head .ttl, .sheet-head .ttl {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-body, .sheet-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}
.sheet-body { padding-bottom: 24px; }

.intervals {
  display: flex;
  gap: 4px;
  margin: 8px 0;
}
.intervals button {
  appearance: none;
  border: 0;
  background: var(--mini-card);
  color: var(--bubble-meta);
  border-radius: 8px;
  padding: 6px 0;
  flex: 1;
  font-size: 12px;
  font-weight: 700;
}
.intervals button.on {
  background: var(--coral-soft);
  color: var(--coral-ink);
}
.chart-wrap {
  background: var(--mini-card);
  border-radius: 14px;
  padding: 8px 6px 6px;
  overflow: hidden;
}
#candleChart { width: 100%; height: 220px; display: block; }
.quote-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 4px 2px 0;
}
.quote-line .px {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.ticket, .tape, .panel {
  background: var(--mini-card);
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
}
.tape-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 8px;
  font-size: 13px;
  padding: 5px 0;
  border-top: 1px solid var(--tg-hair);
  font-variant-numeric: tabular-nums;
}
.tape-row:first-child { border-top: 0; }

/* Numpad */
.pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.pad button {
  appearance: none;
  border: 0;
  background: var(--input-bg);
  color: var(--tg-bar-ink);
  border-radius: 12px;
  min-height: 52px;
  font-size: 22px;
  font-weight: 600;
}
.pad button.ok {
  background: var(--coral);
  color: var(--on-coral);
}
.pad-display {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  padding: 8px 0 4px;
  word-break: break-all;
}
.seg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.seg button {
  appearance: none;
  border: 1px solid var(--key-line);
  background: var(--input-bg);
  color: var(--tg-bar-ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 650;
}
.seg button.on {
  background: var(--coral);
  color: var(--on-coral);
  border-color: transparent;
}

/* Bridge stepper */
.steps { margin: 8px 0 0; padding: 0; list-style: none; }
.steps li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  font-size: 14px;
}
.steps .dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--coral-line);
  background: transparent;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--coral-ink);
}
.steps li.done .dot { background: var(--coral); border-color: var(--coral); color: var(--on-coral); }
.steps li.now .dot { background: var(--coral-soft); border-color: var(--coral); }
.steps li.wait { opacity: 0.55; }
.qr {
  width: 168px; height: 168px;
  margin: 10px auto;
  background: #fff;
  border-radius: 8px;
  display: block;
  padding: 8px;
}

.set-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--tg-hair);
  width: 100%;
  appearance: none;
  background: none;
  border-left: 0; border-right: 0; border-bottom: 0;
  color: inherit;
  text-align: left;
  font-size: 15px;
}
.set-row:first-of-type { border-top: 0; }
.set-row .val { color: var(--bubble-meta); font-weight: 600; font-variant-numeric: tabular-nums; }

.toast {
  position: absolute;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  background: rgba(28, 20, 18, 0.92);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 50;
  white-space: nowrap;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .toast { background: rgba(245, 236, 231, 0.95); color: #1A1210; }

.captcha-opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 4px;
}
.cap {
  appearance: none;
  border: 1px solid var(--key-line);
  background: var(--input-bg);
  border-radius: 14px;
  min-height: 72px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 650;
  color: var(--tg-bar-ink);
}
.cap .swatch {
  width: 28px; height: 28px; border-radius: 50%;
  margin-bottom: 6px;
}
.disabled-note {
  background: var(--input-bg);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin: 8px 0;
}

@media (max-width: 390px) {
  .bubble, .keyboard { width: 100%; }
}
