/* ============================================================================
   Crypto.ssr — View-level styles (accumulated per phase)
   ========================================================================== */

/* Shared section header */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-8) 0 var(--sp-3); }
.sec-head h2 { font-size: var(--fs-h3); }
.home > .sec-head:first-of-type { margin-top: var(--sp-6); }

/* ---- Home: market search ------------------------------------------------ */
.home-search { display: flex; align-items: center; gap: var(--sp-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 11px 14px; margin-bottom: var(--sp-4); color: var(--muted); cursor: text; transition: border-color .15s ease; }
.home-search:focus-within { border-color: var(--brand); color: var(--brand); }
.home-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-size: var(--fs-body); font-family: inherit; }
.home-search input::placeholder { color: var(--muted); }
.home-search__go { flex: none; }

/* ---- Home: quick actions ------------------------------------------------ */
.quickrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.quickrow__item {
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-2); border-radius: var(--r-md);
    background: var(--surface); box-shadow: var(--shadow-sm);
    font-size: var(--fs-small); font-weight: 600; color: var(--text);
    transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
}
.quickrow__item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quickrow__item:active { transform: scale(0.97); }
.quickrow__ico {
    width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center;
    background: var(--brand-weak); color: var(--brand);
}

/* ---- Home: carousel ----------------------------------------------------- */
.carousel { margin-top: var(--sp-4); border-radius: var(--r-lg); overflow: hidden; position: relative; cursor: grab; user-select: none; touch-action: pan-y; }
.carousel:active { cursor: grabbing; }
.carousel__track { display: flex; }
.carousel__track.is-anim { transition: transform var(--dur-slow) var(--ease-out); }
.slide {
    position: relative; flex: 0 0 100%; min-height: 150px; overflow: hidden;
    padding: var(--sp-6); color: #fff; display: flex; flex-direction: column; justify-content: center;
    background: linear-gradient(120deg, #1a2550, #2f49d6);
}
.slide--up   { background: linear-gradient(120deg, #063d2e, #0ecb81); }
.slide--gold { background: linear-gradient(120deg, #5a3d05, #f0a020); }
.slide__kicker { font-size: var(--fs-caption); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.slide__title { font-family: var(--font-display); font-size: var(--fs-display); font-weight: 700; line-height: 1; margin-top: var(--sp-2); }
.slide__sub { font-size: var(--fs-h4); opacity: .92; margin-top: var(--sp-2); max-width: 24ch; }
.slide__glow { position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.14); filter: blur(10px); }
.carousel__dots { position: absolute; left: 0; right: 0; bottom: var(--sp-3); display: flex; justify-content: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: var(--r-pill); background: rgba(255,255,255,.45); transition: width var(--dur) var(--ease-out), background var(--dur); }
.dot.is-on { width: 20px; background: #fff; }

/* ---- Home: currency quotes --------------------------------------------- */
.quotes { padding: var(--sp-1) var(--sp-2); }
.quote {
    width: 100%; display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-2); border-radius: var(--r-sm); text-align: left;
    transition: background var(--dur-fast);
}
.quote + .quote { border-top: 1px solid var(--border-2); }
.quote:hover { background: var(--surface-2); }
.quote__ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-display); }
/* CoinIcon: real artwork fills the size class; the colored-initial fallback keeps the old look. */
img.coin-ic { object-fit: cover; }
.coin-ic--fallback { font-size: 0.82em; letter-spacing: -0.01em; }
/* Stock logos sit on white and fit inside the circle (not cropped). */
img.coin-ic--logo { object-fit: contain; background: #fff; padding: 2px; }
/* FX pairs show the two currencies' flags as a split circle. */
.coin-ic--fx { position: relative; overflow: hidden; background: var(--surface-2); }
.coin-ic--fx > img { position: absolute; top: 0; width: 50%; height: 100%; object-fit: cover; }
.coin-ic--fx > img:first-child { left: 0; border-right: 1px solid rgba(255,255,255,.65); }
.coin-ic--fx > img:last-child { right: 0; }
.quote__id { display: flex; flex-direction: column; gap: 1px; }
.quote__id b { font-size: var(--fs-body); }
.quote__px { font-weight: 600; font-size: var(--fs-body); }
.quote__chg { justify-self: end; min-width: 72px; justify-content: center; }

/* Home markets: paged slider (drag/swipe, animated slide, page dots) */
.mcar { overflow: hidden; cursor: grab; user-select: none; touch-action: pan-y; }
.mcar:active { cursor: grabbing; }
.mcar__track { display: flex; }
.mcar__track.is-anim { transition: transform 0.35s var(--ease-out); }
.mcar__page { flex: 0 0 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.qcard { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3) var(--sp-2); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; transition: box-shadow var(--dur-fast); }
.qcard:hover { box-shadow: var(--shadow-md); }
.qcard__top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.qcard__ico { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-display); font-size: 11px; }
.qcard__top b { font-size: var(--fs-small); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.qcard__px { font-size: var(--fs-body); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qcard__chg { align-self: flex-start; }
.mcar__dots { display: flex; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.mcar__dots .dot { background: var(--border-strong); cursor: pointer; }
.mcar__dots .dot.is-on { background: var(--brand); }

/* ---- Home: real-time feed ---------------------------------------------- */
.feed { padding: var(--sp-2) var(--sp-3); }
.feed__row { display: grid; grid-template-columns: 10px auto auto 1fr auto; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; font-size: var(--fs-small); }
.feed__row + .feed__row { border-top: 1px solid var(--border-2); }
.feed__dot { width: 8px; height: 8px; border-radius: 50%; }
.feed__dot.up { background: var(--up); } .feed__dot.down { background: var(--down); }
.feed__user { color: var(--text-2); }
.feed__ago { justify-self: end; font-size: var(--fs-caption); }
.feed__amt { font-weight: 600; }

/* ---- Home: trust cards -------------------------------------------------- */
.trust { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.trust__card { padding: var(--sp-5); }
.trust__ico { display: block; width: 60px; height: 60px; margin-bottom: var(--sp-3); }
.trust__ico img { width: 100%; height: 100%; display: block; object-fit: contain; }
.trust__card h4 { margin-bottom: var(--sp-1); }

/* ---- Partners / supported wallets --------------------------------------- */
/* Official logos sit on white cards so dark wordmarks read in both themes. */
.partners { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
.partner { display: flex; align-items: center; justify-content: center; height: 66px; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06); transition: box-shadow .15s ease, transform .15s ease; }
.partner:hover { box-shadow: 0 6px 18px -6px rgba(16, 24, 40, 0.18); transform: translateY(-1px); }
.partner__logo { max-width: 100%; max-height: 30px; object-fit: contain; display: block; }

/* ---- Home: FAQ ---------------------------------------------------------- */
.faq { padding: var(--sp-1) var(--sp-4); }
.faq__item + .faq__item { border-top: 1px solid var(--border-2); }
.faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) 0; text-align: left; font-weight: 600; font-size: var(--fs-body); }
.faq__chev { color: var(--text-3); transition: transform var(--dur) var(--ease-out); flex: none; }
.faq__item.is-open .faq__chev { transform: rotate(180deg); }
.faq__a { padding: 0 0 var(--sp-4); }

/* ---- Home: footer ------------------------------------------------------- */
.home-footer { margin-top: var(--sp-10); padding: var(--sp-8) 0 var(--sp-4); text-align: center; border-top: 1px solid var(--border); }
.home-footer .brand { justify-content: center; }

/* ============================ MARKETS ==================================== */
.market__head { position: sticky; top: var(--topbar-h); z-index: 10; background: var(--bg); padding-bottom: var(--sp-2); }
.tabs { display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: var(--sp-2) var(--sp-3); border-radius: var(--r-pill); white-space: nowrap;
    font-weight: 600; font-size: var(--fs-small); color: var(--text-3);
    transition: background var(--dur-fast), color var(--dur-fast);
}
.tab:hover { color: var(--text); }
.tab.is-on { background: var(--text); color: var(--bg); }
.search { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); padding: 0 var(--sp-4); height: 44px; background: var(--surface-2); border-radius: var(--r-pill); color: var(--text-3); }
.search__input { flex: 1; background: none; border: none; outline: none; color: var(--text); }
.search__input::placeholder { color: var(--text-muted); }

.market__list { margin-top: var(--sp-3); padding: var(--sp-1) var(--sp-2); }
.market__row {
    width: 100%; display: grid; grid-template-columns: 1fr auto 84px 40px; align-items: center; gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-2); border-radius: var(--r-sm); text-align: left; transition: background var(--dur-fast);
}
.market__row--head { color: var(--text-3); font-size: var(--fs-caption); padding: var(--sp-2); }
.market__row--head span:nth-child(2) { justify-self: end; } .market__row--head span:nth-child(3) { justify-self: end; }
.market__row:not(.market__row--head) + .market__row { border-top: 1px solid var(--border-2); }
.market__row:not(.market__row--head):hover { background: var(--surface-2); }
.market__pair { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.market__ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-display); flex: none; }
.market__id { display: flex; flex-direction: column; min-width: 0; }
.market__id b { font-size: var(--fs-body); }
.market__px { justify-self: end; font-weight: 600; }
.market__chg { justify-self: end; min-width: 72px; justify-content: center; }
.market__star { color: var(--text-muted); display: grid; place-items: center; width: 40px; height: 40px; }
.market__star.is-on { color: var(--gold); }
.market__star.is-on svg { fill: var(--gold); }

/* ============================ COIN DETAIL =============================== */
.coin__bar { display: flex; align-items: center; gap: var(--sp-2); margin: calc(-1 * var(--sp-2)) 0 var(--sp-3); }
.coin__pair { flex: 1; font-size: var(--fs-h2); } .coin__pair .muted { font-size: var(--fs-body); font-weight: 500; }
.coin__stats { padding: var(--sp-4); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.coin__price { display: flex; align-items: center; gap: var(--sp-3); }
.coin__last { font-size: var(--fs-h1); font-weight: 700; }
.coin__meta { display: flex; gap: var(--sp-5); }
.coin__meta div { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-caption); }
.coin__meta b { font-size: var(--fs-small); }
.coin__tfs { display: flex; gap: 2px; margin: var(--sp-3) 0; overflow-x: auto; scrollbar-width: none; }
.coin__tfs::-webkit-scrollbar { display: none; }
.tf { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-xs); font-size: var(--fs-small); font-weight: 600; color: var(--text-3); white-space: nowrap; }
.tf.is-on { background: var(--brand-weak); color: var(--brand); }
.coin__chartwrap { padding: var(--sp-2); }
.coin__chart { width: 100%; height: 300px; }
.coin__lower { width: 100%; height: 120px; }
.coin__studybar { display: flex; gap: 2px; overflow-x: auto; padding: var(--sp-2) 0; border-top: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); scrollbar-width: none; }
.coin__studybar::-webkit-scrollbar { display: none; }
.study { padding: var(--sp-1) var(--sp-3); border-radius: var(--r-xs); font-size: var(--fs-caption); font-weight: 700; color: var(--text-3); white-space: nowrap; }
.study.is-on { background: var(--text); color: var(--bg); }
.coin__cta { margin-top: var(--sp-5); }

/* Order book preview */
.book { padding: var(--sp-3); }
.book__h { display: flex; justify-content: space-between; font-size: var(--fs-caption); color: var(--text-3); padding: 0 var(--sp-2) var(--sp-1); }
.book__row { position: relative; display: flex; justify-content: space-between; padding: 3px var(--sp-2); font-size: var(--fs-small); }
.book__bar { position: absolute; right: 0; top: 0; bottom: 0; opacity: .12; border-radius: 3px; }
.book__bar.up { background: var(--up); } .book__bar.down { background: var(--down); }
.book__row span { position: relative; z-index: 1; }
.book__mid { padding: var(--sp-2); font-size: var(--fs-h4); font-weight: 700; text-align: left; }

/* ============================ TRADE ===================================== */
.simbanner { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); border-radius: var(--r-sm); background: var(--gold-weak); color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); font-size: var(--fs-small); line-height: 1.4; }
.simbanner svg { flex: none; }
.simbanner b { color: var(--gold); }

/* Simulated wallet (dedicated sim landing: balance + sim history) */
.sim__wallet { padding: var(--sp-5); background: linear-gradient(135deg, var(--gold-weak), var(--surface) 70%); }
.sim__total { font-size: var(--fs-h1); font-weight: 700; margin: var(--sp-1) 0 var(--sp-4); }
.sim__stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-5); border-top: 1px solid var(--border-2); padding-top: var(--sp-3); }
.sim__stats > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-small); min-width: 0; }
.sim__stats b { font-size: var(--fs-body); white-space: nowrap; }
.sim__cta { margin: var(--sp-4) 0; }
.sim__ledger { margin-top: var(--sp-5); }
.sim__ledger .tabs { margin-bottom: var(--sp-2); }

.trade__bar { display: flex; align-items: center; gap: var(--sp-2); margin: calc(-1 * var(--sp-2)) 0 var(--sp-3); }
.trade__pair { flex: 1; font-size: var(--fs-h3); display: flex; align-items: baseline; }
.trade__pair .muted { font-size: var(--fs-small); font-weight: 500; }
.trade__modes { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-4); overflow-x: auto; scrollbar-width: none; }
.trade__modes::-webkit-scrollbar { display: none; }
.trade__mode { position: relative; padding: var(--sp-3) var(--sp-2); font-weight: 600; color: var(--text-3); white-space: nowrap; }
.trade__mode.is-on { color: var(--text); }
.trade__mode.is-on::after { content: ''; position: absolute; left: var(--sp-2); right: var(--sp-2); bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }

.trade__grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: var(--sp-3); align-items: start; }
.trade__grid > * { min-width: 0; }

/* Order book */
.ob { font-size: var(--fs-caption); }
.ob__h { display: flex; justify-content: space-between; color: var(--text-3); padding: 0 var(--sp-1) var(--sp-1); }
.ob__row { position: relative; width: 100%; display: flex; justify-content: space-between; padding: 2px var(--sp-1); text-align: left; }
.ob__amt { color: var(--text-2); }
.ob__bar { position: absolute; right: 0; top: 0; bottom: 0; opacity: .12; }
.ob__bar.up { background: var(--up); } .ob__bar.down { background: var(--down); }
.ob__row span { position: relative; z-index: 1; }
.ob__mid { padding: var(--sp-2) var(--sp-1); font-size: var(--fs-h4); font-weight: 700; }
.ob__mid.up { color: var(--up); } .ob__mid.down { color: var(--down); }

/* Form */
.trade__form { display: flex; flex-direction: column; gap: var(--sp-3); }
.lev { background: var(--surface-2); border-radius: var(--r-sm); padding: var(--sp-3); }
.lev__head { display: flex; justify-content: space-between; margin-bottom: var(--sp-2); }
.lev__range { width: 100%; accent-color: var(--brand); }
.lev__chips, .pcts { display: flex; gap: var(--sp-1); margin-top: var(--sp-2); }
.lev__chips { flex-wrap: wrap; }
.minichip { flex: 1; padding: var(--sp-2) 0; border-radius: var(--r-xs); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-caption); font-weight: 600; min-width: 0; }
.minichip.is-on { background: var(--brand); color: #fff; }
.minichip:active { transform: scale(0.96); }

.seg { display: flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg__btn { flex: 1; padding: var(--sp-2) 0; border-radius: calc(var(--r-sm) - 3px); font-weight: 600; font-size: var(--fs-small); color: var(--text-3); transition: background var(--dur-fast), color var(--dur-fast); }
.seg__btn.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg--side .seg__btn.up-on { background: var(--up); color: #fff; box-shadow: none; }
.seg--side .seg__btn.down-on { background: var(--down); color: #fff; box-shadow: none; }

.fieldrow { display: flex; align-items: center; gap: var(--sp-2); height: 48px; padding: 0 var(--sp-3); background: var(--surface-2); border-radius: var(--r-sm); border: 1px solid transparent; }
.fieldrow:focus-within { border-color: var(--brand); background: var(--surface); }
.fieldrow__lbl { color: var(--text-3); font-size: var(--fs-small); min-width: 48px; }
.fieldrow__in { flex: 1; min-width: 0; background: none; border: none; outline: none; text-align: right; color: var(--text); font-weight: 600; }
.fieldrow__in:disabled { color: var(--text-3); }
.fieldrow__suf { color: var(--text-3); font-size: var(--fs-small); }

.tpsl { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-small); font-weight: 600; color: var(--text-2); }
.switch { width: 40px; height: 22px; appearance: none; background: var(--surface-2); border-radius: 999px; position: relative; cursor: pointer; transition: background var(--dur-fast); }
.switch:checked { background: var(--brand); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--dur-fast) var(--ease-out); }
.switch:checked::after { transform: translateX(18px); }
.tpsl__fields { display: flex; gap: var(--sp-2); }
.balrow { display: flex; justify-content: space-between; font-size: var(--fs-small); padding: var(--sp-1) 0; }

/* Balance not known yet (BalanceStatus): loading, or failed with a retry */
.balstate { display: flex; align-items: center; flex-wrap: wrap; gap: 2px var(--sp-2); margin: 0; font-size: var(--fs-caption); line-height: 1.5; color: var(--text-3); }
.balstate__spin { width: 12px; height: 12px; border-width: 1.5px; flex: none; }
.balstate__ico { flex: none; color: var(--gold); }
.balstate__retry { min-height: 28px; padding: 0 var(--sp-2); margin-inline-start: calc(-1 * var(--sp-1)); border-radius: var(--r-xs); color: var(--brand); font-weight: 600; }
.balstate__retry:hover { background: var(--brand-weak); }
.balstate__retry:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Options */
.trade__options { display: flex; flex-direction: column; gap: var(--sp-3); }
.opt__price { padding: var(--sp-4); display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); }
.opt__last { font-size: var(--fs-h1); font-weight: 700; }
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-2); }
.tier { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--sp-3) 2px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); }
.tier b { font-size: var(--fs-small); color: var(--text); }
.tier .num { font-size: var(--fs-caption); color: var(--up); }
.tier.is-on { background: var(--brand-weak); outline: 1.5px solid var(--brand); }
.tier.is-locked { opacity: .5; }
.tier__lock { display: flex; align-items: center; gap: 2px; font-size: 9px; color: var(--gold); }
.opt__payout { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-2) 0; font-size: var(--fs-small); }
.opt__cta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

/* ---- Options wait screen (bottom-sheet countdown) --------------------- */
.optwait { max-width: 480px; }
.optwait__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
.optwait__sym { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-h4); font-weight: 700; }
.optwait__sym .muted { font-weight: 600; }
.optwait__ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-display); font-size: 13px; flex: none; }
.optwait__ringwrap { position: relative; width: 176px; height: 176px; margin: var(--sp-5) auto var(--sp-6); }
.optwait__ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.optwait__track { fill: none; stroke: var(--surface-2); stroke-width: 6; }
.optwait__arc { fill: none; stroke: var(--up); stroke-width: 7; stroke-linecap: round; }
.optwait__ring.is-settled.is-won .optwait__arc  { stroke: var(--up); }
.optwait__ring.is-settled.is-lost .optwait__arc { stroke: var(--down); }
.optwait__ring.is-active .optwait__arc { stroke: var(--brand); }
.optwait__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.optwait__clock { font-size: var(--fs-h3); font-weight: 700; letter-spacing: 0.02em; }
.optwait__state { font-size: var(--fs-caption); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.optwait__result { font-size: var(--fs-h2); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.optwait__rows { display: flex; flex-direction: column; }
.optwait__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; font-size: var(--fs-small); border-bottom: 1px solid var(--border-2); }
.optwait__row:last-child { border-bottom: 0; }
.optwait__row b { font-size: var(--fs-body); font-weight: 700; }
.optwait__close { margin-top: var(--sp-5); border-radius: var(--r-pill); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.trade__ledger { margin-top: var(--sp-6); border-top: 1px solid var(--border); padding-top: var(--sp-3); }
.pos-list { display: grid; gap: 1px; background: var(--border-2); border-radius: var(--r-sm); overflow: hidden; margin-top: var(--sp-2); }
.pos-row { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: var(--sp-2); padding: var(--sp-3); background: var(--surface); font-size: var(--fs-small); }
.pos-sym { font-weight: 700; }
.pos-status { justify-self: end; font-weight: 600; white-space: nowrap; }
.pos-row--link { cursor: pointer; transition: background var(--dur-fast); }
.pos-row--link:hover { background: var(--surface-2); }
.pos-row--link:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* ============================ ASSETS / WALLET =========================== */
.wallet { padding: var(--sp-5); }
.wallet__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.wallet__total { font-size: var(--fs-h1); font-weight: 700; margin-top: 2px; }
.donut { flex: none; }
.wallet__legend { display: flex; gap: var(--sp-5); margin-top: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-small); color: var(--text-2); }
.wallet__legend div { display: flex; align-items: center; gap: 6px; }
.wallet__legend b { color: var(--text); }
.dotc { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.subacct { padding: var(--sp-5); border-bottom: 1px solid var(--border-2); }

/* ============================ PAY FORMS (deposit/withdraw/transfer) ====== */
.pay__card { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.pay__qr { display: grid; place-items: center; padding: var(--sp-2); }
.pay__qr img { border-radius: var(--r-sm); border: 1px solid var(--border); }
.paystep { display: flex; flex-direction: column; gap: var(--sp-2); }
select.field { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 40px; }
.addr { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3); background: var(--surface-2); border-radius: var(--r-sm); }
.addr__val { flex: 1; min-width: 0; font-size: var(--fs-small); word-break: break-all; }
.note { display: flex; gap: var(--sp-2); font-size: var(--fs-caption); color: var(--text-3); background: var(--gold-weak); padding: var(--sp-3); border-radius: var(--r-sm); line-height: 1.5; }
.note svg { flex: none; color: var(--gold); margin-top: 1px; }
.payline { display: flex; justify-content: space-between; font-size: var(--fs-small); }
.xfer__swap { display: flex; justify-content: center; margin: calc(-1 * var(--sp-2)) 0; }
.xfer__swap .iconbtn { background: var(--surface-2); transform: rotate(90deg); }

/* Deposit coin/network picker + order */
.dep-coins { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.dep-coin { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--sp-3) 2px; border-radius: var(--r-sm); background: var(--surface-2); border: 1.5px solid transparent; }
.dep-coin b { font-size: var(--fs-body); } .dep-coin .muted { font-size: 10px; }
.dep-coin.is-on { border-color: var(--brand); background: var(--brand-weak); }
.dep-coin__ico { width: 32px; height: 32px; margin-bottom: var(--sp-1); border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-display); }
/* Dark artwork (XRP's black disc) would melt into a dark tile — give every icon a faint ring. */
[data-theme="dark"] .dep-coin__ico { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.dep-nets { display: flex; flex-direction: column; gap: var(--sp-2); }
.dep-net { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); background: var(--surface-2); border: 1.5px solid transparent; text-align: left; color: var(--brand); }
.dep-net b { color: var(--text); } .dep-net.is-on { border-color: var(--brand); background: var(--brand-weak); }
.dep-timer { text-align: center; font-size: var(--fs-small); color: var(--text-2); background: var(--gold-weak); border-radius: var(--r-sm); padding: var(--sp-2); }
.dep-timer b { color: var(--gold); }

/* History records */
.rec-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-1); }
.rec-row + .rec-row { border-top: 1px solid var(--border-2); }
.rec-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ============================ FINANCE / EARN =========================== */
.fin__hero { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: var(--sp-6); color: #fff; background: linear-gradient(120deg, #11162b, #2f49d6); margin-bottom: var(--sp-4); }
.fin__hero-txt h2 { color: #fff; } .fin__hero-txt p { opacity: .9; margin: var(--sp-2) 0 var(--sp-4); max-width: 30ch; }
.fin__hero-glow { position: absolute; right: -30px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--up), transparent 70%); opacity: .5; }
.fin__tabs { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.fin__tab { padding: var(--sp-2) 0; font-weight: 600; color: var(--text-3); position: relative; }
.fin__tab.is-on { color: var(--text); }
.fin__tab.is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--brand); border-radius: 2px; }
.fin__list { display: grid; gap: var(--sp-3); }
.fin__card { padding: var(--sp-4); }
.fin__card-top { display: flex; align-items: center; gap: var(--sp-3); }
.fin__coin { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-display); flex: none; }
.fin__id { flex: 1; min-width: 0; } .fin__id b { font-size: var(--fs-body); }
.fin__badges { display: flex; gap: 6px; margin-top: 4px; }
.fin__spark { width: 84px; height: 40px; flex: none; }
.fin__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin: var(--sp-4) 0; }
.fin__stats div { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-caption); }
.fin__stats b { font-size: var(--fs-body); }
.fin__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); border-top: 1px solid var(--border-2); padding-top: var(--sp-3); }
.fin__hold { padding: var(--sp-4); }
.fin__hold-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.fin__hold-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); border-top: 1px solid var(--border-2); padding-top: var(--sp-3); margin-top: var(--sp-3); }

/* Bottom sheet (reusable) */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: var(--sp-5); padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0)); box-shadow: var(--shadow-lg); max-width: 520px; margin: 0 auto; max-height: calc(100dvh - var(--sp-4)); overflow-y: auto; overscroll-behavior: contain; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.sheet__row { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) 0; font-size: var(--fs-small); }
.sheet-enter-active, .sheet-leave-active { transition: transform var(--dur) var(--ease-out); }
.sheet-enter-from, .sheet-leave-to { transform: translateY(100%); }

/* ============================ CONVERT =================================== */
.convert__row { display: grid; grid-template-columns: 130px 1fr; gap: var(--sp-2); }
.convert__amt { text-align: right; font-weight: 600; }

/* ============================ C2C ======================================= */
.c2c__filters { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.c2c__list { display: grid; gap: var(--sp-3); }
.c2c__offer { padding: var(--sp-4); display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'merchant action' 'body action'; gap: var(--sp-2) var(--sp-3); align-items: center; }
.c2c__merchant { grid-area: merchant; display: flex; align-items: center; gap: var(--sp-2); }
.c2c__ava { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-family: var(--font-display); }
.c2c__body { grid-area: body; display: flex; flex-direction: column; gap: 3px; }
.c2c__price b { font-size: var(--fs-h4); }
.c2c__pays { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.c2c__offer .btn { grid-area: action; }

/* ============================ KYC ====================================== */
.kyc__docs { display: flex; flex-direction: column; gap: var(--sp-2); }
.kyc__doc { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); background: var(--surface-2); border: 1.5px solid transparent; font-weight: 600; }
.kyc__doc.is-on { border-color: var(--brand); background: var(--brand-weak); }
.kyc__radio { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); }
.kyc__radio.is-on { border-color: var(--brand); background: radial-gradient(circle at center, var(--brand) 0 5px, transparent 6px); }
.kyc__uploads { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.kyc__drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 120px; border-radius: var(--r-md); border: 1.5px dashed var(--border-strong); color: var(--text-3); background: var(--surface-2); font-size: var(--fs-small); font-weight: 600; }
.kyc__drop.is-done { border-style: solid; border-color: var(--up); color: var(--up); }

/* ============================ SECURITY ================================= */
.sec__acct { padding: var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.sec__list { padding: var(--sp-1) var(--sp-2); }
.sec__row { width: 100%; display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-2); text-align: left; transition: background var(--dur-fast); }
.sec__row + .sec__row { border-top: 1px solid var(--border-2); }
.sec__row:hover { background: var(--surface-2); }
.sec__ico { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); }
.sec__label { font-weight: 600; }
.sec__status { font-size: var(--fs-small); font-weight: 600; }

/* ============================ AUTH / LOGIN ============================= */
.auth { max-width: 420px; margin: var(--sp-4) auto; display: flex; flex-direction: column; gap: var(--sp-4); }
.auth__title { font-size: var(--fs-h1); }
.auth__notice { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--brand-weak); border-inline-start: 3px solid var(--brand); color: var(--text); font-size: var(--fs-small); line-height: 1.55; }
.auth__methods { display: flex; gap: var(--sp-5); border-bottom: 1px solid var(--border); }
.auth__m { padding: var(--sp-3) 0; font-weight: 600; color: var(--text-3); position: relative; }
.auth__m.is-on { color: var(--text); }
.auth__m.is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
.auth__link { color: var(--brand); font-weight: 600; cursor: pointer; }
.pw-eye { color: var(--text-3); display: grid; place-items: center; }
.auth__legal { font-size: var(--fs-caption); color: var(--text-3); line-height: 1.6; }
.auth__legal a { color: var(--text-2); text-decoration: underline; }
.auth__switch { text-align: center; font-size: var(--fs-small); color: var(--text-2); }
.auth__or { display: flex; align-items: center; gap: var(--sp-3); color: var(--text-muted); font-size: var(--fs-small); }
.auth__or::before, .auth__or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ============================ NEWS ===================================== */
.news__tags { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin: var(--sp-3) 0; }
.news__list { display: grid; gap: var(--sp-3); }
.news__card { padding: var(--sp-4); }
.news__meta { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-caption); color: var(--text-3); }
.news__dot { opacity: .5; }
.news__title { font-size: var(--fs-h4); line-height: 1.35; margin: var(--sp-2) 0; }
.news__sum { font-size: var(--fs-small); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news__src { color: var(--text-2); font-weight: 600; }
.news__ext { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-caption); font-weight: 600; color: var(--brand); white-space: nowrap; }
.news__coins { display: flex; gap: 6px; margin-top: var(--sp-3); flex-wrap: wrap; }
/* Whole card is an <a> linking out to the publisher */
.news__card--link { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.news__card--link:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.news__card--link:hover .news__title { color: var(--brand); }
.news__card--link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.news__card--link:active { transform: translateY(0); }

/* ============================ LIVE ===================================== */
.live__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.live__room { padding: 0; overflow: hidden; text-align: left; }
.live__thumb { position: relative; aspect-ratio: 16/10; display: grid; place-items: center; color: rgba(255,255,255,.9); }
.live__badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: var(--r-pill); background: rgba(0,0,0,.4); color: #fff; letter-spacing: .04em; }
.live__badge.is-live { color: #fff; }
.live__viewers { position: absolute; top: 8px; right: 8px; font-size: 10px; display: flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: var(--r-pill); background: rgba(0,0,0,.4); color: #fff; }
.live__info { padding: var(--sp-3); display: flex; flex-direction: column; gap: 2px; }
.live__info b { font-size: var(--fs-small); }

/* ============================ ACADEMY ================================= */
.acad__list { display: grid; gap: var(--sp-3); }
.acad__card { padding: var(--sp-4); display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: var(--sp-3); text-align: left; }
.acad__ico { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; }
.acad__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.acad__meta { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-caption); }

/* ---- Desktop refinements ------------------------------------------------ */
@media (min-width: 1024px) {
    .quickrow { max-width: 560px; }
    .carousel { margin-top: var(--sp-6); }
    .slide { min-height: 220px; padding: var(--sp-10); }
    .home-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: start; }
    .trust { grid-template-columns: repeat(3, 1fr); }
    .partners { grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
    .quote { grid-template-columns: 44px 1fr auto 96px; }
    .market__head { top: 0; }
    .coin__chart { height: 420px; }
    .coin__lower { height: 150px; }
    .fin__list, .c2c__list, .news__list, .acad__list { grid-template-columns: 1fr 1fr; }
    .live__grid { grid-template-columns: repeat(3, 1fr); }
    .pay, .auth { max-width: 460px; }
    .pay { margin: 0 auto; }
    .sec { max-width: 640px; margin: 0 auto; }
}
