/* ============================================================
   Rechange — design system
   ============================================================ */
:root {
    --accent: #e30b5d;
    --accent-soft: rgba(227,11,93,.16);
    --accent-ring: rgba(227,11,93,.30);
    --bg-primary:   #170812;
    --bg-secondary: #200b16;
    --bg-card:      #2a0f1e;
    --bg-input:     #2e1224;
    --bg-hover:     #3a1629;
    --bg-elevated:  #260d1b;

    --sakura-primary:   #e30b5d;
    --sakura-secondary: #f2497c;
    --sakura-tertiary:  #ff8fa8;
    --sakura-gradient:  linear-gradient(135deg, #e30b5d 0%, #f2497c 55%, #ff8fa8 100%);
    --sakura-soft:      rgba(227, 11, 93, .16);
    --sakura-ring:      rgba(227, 11, 93, .30);
    --sakura-glow:      rgba(227, 11, 93, .45);

    --frost-primary:   #e30b5d;
    --frost-secondary: #f2497c;
    --frost-gradient:  linear-gradient(135deg, #a80743 0%, #e30b5d 100%);
    --frost-soft:      rgba(227, 11, 93, .16);
    --frost-ring:      rgba(227, 11, 93, .30);

    --ok: #8fe6b0;

    --text-primary:   #fbf0f4;
    --text-secondary: #d8b8c6;
    --text-muted:     #9a7a8c;

    --border-color: #4a1f38;
    --border-hi:    #7a2c55;

    --radius:    18px;
    --radius-sm: 14px;
    --radius-xs: 8px;

    --shadow-card: 0 1px 2px rgba(0,0,0,.35), 0 12px 40px -12px rgba(227, 11, 93, .28);
    --shadow-pop:  0 20px 60px -12px rgba(227, 11, 93, .38);

    --mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', ui-monospace, monospace;
}

[data-theme="light"] {
    --accent: #c0074f;
    --accent-soft: rgba(192,7,79,.10);
    --accent-ring: rgba(192,7,79,.20);
    --bg-primary:   #fdf6f8;
    --bg-secondary: #ffffff;
    --bg-card:      #ffffff;
    --bg-input:     #faf0f4;
    --bg-hover:     #f6e6ec;
    --bg-elevated:  #ffffff;

    --frost-primary:   #c0074f;
    --frost-secondary: #e30b5d;
    --frost-gradient:  linear-gradient(135deg, #a80743 0%, #e30b5d 100%);
    --frost-soft:      rgba(192, 7, 79, .10);
    --frost-ring:      rgba(192, 7, 79, .22);

    --sakura-primary:   #c0074f;
    --sakura-secondary: #e30b5d;
    --sakura-tertiary:  #f4658f;
    --sakura-gradient:  linear-gradient(135deg, #c0074f 0%, #e30b5d 55%, #f4658f 100%);
    --sakura-soft:      rgba(192, 7, 79, .10);
    --sakura-ring:      rgba(192, 7, 79, .20);
    --sakura-glow:      rgba(192, 7, 79, .35);

    --ok: #1d9e57;

    --text-primary:   #2b2438;
    --text-secondary: #6a6484;
    --text-muted:     #a8a2bd;

    --border-color: #f3c9d8;
    --border-hi:    #e89ab5;

    --shadow-card: 0 1px 2px rgba(192, 7, 79, .10), 0 12px 32px -12px rgba(192, 7, 79, .22);
    --shadow-pop:  0 20px 50px -12px rgba(192, 7, 79, .28);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

/* anchor jumps (TOC, footer links) glide instead of teleporting */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss01';
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.app { display: flex; flex-direction: column; min-height: 100vh; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ── Static background (phone.png) ───────────────────── */
.bg-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg-primary);
}
/* Phone background image — quiet, warm-tinted, lets the candy glow win */
.bg-fx::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/static/img/phone.png') center top / cover no-repeat;
    opacity: .30;
    filter: saturate(1.35) hue-rotate(-12deg) brightness(.92);
}
/* Candy veil: raspberry + tangerine + violet over deep plum. No blue. */
.bg-fx::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(760px 420px at 15% 0%, rgba(227,11,93,.28), transparent 62%),
        radial-gradient(680px 420px at 85% 12%, rgba(255,122,26,.16), transparent 62%),
        radial-gradient(900px 560px at 50% 110%, rgba(150,60,255,.16), transparent 62%),
        linear-gradient(180deg, rgba(23,8,18,.58) 0%, rgba(23,8,18,.36) 42%, rgba(18,5,13,.88) 100%);
}
/* slow candy glow orbs — static, blurred, cheap */
.bg-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .8; }
.bg-orb-1 { width: 460px; height: 460px; top: -140px; left: -110px; background: rgba(227,11,93,.38); animation: orbDrift 22s ease-in-out infinite alternate; }
.bg-orb-2 { width: 400px; height: 400px; bottom: -150px; right: -90px; background: rgba(255,122,26,.22); animation: orbDrift 26s ease-in-out infinite alternate-reverse; }
.bg-orb-3 { width: 520px; height: 520px; bottom: -220px; left: 30%; background: rgba(150,60,255,.20); animation: orbDrift 30s ease-in-out infinite alternate; }
@keyframes orbDrift { from { transform: translate(0,0) scale(1); } to { transform: translate(60px,50px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .bg-orb { animation: none; } }
/* falling petals canvas (petals.js, desktop only) */
#petalsBg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 150; pointer-events: none; }
[data-theme="light"] .bg-fx::before {
    opacity: .45;
    filter: brightness(1.08);
}
[data-theme="light"] .bg-fx::after {
    background: linear-gradient(180deg, rgba(253,248,255,.72) 0%, rgba(253,248,255,.5) 40%, rgba(255,255,255,.85) 100%);
}
.app { position: relative; z-index: 1; }
.bg-blob { display: none !important; }
.bg-grid { display: none !important; }
#leavesBg { display: none !important; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 36px;
    height: 66px;
}

.header-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* hamburger — mobile only */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.burger:hover { border-color: var(--border-hi); background: var(--bg-hover); }

.burger span {
    display: block;
    height: 1.8px;
    width: 100%;
    border-radius: 2px;
    background: var(--text-secondary);
    transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .2s;
}

body.menu-open .burger span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

.logo { display: inline-flex; align-items: center; gap: 0; flex-shrink: 0; }
.logo-icon { width: 0; height: 0; display: none; }
.logo-text {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -.035em;
    background: var(--frost-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* shimmer sweep across the wordmark on hover */
.logo:hover .logo-text {
    background-image: linear-gradient(110deg,
        #e30b5d 15%, #ff7aa8 38%, #ffb37a 50%, #ff7aa8 62%, #e30b5d 85%);
    background-size: 220% 100%;
    animation: logoSheen 1.2s linear infinite;
}
@keyframes logoSheen {
    from { background-position: 210% 0; }
    to { background-position: -110% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .logo:hover .logo-text { animation: none; }
}

.nav { display: flex; gap: 4px; margin-right: auto; position: relative; }

.nav-link {
    position: relative;
    padding: 7px 13px;
    border-radius: 9px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color .18s, background .18s;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
/* single sliding indicator gliding between tabs (positioned by JS) */
.nav-indicator {
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--frost-gradient);
    box-shadow: 0 0 8px var(--frost-ring);
    opacity: 0;
    pointer-events: none;
    transition: left .3s cubic-bezier(.4,0,.2,1), width .3s cubic-bezier(.4,0,.2,1), opacity .2s;
}
.nav-indicator.show { opacity: 1; }
/* current page keeps its color; the bar position comes from JS */
.nav-link.current { color: var(--text-primary); }
@media (prefers-reduced-motion: reduce) {
    .nav-indicator { transition: none; }
}

.header-actions { display: flex; align-items: center; gap: 10px; }

/* language dropdown */
.lang-dd { flex-shrink: 0; }

.lang-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
}
.lang-trigger:hover { color: var(--text-primary); border-color: var(--border-hi); background: var(--bg-hover); }

.lang-dd.open .lang-trigger { color: var(--frost-primary); border-color: var(--frost-primary); }

.lang-globe { flex-shrink: 0; }

.lang-code {
    font-family: var(--mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1;
}

.lang-dd .dd-arrow { width: 12px; height: 12px; }

.lang-panel {
    left: auto;
    right: 0;
    width: 214px;
    padding: 5px;
}

.lang-opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 9px;
    border-radius: 9px;
    cursor: pointer;
    transition: background .15s;
}
.lang-opt:hover { background: var(--bg-hover); }
.lang-opt:focus-visible {
    outline: none;
    background: var(--bg-hover);
    box-shadow: inset 0 0 0 1px var(--frost-primary);
}

/* the active row is marked by the chip and the tick — a filled background on
   top of both was a third signal saying the same thing */
.lang-opt.active { background: transparent; }
.lang-opt.active:hover { background: var(--bg-hover); }

/* 4:3 — the ratio nearly every flag icon set ships in (flag-icons, twemoji),
   so dropping real flag art in here later will not distort it */
.lang-chip {
    display: grid;
    place-items: center;
    width: 32px;
    height: 24px;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border-hi);
    border-radius: 6px;
    background: var(--bg-input);
    font-family: var(--mono);
    font-size: .66rem;
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--text-secondary);
    transition: color .15s, border-color .15s, background .15s;
}

/* a future <img>/<svg> flag fills the tile edge to edge instead of sitting
   inside it with the border showing through */
.lang-chip img,
.lang-chip svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lang-opt:hover .lang-chip { color: var(--text-primary); border-color: var(--border-hi); }
.lang-opt.active .lang-chip {
    border-color: var(--frost-primary);
    color: var(--frost-primary);
    background: var(--frost-soft);
}

.lang-names { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lang-native {
    font-size: .855rem;
    font-weight: 550;
    line-height: 1.3;
    color: var(--text-secondary);
    transition: color .15s;
}
.lang-opt:hover .lang-native { color: var(--text-primary); }
.lang-opt.active .lang-native { color: var(--text-primary); font-weight: 600; }

.lang-en { font-size: .715rem; line-height: 1.3; color: var(--text-muted); }

/* the shared rule keys off .dd-option, which never matched these rows — the
   tick was permanently invisible here */
.lang-opt.active .dd-check { opacity: 1; }

.theme-toggle {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--frost-primary); border-color: var(--border-hi); background: var(--bg-hover); }

.icon-sun, .icon-moon { display: none; }
html:not([data-theme="light"]) .icon-sun { display: block; }
html[data-theme="light"] .icon-moon { display: block; }

.btn-ghost {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 550;
    color: var(--text-secondary);
    transition: color .18s, background .18s;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-mini {
    padding: 9px 17px;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    color: #fff;
    background: var(--frost-gradient);
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn-mini:hover { transform: translateY(-1px); box-shadow: 0 6px 20px -6px var(--frost-primary); filter: brightness(1.06); }

/* Telegram button */
.tg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #c65d84 0%, #e08cab 100%);
    box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 4px 16px -6px rgba(214,93,133,.45);
    transition: transform .18s, box-shadow .18s, filter .18s;
    white-space: nowrap;
}
.tg-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -6px rgba(214,93,133,.55); filter: brightness(1.06); }
.tg-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,110,199,.4); }
.tg-btn svg { flex-shrink: 0; }
.tg-btn-text { display: none; }
@media (min-width: 769px) {
    .tg-btn-text { display: inline; }
}

/* Drawer Telegram button */
.tg-btn-drawer {
    background: linear-gradient(135deg, #c65d84 0%, #e08cab 100%);
    color: #fff;
    padding: 9px 10px;
    border-radius: 11px;
    justify-content: flex-start;
    gap: 12px;
}
.tg-btn-drawer:hover { background: linear-gradient(135deg, #d46d93 0%, #ea9cba 100%); }
.tg-btn-drawer .dn-ico {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
}
.tg-btn-drawer .dn-label { flex: 1; }
.tg-btn-drawer .dn-arrow { display: none; }

/* ============================================================
   MAIN / PAGE HEAD
   ============================================================ */
.main { flex: 1; padding-top: 54px; animation: pageIn .28s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.main.leaving { opacity: 0; transform: translateY(10px); transition: opacity .16s ease, transform .16s ease; }
@media (prefers-reduced-motion: reduce) {
    .main { animation: none; }
}

.page-head {
    position: relative;
    max-width: 620px;
    margin: 0 auto 40px;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 13px 5px 10px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    background: var(--bg-card);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-secondary);
}

.pulse {
    position: relative;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ok);
    flex-shrink: 0;
}
.pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid var(--ok);
    animation: pulseRing 2s ease-out infinite;
}
@keyframes pulseRing {
    0%   { opacity: .7; transform: scale(.5); }
    100% { opacity: 0;  transform: scale(1.4); }
}

.page-title {
    font-size: clamp(1.9rem, 4.4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-bottom: 12px;
}

.page-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 26px;
    align-items: start;
    padding-bottom: 72px;
}

/* ============================================================
   INVOICE CARD
   ============================================================ */
.invoice-card {
    background: color-mix(in srgb, var(--bg-card) 20%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-card);
}

/* steps */
.steps { display: flex; align-items: center; margin-bottom: 30px; }

.step { display: flex; align-items: center; gap: 9px; min-width: 0; }
.step-number {
    display: grid; place-items: center;
    width: 30px; height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border-hi);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 700;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.step-label {
    font-size: .82rem;
    font-weight: 550;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color .3s;
}

.step.active .step-number {
    background: var(--frost-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 0 4px var(--frost-soft);
}
.step.active .step-label { color: var(--text-primary); }

.step.completed .step-number {
    background: var(--frost-soft);
    border-color: var(--frost-primary);
    color: var(--frost-primary);
}
.step.completed .step-label { color: var(--text-secondary); }

.step-line {
    flex: 1;
    height: 1px;
    margin: 0 14px;
    background: var(--border-hi);
}
.step.completed + .step-line {
    background: var(--frost-gradient);
    height: 2px;
    border-radius: 2px;
}

/* step content */
.step-content { display: none; }
.step-content.active { display: block; animation: fadeUp .32s cubic-bezier(.4,0,.2,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step-title {
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -.025em;
    margin-bottom: 5px;
}
.step-description {
    font-size: .9rem;
    color: var(--text-secondary);
    margin-bottom: 26px;
}

/* form */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 9px;
}

.label-row { display: flex; align-items: baseline; justify-content: space-between; }

.link-btn {
    border: none;
    background: none;
    color: var(--frost-primary);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 9px;
    transition: opacity .18s;
}
.link-btn:hover { opacity: .72; }

/* ============================================================
   DROPDOWN
   ============================================================ */
.dd { position: relative; }

.dd-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    cursor: pointer;
    user-select: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.dd-trigger:hover { border-color: var(--border-hi); background: var(--bg-hover); }
.dd.open .dd-trigger { border-color: var(--frost-primary); }

.dd-trigger-left { display: flex; align-items: center; gap: 13px; min-width: 0; }

.dd-icon {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,.35);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.35), inset 0 -2px 4px rgba(0,0,0,.25), 0 2px 8px -2px rgba(0,0,0,.4);
    border: 1px solid rgba(255,255,255,.22);
}
.dd-icon-net {
    background: var(--bg-elevated);
    border: 1px solid var(--border-hi);
    color: var(--frost-secondary);
}

.dd-trigger-text { display: flex; flex-direction: column; min-width: 0; }
.dd-val  { font-size: .94rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.dd-sub  { font-size: .76rem; color: var(--text-muted); line-height: 1.35; }

.dd-arrow { color: var(--text-muted); flex-shrink: 0; transition: transform .28s cubic-bezier(.4,0,.2,1); }
.dd.open .dd-arrow { transform: rotate(180deg); }

.dd-panel {
    position: absolute;
    top: calc(100% + 7px);
    left: 0; right: 0;
    z-index: 60;
    padding: 6px;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-pop);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(.98);
    transform-origin: top center;
    transition: opacity .2s, transform .2s, visibility .2s;
    max-height: 264px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.dd.open .dd-panel { opacity: 1; visibility: visible; transform: none; }

.dd-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}
.dd-option:hover { background: var(--bg-hover); }
.dd-option.active { background: var(--frost-soft); }

.dd-option .dd-icon { width: 34px; height: 34px; font-size: .95rem; border-radius: 10px; }

.dd-opt-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dd-opt-code { font-size: .875rem; font-weight: 650; line-height: 1.25; }
.dd-opt-name { font-size: .74rem; color: var(--text-muted); line-height: 1.35; }

.dd-check { color: var(--frost-primary); opacity: 0; flex-shrink: 0; transition: opacity .15s; }
.dd-option.active .dd-check { opacity: 1; }

/* ============================================================
   AMOUNT
   ============================================================ */
.amount-input-wrapper { position: relative; display: flex; align-items: center; }

.amount-input {
    width: 100%;
    padding: 15px 78px 15px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.18rem;
    font-weight: 650;
    letter-spacing: -.02em;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.amount-input:focus { border-color: var(--frost-primary); }
.amount-input::placeholder { color: var(--text-muted); font-weight: 500; }
.amount-input.invalid { border-color: var(--sakura-primary); }

.amount-currency {
    position: absolute;
    right: 15px;
    padding: 4px 9px;
    border-radius: 7px;
    background: var(--frost-soft);
    color: var(--frost-primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    pointer-events: none;
}

.field-hint {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 9px;
    font-size: .78rem;
    color: var(--text-muted);
}
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .92rem;
    font-weight: 650;
    letter-spacing: -.005em;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, background .18s, border-color .18s, filter .18s;
}

.btn-primary {
    background: linear-gradient(135deg, #d65d85 0%, #ec8fb0 100%);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 22px -10px rgba(230,106,146,.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(230,106,146,.6); filter: brightness(1.05); }
.btn-primary:active { transform: none; }

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-hi); }

.btn-group { display: flex; gap: 10px; }
.btn-group .btn { flex: 1; }

/* ============================================================
   SUMMARY (step 2)
   ============================================================ */
.summary {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    padding: 6px 16px;
    margin-bottom: 22px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.summary-row:last-child { border-bottom: none; }

.summary-label { font-size: .86rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 7px; }
.summary-value { font-size: .9rem; font-weight: 650; letter-spacing: -.01em; }

.summary-total { padding: 15px 0; }
.summary-total .summary-label { color: var(--text-primary); font-weight: 600; }
.summary-amount { font-size: 1.14rem; font-weight: 750; color: var(--frost-primary); letter-spacing: -.02em; }

.tag {
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--bg-hover);
    border: 1px solid var(--border-hi);
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: .01em;
}
.tag-bonus {
    background: rgba(143,230,176,.12);
    border-color: rgba(143,230,176,.35);
    color: var(--ok);
}
.kv-v.accent-green { color: var(--ok); font-weight: 750; }
.summary-value.accent-green { color: var(--ok); }

/* ============================================================
   PAY (step 3)
   ============================================================ */
.pay-head {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}

.qr-box {
    display: grid; place-items: center;
    width: 128px; height: 128px;
    flex-shrink: 0;
    border-radius: 13px;
    background: #fff;
    border: 1px solid var(--border-hi);
    overflow: hidden;
}
.qr-img { width: 128px; height: 128px; display: block; }

/* fiat send: manager card instead of QR + address */
.fiat-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 26px 22px;
    margin-bottom: 20px;
    border: 1px solid var(--sakura-ring);
    border-radius: var(--radius-sm);
    background: linear-gradient(160deg, var(--sakura-soft), transparent 70%);
    animation: fadeUp .32s cubic-bezier(.4,0,.2,1);
}
.fiat-notice-ico {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--frost-gradient);
    font-size: 1.5rem;
    box-shadow: 0 8px 22px -8px var(--sakura-glow);
    animation: floaty 4s ease-in-out infinite;
}
.fiat-notice div { display: flex; flex-direction: column; gap: 4px; }
.fiat-notice b { font-size: 1rem; font-weight: 750; }
.fiat-notice span { font-size: .85rem; color: var(--text-secondary); }
.fiat-notice .btn { width: auto; padding: 12px 28px; }

/* deal ticket modal (fiat buy) */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 14, 28, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 28px 24px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--sakura-ring);
    background: var(--bg-card);
    box-shadow: var(--shadow-pop), 0 0 40px -10px var(--sakura-glow);
    animation: modalPop .3s cubic-bezier(.34,1.4,.44,1);
}
@keyframes modalPop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.modal-x { position: absolute; top: 14px; right: 14px; }
.modal-title { font-size: 1.15rem; font-weight: 750; letter-spacing: -.02em; margin: 0 40px 6px 0; }
.modal-sub { font-size: .85rem; color: var(--text-secondary); margin-bottom: 16px; }
.deal-ticket {
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px dashed var(--border-hi);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    font-family: var(--mono);
    font-size: .82rem;
    line-height: 1.75;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}
.deal-ticket::first-line { color: var(--sakura-primary); font-weight: 700; }
.modal-card .btn-group { display: flex; gap: 10px; }
.modal-card .btn-group .btn { flex: 1; }
@media (prefers-reduced-motion: reduce) {
    .modal-backdrop, .modal-card { animation: none; }
}

@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(5deg); } }

/* ---------- decorative motion pack (pure eye-candy) ---------- */

/* slow rotating beam on the swap card border */
.invoice-card {
    position: relative;
    overflow: hidden;
}
.invoice-card::before {
    content: '';
    position: absolute;
    inset: -60%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 40%, rgba(227,11,93,.35) 50%, rgba(255,122,26,.18) 53%, transparent 60%, transparent 100%);
    animation: beamSpin 9s linear infinite;
    pointer-events: none;
}
.invoice-card > * { position: relative; }
@keyframes beamSpin { to { transform: rotate(360deg); } }

/* shine sweep across primary buttons on hover */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 45%;
    left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-18deg);
    pointer-events: none;
}
.btn-primary:hover::after { animation: btnShine .8s ease; }
@keyframes btnShine { from { left: -60%; } to { left: 130%; } }

/* gradient page title */
.page-title {
    background: linear-gradient(120deg, var(--text-primary) 30%, var(--sakura-primary) 55%, var(--text-primary) 75%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleSheen 9s ease-in-out infinite;
}
@keyframes titleSheen { 0%,100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }

/* rate value tick pulse when the quote refreshes */
.rate-value.tick { animation: rateTick .6s ease; display: inline-block; }
@keyframes rateTick { 0% { transform: scale(1); } 35% { transform: scale(1.07); color: var(--sakura-primary); } 100% { transform: scale(1); } }

/* staggered entrances */
.trust-pill { animation: fadeUp .5s cubic-bezier(.4,0,.2,1) backwards; }
.trust-pill:nth-child(2) { animation-delay: .12s; }
.trust-pill:nth-child(3) { animation-delay: .24s; }
.how-card { animation: fadeUp .55s cubic-bezier(.4,0,.2,1) backwards; }
.how-card:nth-child(2) { animation-delay: .12s; }
.how-card:nth-child(3) { animation-delay: .24s; }

/* glowing live dot */
.live .pulse { box-shadow: 0 0 10px 2px var(--sakura-glow); }

@media (prefers-reduced-motion: reduce) {
    .invoice-card::before, .btn-primary:hover::after,
    .page-title, .rate-value.tick, .fiat-notice-ico,
    .trust-pill, .how-card { animation: none; }
    .page-title { -webkit-text-fill-color: var(--text-primary); background: none; }
}

.pay-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-meta-label { font-size: .76rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.pay-amount { font-size: 1.55rem; font-weight: 780; letter-spacing: -.035em; line-height: 1.2; }
.pay-net { font-size: .82rem; color: var(--text-secondary); margin-bottom: 8px; }

.timer {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    padding: 5px 11px;
    border-radius: 8px;
    background: var(--frost-soft);
    color: var(--frost-secondary);
    font-size: .84rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.timer-note { font-weight: 500; opacity: .75; font-size: .78rem; }

.address-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    transition: border-color .2s;
}
.address-display:hover { border-color: var(--border-hi); }
.address-display code {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: .78rem;
    line-height: 1.6;
    color: var(--frost-primary);
    word-break: break-all;
}

.copy-btn {
    display: grid; place-items: center;
    width: 32px; height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}
.copy-btn:hover { color: var(--frost-primary); border-color: var(--frost-primary); background: var(--frost-soft); }

.notice {
    display: flex;
    gap: 11px;
    padding: 13px 15px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 110, 199, .28);
    border-radius: var(--radius-sm);
    background: rgba(255, 110, 199, .07);
    color: var(--sakura-primary);
}
.notice svg { flex-shrink: 0; margin-top: 1px; }
.notice p { font-size: .82rem; line-height: 1.5; color: var(--text-secondary); }
.notice b { color: var(--sakura-primary); font-weight: 650; }

.status-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    font-size: .82rem;
    color: var(--text-secondary);
}

.status-dot {
    position: relative;
    width: 7px; height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--ok);
}
.status-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid var(--ok);
    animation: pulseRing 2s ease-out infinite;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.side { display: flex; flex-direction: column; gap: 14px; }

.side-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--bg-card) 20%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
    padding: 17px 18px;
    box-shadow: var(--shadow-card);
}

.side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}
.side-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
}

.live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 650;
    color: var(--ok);
}

/* rate */
.rate-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rate-pair  { font-size: .92rem; font-weight: 600; color: var(--text-secondary); }
.rate-eq    { font-size: .92rem; color: var(--text-muted); }
.rate-value { font-size: 1.42rem; font-weight: 780; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }

.rate-foot { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.chg {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: .74rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.chg.up   { background: rgba(255,110,199,.12); color: var(--ok); }
.chg.down { background: rgba(242,85,90,.12);  color: var(--sakura-primary); }
.rate-time { font-size: .74rem; color: var(--text-muted); }

.spark { margin: 12px -18px -17px; height: 48px; }
.spark svg { display: block; width: 100%; height: 48px; }

/* key/value lists */
.kv { list-style: none; display: flex; flex-direction: column; }
.kv li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-color);
}
.kv li:last-child { border-bottom: none; padding-bottom: 0; }
.kv li:first-child { padding-top: 0; }

.kv-k { font-size: .82rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 7px; }
.kv-v { font-size: .85rem; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kv-v.accent { color: var(--frost-primary); font-weight: 750; }
.kv-total { border-top: 1px solid var(--border-hi); margin-top: 3px; padding-top: 11px !important; }

/* chains */
.chains { display: flex; flex-wrap: wrap; gap: 7px; }
.chain {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border: 1px solid var(--border-hi);
    border-radius: 100px;
    background: var(--bg-input);
    font-size: .76rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.chain-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.chain.muted { color: var(--text-muted); border-style: dashed; background: none; }

/* secure note */
.secure-note {
    display: flex;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, var(--frost-soft), transparent);
    color: var(--frost-secondary);
}
.secure-note svg { flex-shrink: 0; margin-top: 2px; }
.secure-note div { display: flex; flex-direction: column; gap: 3px; }
.secure-note b { font-size: .85rem; font-weight: 650; color: var(--text-primary); }
.secure-note span { font-size: .78rem; line-height: 1.5; color: var(--text-secondary); }

/* ============================================================
   STATS
   ============================================================ */
.stats {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-secondary) 72%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 30px 8px;
    text-align: center;
    border-left: 1px solid var(--border-color);
}
.stat:first-child { border-left: none; }

.stat-value {
    font-size: 1.7rem;
    font-weight: 780;
    letter-spacing: -.04em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-plus {
    background: var(--frost-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label { font-size: .8rem; color: var(--text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: color-mix(in srgb, var(--bg-primary) 78%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 54px 0 26px; }

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 40px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-tag {
    font-size: .85rem;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 300px;
}

.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col h4 {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-primary);
    margin-bottom: 3px;
}
.footer-col a {
    font-size: .85rem;
    color: var(--text-muted);
    width: fit-content;
    transition: color .18s;
}
.footer-col a:hover { color: var(--frost-primary); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: .8rem;
    color: var(--text-muted);
}
.footer-status { display: inline-flex; align-items: center; gap: 8px; }

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
}
body.menu-open .drawer-backdrop { opacity: 1; visibility: visible; }

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 400;
    display: flex;
    flex-direction: column;
    width: 284px;
    max-width: 84vw;
    padding: 18px 16px 20px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    visibility: hidden;
    overflow-y: auto;
    /* we handle horizontal gestures ourselves, browser keeps vertical scroll */
    touch-action: pan-y;
}
body.menu-open .drawer { transform: none; visibility: visible; }

/* while a finger is dragging, transitions must not fight the live transform */
body.drawer-dragging .drawer,
body.drawer-dragging .drawer-backdrop { transition: none; }

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.drawer-close {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}
.drawer-close:hover { color: var(--text-primary); border-color: var(--border-hi); background: var(--bg-hover); }

.drawer-nav { display: flex; flex-direction: column; padding: 8px 0; }

/* profile block above the nav — same geometry as nav rows */
.drawer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin: 0 0 6px;
    border-radius: 11px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    transition: border-color .18s, background .18s;
}
.drawer-profile:hover { border-color: var(--border-hi); background: var(--bg-hover); }

.drawer-avatar {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    flex-shrink: 0;
    border-radius: 9px;
    border: 1px solid var(--border-hi);
    background:
        linear-gradient(160deg, rgba(255,107,53,.09), transparent 68%),
        var(--bg-input);
    color: var(--frost-primary);
}

.drawer-profile-text { display: flex; flex-direction: column; min-width: 0; }
.drawer-profile-name {
    font-size: .9rem;
    font-weight: 650;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drawer-profile-email {
    font-size: .76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-nav a,
.drawer-nav .dn-toggle,
.drawer-nav .dn-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 11px;
    font-size: .93rem;
    font-weight: 550;
    color: var(--text-secondary);
    transition: color .18s, background .18s;
}
.drawer-nav a:hover,
.drawer-nav a:active,
.drawer-nav .dn-toggle:hover { color: var(--text-primary); background: var(--bg-hover); }

/* the row itself does nothing — the segment on the right is the control, so it
   must not offer a hover affordance for the whole strip */
.drawer-nav .dn-row { cursor: default; }

/* iOS-style switch: pill track, sliding knob, grey when off and accent when on.
   Styled off aria-checked so the visual state is the accessibility state. */
.dn-switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 100px;
    background: #3a3a3a;
    cursor: pointer;
    transition: background .24s cubic-bezier(.4,0,.2,1);
}
.dn-switch[aria-checked="true"] { background: var(--frost-primary); }

.dn-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
    transition: transform .24s cubic-bezier(.4,0,.2,1);
}
/* 44 - 3 - 20 - 3 = 18 */
.dn-switch[aria-checked="true"] .dn-switch-knob { transform: translateX(18px); }

/* the toggle is a button, so it needs the chrome reset the links get for free */
.drawer-nav .dn-toggle {
    width: 100%;
    border: none;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.dn-sep {
    height: 1px;
    margin: 7px 10px;
    background: var(--border-color);
}

/* current language, shown collapsed so the row reads without opening */
.dn-current {
    font-size: .8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dn-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.dn-toggle.open .dn-chevron { transform: rotate(180deg); }
.dn-toggle.open { color: var(--frost-primary); }
.dn-toggle.open .dn-ico {
    color: var(--frost-primary);
    border-color: var(--frost-primary);
    background: var(--frost-soft);
}

/* 0fr -> 1fr animates to the natural height without measuring it in JS,
   matching how the profile page expands its inline forms */
.drawer-lang-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .28s cubic-bezier(.4,0,.2,1);
}
.drawer-lang-wrap.open { grid-template-rows: 1fr; }
.drawer-lang-inner { overflow: hidden; min-height: 0; }

.dl-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px 8px 16px;
    border: none;
    border-radius: 10px;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.dl-opt:hover { background: var(--bg-hover); }

.dl-names { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dl-native {
    font-size: .875rem;
    font-weight: 550;
    line-height: 1.3;
    color: var(--text-secondary);
}
.dl-opt:hover .dl-native { color: var(--text-primary); }
.dl-opt.active .dl-native { color: var(--text-primary); font-weight: 600; }
.dl-en { font-size: .715rem; line-height: 1.3; color: var(--text-muted); }

.dl-opt.active .lang-chip {
    border-color: var(--frost-primary);
    color: var(--frost-primary);
    background: var(--frost-soft);
}
.dl-opt.active .dd-check { opacity: 1; }

.dn-label { flex: 1; min-width: 0; }
.dn-arrow { color: var(--text-muted); flex-shrink: 0; }

.dn-ico {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--bg-input);
    color: var(--text-secondary);
    transition: color .18s, border-color .18s, background .18s;
}
.drawer-nav a:hover .dn-ico,
.drawer-nav a:active .dn-ico,
.drawer-nav .dn-toggle:hover .dn-ico {
    color: var(--frost-primary);
    border-color: var(--frost-primary);
    background: var(--frost-soft);
}

.drawer-foot {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}
.drawer-foot .btn { padding: 13px 20px; }

/* ============================================================
   API DOCS
   ============================================================ */
.docs-hero {
    max-width: 720px;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 34px;
}
.docs-hero .page-title { margin-bottom: 14px; }
.docs-hero .page-sub { margin: 0 0 22px; max-width: 620px; }

.base-url {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px 9px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    max-width: 100%;
}
.base-url-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}
.base-url code {
    font-family: var(--mono);
    font-size: .84rem;
    color: var(--frost-primary);
    word-break: break-all;
}

.docs-langnote {
    margin-top: 16px;
    font-size: .8rem;
    color: var(--text-muted);
}

.docs-layout {
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 46px;
    padding-bottom: 90px;
    align-items: start;
}

/* table of contents */
.toc { position: sticky; top: 90px; }
.toc-inner { display: flex; flex-direction: column; gap: 1px; }

.toc-title {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.toc-group {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 18px 0 7px;
}

.toc-link {
    padding: 6px 12px;
    border-left: 1.5px solid var(--border-color);
    font-size: .84rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color .16s, border-color .16s;
}
.toc-link.sub { padding-left: 20px; }
.toc-link:hover { color: var(--text-primary); border-color: var(--border-hi); }
.toc-link.current {
    color: var(--frost-primary);
    border-color: var(--frost-primary);
    font-weight: 600;
}

/* content */
.docs-body { min-width: 0; }

.doc-section { padding-bottom: 46px; }
.doc-section:not(:first-child) { padding-top: 10px; }

/* offset so anchors are not swallowed by the sticky header */
.doc-section { scroll-margin-top: 86px; }

.doc-h2 {
    font-size: 1.42rem;
    font-weight: 750;
    letter-spacing: -.03em;
    margin-bottom: 12px;
}

.doc-h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: 28px 0 12px;
}

.doc-p {
    font-size: .93rem;
    line-height: 1.72;
    color: var(--text-secondary);
    margin-bottom: 18px;
    max-width: 68ch;
}
.doc-p:last-child { margin-bottom: 0; }

/* inline code */
.doc-p code, .doc-table code, .callout code, .flow code {
    padding: 1.5px 5px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-input);
    font-family: var(--mono);
    font-size: .84em;
    color: var(--frost-primary);
    white-space: nowrap;
}

/* endpoint header */
.endpoint {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
    padding: 11px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}
.endpoint code {
    font-family: var(--mono);
    font-size: .89rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.method {
    padding: 3px 9px;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    flex-shrink: 0;
}
.method.get  { background: rgba(255,179,71,.14);  color: var(--ok); }
.method.post { background: rgba(255,107,53,.14);   color: var(--frost-primary); }

/* flow list */
.flow { list-style: none; display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.flow li { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border-color); }
.flow li:last-child { border-bottom: none; }

.flow-n {
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--frost-soft);
    border: 1px solid var(--frost-primary);
    color: var(--frost-primary);
    font-size: .76rem;
    font-weight: 800;
}
.flow li div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.flow b { font-size: .92rem; font-weight: 650; color: var(--text-primary); }
.flow span:not(.flow-n) { font-size: .875rem; line-height: 1.65; color: var(--text-secondary); }

/* code blocks */
.code-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    margin-bottom: 20px;
    overflow: hidden;
}

.code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px 8px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-elevated);
}
.code-lang {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.code-copy {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}
.code-copy:hover { color: var(--frost-primary); border-color: var(--frost-primary); background: var(--frost-soft); }
.code-copy.done { color: var(--ok); border-color: var(--ok); background: rgba(255,179,71,.1); }

.code-block pre {
    padding: 15px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.code-block code {
    font-family: var(--mono);
    font-size: .82rem;
    line-height: 1.72;
    color: var(--text-primary);
    white-space: pre;
}

/* tables */
.table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    min-width: 460px;
}
.doc-table th {
    padding: 11px 14px;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.doc-table td {
    padding: 12px 14px;
    vertical-align: top;
    line-height: 1.6;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.doc-table tr:last-child td { border-bottom: none; }
.doc-table td:first-child { white-space: nowrap; }

.pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.pill.req { background: rgba(242,85,90,.12); color: var(--sakura-primary); }
.pill.opt { background: var(--bg-hover); color: var(--text-muted); }
.pill.rec { background: rgba(255,110,199,.12); color: var(--frost-primary); }

/* callouts */
.callout {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}
.callout svg { flex-shrink: 0; margin-top: 2px; }
.callout div { font-size: .875rem; line-height: 1.68; color: var(--text-secondary); }
.callout b { display: block; margin-bottom: 3px; }

.callout.info { border: 1px solid var(--border-hi); background: var(--frost-soft); color: var(--frost-primary); }
.callout.info b { color: var(--text-primary); }

.callout.warn { border: 1px solid rgba(255,110,199,.28); background: rgba(255,110,199,.07); color: var(--sakura-primary); }
.callout.warn b { color: var(--sakura-primary); }

/* SDK grid */
.sdk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.sdk {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}
.sdk-name { font-size: .875rem; font-weight: 650; color: var(--text-primary); }
.sdk code {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--frost-primary);
    word-break: break-all;
}

/* ---------- legal pages (terms / privacy / aml) ---------- */

/* version + effective date strip under the title */
.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 4px;
}
.legal-meta span {
    padding: 5px 11px;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    background: var(--bg-input);
    font-size: .76rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.legal-meta b {
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 3px;
}

/* clause lists — <ul> gets dashes, <ol> gets its own numbering */
.legal-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    max-width: 68ch;
    counter-reset: clause;
}
.legal-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    font-size: .93rem;
    line-height: 1.72;
    color: var(--text-secondary);
}
.legal-list li:last-child { margin-bottom: 0; }

ul.legal-list > li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: .78em;
    width: 8px;
    height: 1.5px;
    background: var(--frost-primary);
    opacity: .75;
}
ol.legal-list > li {
    counter-increment: clause;
    padding-left: 32px;
}
ol.legal-list > li::before {
    content: counter(clause) ".";
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    text-align: right;
    font-family: var(--mono);
    font-size: .82rem;
    font-weight: 500;
    color: var(--frost-primary);
}

/* nested lists sit tighter and drop the accent colour */
.legal-list .legal-list { margin: 10px 0 0; }

.legal-list b { color: var(--text-primary); font-weight: 650; }
.legal-list a { color: var(--frost-primary); }
.legal-list a:hover { text-decoration: underline; }

.legal-list code {
    padding: 1.5px 5px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-input);
    font-family: var(--mono);
    font-size: .84em;
    color: var(--frost-primary);
    white-space: nowrap;
}

/* inline links inside body copy and tables */
.doc-p a, .doc-table a {
    color: var(--frost-primary);
    border-bottom: 1px solid transparent;
    transition: border-color .18s;
}
.doc-p a:hover, .doc-table a:hover { border-bottom-color: var(--frost-primary); }

/* legal tables carry sentences, not identifiers — let the first column wrap */
.docs-body.legal .doc-table td:first-child { white-space: normal; min-width: 120px; }
.docs-body.legal .doc-table { min-width: 0; }

/* current nav item */
.nav-link.current { color: var(--text-primary); background: var(--bg-hover); }

/* ---------- account chip (logged-in state) ---------- */
.account {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 220px;
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: .8rem;
    font-weight: 600;
}
.account svg { flex-shrink: 0; color: var(--frost-primary); }
.account-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-form { display: inline-flex; }

/* same family as the lang / theme controls: quiet bordered square-button */
.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}
.logout-btn:hover { color: var(--frost-primary); border-color: var(--border-hi); background: var(--bg-hover); }

.form-error { margin: 2px 0 10px; }

/* ============================================================
   AUTH (login / register)
   ============================================================ */
.auth-wrap { display: flex; justify-content: center; padding: 26px 0 84px; }

.auth-card {
    display: grid;
    grid-template-columns: 328px minmax(0, 1fr);
    width: 100%;
    max-width: 860px;
    background: color-mix(in srgb, var(--bg-card) 20%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* ---------- frost pane (desktop only) ---------- */
.auth-pane {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 34px 28px;
    background:
        linear-gradient(165deg, rgba(227,11,93,.22), rgba(242,73,124,.10) 55%, transparent),
        color-mix(in srgb, var(--bg-secondary) 55%, transparent);
    border-right: 1px solid var(--border-color);
    overflow: hidden;
}

/* drifting aurora glow — the one animated element on the page */
.auth-pane::before {
    content: "";
    position: absolute;
    top: -130px;
    left: -90px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(227,11,93,.32), transparent 65%);
    filter: blur(8px);
    animation: authFloat 16s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes authFloat {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(46px, 64px) scale(1.12); }
}

.auth-pane > * { position: relative; }

.auth-pane-title {
    font-size: 1.42rem;
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.25;
}

.auth-pane-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.auth-pane-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: .88rem;
    color: var(--text-secondary);
}
.auth-pane-list svg { flex-shrink: 0; margin-top: 2px; color: var(--frost-primary); }

.auth-pane-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ---------- form ---------- */
.auth-form { padding: 34px 34px 30px; }

.auth-title {
    font-size: 1.48rem;
    font-weight: 750;
    letter-spacing: -.03em;
    margin-bottom: 6px;
}
.auth-sub { font-size: .9rem; color: var(--text-secondary); margin-bottom: 26px; }

.auth-input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
    font-size: .95rem;
    font-weight: 550;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
/* focus = one outline: the border itself. No extra ring around it. */
.auth-input:focus { border-color: var(--frost-primary); }
.auth-input::placeholder { color: var(--text-muted); }
.auth-input.invalid { border-color: var(--sakura-primary); }

/* ---------- Google sign-in ---------- */
.auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: .95rem;
    font-weight: 600;
    transition: border-color .2s, background .2s;
}
.auth-google:hover { border-color: var(--border-hi); background: var(--bg-hover); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: .76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }

.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 46px; }

.auth-eye {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 9px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color .18s, background .18s;
}
.auth-eye:hover { color: var(--text-primary); background: var(--bg-hover); }

.field-error {
    display: none;
    margin-top: 7px;
    font-size: .78rem;
    font-weight: 550;
    color: var(--sakura-primary);
}
.field-error.show { display: block; }

/* ---------- strength meter ---------- */
.strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    opacity: .55;
    transition: opacity .25s;
}
.strength.weak, .strength.fair, .strength.good { opacity: 1; }

.strength-bars { display: flex; gap: 4px; flex: 1; }
.strength-bar {
    height: 4px;
    flex: 1;
    border-radius: 100px;
    background: var(--border-hi);
    transition: background .25s;
}
.strength.weak .strength-bar.on { background: var(--sakura-primary); }
.strength.fair .strength-bar.on { background: var(--sakura-tertiary); }
.strength.good .strength-bar.on { background: var(--ok); }

.strength-label { font-size: .76rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

/* ---------- terms checkbox ---------- */
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .82rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.auth-check input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--frost-primary);
    cursor: pointer;
}
.auth-check a { color: var(--frost-primary); font-weight: 600; }
.auth-check a:hover { opacity: .75; }

/* ---------- footer of the form ---------- */
.auth-submit { margin-top: 4px; }

.auth-alt {
    margin-top: 22px;
    text-align: center;
    font-size: .86rem;
    color: var(--text-secondary);
}
.auth-alt a { color: var(--frost-primary); font-weight: 650; margin-left: 6px; }
.auth-alt a:hover { opacity: .75; }

.auth-demo {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--frost-ring);
    border-radius: var(--radius-sm);
    background: var(--frost-soft);
    font-size: .82rem;
    color: var(--text-secondary);
    animation: fadeUp .32s cubic-bezier(.4,0,.2,1);
}
.auth-demo[hidden] { display: none; }
.auth-demo svg { flex-shrink: 0; margin-top: 2px; color: var(--frost-primary); }

@media (max-width: 900px) {
    .auth-card { grid-template-columns: 1fr; max-width: 480px; }
    .auth-pane { display: none; }
}

@media (max-width: 560px) {
    .auth-wrap { padding: 8px 0 60px; }
    .auth-card { border-radius: 15px; }
    .auth-form { padding: 26px 20px 24px; }
}

/* ============================================================
   PROFILE (merchant account) — settings-style stack
   ============================================================ */

.profile-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 90px;
}

.profile-eyebrow { margin-bottom: 18px; }

/* ---------- hero ---------- */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    animation: fadeUp .32s cubic-bezier(.4,0,.2,1);
}

/* dark theme: a restrained tile — the icon carries the accent, not the whole
   block. A saturated gradient here reads as a glowing rectangle against
   near-black, which is what it looked like before. */
.profile-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    border: 1px solid var(--border-hi);
    background:
        linear-gradient(160deg, rgba(255,107,53,.09), transparent 68%),
        var(--bg-input);
    color: var(--frost-primary);
}

.profile-hero-text { min-width: 0; flex: 1; }
.profile-name {
    font-size: 1.22rem;
    font-weight: 750;
    letter-spacing: -.02em;
    margin-bottom: 2px;
}
.profile-email {
    display: block;
    font-size: .88rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-since {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    background: var(--bg-input);
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.profile-since svg { opacity: .7; }

/* ---------- settings cards ---------- */
.set-card {
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.set-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
}

.set-titles { min-width: 0; }
.set-titles h2 {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -.015em;
    margin-bottom: 5px;
}
.set-titles p {
    font-size: .84rem;
    line-height: 1.62;
    color: var(--text-secondary);
    max-width: 56ch;
}

.set-docs-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    font-size: .82rem;
    font-weight: 650;
    color: var(--frost-primary);
}
.set-docs-link svg { flex-shrink: 0; }
.set-docs-link:hover { opacity: .75; }

/* quiet action on the right of a settings row */
.set-action {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
    transition: color .16s, border-color .16s, background .16s, filter .16s;
}
.set-action:hover { color: var(--frost-primary); border-color: var(--frost-primary); background: var(--frost-soft); }
.set-action.primary {
    border-color: transparent;
    background: var(--frost-gradient);
    color: #fff;
}
.set-action.primary:hover { color: #fff; filter: brightness(1.07); }
.set-action.danger:hover { color: var(--sakura-primary); border-color: rgba(255,110,199,.45); background: rgba(255,110,199,.07); }

/* ---------- inline forms (progressive disclosure) ----------
   grid-template-rows 0fr → 1fr animates height smoothly with
   padding in play; the inner wrapper clips while collapsing. */
.set-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .34s cubic-bezier(.4,0,.2,1);
}
.set-body[hidden] { display: none; }
.set-body.open { grid-template-rows: 1fr; }

.set-inner {
    overflow: hidden;
    min-height: 0;
    padding: 2px 22px 22px;
    opacity: 0;
    transition: opacity .26s ease;
}
.set-body.open .set-inner { opacity: 1; }

.set-note {
    margin-bottom: 14px;
    font-size: .82rem;
    color: var(--text-muted);
}

.set-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
}
.set-field > span {
    font-size: .78rem;
    font-weight: 650;
    color: var(--text-secondary);
}
.set-field .auth-input { padding: 11px 14px; }

.set-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 0 12px;
}
.set-row .set-field:last-child { margin-bottom: 14px; }

.set-actions { display: flex; gap: 10px; margin-top: 4px; }
.set-actions .btn { padding: 11px 18px; white-space: nowrap; }

/* success line under a card head */
.set-ok {
    display: none;
    margin: 0 22px 18px;
    padding: 10px 14px;
    border: 1px solid rgba(255,179,71,.25);
    border-radius: var(--radius-sm);
    background: rgba(255,179,71,.08);
    font-size: .82rem;
    font-weight: 650;
    color: var(--ok);
}
.set-ok.show {
    display: block;
    animation: fadeUp .25s cubic-bezier(.4,0,.2,1);
}

/* ---------- key reveal (signature moment) ---------- */
.key-reveal {
    margin: 0 22px 18px;
    padding: 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        var(--frost-gradient) border-box;
    box-shadow: 0 14px 44px -14px rgba(255,107,53,.35);
    animation: fadeUp .3s cubic-bezier(.4,0,.2,1);
}
.key-reveal[hidden] { display: none; }

.key-reveal-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: var(--sakura-primary);
    font-size: .92rem;
}
.key-reveal-head b { color: var(--text-primary); }

.key-reveal-body {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}
.key-reveal-body .copy-btn { flex-shrink: 0; }

.key-reveal-value {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: .82rem;
    font-weight: 500;
    color: var(--frost-primary);
    word-break: break-all;
}

.key-reveal-warn {
    margin: 12px 0 16px;
    font-size: .8rem;
    color: var(--text-secondary);
}

/* ---------- key list ---------- */
.key-list { border-top: 1px solid var(--border-color); }

.key-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 22px;
    transition: background .15s, opacity .25s;
}
.key-row:hover { background: var(--bg-hover); }
.key-row + .key-row { border-top: 1px solid var(--border-color); }

.key-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.key-row-name {
    font-size: .9rem;
    font-weight: 650;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.key-row-prefix {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--text-muted);
}

.key-row-date {
    font-size: .78rem;
    font-weight: 550;
    color: var(--text-muted);
    white-space: nowrap;
}

.key-revoke {
    flex-shrink: 0;
    padding: 7px 13px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 650;
    cursor: pointer;
    transition: color .16s, border-color .16s, background .16s;
}
.key-revoke:hover { color: var(--sakura-primary); border-color: rgba(255,110,199,.4); background: rgba(255,110,199,.07); }
.key-revoke:disabled { opacity: .55; cursor: wait; }

/* ---------- wallet connected view ---------- */
.wallet-view {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 0 22px 20px;
}

.wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 100px;
    background: rgba(255,110,199,.1);
    color: var(--ok);
    font-size: .74rem;
    font-weight: 700;
}

.wallet-address {
    flex: 1;
    min-width: 220px;
    font-family: var(--mono);
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.wallet-net {
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    font-family: var(--mono);
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ---------- empty states ---------- */
.set-empty {
    padding: 26px 22px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: .84rem;
    color: var(--text-muted);
}

/* ---------- transactions ---------- */
.tx-list { border-top: 1px solid var(--border-color); }

.tx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    flex-wrap: wrap;
    padding: 13px 22px;
    transition: background .15s;
}
.tx-row:hover { background: var(--bg-hover); }
.tx-row + .tx-row { border-top: 1px solid var(--border-color); }

.tx-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.tx-id {
    font-family: var(--mono);
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tx-asset { font-size: .8rem; color: var(--text-secondary); }

.tx-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tx-amount {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tx-sub {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}
.tx-addr {
    font-size: .72rem;
    color: var(--text-muted);
}
.tx-addr code {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--frost-primary);
    word-break: break-all;
}

.tx-date {
    font-size: .78rem;
    font-weight: 550;
    color: var(--text-muted);
    white-space: nowrap;
}

/* status badges */
.st {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 100px;
    font-size: .74rem;
    font-weight: 700;
}
.st-pending    { background: rgba(255,110,199,.11);  color: var(--frost-primary); }
.st-confirming { background: rgba(255,110,199,.12); color: var(--sakura-primary); }
.st-queued     { background: rgba(255,110,199,.12); color: var(--sakura-primary); }
.st-sent       { background: rgba(255,110,199,.12); color: var(--ok); }
.st-paid       { background: rgba(255,110,199,.12); color: var(--ok); }
.st-expired    { background: var(--bg-hover);      color: var(--text-muted); }
.st-failed     { background: rgba(255,90,90,.12);  color: #ff5a5a; }

.mono { font-family: var(--mono); }

/* busy buttons */
.btn.loading, .btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ---------- profile responsive ---------- */
@media (max-width: 640px) {
    .profile-hero { flex-wrap: wrap; padding: 18px; }
    .profile-since { order: 3; }

    .set-head { flex-direction: column; gap: 14px; padding: 18px; align-items: stretch; }
    .set-action { width: 100%; }
    .set-inner { padding: 2px 18px 18px; }
    .set-ok { margin: 0 18px 16px; }

    .set-row { grid-template-columns: 1fr; }

    .set-actions { flex-direction: column-reverse; }
    .set-actions .btn { width: 100%; }

    .key-reveal { margin: 0 18px 16px; padding: 16px; }
    .key-row { padding: 12px 18px; gap: 10px; }
    .key-row-date { display: none; }

    .wallet-view { padding: 0 18px 18px; }

    .tx-row { padding: 12px 18px; }
    .tx-right { flex-basis: 100%; justify-content: space-between; }
}

/* ============================================================
   PRODUCTS
   ============================================================ */

.pr-head { margin-bottom: 26px; }
.pr-head .page-title { margin-bottom: 8px; }
.pr-head .page-sub { max-width: 62ch; }

/* a label with a quiet "optional" marker on the right */
.set-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.set-label-row i {
    font-style: normal;
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pr-inline-addr {
    font-family: var(--mono);
    font-size: .74rem;
    color: var(--text-muted);
    word-break: break-all;
}

/* ---------- product cards ---------- */

.pr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.pr-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 19px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    text-decoration: none;
    transition: border-color .18s, transform .18s;
}
.pr-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-2px);
}
/* archived products stay reachable but stop competing for attention */
.pr-card.archived { opacity: .55; }
.pr-card.archived:hover { opacity: 1; }

.pr-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}
.pr-card-name {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pr-tag {
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 100px;
    background: var(--bg-hover);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pr-slug {
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: var(--radius-xs);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    font-family: var(--mono);
    font-size: .74rem;
    color: var(--frost-primary);
}

.pr-card-desc {
    font-size: .82rem;
    line-height: 1.55;
    color: var(--text-secondary);
    /* two lines maximum, so cards in a row stay the same height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pr-card-bal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: auto;
    padding-top: 6px;
}
.pr-bal {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.pr-bal b {
    font-family: var(--mono);
    font-size: 1.04rem;
    font-weight: 600;
    color: var(--text-primary);
}
.pr-bal i {
    font-style: normal;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
}
.pr-bal.empty {
    font-size: .78rem;
    color: var(--text-muted);
}

.pr-card-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 11px;
    border-top: 1px solid var(--border-color);
}
.pr-card-foot > span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.pr-card-foot b {
    font-size: .84rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pr-card-foot i {
    font-style: normal;
    font-size: .72rem;
    color: var(--text-muted);
}
.pr-card-date {
    margin-left: auto;
    font-family: var(--mono);
    font-size: .68rem;
    color: var(--text-muted);
}

/* ---------- empty state ---------- */

.pr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 52px 28px;
    border: 1px dashed var(--border-hi);
    border-radius: var(--radius-sm);
    text-align: center;
}
.pr-empty-ico {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-muted);
}
.pr-empty b {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pr-empty p {
    max-width: 46ch;
    font-size: .85rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* ---------- detail head ---------- */

.pr-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .15s;
}
.pr-back:hover { color: var(--frost-primary); }

.pr-detail-head { margin-bottom: 24px; }
.pr-detail-head .page-title { margin-bottom: 8px; }
.pr-detail-head .page-sub { max-width: 62ch; margin-bottom: 14px; }

.pr-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.pr-handle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pr-handle code {
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    font-family: var(--mono);
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--frost-primary);
}

.copy-btn.sm { width: 28px; height: 28px; }

.pr-created {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .76rem;
    color: var(--text-muted);
}

/* ---------- balance cards ---------- */

.pr-bal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 4px;
}
.pr-bal-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 15px 17px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    background: var(--bg-input);
}
.pr-bal-cur {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pr-bal-avail {
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--text-primary);
}
.pr-bal-sub {
    font-size: .72rem;
    color: var(--text-muted);
}
.pr-bal-sub b {
    font-family: var(--mono);
    font-weight: 500;
    color: var(--text-secondary);
}

/* ---------- stat grid ---------- */

.pr-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.pr-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.pr-stat-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pr-stat-value {
    font-size: 1.72rem;
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--text-primary);
}
.pr-stat-value.sm    { font-size: 1.2rem; }
.pr-stat-value.ok    { color: var(--ok); }
.pr-stat-value.warn  { color: var(--sakura-tertiary); }
.pr-stat-value.bad   { color: #ff5a5a; }
.pr-stat-value.muted { color: var(--text-muted); }

.pr-stat-note {
    font-size: .76rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.pr-stat-note b {
    font-weight: 700;
    color: var(--text-primary);
}

/* ---------- payments chart ---------- */

.pr-spark {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 152px;
    margin-top: 4px;
}
.pr-spark-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    height: 100%;
}
.pr-spark-count {
    font-family: var(--mono);
    font-size: .68rem;
    font-weight: 500;
    color: var(--text-secondary);
    /* reserve the line so bars share one baseline whether labelled or not */
    min-height: 1em;
}
.pr-spark-bar {
    width: 100%;
    max-width: 34px;
    min-height: 3px;
    border-radius: 5px 5px 2px 2px;
    background: var(--frost-gradient);
}
/* a day with no payments is still a day — show the tick, not a gap */
.pr-spark-bar.zero { background: var(--bg-hover); }
.pr-spark-day {
    font-family: var(--mono);
    font-size: .64rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---------- archive row ---------- */

.pr-archive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}
.pr-archive b {
    display: block;
    font-size: .88rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pr-archive span {
    display: block;
    max-width: 52ch;
    margin-top: 3px;
    font-size: .78rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

@media (max-width: 620px) {
    .pr-stat-value { font-size: 1.5rem; }
    .pr-spark { height: 124px; gap: 4px; }
    .pr-spark-day { font-size: .58rem; }
    .pr-spark-count { font-size: .62rem; }
    .pr-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */

.adm-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}
.adm-head .page-title { margin-bottom: 0; }

.adm-stamp {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* headline counters */
.adm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.adm-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.adm-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.adm-value {
    font-size: 1.86rem;
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--text-primary);
}
.adm-note { font-size: .78rem; color: var(--text-secondary); }

/* panels */
.adm-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.adm-panel {
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.adm-wide { margin-bottom: 80px; }

.adm-h2 {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin-bottom: 14px;
}

.adm-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.adm-table td {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-num {
    text-align: right;
    font-family: var(--mono);
    font-size: .84rem;
    color: var(--text-primary);
    white-space: nowrap;
}

/* horizontal distribution bars */
.adm-bar-row {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    align-items: center;
    gap: 11px;
    margin-bottom: 9px;
}
.adm-bar-row:last-of-type { margin-bottom: 0; }

.adm-bar-label {
    font-size: .84rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.adm-bar-track {
    height: 7px;
    border-radius: 100px;
    background: var(--bg-input);
    overflow: hidden;
}
.adm-bar-fill {
    display: block;
    height: 100%;
    border-radius: 100px;
    background: var(--frost-gradient);
}
.adm-bar-num {
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--text-primary);
    white-space: nowrap;
}
.adm-bar-num i { font-style: normal; color: var(--text-muted); }

/* 14-day signup chart */
.adm-spark {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 132px;
    padding-top: 6px;
}
.adm-spark-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
    height: 100%;
}
.adm-spark-bar {
    width: 100%;
    max-width: 34px;
    /* a zero-count day still needs to be visible as a day */
    min-height: 3px;
    border-radius: 5px 5px 2px 2px;
    background: var(--frost-gradient);
}
.adm-spark-day {
    font-family: var(--mono);
    font-size: .66rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.adm-hint {
    margin-top: 12px;
    font-size: .78rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ---------- orders queue ---------- */
.adm-orders { grid-column: 1 / -1; }
.adm-orders-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.adm-orders-head .adm-h2 { margin-bottom: 0; }
.adm-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-filter {
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: .74rem;
    font-weight: 650;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.adm-filter:hover { border-color: var(--sakura-primary); color: var(--sakura-primary); }
.adm-filter.active {
    background: var(--sakura-gradient);
    border-color: transparent;
    color: #4a1028;
}
.adm-orders-table td { vertical-align: top; }
.adm-payout code {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--frost-primary);
    word-break: break-all;
}
.adm-actions { white-space: nowrap; }
.adm-actions .key-revoke { margin-bottom: 4px; }
tr[data-status="confirming"] { background: var(--sakura-soft); }
tr[data-status="confirming"] td:first-child { box-shadow: inset 3px 0 0 var(--sakura-primary); }
.adm-empty {
    font-size: .84rem;
    line-height: 1.6;
    color: var(--text-muted);
}

@media (max-width: 560px) {
    .adm-value { font-size: 1.6rem; }
    .adm-bar-row { grid-template-columns: 68px 1fr auto; gap: 9px; }
    .adm-spark { height: 108px; gap: 4px; }
    .adm-spark-day { font-size: .6rem; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
    .layout { grid-template-columns: 1fr; }
    .side {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
        gap: 14px;
    }
    .secure-note { grid-column: 1 / -1; }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-tag { max-width: 460px; }

    /* TOC becomes a horizontal scroller pinned under the header */
    .docs-layout { grid-template-columns: 1fr; gap: 0; }
    .toc {
        position: sticky;
        top: 66px;
        z-index: 90;
        margin-bottom: 30px;
        padding: 10px 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
    }
    .toc-inner {
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .toc-inner::-webkit-scrollbar { display: none; }
    .toc-title, .toc-group { display: none; }
    .toc-link {
        flex-shrink: 0;
        padding: 6px 12px;
        border: 1px solid var(--border-color);
        border-left-width: 1px;
        border-radius: 100px;
        white-space: nowrap;
    }
    .toc-link.sub { padding-left: 12px; }
    .toc-link.current { background: var(--frost-soft); }
}

@media (max-width: 900px) {
    /* nav moves into the drawer */
    .nav { display: none; }
    .burger { display: flex; }

    /* language and theme both live in the drawer now */
    .lang-dd { display: none; }
    .theme-toggle { display: none; }

    /* one auth control survives in the bar: the primary CTA for guests, the
       account link for signed-in users. "Sign in" and "Log out" stay in the
       drawer so the header keeps a single, unambiguous action. */
    .btn-ghost { display: none; }
    .header-actions .logout-form { display: none; }

    /* the email stays — it is what gives the pill weight and tells you which
       account you are in. Capping the pill lets the existing ellipsis on
       .account-email do the trimming.

       min() keeps it safe without another breakpoint: a flat 168px would
       overflow a 320px screen once the burger, logo and gaps are accounted
       for, while 42vw alone would waste space on a tablet. */
    .account { max-width: min(168px, 42vw); }

    .header-actions { margin-left: auto; }
}

/* the drawer language row is mobile-only — the header dropdown owns it above
   the breakpoint */
@media (min-width: 901px) {
    .dn-sep,
    .drawer-nav .dn-toggle,
    .drawer-lang-wrap { display: none; }
}

/* drawer is mobile-only — guard against a resize while it is open */
@media (min-width: 901px) {
    .drawer, .drawer-backdrop { display: none; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .main { padding-top: 38px; }
    .page-head { margin-bottom: 30px; }
    .invoice-card {
        padding: 24px 22px;
    }
    .side-card {
    }
    .auth-card {
    }
    .layout { gap: 20px; padding-bottom: 52px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat { padding: 24px 8px; }
    .stat:nth-child(odd) { border-left: none; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--border-color); }
    .footer { padding-top: 42px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }

    .docs-hero { padding-bottom: 26px; margin-bottom: 26px; }
    .doc-section { padding-bottom: 36px; }
    .doc-h2 { font-size: 1.28rem; }
    .toc { top: 60px; }
    .docs-body { overflow-x: hidden; }
    .docs-body .doc-table { min-width: 0; }
    .docs-body .doc-table td:first-child { white-space: normal; }

    .legal-hero { padding: 40px 0 28px; }
    .legal-hero-title { font-size: 1.6rem; }
    .legal-meta { flex-direction: column; gap: 4px; }
}

@media (max-width: 560px) {
    html { font-size: 15px; }
    .container { padding: 0 16px; }
    .header-inner { height: 60px; gap: 14px; }

    /* buys clearance between the centred wordmark and the CTA */
    .btn-mini { padding: 8px 14px; font-size: .84rem; }
    .account { padding: 7px 10px; }
    .invoice-card { padding: 20px 16px; border-radius: 15px; }
    .step-label { display: none; }
    .step-line { margin: 0 10px; }
    .pay-head { flex-direction: column; align-items: flex-start; gap: 16px; }
    .qr-box { width: 100%; height: 148px; }
    .btn-group { flex-direction: column; }
    .btn-group .btn { width: 100%; }
    .side { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat { border-left: none; padding: 20px 8px; }
    .stat:not(:first-child) { border-top: 1px solid var(--border-color); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }

    /* drawer language rows: the endonym and the chip identify the language, the
       English gloss is redundant on a narrow screen */
    .dl-en { display: none; }
    .lang-chip { width: 28px; height: 21px; font-size: .63rem; border-radius: 5px; }
    .dl-opt { padding: 7px 10px 7px 14px; }
    .dl-native { font-size: .855rem; }
    .dn-current { font-size: .775rem; }

    .docs-layout { overflow-x: hidden; }
    .docs-body { overflow-x: hidden; width: 100%; }
    .doc-table { min-width: 0; width: 100%; }
    .doc-table td:first-child { white-space: normal; }

    .legal-hero { padding: 32px 0 24px; }
    .legal-hero-title { font-size: 1.4rem; }
    .legal-card { border-radius: 10px; }
    .legal-card-row { padding: 12px 14px; }
    .legal-notice { padding: 12px 14px; font-size: 13px; }
}

/* ============================================================
   MISC
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 100px; border: 3px solid var(--bg-primary); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

::selection { background: rgba(255,107,53,.25); }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

:focus-visible { outline: 2px solid var(--frost-primary); outline-offset: 2px; }

/* inputs already show focus via their border — the global outline
   would paint a second frame around them */
.auth-input:focus-visible,
.amount-input:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* light-theme fine tuning */
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-mini { color: #fff; }
[data-theme="light"] .step.active .step-number { color: #fff; }
[data-theme="light"] .notice { border-color: rgba(180,110,0,.25); background: rgba(255,176,32,.1); color: #a86a00; }
[data-theme="light"] .notice b { color: #a86a00; }
[data-theme="light"] .footer { background: var(--bg-secondary); border-top: 1px solid var(--border-color); }
[data-theme="light"] .stats { background: var(--bg-secondary); }
[data-theme="light"] ::selection { background: rgba(232,93,38,.2); }

/* off-state track has to read as grey against white, not as a dark blob */
[data-theme="light"] .dn-switch { background: var(--border-hi); }
[data-theme="light"] .dn-switch-knob { box-shadow: 0 1px 3px rgba(16,24,40,.22); }

/* on white the gradient tile works — it just does not need a halo around it */
[data-theme="light"] .profile-avatar {
    border-color: transparent;
    background: var(--frost-gradient);
    color: #fff;
    box-shadow: 0 5px 14px -8px rgba(232,93,38,.32);
}
[data-theme="light"] .drawer-avatar {
    border-color: transparent;
    background: var(--frost-gradient);
    color: #fff;
}

/* ── FAQ page ──────────────────────────────────────────── */
.faq-hero {
    text-align: center;
    padding: 64px 0 40px;
}
.faq-hero-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 16px;
}
.faq-hero-sub {
    font-size: 16px;
    color: var(--text-dim);
    margin: 0;
}

.faq-list {
    max-width: 640px;
    margin: 0 auto 64px;
}
.faq-group {
    margin-bottom: 40px;
}
.faq-group-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    margin: 0 0 16px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.faq-group-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.faq-item {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s, background .25s;
}
.faq-item:hover {
    border-color: var(--accent-ring);
    background: var(--accent-soft);
}
.faq-item.open {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft), 0 4px 20px var(--accent-soft);
    background: var(--accent-soft);
}

.faq-q {
    width: 100%;
    padding: 20px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border: none;
    background: none;
    text-align: left;
    font-family: inherit;
    transition: color .2s;
}
.faq-q-icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}
.faq-q:hover {
    color: var(--accent);
}
.faq-item.open .faq-q {
    color: var(--accent);
}

.faq-a-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s cubic-bezier(.4,0,.2,1);
}
.faq-a {
    padding: 0 24px 22px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-dim);
    margin: 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

[data-theme="light"] .faq-item.open {
    box-shadow: 0 0 0 2px var(--accent-soft), 0 4px 20px var(--accent-soft);
    background: var(--accent-soft);
}
[data-theme="light"] .faq-item:hover {
    border-color: var(--accent-ring);
    background: var(--accent-soft);
}

/* ── Contacts page ─────────────────────────────────────── */
.contacts-hero {
    text-align: center;
    padding: 64px 0 40px;
}
.contacts-hero-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 16px;
}
.contacts-hero-sub {
    font-size: 16px;
    color: var(--text-dim);
    margin: 0;
}
.ct-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ct-link:hover {
    opacity: .8;
}

.contacts-grid {
    max-width: 520px;
    margin: 0 auto 64px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    text-decoration: none;
    color: var(--text);
    transition: border-color .25s, box-shadow .25s, transform .2s;
}
.contact-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 24px rgba(255,107,53,.08);
    transform: translateY(-2px);
}
.cc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,107,53,.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cc-icon-tg {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: #fff;
}
.cc-icon-mail {
    background: rgba(255,255,255,.06);
    color: var(--text-dim);
}
.cc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.cc-label {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
.cc-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}
.cc-url {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}
.cc-handle {
    font-family: 'JetBrains Mono', monospace;
    color: #2AABEE;
}
.cc-email-addr {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
}
.cc-hint {
    font-size: 12px;
    color: var(--text-dim);
    opacity: .7;
}
.cc-arrow {
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform .15s, color .15s;
}
.contact-card:hover .cc-arrow {
    transform: translateX(3px);
    color: var(--accent);
}

[data-theme="light"] .contact-card:hover {
    box-shadow: 0 4px 24px rgba(232,93,38,.06);
}
[data-theme="light"] .cc-icon-mail {
    background: rgba(0,0,0,.04);
}

/* ── Legal pages (Privacy, Terms, AML) ─────────────────── */
.legal-hero {
    padding: 64px 0 40px;
}
.legal-hero-title {
    font-size: clamp(1.9rem, 4.4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 12px;
}
.legal-hero-sub {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-dim);
    margin: 0 0 16px;
    max-width: 600px;
}
.legal-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.legal-content {
    max-width: 720px;
    padding-bottom: 80px;
}
.legal-section {
    margin-bottom: 40px;
}
.legal-h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
    letter-spacing: -.02em;
}
.legal-p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-dim);
    margin: 0 0 14px;
}
.legal-p:last-child { margin-bottom: 0; }
.legal-p a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}
.legal-p a:hover {
    border-bottom-color: var(--accent);
}
.legal-p code {
    font-family: var(--mono);
    font-size: .88em;
    color: var(--accent);
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
}
.legal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}
.legal-list li {
    position: relative;
    padding: 6px 0 6px 20px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-dim);
}
.legal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.legal-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--bg-card);
}
.legal-card-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
}
.legal-card-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}
.legal-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.legal-card-label code {
    font-family: var(--mono);
    font-size: .92em;
    color: var(--accent);
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
}
.legal-card-value {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dim);
}
.legal-card-value a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}
.legal-card-value a:hover {
    border-bottom-color: var(--accent);
}
.legal-notice {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(255,179,71,.25);
    border-radius: 12px;
    background: rgba(255,179,71,.06);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-dim);
}
.legal-notice svg {
    color: var(--ok);
    flex-shrink: 0;
    margin-top: 2px;
}

.support-hero {
    text-align: center;
    padding: 64px 0 32px;
    position: relative;
}
.support-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,107,53,.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.support-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255,107,53,.1);
    border: 1px solid rgba(255,107,53,.2);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.support-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
    margin: 0 0 12px;
    position: relative;
    z-index: 1;
}
.support-sub {
    font-size: 16px;
    color: var(--text-dim);
    margin: 0;
    position: relative;
    z-index: 1;
}

.support-cards {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.support-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.support-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 24px rgba(255,107,53,.1);
    transform: translateY(-2px);
}
.sc-main {
    background: linear-gradient(135deg, rgba(255,107,53,.06) 0%, rgba(255,107,53,.02) 100%);
    border-color: rgba(255,107,53,.2);
}
.sc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tg-icon {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: #fff;
}
.chat-icon {
    background: rgba(255,107,53,.12);
    color: var(--accent);
}
.mail-icon {
    background: rgba(255,255,255,.06);
    color: var(--text-dim);
}
[data-theme="light"] .mail-icon {
    background: rgba(0,0,0,.04);
}
.sc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.sc-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.sc-handle {
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}
.sc-desc {
    font-size: 13px;
    color: var(--text-dim);
}
.sc-arrow {
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform .15s;
}
.support-card:hover .sc-arrow {
    transform: translateX(3px);
    color: var(--accent);
}

@media (max-width: 600px) {
    .support-title { font-size: 28px; }
    .support-hero { padding: 40px 0 20px; }
    .support-card { padding: 16px 18px; }
    .sc-icon { width: 42px; height: 42px; }
}

/* ============================================================
   HOMEPAGE EXTRAS — swap arrow, chips, receive preview,
   trust pills, how-it-works
   ============================================================ */

/* swap direction button */
.swap-arrow-wrap { display: flex; justify-content: center; margin: 2px 0; }
.swap-arrow-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border-hi);
    color: var(--frost-primary);
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.swap-arrow-btn:hover {
    border-color: var(--frost-primary);
    box-shadow: 0 0 0 4px var(--frost-soft);
}
.swap-arrow-btn:active { transform: scale(.92); }
.swap-arrow-btn svg { transition: transform .5s cubic-bezier(.34,1.35,.44,1); }
.swap-arrow-btn.flipped svg { transform: rotate(180deg); }

/* quick-amount chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
    padding: 6px 15px;
    border-radius: 100px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.chip:hover {
    border-color: var(--frost-primary);
    color: var(--frost-primary);
    background: var(--frost-soft);
}
.chip:active { transform: scale(.96); }

/* big "you receive" preview inside step 1 */
.recv-preview {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 20px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,122,168,.38);
    background: linear-gradient(135deg, rgba(227,11,93,.18), rgba(255,122,26,.07) 55%, transparent 80%);
    box-shadow: 0 8px 28px -12px rgba(227,11,93,.4);
}
/* network pills: TRC-20 / ERC-20 / BEP-20 … */
.net-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.net-pill {
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.net-pill:hover { border-color: var(--sakura-primary); color: var(--sakura-primary); }
.net-pill.active {
    background: var(--sakura-gradient);
    border-color: transparent;
    color: #4a1028;
    box-shadow: 0 4px 16px -6px var(--sakura-glow);
}
.net-pill.static { cursor: default; opacity: .8; }
.net-pill.static:hover { border-color: var(--border-color); color: var(--text-secondary); }
/* live conversion line: 1 USDT ≈ X ETH */
.rate-line { margin-top: 10px; font-size: .85rem; color: var(--text-secondary); }
.rate-line b { color: var(--sakura-primary); font-weight: 750; }
.rate-line-fee {
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--sakura-soft);
    border: 1px solid var(--sakura-ring);
    font-size: .7rem;
    font-weight: 700;
    color: var(--sakura-secondary);
}
.rate-line-fee.bonus {
    background: rgba(143,230,176,.12);
    border-color: rgba(143,230,176,.35);
    color: var(--ok);
}
.rate-line-wait { color: var(--text-muted); }
.recv-preview-fiat {
    display: block;
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-muted);
}
/* sakura card frame */
.invoice-card {
    border: 1px solid rgba(255,122,168,.30);
    box-shadow: 0 1px 2px rgba(0,0,0,.35), 0 18px 50px -18px rgba(227,11,93,.40);
}
.side-card { border-color: rgba(255,122,168,.24); }
/* destination address field (step 3) — same look as other inputs */
.address-input-wrapper { position: relative; display: flex; align-items: center; gap: 8px; }
.address-input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--mono);
    font-size: .85rem;
    outline: none;
    transition: border-color .2s;
}
.address-input:focus { border-color: var(--frost-primary); }
.address-input::placeholder { color: var(--text-muted); font-family: inherit; }
.address-input.invalid, .auth-input.invalid { border-color: #ff5a5a !important; }
.recv-preview-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.recv-preview-value {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--frost-primary);
    font-variant-numeric: tabular-nums;
    text-align: right;
    overflow-wrap: anywhere;
}

/* trust pills under the widget */
.trust-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 26px 0 0;
    padding-bottom: 56px;
}
.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 17px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-card);
}
.trust-pill svg { color: var(--ok); flex-shrink: 0; }

/* how it works */
.how { padding: 64px 0; }
.how-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 0 28px;
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.how-card {
    position: relative;
    overflow: hidden;
    padding: 26px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.how-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hi);
    box-shadow: var(--shadow-card);
}
.how-num {
    position: absolute;
    top: 6px;
    right: 16px;
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    opacity: .07;
    pointer-events: none;
}
.how-ico {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--frost-gradient);
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px -8px var(--frost-primary);
}
.how-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; }
.how-card p { font-size: .85rem; line-height: 1.6; color: var(--text-secondary); margin: 0; }
[data-theme="light"] .how-ico { color: #fff; }

.stat-value { font-variant-numeric: tabular-nums; }

/* ---------- native leaf cursor ---------- */
body { cursor: url('/static/img/leaf.cur?v=3'), auto; }
a, button, .dd-trigger, .chip, .faq-q, [role="button"],
input[type="checkbox"], input[type="radio"] { cursor: url('/static/img/leaf.cur?v=3'), pointer !important; }
/* the leaf wins over every component-level cursor (labels, buttons, rows…),
   everywhere except text fields where the I-beam stays */
body *:not(input):not(textarea):not(select) { cursor: url('/static/img/leaf.cur?v=3'), pointer !important; }
input:not([type="checkbox"]):not([type="radio"]), textarea, select { cursor: auto; }
/* busy/disabled controls keep the leaf instead of swapping to an hourglass */
.btn.loading, .btn:disabled,
.key-revoke:disabled { cursor: url('/static/img/leaf.cur?v=3'), wait; }

@media (max-width: 768px) {
    .how { padding: 44px 0; }
    .how-grid { grid-template-columns: 1fr; }
    .how-title { font-size: 1.35rem; margin-bottom: 20px; }
    .trust-pills { padding-bottom: 40px; }
    .recv-preview-value { font-size: 1.15rem; }
}

/* ============================================================
   SATURATED PINK + GLASS OVERRIDE
   Все окна — стекло, розовый — насыщенный, а не бледный.
   ============================================================ */
.invoice-card,
.auth-card,
.side-card,
.adm-card,
.adm-panel,
.set-card,
.faq-item,
.legal-card,
.how-card {
    background: linear-gradient(165deg, rgba(255,120,170,.10), rgba(255,122,26,.04) 38%, rgba(42,15,30,.42) 100%), color-mix(in srgb, var(--bg-card) 24%, transparent);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,150,190,.18);
    box-shadow: 0 8px 32px -12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.14), inset 0 -1px 0 rgba(227,11,93,.12);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.invoice-card:hover,
.auth-card:hover,
.adm-panel:hover,
.how-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,150,190,.32);
    box-shadow: 0 16px 44px -12px rgba(227,11,93,.35), inset 0 1px 0 rgba(255,255,255,.18);
}
[data-theme="light"] .invoice-card,
[data-theme="light"] .auth-card,
[data-theme="light"] .side-card,
[data-theme="light"] .adm-card,
[data-theme="light"] .adm-panel,
[data-theme="light"] .set-card,
[data-theme="light"] .faq-item,
[data-theme="light"] .legal-card,
[data-theme="light"] .how-card {
    background: linear-gradient(165deg, rgba(192,7,79,.06), rgba(227,11,93,.02) 40%, rgba(255,255,255,.38) 100%), color-mix(in srgb, #ffffff 32%, transparent);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,.65);
    box-shadow: 0 8px 28px -14px rgba(192,7,79,.18), inset 0 1px 0 rgba(255,255,255,.6);
}
.invoice-card,
.auth-card,
.adm-panel { position: relative; }
.auth-card { overflow: hidden; }
/* кнопки — сочнее, но без тяжести */
.btn-primary {
    background: var(--frost-gradient);
    box-shadow: 0 6px 20px -8px var(--sakura-glow), inset 0 1px 0 rgba(255,255,255,.25);
    border: 1px solid rgba(255,255,255,.18);
    filter: saturate(1.15);
}
.btn-primary:hover { filter: saturate(1.3) brightness(1.05); }
.step.active .step-number,
.adm-bar-fill {
    background: var(--frost-gradient);
    filter: saturate(1.3);
}

/* ============================================================
   CANDY PASS — воздух, глянец, характер. Только поверх, ничего не ломает.
   ============================================================ */

/* 1. Воздух и масштаб — заметно крупнее */
.container { max-width: 1220px; }
.main { padding-top: 64px; }
.layout { gap: 32px; align-items: start; grid-template-columns: minmax(0, 1fr) 360px; }
.invoice-card { padding: 44px 40px; border-radius: 26px; }
.layout > aside, .layout > .side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.side-card { padding: 22px 24px; border-radius: 22px; }

/* 2. Заголовок-витрина */
.page-head { max-width: 680px; margin-bottom: 46px; }
.eyebrow {
    background: linear-gradient(165deg, rgba(227,11,93,.18), rgba(255,122,26,.08)), color-mix(in srgb, var(--bg-card) 30%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-color: rgba(255,122,168,.35);
    color: var(--text-primary);
}
.page-title {
    font-size: clamp(2.1rem, 4.8vw, 3rem);
    background: linear-gradient(115deg, #fff 20%, #ff7aa8 48%, #ffb37a 60%, #c86bff 78%, #fff 95%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleSheen 9s ease-in-out infinite;
    filter: drop-shadow(0 2px 24px rgba(227,11,93,.35));
}
.page-sub { font-size: 1.05rem; max-width: 540px; }

/* 3. Шапка — стекло + карамельная нить */
.header::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(227,11,93,.65) 30%, rgba(255,122,26,.5) 50%, rgba(150,60,255,.5) 70%, transparent);
    pointer-events: none;
}
.nav-link { border-radius: 10px; }
.nav-link:hover { background: rgba(227,11,93,.10); }

/* 4. Кнопки-леденцы */
.btn { border-radius: 16px; font-weight: 700; }
.btn-primary {
    padding: 15px 24px;
    background: linear-gradient(135deg, #c0074f 0%, #e30b5d 45%, #ff5c3d 130%);
    box-shadow: 0 10px 28px -8px rgba(227,11,93,.55), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 6px rgba(0,0,0,.18);
}
.btn-secondary {
    background: color-mix(in srgb, var(--bg-input) 55%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

/* 5. Степы — сочные */
.step-number { width: 32px; height: 32px; }
.step.active .step-number {
    box-shadow: 0 0 0 5px rgba(227,11,93,.18), 0 4px 16px -4px rgba(227,11,93,.6);
}
.step.completed .step-number { border-color: var(--frost-primary); }

/* 6. Поля и дропдауны — мягче */
.dd-trigger, .auth-input, .address-input {
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-input) 62%, transparent);
}
.dd-trigger:hover { border-color: rgba(255,122,168,.45); }
.dd-trigger:focus-within, .auth-input:focus, .address-input:focus {
    border-color: var(--frost-primary);
    box-shadow: 0 0 0 4px rgba(227,11,93,.18);
    outline: none;
}
:focus-visible { outline: 2px solid rgba(227,11,93,.6); outline-offset: 2px; }

/* 7. Полоса статистики — парящие пилюли вместо плоской ленты */
.stats { border: none; background: transparent; }
.stats-grid { gap: 14px; padding: 6px 0 34px; }
.stat {
    border: 1px solid rgba(255,150,190,.16);
    border-radius: 20px;
    background: linear-gradient(165deg, rgba(255,120,170,.08), transparent 45%, rgba(42,15,30,.4)), color-mix(in srgb, var(--bg-card) 26%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    backdrop-filter: blur(20px) saturate(170%);
    padding: 24px 10px;
}
.stat-value { font-size: 1.85rem; }

/* 8. Глубина фона: зерно + виньетка */
.bg-fx::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(760px 420px at 15% 0%, rgba(227,11,93,.28), transparent 62%),
        radial-gradient(680px 420px at 85% 12%, rgba(255,122,26,.16), transparent 62%),
        radial-gradient(900px 560px at 50% 110%, rgba(150,60,255,.16), transparent 62%),
        radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(10,3,8,.55) 100%),
        linear-gradient(180deg, rgba(23,8,18,.58) 0%, rgba(23,8,18,.36) 42%, rgba(18,5,13,.88) 100%);
}
::selection { background: rgba(227,11,93,.45); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #170812; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #e30b5d, #7a2c55); border-radius: 99px; border: 2px solid #170812; }

/* ============================================================
   WINDOW DRESSING + MOTION — оформление окон и анимации.
   Только CSS, логику не трогает.
   ============================================================ */

/* entrance: виджет выезжает, сайдбар догоняет каскадом */
@keyframes cardIn {
    from { opacity: 0; transform: translateY(26px) scale(.985); }
    to   { opacity: 1; transform: none; }
}
.invoice-card { animation: cardIn .65s cubic-bezier(.22,.9,.28,1) backwards; }
.side .side-card, .side .secure-note { animation: cardIn .6s cubic-bezier(.22,.9,.28,1) backwards; }
.side .side-card:nth-of-type(2) { animation-delay: .08s; }
.side .side-card:nth-of-type(3) { animation-delay: .16s; }
.side .side-card:nth-of-type(4) { animation-delay: .24s; }
.side .secure-note { animation-delay: .3s; }

/* смена шагов — скользит, а не мигает */
.step-content.active { animation: stepSlide .38s cubic-bezier(.22,.9,.28,1); }
@keyframes stepSlide {
    from { opacity: 0; transform: translateX(22px); }
    to   { opacity: 1; transform: none; }
}

/* дропдауны — пружинкой */
.dd-panel {
    transform-origin: top center;
    transition: opacity .22s ease, transform .28s cubic-bezier(.34,1.4,.4,1), visibility .22s;
}
.dd.open .dd-panel { transform: translateY(0) scale(1); }
.dd-option { transition: background .15s, transform .15s; }
.dd-option:hover { transform: translateX(3px); }

/* стрелка swap — иконка крутится, кнопка светится */
.swap-arrow-btn { transition: border-color .25s, box-shadow .25s, transform .15s; }
.swap-arrow-btn:hover {
    border-color: rgba(255,122,168,.55);
    box-shadow: 0 0 26px -4px rgba(227,11,93,.65), 0 0 0 4px rgba(227,11,93,.15);
}
.swap-arrow-btn:hover svg { transform: rotate(180deg); }
.swap-arrow-btn.flipped:hover svg { transform: rotate(0deg); }

/* пилюли сетей и чейны — живые */
.net-pill:not(.static), .chain { transition: transform .18s, border-color .18s, background .18s, box-shadow .18s, color .18s; }
.net-pill:not(.static):hover, .chain:hover { transform: translateY(-2px); border-color: rgba(255,122,168,.5); }
.net-pill.active {
    background: var(--frost-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px -6px rgba(227,11,93,.65);
}

/* secure-note дышит */
.secure-note { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(227,11,93,.0); }
    50%      { box-shadow: 0 0 28px -6px rgba(227,11,93,.45); }
}

/* how-карточки — наклон при наведении */
.how-card { transition: transform .28s cubic-bezier(.22,.9,.28,1), box-shadow .28s, border-color .28s; }
.how-card:hover {
    transform: translateY(-6px) rotate(-.4deg);
    border-color: rgba(255,122,168,.45);
    box-shadow: 0 24px 50px -16px rgba(227,11,93,.5);
}
.how-card:nth-child(2):hover { transform: translateY(-6px) rotate(.4deg); }
.how-num {
    background: var(--frost-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* trust-пилюли — пружинка при появлении уже есть, добавляем ховер */
.trust-pill { transition: transform .2s, border-color .2s; }
.trust-pill:hover { transform: translateY(-2px) scale(1.03); border-color: rgba(255,122,168,.45); }

/* курс пульсирует при обновлении — сильнее */
.rate-value.tick { animation: rateTick .6s ease; }
@keyframes rateTick {
    0% { transform: scale(1); }
    35% { transform: scale(1.1); color: var(--sakura-primary); text-shadow: 0 0 18px var(--sakura-glow); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .invoice-card, .side .side-card, .side .secure-note,
    .step-content.active, .secure-note { animation: none; }
    .swap-arrow-btn:hover, .how-card:hover { transform: none; }
}
