/* Hashswap — CEX_PREVIEW_STYLE_2026_11_15_V6
   Design reference: HashSwap template (dark #0B0E11 / panel #181A20 / blue
   #0055FF / green #0ECB81 / red #F6465D / gold #F0B90B for Rewards).
   Five real static pages share this one stylesheet: / (Landing), /spot
   (Trade), /markets, /earn, /rewards. Earn and Rewards have no backend yet
   and are explicitly marked "Vorschau" - see their own files. */

:root {
    --bg-0: #0B0E11;      /* page background */
    --bg-1: #181A20;      /* card / panel surface */
    --bg-2: #1E2329;      /* input / field / hover surface */
    --bg-3: #22262F;      /* deeper hover */
    --border: #2B3139;
    --border-strong: #3A4150;
    --text-0: #EAECEF;
    --text-1: #848E9C;
    --text-2: #5B6472;
    --accent: #0055FF;    /* Hashswap blue */
    --accent-hover: #0044CC;
    --accent-dim: rgba(0, 85, 255, 0.14);
    --accent-strong: rgba(0, 85, 255, 0.45);
    --accent-glow: rgba(0, 85, 255, 0.35);
    --up: #0ECB81;
    --up-bg: rgba(14, 203, 129, 0.1);
    --down: #F6465D;
    --down-bg: rgba(246, 70, 93, 0.1);
    --warn: #F0B90B;      /* also the Rewards/gold accent */
    --warn-bg: rgba(240, 185, 11, 0.1);
    --radius: 10px;
    --radius-lg: 14px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --brand-band: #0d1013;
    --content-max: 1520px;
    --gutter: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text-0);
    font-family: var(--font);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

button, input { font-family: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }

.page-container { max-width: var(--content-max); margin: 0 auto; width: 100%; padding: 0 var(--gutter); }

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

body.landing { background: var(--bg-0); color: var(--text-0); min-height: 100vh; }

/* ---- Shared header (identical markup on all five pages) ---- */
.landing-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; padding: 14px var(--gutter); flex-wrap: wrap;
    background: rgba(11, 14, 17, 0.92); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
}

.landing-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-0); }
.logo-mark {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), #00C2FF);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 14px var(--accent-glow);
}
.brand-wordmark { font-size: 18px; font-weight: 800; color: var(--text-0); }
.wordmark-dim { opacity: 0.5; font-weight: 600; }
.beta-chip {
    font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--accent); background: var(--accent-dim);
    border: 1px solid var(--accent-strong); border-radius: 999px; padding: 2px 8px;
}

.landing-nav { display: flex; gap: 26px; }
.landing-nav a { color: var(--text-1); text-decoration: none; font-weight: 600; font-size: 14.5px; position: relative; padding: 4px 0; }
.landing-nav a:hover { color: var(--text-0); }
.landing-nav a.active { color: var(--text-0); }
.landing-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -17px; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.nav-preview-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); margin-left: 5px; vertical-align: middle; }

.landing-header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.btn-text-link { background: none; border: none; color: var(--text-1); font-weight: 700; font-size: 14px; cursor: pointer; padding: 6px 4px; }
.btn-text-link:hover { color: var(--text-0); }

.btn-pill-outline, .btn-pill-solid {
    border-radius: 8px; padding: 9px 18px; font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.btn-pill-outline { border: 1px solid var(--border-strong); color: var(--text-0); background: transparent; }
.btn-pill-outline:hover { border-color: var(--accent-strong); color: var(--accent); background: var(--bg-2); }
.btn-pill-solid { border: none; background: var(--accent); color: #fff; }
.btn-pill-solid:hover { background: var(--accent-hover); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-pill-solid:disabled, .btn-pill-outline:disabled {
    background: var(--bg-3); border-color: var(--border); color: var(--text-2);
    cursor: not-allowed; box-shadow: none;
}

@media (max-width: 860px) { .landing-nav { display: none; } }

/* =======================================================================
   LANDING
   ======================================================================= */

.hero-section { background: var(--bg-0); position: relative; overflow: hidden; }
.hero-section::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 900px 500px at 15% 0%, rgba(0, 85, 255, 0.16), transparent 60%),
        radial-gradient(ellipse 700px 500px at 90% 90%, rgba(0, 194, 255, 0.08), transparent 60%);
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 48px;
    padding: 72px 0 56px;
    min-height: 420px;
}

.hero-text { max-width: 640px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
    padding: 6px 14px; background: var(--up-bg); border: 1px solid rgba(14, 203, 129, 0.3);
    border-radius: 20px; font-size: 12px; font-weight: 700; color: var(--up);
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); }

.hero-headline {
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.05;
    font-weight: 800;
    margin: 0 0 20px;
    color: var(--text-0);
    letter-spacing: -0.015em;
}
.hero-accent {
    background: linear-gradient(135deg, var(--accent), #00C2FF);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 17px; color: var(--text-1); margin: 0 0 28px; max-width: 520px; line-height: 1.6; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.btn-cta-equal {
    border-radius: 10px; padding: 16px 30px; font-weight: 800; font-size: 15.5px; cursor: pointer;
    background: var(--bg-1); border: 1px solid var(--border-strong); color: var(--text-0);
    flex: 1 1 200px; text-align: center;
}
.btn-cta-equal.is-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-cta-equal:hover { border-color: var(--accent-strong); background: var(--bg-2); }
.btn-cta-equal.is-primary:hover { background: var(--accent-hover); box-shadow: 0 6px 20px var(--accent-glow); }

.hero-stats { display: flex; gap: 36px; padding-top: 28px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; gap: 4px; }
.hero-stat .v { font-size: 25px; font-weight: 800; color: var(--text-0); letter-spacing: -0.01em; }
.hero-stat .l { font-size: 11.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Swap-preview card (real reference price, clearly not an executable
   quote - the real LI.FI quote only ever happens on /spot) ---- */
.hero-visual { display: flex; justify-content: center; flex-direction: column; gap: 10px; width: 100%; max-width: 380px; margin: 0 auto; }

/* BTC/ETH/SOL umschalten - aktualisiert Name, Preis, 24h, Kurve und
   Datenstand gemeinsam (siehe landing.js renderMarketSwitch()). */
.market-switch-tabs { display: flex; gap: 6px; }
.market-switch-tab {
    flex: 1 1 0; padding: 9px 0; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-1); color: var(--text-1); font-weight: 700; font-size: 13px; cursor: pointer;
}
.market-switch-tab.active { background: var(--accent-dim); border-color: var(--accent-strong); color: var(--accent); }

.price-preview-card {
    background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; width: 100%;
    min-height: 254px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 50px rgba(0, 85, 255, 0.12);
    animation: previewFloat 6s ease-in-out infinite;
}
@keyframes previewFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.price-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price-preview-id { display: flex; align-items: center; gap: 10px; }
.price-preview-head img { width: 34px; height: 34px; border-radius: 50%; }
.price-preview-name { font-weight: 800; font-size: 15px; color: var(--text-0); }
.price-preview-symbol { font-size: 12px; color: var(--text-2); }
.price-preview-live { font-size: 11px; font-weight: 700; color: var(--up); display: flex; align-items: center; gap: 5px; }
.price-preview-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 6px var(--up); }
.price-preview-value { font-size: clamp(28px, 3vw, 38px); font-weight: 800; color: var(--text-0); letter-spacing: -0.02em; transition: color .15s; font-variant-numeric: tabular-nums; }
.price-preview-value.flash { animation: priceFlash 900ms ease-out; }
.price-preview-change { font-size: 14px; font-weight: 700; transition: color .15s; }
.price-preview-spark { width: 100%; height: 56px; display: block; transition: opacity .2s ease; }
.price-preview-spark.swapping { opacity: 0; }
.price-preview-foot { font-size: 11px; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.price-preview-cta {
    width: 100%; margin-top: 4px; padding: 12px; border-radius: 9px; border: none;
    background: var(--accent); color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.price-preview-cta:hover { background: var(--accent-hover); }
.price-preview-cta.is-view-only { background: var(--bg-2); color: var(--text-0); border: 1px solid var(--border-strong); }
.price-preview-cta.is-view-only:hover { background: var(--bg-1); }

/* ---- Feature grid ---- */
.features-section { padding: 88px 0; background: var(--bg-0); }
.section-head-center { text-align: center; margin-bottom: 52px; }
.section-head-center h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.015em; margin: 0 0 12px; color: var(--text-0); }
.section-head-center p { color: var(--text-1); font-size: 15.5px; max-width: 560px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 28px; transition: .2s; position: relative; }
.feature:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3); }
.feature-icon {
    width: 46px; height: 46px; border-radius: 11px; margin-bottom: 18px;
    background: var(--accent-dim); border: 1px solid var(--accent-strong);
    display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 23px; height: 23px; fill: var(--accent); }
.feature h3 { font-size: 16.5px; font-weight: 700; margin: 0 0 8px; color: var(--text-0); display: flex; align-items: center; gap: 8px; }
.feature p { color: var(--text-1); line-height: 1.6; font-size: 13.5px; margin: 0; }
.preview-tag {
    font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
    background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(240, 185, 11, 0.4);
    border-radius: 999px; padding: 2px 7px;
}

/* ---- Market table (clicking a row opens that market in Spot) ---- */
.market-table-section { padding: 40px 0 56px; background: var(--brand-band); border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--text-0); }
.section-head a { color: var(--text-1); text-decoration: none; font-weight: 600; font-size: 14px; }
.section-head a:hover { color: var(--accent); }
.section-head-right { display: flex; align-items: center; gap: 10px; }
.mkt-sort-row { display: flex; gap: 6px; }
.mkt-sort-btn { background: var(--bg-1); border: 1px solid var(--border); color: var(--text-1); font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.mkt-sort-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.market-table { width: 100%; border-collapse: collapse; }
.market-table thead th {
    text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-2); font-weight: 700; padding: 0 10px 10px; border-bottom: 1px solid var(--border);
}
.market-table thead th:nth-child(2), .market-table thead th:nth-child(3), .market-table thead th:nth-child(4) { text-align: right; }
.market-table .spark-col { text-align: right; width: 120px; }
.market-table tbody tr { cursor: pointer; border-bottom: 1px solid var(--border); }
.market-table tbody tr:hover { background: var(--bg-2); }
.market-table td { padding: 12px 10px; }
.mt-asset { display: flex; align-items: center; gap: 10px; }
.mt-asset img { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.mt-name { font-weight: 700; font-size: 14px; color: var(--text-0); }
.mt-symbol { font-size: 11px; color: var(--text-2); }
.mt-price { text-align: right; font-weight: 700; font-size: 15px; color: var(--text-0); transition: color .15s; }
.mt-change { text-align: right; font-weight: 700; font-size: 14px; transition: color .15s; }
.mt-price.flash { animation: priceFlash 900ms ease-out; }
.mt-vol { text-align: right; font-size: 12.5px; color: var(--text-1); }
.mt-spark { width: 110px; height: 28px; display: block; margin-left: auto; }
.table-loading, .table-empty { padding: 20px 10px; color: var(--text-2); font-size: 13px; }

/* ---- Stats band (only real, derivable numbers - no fabricated metrics) ---- */
.stats-band { background: linear-gradient(135deg, #10131a, #161b23); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 60px 0; }
.stats-band-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat-item { text-align: center; }
.stat-item .v {
    font-size: 36px; font-weight: 800; letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, #7FD4FF); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-item .l { font-size: 11.5px; color: var(--text-2); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-item .src { font-size: 10px; color: var(--text-2); opacity: .7; margin-top: 2px; }

/* ---- CTA ---- */
.cta-section { padding: 90px 0; text-align: center; position: relative; }
.cta-inner { max-width: 760px; margin: 0 auto; }
.cta-inner h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.015em; margin: 0 0 16px; color: var(--text-0); }
.cta-inner p { color: var(--text-1); font-size: 16px; margin: 0 0 32px; }

/* ---- Footer ---- */
.footer-landing { background: var(--bg-1); border-top: 1px solid var(--border); padding: 48px 0 28px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--text-1); font-size: 13px; line-height: 1.7; max-width: 280px; margin: 14px 0 0; }
.footer-col h4 { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--text-1); font-size: 13px; padding: 5px 0; text-decoration: none; }
.footer-col a:hover { color: var(--text-0); }
.footer-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); text-align: center; color: var(--text-2); font-size: 11.5px; }

/* ---- Activity bar (kept from the honest "real data only" design) ---- */
.activity-bar { background: var(--bg-0); padding: 0 0 56px; }
.activity-head { margin-bottom: 16px; }
.activity-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--text-0); }
.activity-row { display: flex; gap: 36px; flex-wrap: wrap; }
.activity-item { display: flex; flex-direction: column; gap: 5px; min-width: 190px; }
.activity-label { font-size: 12.5px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.activity-value { font-size: 14.5px; font-weight: 800; color: var(--text-0); display: flex; align-items: center; gap: 7px; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0.5; flex-shrink: 0; }
.activity-dot.flash { animation: dotFlash 1.4s ease-out; }
@keyframes dotFlash {
    0% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-strong); }
    100% { opacity: 0.5; box-shadow: 0 0 0 9px rgba(0, 85, 255, 0); }
}
.demo-badge {
    font-size: 9.5px; font-weight: 800; text-transform: uppercase;
    background: var(--warn-bg); color: var(--warn);
    border: 1px solid rgba(240, 185, 11, 0.4); border-radius: 999px; padding: 1px 6px;
}

/* =======================================================================
   SPOT TERMINAL — four columns, in this order: Marktinformationen (incl.
   switchable market list), großer Kerzenchart, schmales Datenpanel
   (Route & Ausführung, real LI.FI data), Spot-Formular (order ticket).
   ======================================================================= */

.spot-main { background: var(--bg-0); padding: 20px 0 40px; }
/* .page-container's shared --content-max (1520px) is correct for reading
   content (Landing/Markets/Earn/Rewards) but was also silently capping the
   Spot terminal - at 1920px that left only 79% of the viewport in use and
   squeezed the chart to ~450px. Spot gets its own, much larger cap instead
   of inheriting the shared one; the --gutter side padding is kept as-is,
   which alone lands the terminal at ~93% of viewport width on wide screens. */
.spot-container { display: flex; flex-direction: column; gap: 14px; max-width: 2200px; }

.card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-lg); }

.panel-title { margin: 0; font-size: 14.5px; font-weight: 800; color: var(--text-0); text-transform: uppercase; letter-spacing: 0.04em; }
.panel-sub { font-size: 11px; color: var(--text-2); margin: 2px 0 0; }

.up { color: var(--up); }
.down { color: var(--down); }

/* Numbers: tabular (equal-width) digits everywhere a price/amount can
   change, so columns don't jitter and right-aligned figures stay aligned. */
.pair-price, .pair-change, .pair-change-abs, .pair-stats strong,
.market-row-price, .market-row-change, .mt-price, .mt-change, .mt-vol,
.amount-row input, .amount-display, .quote-summary strong, .quote-details strong,
.markets-full-table td, .earn-apy-block .value, .earn-position-value {
    font-variant-numeric: tabular-nums;
}

/* =======================================================================
   Gemeinsame Kopfzeile: Paar, Referenzkurs, 24h-Änderung, Hoch/Tief/Volumen.
   ======================================================================= */
.spot-header-bar {
    display: flex; align-items: center; gap: 28px; padding: 18px 22px; flex-wrap: wrap;
    margin-bottom: 14px;
}
.pair-id { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.pair-icon {
    width: 38px; height: 38px; border-radius: 50%; background: var(--accent-dim);
    display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--accent);
    flex-shrink: 0; overflow: hidden;
}
.pair-icon img { width: 100%; height: 100%; object-fit: cover; }
.pair-id-text { min-width: 0; }
.pair-name { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 6px; color: var(--text-0); }
.ref-tag {
    font-size: 9.5px; font-weight: 700; color: var(--text-2); background: var(--bg-2);
    border: 1px solid var(--border); border-radius: 999px; padding: 2px 6px; letter-spacing: 0.01em;
}
.pair-sub { font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.market-caption { font-size: 10px; color: var(--text-1); display: block; text-transform: uppercase; letter-spacing: 0.03em; }
.pair-divider { width: 1px; align-self: stretch; background: var(--border); flex: 0 0 auto; }

.pair-price-block { flex: 0 0 auto; }
.pair-price { font-size: clamp(26px, 2vw, 32px); font-weight: 800; color: var(--text-0); line-height: 1.15; transition: color .15s; }
.pair-price.flash { animation: priceFlash 900ms ease-out; }
.pair-price-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-top: 2px; }
.pair-change { font-weight: 700; }
.pair-change-abs { color: var(--text-2); font-weight: 600; }
.price-label { font-size: 10.5px; color: var(--text-1); text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 2px; }
.pair-updated { font-size: 10.5px; color: var(--text-1); margin-top: 2px; }

.pair-stats { display: flex; gap: 22px; flex-wrap: wrap; flex: 1 1 auto; }
.stat-row-h { display: flex; flex-direction: column; gap: 2px; }
.stat-row-h span { font-size: 10px; color: var(--text-1); text-transform: uppercase; letter-spacing: 0.03em; }
.stat-row-h strong { font-size: 13px; font-weight: 700; color: var(--text-0); }

.mobile-market-switch-btn { display: none; }

/* =======================================================================
   Drei Spalten: Marktliste | Chart | Swap-Formular.
   ======================================================================= */
.spot-grid-3 {
    display: grid;
    grid-template-columns: clamp(280px, 18vw, 320px) minmax(560px, 1fr) clamp(320px, 19vw, 400px);
    gap: 16px;
    align-items: start;
}
.watchlist-card { grid-column: 1; grid-row: 1; }
.chart-card { grid-column: 2; grid-row: 1; }
.tauschen-card { grid-column: 3; grid-row: 1; }

/* ---- Marktliste (links) ---- */
.watchlist-card { height: 640px; padding: 16px; overflow: hidden; }
.mobile-market-details { height: 100%; }
.mobile-market-details > summary { display: none; } /* desktop: list is always visible, no toggle */
.watchlist-inner { display: flex; flex-direction: column; height: 100%; }
.watchlist-inner .panel-title { flex: 0 0 auto; margin-bottom: 12px; }

.market-search { flex: 0 0 auto; margin-bottom: 8px; }
.market-search input {
    width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 10px; color: var(--text-0); font-size: 12.5px;
}
.market-search input:focus { outline: none; border-color: var(--accent-strong); }
.market-search input::placeholder { color: var(--text-2); }

.market-filter-tabs { display: flex; gap: 5px; padding-bottom: 8px; flex-wrap: nowrap; overflow-x: auto; flex: 0 0 auto; scrollbar-width: thin; }
.market-filter-tabs::-webkit-scrollbar { height: 4px; }
.market-filter-tabs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.filter-chip {
    background: transparent; border: 1px solid var(--border); color: var(--text-1);
    font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 999px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.filter-chip.active { background: var(--accent-dim); border-color: var(--accent-strong); color: var(--accent); }

.market-list-head {
    display: grid; grid-template-columns: minmax(0, 1fr) 86px 54px; column-gap: 6px; padding: 5px 4px; font-size: 9.5px;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-1);
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.market-list-head span:not(:first-child) { text-align: right; }
.market-list { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.market-list-loading, .market-list-empty { padding: 18px 4px; color: var(--text-2); font-size: 12px; }

/* Three children (name block, price, 24h change) need three explicit grid
   columns - the old 2-column grid (minmax(0,1fr) auto) left the change value
   with nowhere consistent to go, so it visually floated between the name and
   the price instead of sitting in its own right-aligned column. Price and
   change get fixed-width columns so figures never jitter column width
   between rows, and both use tabular-nums (set globally further up) so the
   digits themselves stay aligned. */
.market-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 86px 54px; column-gap: 6px; align-items: center;
    padding: 7px 4px; cursor: pointer; border-bottom: 1px solid var(--border); border-radius: 6px;
}
.market-row:hover { background: var(--bg-2); }
.market-row.active { background: var(--accent-dim); }
.market-row-asset { display: flex; align-items: center; gap: 6px; min-width: 0; }
.market-row-fav { flex-shrink: 0; }
.market-row-icon { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; background: var(--bg-3); }
.market-row-names { min-width: 0; }
.market-row-symbol { font-weight: 700; font-size: 12.5px; color: var(--text-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-row-name { font-size: 10px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-row-price { font-size: 13px; font-weight: 600; text-align: right; color: var(--text-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-row-change { font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; }
.market-row-fav { background: transparent; border: none; color: var(--text-2); cursor: pointer; font-size: 12px; margin-right: 3px; }
.market-row-fav.active { color: var(--warn); }

/* ---- Column 2: Chart ---- */
.chart-card { display: flex; flex-direction: column; min-width: 0; height: 640px; padding: 16px; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.chart-heading .panel-title, .chart-title { margin: 0; }
#expandChart { color: var(--text-1); background: transparent; border: 0; cursor: pointer; padding: 6px; }
#expandChart:hover { color: var(--accent); }
.chart-card:fullscreen { width: 100vw; height: 100vh; padding: 24px; background: var(--bg-1); }

.chart-toolbar {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 8px;
}
.timeframes { display: flex; gap: 4px; }
.tf-btn {
    background: transparent; border: 1px solid transparent; color: var(--text-1);
    font-size: 12.5px; font-weight: 700; padding: 6px 11px; border-radius: 7px; cursor: pointer;
}
.tf-btn:hover { background: var(--bg-2); }
.tf-btn.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-strong); }

.chart-source-note { font-size: 11px; color: var(--text-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chart-source-note a { color: inherit; }
.chart-granularity { color: var(--text-1); }

.chart-canvas-wrap { position: relative; flex: 1 1 auto; min-height: 0; margin-top: 8px; }
.chart-container { width: 100%; height: 100%; }
.chart-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: var(--text-2); font-size: 13px; background: rgba(24, 26, 32, 0.85); text-align: center; padding: 0 20px;
}
.ohlc-strip { display: flex; min-height: 28px; align-items: center; gap: 7px 18px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); padding: 7px 0 0; }
.ohlc-strip b { color: var(--text-1); font-weight: 600; }
.chart-footnote { flex: 0 0 auto; font-size: 11px; color: var(--text-1); padding-top: 6px; }

/* ---- Route & Ausführung: jetzt aufklappbar direkt im Swap-Formular statt
   einer eigenen, oft fast leeren Spalte - Angebot und Ausführung gehören
   zusammen an eine Stelle. ---- */
.quote-summary { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.quote-summary div { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-1); }
.quote-summary strong { color: var(--text-0); font-weight: 700; font-size: 13px; }

.routes-accordion { border: 1px solid var(--border); border-radius: 9px; background: var(--bg-2); }
.routes-accordion summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 10px 12px; font-size: 12px;
}
.routes-accordion summary::-webkit-details-marker { display: none; }
.routes-accordion summary::after { content: '▾'; color: var(--text-1); flex-shrink: 0; }
.routes-accordion[open] summary::after { content: '▴'; }
.routes-title { font-size: 11px; font-weight: 800; color: var(--text-0); text-transform: uppercase; letter-spacing: 0.04em; }
.routes-sub { font-size: 10.5px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.routes-body { display: flex; flex-direction: column; gap: 4px; padding: 0 12px 10px; }
.routes-empty { font-size: 12.5px; color: var(--text-1); margin: 0; line-height: 1.6; }
.route-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 12.5px; }
.route-tool { color: var(--text-1); }
.route-value { font-weight: 700; color: var(--text-0); }
.route-error { color: var(--down); font-size: 12.5px; margin: 0; }
.quote-details { padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; flex: 0 0 auto; }
.quote-details div { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.quote-details strong { color: var(--text-0); font-weight: 700; }

/* ---- Column 4: Spot-Formular (order ticket) ---- */
.tauschen-card { display: flex; flex-direction: column; padding: 16px; gap: 10px; border-top: 2px solid var(--accent); }
.ticket-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.ticket-heading .panel-title { margin: 0; }
.ticket-heading > span { font-size: 11px; color: var(--text-2); letter-spacing: 0.06em; }

.trade-side-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-radius: 7px; overflow: hidden; }
.side-tab { padding: 10px; border: none; background: var(--bg-2); color: var(--text-1); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: .15s; }
.side-tab.buy.active { background: var(--up-bg); color: var(--up); }
.side-tab.sell.active { background: var(--down-bg); color: var(--down); }

.trade-field { display: flex; flex-direction: column; gap: 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px; padding: 11px; }
.trade-field:focus-within { border-color: var(--accent-strong); }
.trade-field-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--text-1); }
.trade-field-head label { font-weight: 600; }
.balance-inline strong { color: var(--text-0); font-weight: 700; }

.amount-row { display: flex; align-items: center; gap: 8px; }
.amount-row input { background: transparent; border: none; color: var(--text-0); font-size: 22px; font-weight: 700; width: 100%; min-width: 0; }
.amount-row input:focus { outline: none; }
.amount-display { font-size: 22px; font-weight: 700; color: var(--text-0); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.field-sub-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.network-chip { font-size: 10.5px; font-weight: 700; color: var(--text-2); }

.token-pill {
    display: flex; align-items: center; gap: 6px; background: var(--bg-3); border: 1px solid var(--border-strong);
    color: var(--text-0); font-weight: 700; font-size: 13px; padding: 7px 10px; border-radius: 7px; cursor: pointer; flex-shrink: 0;
}
.token-pill:hover { border-color: var(--accent-strong); }
.pill-caret { color: var(--text-2); font-size: 10px; display: inline-block; transition: transform .15s; }
.mobile-market-details[open] .pill-caret { transform: rotate(180deg); }

.percent-row { display: flex; gap: 5px; }
.pct-btn { background: transparent; border: 1px solid var(--border-strong); color: var(--text-1); font-size: 11px; font-weight: 700; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.pct-btn:hover { border-color: var(--accent-strong); color: var(--accent); }

.swap-direction-btn {
    align-self: center; width: 30px; height: 30px; margin: -8px 0; border-radius: 7px;
    background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--accent); font-size: 13px; cursor: pointer; z-index: 1;
}
.swap-direction-btn:hover { background: var(--accent-dim); }

.pair-hint { font-size: 11.5px; color: var(--warn); background: var(--warn-bg); border: 1px solid rgba(240, 185, 11, 0.3); border-radius: 8px; padding: 7px 9px; margin: 0; line-height: 1.5; }
.quote-hint { font-size: 12px; color: var(--text-1); margin: 0; line-height: 1.5; }

@keyframes priceFlash {
    0% { color: var(--accent); }
    100% { color: var(--text-0); }
}
@media (prefers-reduced-motion: reduce) {
    .pair-price.flash, .price-preview-value.flash, .mt-price.flash { animation: none; }
    .price-preview-card { animation: none; }
    .price-preview-spark { transition: none; }
}

.btn-execute { width: 100%; padding: 14px; border-radius: 9px; border: none; background: var(--accent); color: #fff; font-weight: 800; font-size: 14.5px; cursor: pointer; }
.btn-execute:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 6px 18px var(--accent-glow); }
.btn-execute:disabled { background: var(--bg-3); color: var(--text-2); cursor: not-allowed; }
.trade-disclaimer { font-size: 11px; color: var(--text-2); margin: 0; line-height: 1.5; }

/* ---- Activity card (transaction status + history) ---- */
.activity-card { padding: 4px 16px 16px; }
.bottom-tabs { display: flex; gap: 4px; padding: 10px 4px 0; }
.bottom-tab { background: transparent; border: none; color: var(--text-1); font-weight: 700; font-size: 13px; padding: 9px 12px; cursor: pointer; border-bottom: 2px solid transparent; }
.bottom-tab.active { color: var(--accent); border-color: var(--accent); }
.bottom-view { padding: 12px 4px 4px; }
.bottom-empty { color: var(--text-2); font-size: 12.5px; padding: 6px 0; line-height: 1.5; }
.tx-status-list { display: flex; flex-direction: column; gap: 6px; }
.tx-step-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 4px 0; }
.tx-step-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-2); flex-shrink: 0; }
.tx-step-dot.done { background: var(--up); }
.tx-step-dot.active { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.tx-step-dot.error { background: var(--down); }
.table-scroll { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
.history-table th { text-align: left; color: var(--text-2); font-weight: 700; text-transform: uppercase; font-size: 10.5px; padding: 0 8px 8px; }
.history-table td { padding: 9px 8px; border-top: 1px solid var(--border); color: var(--text-0); }

/* ---- Status bar (footer) ---- */
.status-bar { display: flex; align-items: center; gap: 10px; padding: 9px var(--gutter); background: var(--bg-0); border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-2); flex-wrap: wrap; }
.conn-dot-row { display: flex; align-items: center; gap: 6px; }
.conn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); }
.conn-dot.online { background: var(--up); }
.conn-dot.offline { background: var(--down); }
.status-sep { opacity: 0.4; }
.status-ticker { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.status-links { display: flex; gap: 12px; flex-shrink: 0; }
.status-links a { color: var(--text-2); text-decoration: none; }
.status-links a:hover { color: var(--accent); }

/* ---- Modals ---- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-card { background: var(--bg-1); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); width: 100%; max-width: 420px; padding: 20px; max-height: 86vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16px; color: var(--text-0); }
.modal-head button { background: none; border: none; color: var(--text-1); font-size: 20px; cursor: pointer; }

#tokenModalSearch { width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; color: var(--text-0); margin-bottom: 10px; }
.chain-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chain-chip { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-1); font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.chain-chip.active { background: var(--accent-dim); border-color: var(--accent-strong); color: var(--accent); }
.token-modal-results { max-height: 320px; overflow-y: auto; }
.token-result-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.token-result-row:hover { background: var(--bg-2); }
.token-result-icon { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-3); flex-shrink: 0; }
.token-result-symbol { font-weight: 700; font-size: 13.5px; color: var(--text-0); }
.token-result-name { font-size: 11.5px; color: var(--text-2); }
.token-result-chain { margin-left: auto; font-size: 10.5px; color: var(--text-2); }

.wallet-option { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); font-weight: 700; padding: 12px; border-radius: 9px; margin-bottom: 8px; cursor: pointer; text-align: left; }
.wallet-option svg { flex-shrink: 0; color: var(--accent); }
.wallet-option:hover { border-color: var(--accent-strong); }

.auth-card form { display: flex; flex-direction: column; gap: 8px; }
.auth-card label { font-size: 12.5px; color: var(--text-2); margin-top: 4px; font-weight: 600; }
.auth-card input { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 11px; color: var(--text-0); font-size: 14.5px; }
.auth-card input:focus { outline: none; border-color: var(--accent-strong); }
.auth-card input.field-invalid { border-color: var(--down); background: rgba(246, 70, 93, 0.08); }
.auth-submit { margin-top: 10px; background: var(--accent); color: #fff; border: none; border-radius: 9px; padding: 12px; font-weight: 800; font-size: 14.5px; cursor: pointer; }
.auth-submit:hover { background: var(--accent-hover); }
.auth-error { color: var(--down); font-size: 12.5px; margin: 0; }
.auth-switch { text-align: center; font-size: 12.5px; color: var(--text-2); margin-top: 12px; }
.auth-switch button { background: none; border: none; color: var(--accent); font-weight: 700; cursor: pointer; }
.auth-note { font-size: 11px; color: var(--text-2); line-height: 1.5; margin-top: 10px; }

/* =======================================================================
   MARKETS (own page, full table incl. real 24h volume)
   ======================================================================= */
.markets-page-main { padding: 36px 0 56px; background: var(--bg-0); }
.markets-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.markets-toolbar h1 { margin: 0; font-size: 26px; font-weight: 800; color: var(--text-0); }
.markets-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.markets-controls input {
    background: var(--bg-1); border: 1px solid var(--border); border-radius: 8px; padding: 9px 14px;
    color: var(--text-0); font-size: 13px; width: 230px;
}
.markets-controls input::placeholder { color: var(--text-2); }
.filter-pill { background: var(--bg-1); border: 1px solid var(--border); color: var(--text-1); font-weight: 700; font-size: 12.5px; padding: 9px 14px; border-radius: 8px; cursor: pointer; }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.markets-table-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.markets-full-table { width: 100%; border-collapse: collapse; }
.markets-full-table thead th {
    text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2);
    font-weight: 700; padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.markets-full-table thead th:not(:first-child) { text-align: right; }
.markets-full-table thead th:last-child { text-align: center; }
.markets-full-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.markets-full-table tr:last-child td { border-bottom: none; }
.markets-full-table tr:hover td { background: var(--bg-2); }
.markets-full-table td:not(:first-child) { text-align: right; }
.markets-full-table td:last-child { text-align: center; }
.mkt-action-btn { background: var(--accent-dim); border: 1px solid var(--accent-strong); color: var(--accent); font-weight: 700; font-size: 12px; padding: 7px 16px; border-radius: 7px; cursor: pointer; }
.mkt-action-btn:hover { background: var(--accent); color: #fff; }

/* =======================================================================
   EARN & REWARDS — Vorschau (no backend yet: no fabricated numbers,
   no fake balances/points; everything that isn't live is labeled clearly).
   ======================================================================= */
.preview-page-main { padding: 36px 0 60px; background: var(--bg-0); }
.preview-header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.preview-header h1 { margin: 0; font-size: 26px; font-weight: 800; color: var(--text-0); }
.preview-badge {
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
    background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(240, 185, 11, 0.4);
    border-radius: 999px; padding: 4px 11px;
}
.preview-note { color: var(--text-1); font-size: 14px; max-width: 640px; margin: 0 0 32px; line-height: 1.6; }

.stat-cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card-ghost { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 22px; text-align: center; }
.stat-card-ghost .v { font-size: 24px; font-weight: 800; color: var(--text-2); }
.stat-card-ghost .l { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 8px; }

.pool-card-ghost {
    background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px;
    display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap;
}
.pool-card-ghost .pool-id { display: flex; align-items: center; gap: 14px; }
.pool-icons { display: flex; }
.pool-icon { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--bg-1); margin-left: -10px; flex-shrink: 0; }
.pool-icon:first-child { margin-left: 0; }
.pool-icon img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pool-id strong { font-size: 15px; font-weight: 700; color: var(--text-0); display: block; }
.pool-id span { font-size: 12px; color: var(--text-2); }
.pool-apy-ghost { text-align: right; }
.pool-apy-ghost .v { font-size: 13px; font-weight: 700; color: var(--text-2); }
.pool-apy-ghost .l { font-size: 10px; color: var(--text-2); text-transform: uppercase; }
.btn-ghost-disabled {
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2);
    font-weight: 700; font-size: 12.5px; padding: 9px 18px; border-radius: 8px; cursor: not-allowed;
}

/* Rewards tabs */
.rw-tabs { display: flex; gap: 4px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.rw-tabs button { padding: 10px 18px; font-size: 13px; font-weight: 700; color: var(--text-1); border-radius: 7px; background: transparent; border: none; cursor: pointer; }
.rw-tabs button:hover { color: var(--text-0); }
.rw-tabs button.active { background: var(--accent); color: #fff; }
.rw-tab-content { display: none; }
.rw-tab-content.active { display: block; }

.rw-hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.rw-stat-ghost { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.rw-stat-ghost .label { font-size: 10.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.rw-stat-ghost .value { font-size: 24px; font-weight: 800; color: var(--text-2); }

.preview-empty-card {
    background: var(--bg-1); border: 1px dashed var(--border-strong); border-radius: 12px;
    padding: 48px 24px; text-align: center; color: var(--text-1); font-size: 14px; line-height: 1.7;
}
.preview-empty-card strong { color: var(--text-0); display: block; margin-bottom: 8px; font-size: 15px; }

/* =======================================================================
   REWARDS (real) — missions, shop, leaderboard, history, profile card.
   ======================================================================= */
.rw-profile-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.rw-profile-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--text-0); }
.rw-name-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rw-name-row input {
    flex: 1 1 220px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 9px 12px; color: var(--text-0); font-size: 13.5px;
}
.rw-name-row input:focus { outline: none; border-color: var(--accent-strong); }

.mission-card-real {
    background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px;
    margin-bottom: 10px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.mission-icon-lg { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-dim); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.mission-body { flex: 1; min-width: 200px; }
.mission-body h4 { font-size: 14px; font-weight: 700; margin: 0 0 4px; color: var(--text-0); }
.mission-body p { font-size: 12.5px; color: var(--text-1); margin: 0; line-height: 1.5; }
.mission-reward-side { text-align: right; flex-shrink: 0; }
.mission-reward-pts { font-size: 14px; font-weight: 800; color: var(--warn); margin-bottom: 8px; }
.mission-claim-btn { padding: 8px 16px; border-radius: 7px; font-size: 12.5px; font-weight: 700; background: var(--up); color: #06281a; border: none; cursor: pointer; }
.mission-claim-btn:hover:not(:disabled) { filter: brightness(1.08); }
.mission-claim-btn:disabled { background: var(--bg-3); color: var(--text-2); cursor: not-allowed; }
.mission-claim-btn.claimed { background: var(--up-bg); color: var(--up); }

.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shop-item { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: .2s; }
.shop-item:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.shop-icon { font-size: 32px; margin-bottom: 10px; }
.shop-item h4 { font-size: 14px; font-weight: 700; margin: 0 0 6px; color: var(--text-0); }
.shop-item p { font-size: 12.5px; color: var(--text-1); margin: 0 0 14px; line-height: 1.5; min-height: 36px; }
.shop-price { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: var(--warn); margin-bottom: 12px; }
.shop-btn { width: 100%; padding: 10px; border-radius: 7px; font-size: 12.5px; font-weight: 700; background: var(--accent); color: #fff; border: none; cursor: pointer; }
.shop-btn:hover:not(:disabled) { background: var(--accent-hover); }
.shop-btn:disabled { background: var(--bg-3); color: var(--text-2); cursor: not-allowed; }
.shop-btn.owned { background: var(--up-bg); color: var(--up); }

.lb-table { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.lb-hdr-row { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.lb-hdr-row h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text-0); }
.lb-item { display: grid; grid-template-columns: 50px 1fr 100px; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); align-items: center; }
.lb-item:last-child { border-bottom: none; }
.lb-rank-big { font-size: 15px; font-weight: 800; color: var(--text-2); }
.lb-rank-big.rank-1 { color: var(--warn); } .lb-rank-big.rank-2 { color: #C0C0C0; } .lb-rank-big.rank-3 { color: #CD7F32; }
.lb-user-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.lb-avatar-sm.has-frame { box-shadow: 0 0 0 2px var(--warn); }
.lb-pts-big { font-size: 13.5px; font-weight: 700; color: var(--text-0); text-align: right; }

.history-list { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.history-item:last-child { border-bottom: none; }
.history-item .info { display: flex; align-items: center; gap: 12px; }
.history-item .info-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--warn-bg); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.history-item .title { font-size: 12.5px; font-weight: 600; color: var(--text-0); }
.history-item .time { font-size: 10.5px; color: var(--text-2); margin-top: 2px; }
.history-item .amt { font-size: 13.5px; font-weight: 800; color: var(--warn); flex-shrink: 0; }

/* Global toast, used by account.js's showStatus() on pages without Spot's
   own inline status strip (index/markets/earn/rewards). */
.global-status-msg {
    position: fixed; bottom: 20px; right: 20px; max-width: 360px; z-index: 500;
    background: var(--bg-1); border: 1px solid var(--border-strong); border-radius: 10px;
    padding: 13px 16px; font-size: 13px; color: var(--text-0); box-shadow: 0 12px 32px rgba(0,0,0,.5);
    opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s;
}
.global-status-msg.show { opacity: 1; transform: translateY(0); }
.global-status-msg.is-error { border-color: var(--down); color: var(--down); }

/* =======================================================================
   EARN (real) — Aave V3 USDC market, deposit/withdraw flow.
   ======================================================================= */
.earn-market-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 22px; margin-bottom: 20px; }
.earn-market-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.earn-apy-block .label { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.earn-apy-block .value { font-size: 34px; font-weight: 800; color: var(--up); letter-spacing: -0.01em; }
.earn-apy-block .asof { font-size: 10.5px; color: var(--text-2); margin-top: 2px; }
.earn-flag { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; margin: 2px 4px 2px 0; }
.earn-flag-ok { background: var(--up-bg); color: var(--up); }
.earn-flag-warn { background: var(--warn-bg); color: var(--warn); }
.earn-flag-bad { background: var(--down-bg); color: var(--down); }
.earn-flag-unknown { background: var(--bg-2); color: var(--text-2); }
.earn-market-meta { display: flex; gap: 28px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-1); padding-top: 14px; border-top: 1px solid var(--border); }
.earn-market-meta strong { color: var(--text-0); display: block; margin-top: 2px; }
.earn-explainer { font-size: 12.5px; color: var(--text-1); line-height: 1.6; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

.earn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.earn-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.earn-card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--text-0); }
.earn-amount-row { display: flex; gap: 8px; margin-bottom: 12px; }
.earn-amount-row input {
    flex: 1; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 11px 13px; color: var(--text-0); font-size: 16px; font-weight: 600;
}
.earn-amount-row input:focus { outline: none; border-color: var(--accent-strong); }
.earn-amount-row span { display: flex; align-items: center; padding: 0 10px; font-weight: 700; color: var(--text-1); font-size: 13px; }
.earn-btn-row { display: flex; gap: 8px; }
.earn-btn-row .btn-pill-solid, .earn-btn-row .btn-pill-outline { flex: 1; text-align: center; padding: 11px; }
.earn-position-value { font-size: 26px; font-weight: 800; color: var(--text-0); }
.earn-position-sub { font-size: 12.5px; color: var(--text-1); margin-top: 6px; }
.earn-empty { color: var(--text-2); font-size: 13px; line-height: 1.6; }
.earn-empty.is-error { color: var(--down); }
.earn-msg { font-size: 12.5px; color: var(--text-1); margin-top: 14px; min-height: 18px; line-height: 1.6; }
.earn-msg.is-error { color: var(--down); }

/* =======================================================================
   REWARDS V2 — avatar/frame/badge rendering, mission states, inventory,
   leaderboard participation, history filters, shared loading/error states.
   ======================================================================= */
.rwx-avatar {
    position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--bg-2);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
    color: var(--text-0); flex-shrink: 0; box-shadow: 0 0 0 3px var(--frame-color, transparent);
}
.rwx-avatar.sm { width: 32px; height: 32px; font-size: 12px; box-shadow: 0 0 0 2px var(--frame-color, transparent); }
.rwx-avatar-badge {
    position: absolute; bottom: -2px; right: -2px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent); color: #fff; font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-1);
}
.rwx-avatar.sm .rwx-avatar-badge { width: 14px; height: 14px; font-size: 8px; border-width: 1.5px; bottom: -1px; right: -1px; }

.rwx-profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.rwx-profile-name { font-size: 17px; font-weight: 800; color: var(--text-0); }
.rwx-profile-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.rwx-profile-stats { display: flex; gap: 28px; margin-left: auto; flex-wrap: wrap; }
.rwx-profile-stats .v { font-size: 20px; font-weight: 800; color: var(--text-0); }
.rwx-profile-stats .l { font-size: 10.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

.rwx-next-advantage {
    background: var(--accent-dim); border: 1px solid var(--accent-strong); border-radius: 10px;
    padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.rwx-next-advantage .label { font-size: 13px; color: var(--text-0); font-weight: 700; }
.rwx-next-advantage .sub { font-size: 11.5px; color: var(--text-1); margin-top: 2px; }

.rwx-guest-cta { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.rwx-state { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; flex-shrink: 0; }
.rwx-state.available { background: var(--accent-dim); color: var(--accent); }
.rwx-state.pending { background: var(--warn-bg); color: var(--warn); }
.rwx-state.done { background: var(--up-bg); color: var(--up); }
.mission-card-real .mission-body h4 { display: flex; align-items: center; gap: 8px; }

.rwx-section-title { font-size: 13px; font-weight: 800; color: var(--text-0); text-transform: uppercase; letter-spacing: 0.04em; margin: 28px 0 12px; }
.rwx-section-title:first-child { margin-top: 0; }

.rwx-inventory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.rwx-inv-item { background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
.rwx-inv-item.is-equipped { border-color: var(--accent-strong); }
.rwx-inv-item .lbl { font-size: 11.5px; font-weight: 700; color: var(--text-0); margin: 10px 0 10px; }
.rwx-inv-btn { width: 100%; padding: 7px; border-radius: 6px; font-size: 11px; font-weight: 700; border: 1px solid var(--border-strong); background: transparent; color: var(--text-1); cursor: pointer; }
.rwx-inv-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.rwx-inv-empty { color: var(--text-2); font-size: 12.5px; grid-column: 1 / -1; }

.rwx-participation {
    background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px 16px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.rwx-participation .name-input {
    background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 12px; color: var(--text-0); font-size: 13px; width: 200px;
}
.rwx-own-rank-row { background: var(--accent-dim) !important; border-color: var(--accent-strong) !important; }

.rwx-filter-row { display: flex; gap: 8px; margin-bottom: 14px; }
.rwx-filter-btn { background: var(--bg-1); border: 1px solid var(--border); color: var(--text-1); font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.rwx-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.rwx-load-more { width: 100%; margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--bg-1); border: 1px solid var(--border); color: var(--text-1); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.rwx-load-more:hover { border-color: var(--accent-strong); color: var(--accent); }

.rwx-error-card { background: var(--down-bg); border: 1px solid rgba(246, 70, 93, 0.35); border-radius: 10px; padding: 24px; text-align: center; color: var(--text-0); font-size: 13.5px; }
.rwx-error-card button { margin-top: 12px; }
.rwx-loading-card { color: var(--text-2); font-size: 13px; padding: 24px; text-align: center; }

@media (max-width: 640px) {
    .rwx-profile-stats { margin-left: 0; gap: 18px; }
    .rwx-inventory-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ---- Responsive ---- */
/* Between full mobile stacking (<=1080px) and comfortable 3-column space,
   the fixed clamp() widths for Marktliste/Swap-Formular leave too little
   room for the chart - narrow both side columns with fixed px values. */
@media (max-width: 1300px) and (min-width: 1081px) {
    .spot-grid-3 { grid-template-columns: 280px minmax(0, 1fr) 300px; }
}

@media (max-width: 1080px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding: 40px 0 32px; gap: 28px; }
    .hero-text { max-width: 100%; margin: 0 auto; }
    .hero-badge, .hero-stats { justify-content: center; }
    .hero-ctas { justify-content: center; }
    .hero-visual { order: -1; }
    .price-preview-card { max-width: 420px; margin: 0 auto; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .stats-band-inner { grid-template-columns: 1fr 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .stat-cards-row, .rw-hero-stats { grid-template-columns: 1fr 1fr; }
    .earn-grid, .shop-grid { grid-template-columns: 1fr; }

    /* Die Kopfzeile (Paar/Kurs/24h/Hoch-Tief) steht bereits außerhalb des
       Grids und bleibt damit immer an erster Stelle. Darunter müssen
       Betrag/Token/Netzwerk/Aktion (das Swap-Formular) direkt erreichbar
       sein, vor dem Chart; die Marktliste wird zu einem aufklappbaren
       Auswahlbereich und rutscht ganz nach unten. */
    .spot-grid-3 { display: flex; flex-direction: column; }
    .tauschen-card { order: 1; }
    .chart-card { order: 2; height: 420px; }
    .watchlist-card { order: 3; height: auto; }

    /* Marktliste auf dem Handy: aufklappbarer Auswahlbereich statt fixer
       640px-Spalte. Der <summary>-Trigger wird sichtbar (auf dem Desktop
       ist er ausgeblendet, siehe Basisregeln), der Inhalt folgt dem
       nativen [open]-Zustand - rein per CSS, ohne JS. */
    .mobile-market-details > summary {
        display: flex; align-items: center; justify-content: space-between;
        list-style: none; cursor: pointer; user-select: none;
        padding: 12px 14px; font-size: 13px; font-weight: 700; color: var(--text-0);
    }
    .mobile-market-details > summary::-webkit-details-marker { display: none; }
    .watchlist-inner { height: auto; max-height: 380px; overflow-y: auto; }
    .watchlist-inner .panel-title { display: none; }

    .spark-col, .mt-spark { display: none; }
}

@media (max-width: 640px) {
    .landing-header { padding: 12px 18px; }
    .landing-header-right { gap: 6px; }
    .btn-pill-outline, .btn-pill-solid { padding: 8px 13px; font-size: 12.5px; }
    .btn-text-link { font-size: 12.5px; }

    .hero-sub { font-size: 15px; }
    .hero-ctas { flex-direction: column; }
    /* flex-basis is a HEIGHT in a column flex container, not a width - the
       desktop rule's "flex: 1 1 200px" would otherwise make each button
       ~200px tall once the direction flips. Reset to natural content height. */
    .btn-cta-equal { width: 100%; flex: 0 0 auto; }
    .hero-stats { gap: 22px; }

    .activity-row { gap: 20px; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-band-inner { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .stat-cards-row, .rw-hero-stats { grid-template-columns: 1fr; }
    .pool-card-ghost { flex-direction: column; align-items: flex-start; }

    .spot-header-bar { gap: 14px; padding: 14px 16px; }
    .pair-stats { gap: 14px; }
    .chart-card { height: 360px; }
}
