/* Shared design system — monochrome (white / ink) with a spectrum accent */
:root {
  --bg: #ffffff;
  --bg-2: #f7f7f8;
  --card: #ffffff;
  --card-hi: #ffffff;
  --border: #ebebee;
  --border-hi: #dedee3;
  --text: #0b0b0f;
  --text-2: #45454f;
  --muted: #8b8b96;
  --ink: #0b0b0f;            /* primary buttons, dark panels */
  --ink-2: #17171d;
  --accent: #0b0b0f;
  --accent-hi: #0b0b0f;
  --accent-soft: #f2f2f5;
  --violet: #7c5cff;
  --spectrum: linear-gradient(100deg, #ff9a3c 0%, #ff4f8b 34%, #9b5cff 66%, #3d7bff 100%);
  --spectrum-soft: linear-gradient(100deg, rgba(255,154,60,.14), rgba(255,79,139,.14) 34%, rgba(155,92,255,.14) 66%, rgba(61,123,255,.14));
  --danger: #e5383b;
  --danger-soft: #fdeeee;
  --success: #12a150;
  --success-soft: #e8f7ee;
  --warn: #d97a06;
  --warn-soft: #fff4e5;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16,16,24,.04), 0 8px 24px -12px rgba(16,16,24,.12);
  /* neutral fills, translucent bars, primary buttons, status tints (redefined for the dark theme) */
  --fill: var(--fill);
  --fill-2: #e4e4e9;
  --fill-hover: #f3f3f6;
  --glass: rgba(255,255,255,.8);
  --btn: #0b0b0f;
  --btn-fg: #ffffff;
  --btn-hover: #26262e;
  --hover-border: var(--hover-border);
  --placeholder: #b3b3bc;
  --violet-soft: #efeaff;
  --violet-text: #6a46f0;
  --violet-tint: #faf8ff;
  --danger-border: var(--danger-border);
  --danger-text: #b4383a;
  --danger-hover: #fbe0e0;
  --warn-border: #f5d9ad;
  --warn-text: #9a5600;
  --pos-soft: #e7f8ef;
  --pos-text: #12804a;
  --neg-soft: #fdecec;
  --neg-text: #c22b2b;
  --panel-border: var(--ink);
  color-scheme: light;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Onest", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--text); text-decoration: none; }
.mono { font-family: var(--font-mono); letter-spacing: 0; }
.muted { color: var(--muted); }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; }
.hidden { display: none !important; }
.spectrum-text { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── layout ── */
.wrap { max-width: 480px; margin: 0 auto; padding: 18px 16px 120px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 18px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.03em; }
.brand b { font-weight: 800; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ── cards ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.card-title h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card-title small { color: var(--muted); font-size: 12px; }

/* dark "ink" panel with a spectrum glow — used for hero amounts, promo, CTA */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: #fff; border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 18px 18px 20px;
}
.hero::after {
  content: ""; position: absolute; z-index: -1; right: -30%; bottom: -120%; width: 120%; height: 180%;
  background: var(--spectrum); filter: blur(60px); opacity: .45; transform: rotate(-12deg); pointer-events: none;
}
.hero .label { font-weight: 600; font-size: 14px; color: rgba(255,255,255,.7); }
.hero .value { font-family: var(--font-display); font-size: 34px; font-weight: 700; margin-top: 12px; letter-spacing: -.03em; }
.hero .sub { color: rgba(255,255,255,.6); font-size: 13px; margin-top: 4px; }
.hero .mono, .hero .muted { color: rgba(255,255,255,.65) !important; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.grid3 .cell { padding: 14px 14px 12px; border-right: 1px solid var(--border); min-width: 0; }
.grid3 .cell:last-child { border-right: 0; }
.grid3 .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid3 .v { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid3 .foot { grid-column: 1 / -1; border-top: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; gap: 12px; }

.progress { flex: 1; height: 6px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--spectrum); transition: width .6s ease; }
.progress-label { font-size: 12px; color: var(--muted); white-space: nowrap; }

.status-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 2px 4px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.dot.ok { background: var(--success); color: var(--success); }
.dot.warn { background: var(--warn); color: var(--warn); }
.dot.err { background: var(--danger); color: var(--danger); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ── alerts ── */
.alert { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--danger-border); background: var(--danger-soft); border-radius: var(--radius); padding: 14px 16px; color: var(--danger); }
.alert .t { font-weight: 700; }
.alert .s { color: var(--danger-text); font-size: 13px; margin-top: 2px; }
.alert .act { margin-left: auto; font-weight: 700; display: flex; gap: 6px; align-items: center; cursor: pointer; white-space: nowrap; background: none; border: 0; color: var(--danger); padding: 0; }
.alert.info { position: relative; border-color: transparent; color: var(--text);
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--spectrum) border-box; border: 1px solid transparent;
  box-shadow: 0 10px 30px -22px rgba(80,40,160,.45); }
.alert.info svg { color: var(--violet); }
.alert.warn { border-color: var(--warn-border); background: var(--warn-soft); color: var(--warn-text); }
.alert.warn .s, .alert.info .s { color: inherit; opacity: .75; }

/* ── buttons ── */
.icon-btn { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; cursor: pointer;
  background: var(--card); border: 1px solid var(--border-hi); color: var(--text-2); transition: background .15s, transform .15s; }
.icon-btn:hover { background: var(--bg-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--btn);
  font-weight: 600; font-size: 15px; cursor: pointer; width: 100%;
  background: var(--btn); color: var(--btn-fg); white-space: nowrap;
  transition: transform .12s, background .15s, box-shadow .2s, opacity .15s;
}
.btn:hover { background: var(--btn-hover); box-shadow: 0 6px 20px -8px rgba(124,92,255,.55); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: var(--card); border-color: var(--border-hi); color: var(--text); }
.btn.ghost:hover { background: var(--bg-2); box-shadow: none; }
.btn.danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.btn.danger:hover { box-shadow: none; background: var(--danger-hover); }
.btn.sm { height: 36px; font-size: 13px; border-radius: 10px; width: auto; padding: 0 14px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 1px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; cursor: pointer; background: var(--card); border: 1px solid var(--border-hi);
  color: var(--text-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: border-color .15s; }
.chip:hover { border-color: var(--hover-border); }
.chip.on { background: var(--btn); border-color: var(--btn); color: var(--btn-fg); }

/* ── forms ── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field > small { color: var(--muted); font-size: 12px; }
.input { width: 100%; height: 46px; border-radius: 11px; padding: 0 14px; outline: none; background: var(--card); border: 1px solid var(--border-hi); color: var(--text);
  transition: border-color .15s, box-shadow .15s; }
textarea.input { height: 84px; padding: 12px 14px; resize: none; }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124,92,255,.14); }
.input::placeholder { color: var(--placeholder); }
.input.mono { font-size: 13px; }
.input-wrap { position: relative; }
.input-wrap .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.big-input { height: 62px; font-family: var(--font-display); font-size: 26px; font-weight: 700; padding-right: 64px; letter-spacing: -.02em; }

.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--fill-2); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(18px); }

/* ── list rows ── */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; color: var(--text); }
.item:first-child { border-top: 0; padding-top: 2px; }
.item:last-child { padding-bottom: 2px; }
.item .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .r { text-align: right; flex: none; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge.paid { background: var(--success-soft); color: var(--success); }
.badge.waiting, .badge.created { background: var(--violet-soft); color: var(--violet-text); }
.badge.confirming { background: var(--warn-soft); color: var(--warn); }
.badge.expired { background: var(--fill); color: var(--muted); }

/* coin icon */
.coin { position: relative; width: 38px; height: 38px; flex: none; }
.coin svg { display: block; }
.coin .chain { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--card); display: grid; place-items: center; font-size: 8px; font-weight: 800; color: #fff; }

.empty { text-align: center; color: var(--muted); padding: 22px 10px; font-size: 14px; }
.empty .ico { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); }

.copy-box { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .15s; color: var(--text); }
.copy-box:hover { border-color: var(--hover-border); }
.copy-box .val { flex: 1; min-width: 0; word-break: break-all; font-family: var(--font-mono); font-size: 13px; }
.copy-box svg { flex: none; color: var(--muted); }

/* ── bottom nav (legacy mini-app) ── */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 20; width: calc(100% - 24px); max-width: 456px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; background: var(--glass); backdrop-filter: blur(16px);
  border: 1px solid var(--border-hi); border-radius: 20px; box-shadow: var(--shadow); }
.nav button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 8px; border-radius: 14px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.nav button.on { color: var(--btn-fg); background: var(--btn); }
.foot-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ── sheet ── */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(11,11,15,.32); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.sheet-bg.open { opacity: 1; }
.sheet { position: fixed; left: 50%; bottom: 0; z-index: 41; width: 100%; max-width: 520px; transform: translate(-50%, 100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  background: var(--card); border: 1px solid var(--border-hi); border-bottom: 0; border-radius: 24px 24px 0 0; max-height: 92vh; overflow-y: auto; padding: 10px 16px 28px; }
.sheet.open { transform: translate(-50%, 0); }
.sheet .grab { width: 40px; height: 4px; border-radius: 99px; background: var(--border-hi); margin: 2px auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-size: 19px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--fill); border-radius: 12px; }
.seg button { height: 34px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(16,16,24,.12); }

/* toast */
.toast { position: fixed; left: 50%; top: 16px; z-index: 60; transform: translate(-50%, -140%); padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  background: var(--ink); color: #fff; box-shadow: 0 12px 30px rgba(16,16,24,.25); transition: transform .25s cubic-bezier(.2,.8,.2,1); max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

.sk { background: linear-gradient(90deg, var(--fill) 25%, var(--fill-2) 50%, var(--fill) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 8px; color: transparent !important; }
@keyframes sk { to { background-position: -200% 0; } }
.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ── misc ── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; white-space: nowrap; }
.pill.light { background: var(--bg-2); border-color: var(--border); color: var(--text-2); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stackbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 3px; background: var(--fill); }
.stackbar i { display: block; height: 100%; }

.kassa { position: relative; overflow: hidden; cursor: pointer; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card);
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s, box-shadow .2s; }
.kassa::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--spectrum); opacity: 0; transition: opacity .2s; }
.kassa:hover { border-color: var(--border-hi); transform: translateY(-2px); box-shadow: 0 14px 34px -16px rgba(16,16,24,.25); }
.kassa:hover::before { opacity: 1; }
.kassa.off { opacity: .55; }
.kassa .name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.kassa .url { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kassa .coins { display: flex; }
.kassa .coins .coin { margin-left: -6px; }
.kassa .coins .coin:first-child { margin-left: 0; }
.kassa .coins .coin svg { border-radius: 50%; box-shadow: 0 0 0 2px var(--card); }
.kassa .sum { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.add-kassa { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: var(--radius); cursor: pointer;
  border: 1.5px dashed var(--border-hi); color: var(--text-2); font-weight: 600; background: none; width: 100%; transition: border-color .15s, background .15s; }
.add-kassa:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-tint); }

.code { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--ink); border: 1px solid var(--ink); font-family: var(--font-mono);
  font-size: 12px; line-height: 1.65; color: #d4d4dc; white-space: pre-wrap; word-break: break-all; cursor: pointer; }
.step { display: flex; gap: 12px; }
.step .n { width: 28px; height: 28px; border-radius: 99px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--btn); color: var(--btn-fg); }
.step p { margin: 3px 0 0; color: var(--text-2); font-size: 13.5px; }
.foot-note a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
/* icons inside buttons/links: centre them on the text line instead of the baseline */
.btn svg, .chip svg, .eyebrow svg, .pill svg { display: block; flex: none; }
.btn > span, .chip > span, .pill > span { display: inline-flex; align-items: center; }

/* language switch */
.lang-dd { position: relative; display: inline-block; }
.lang-dd .flag { display: inline-block; flex: none; width: 20px; height: 14px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(16,16,24,.12); }
.lang-dd .flag svg { display: block; width: 100%; height: 100%; }
.lang-cur { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 9px 0 10px; border: 1px solid var(--border, #e6e6ea); border-radius: 10px; background: var(--card, #fff); color: var(--text); font: 700 12.5px/1 var(--font); letter-spacing: .04em; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.lang-cur:hover, .lang-dd.open .lang-cur { border-color: var(--hover-border); box-shadow: 0 1px 3px rgba(16,16,24,.08); }
.lang-cur .chev { width: 12px; height: 12px; color: var(--muted); transition: transform .18s; }
.lang-dd.open .lang-cur .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; min-width: 172px; padding: 5px; border: 1px solid var(--border, #e6e6ea); border-radius: 12px; background: var(--card, #fff); box-shadow: 0 12px 32px rgba(16,16,24,.14), 0 2px 6px rgba(16,16,24,.06); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; }
.lang-dd.up .lang-menu { top: auto; bottom: calc(100% + 6px); transform: translateY(4px); }
.lang-dd.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 500 14px/1 var(--font); text-align: left; cursor: pointer; }
.lang-menu button span:not(.flag) { flex: 1; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--fill-hover); outline: none; }
.lang-menu button.on { font-weight: 600; }
.lang-menu .tick { width: 14px; height: 14px; color: var(--text); visibility: hidden; }
.lang-menu button.on .tick { visibility: visible; }
.side-lang .lang-menu { right: auto; left: 0; }
.foot-note .lang-menu { right: auto; left: 50%; margin-left: -86px; }

/* ───── dark theme (html[data-theme="dark"], set before first paint by /static/js/theme.js) ───── */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0f;
  --bg-2: #111116;
  --card: #15151b;
  --card-hi: #1b1b22;
  --border: #24242c;
  --border-hi: #30303a;
  --text: #f2f2f5;
  --text-2: #b9b9c4;
  --muted: #80808c;
  --ink: #1a1a22;              /* dark panels stay dark, a step above the page */
  --ink-2: #22222b;
  --panel-border: #2c2c36;
  --accent: #f2f2f5;
  --accent-hi: #ffffff;
  --accent-soft: #1d1d25;
  --violet: #9a80ff;
  --danger: #ff6b6e;
  --danger-soft: #2a1517;
  --success: #3ccf7f;
  --success-soft: #11261b;
  --warn: #f0a33a;
  --warn-soft: #2a1f10;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  --fill: #202028;
  --fill-2: #2a2a33;
  --fill-hover: #22222a;
  --glass: rgba(15,15,20,.78);
  --btn: #f2f2f5;
  --btn-fg: #0b0b0f;
  --btn-hover: #ffffff;
  --hover-border: #44444f;
  --placeholder: #5d5d68;
  --violet-soft: #241d3d;
  --violet-text: #b9a6ff;
  --violet-tint: #1b1730;
  --danger-border: #4a2427;
  --danger-text: #ff9a9c;
  --danger-hover: #33191c;
  --warn-border: #4a3517;
  --warn-text: #f3b45c;
  --pos-soft: #12301f;
  --pos-text: #5fe39a;
  --neg-soft: #33171a;
  --neg-text: #ff8a8a;
}
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .lang-dd .flag { box-shadow: 0 0 0 1px rgba(255,255,255,.14); }
:root[data-theme="dark"] .lang-menu { box-shadow: 0 16px 40px rgba(0,0,0,.55); }
:root[data-theme="dark"] .sheet-bg, :root[data-theme="dark"] .modal-bg { background: rgba(0,0,0,.6); }
:root[data-theme="dark"] .qr { background: #fff; }

/* theme toggle (sun / moon) */
.theme-btn { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border-hi); border-radius: 10px;
  background: var(--card); color: var(--text-2); cursor: pointer; transition: border-color .15s, color .15s; }
.theme-btn:hover { border-color: var(--hover-border); color: var(--text); }
.theme-btn svg { width: 17px; height: 17px; display: block; }
.theme-btn .moon, :root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after { transition: background-color .25s, border-color .25s, color .2s, box-shadow .25s !important; }
.foot-note .theme-btn, .foot-note .lang-dd { vertical-align: middle; }
.foot-note .theme-btn { margin-right: 8px; }
.foot-note > svg { vertical-align: -2px; }
.copy-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.copy-pill { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--text); transition: border-color .15s; }
.copy-pill:hover { border-color: var(--hover-border); }
.copy-pill b { font-family: var(--font-mono); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-pill svg { flex: none; color: var(--text-3, var(--text-2)); }
