:root {
    --bg: #0a0a0a;
    --bg2: #0f0f0f;
    --bg3: #141414;
    --cream: #f0ebe0;
    --cream2: #e8e2d6;
    --surface: #161616;
    --surface2: #1e1e1e;
    --border: rgba(255,255,255,0.07);
    --border2: rgba(255,255,255,0.12);
    --accent: #00e5a0;
    --accent-dim: rgba(0,229,160,0.08);
    --accent-border: rgba(0,229,160,0.2);
    --accent-glow: rgba(0,229,160,0.15);
    --text: #f0f0f0;
    --text2: #777;
    --text3: #333;
    --text-cream: #1a1a1a;
    --text-cream2: #555;
    --danger: #ff4d4d;
    --panel-h: 88px;
    --font: 'Space Grotesk', sans-serif;
    --mono: 'Geist Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    overflow-x: hidden;
    padding-bottom: calc(var(--panel-h) + 20px);
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════
   NAV
══════════════════════════════ */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 500;
    height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px;
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    font-size: 15px; font-weight: 800;
    letter-spacing: -0.02em; color: var(--text);
    text-decoration: none;
}
.nav-brand em { color: var(--accent); font-style: normal; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
    font-size: 12px; font-weight: 500;
    letter-spacing: 0.06em; color: var(--text2);
    text-decoration: none; text-transform: uppercase;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
    height: 32px; padding: 0 16px;
    background: var(--accent); color: #000 !important;
    border-radius: 6px; font-weight: 800 !important;
    font-size: 12px !important; letter-spacing: 0.04em !important;
    transition: box-shadow 0.2s !important;
    display: inline-flex; align-items: center;
}
.nav-cta:hover { box-shadow: 0 0 16px rgba(0,229,160,0.4) !important; }

@media (max-width: 640px) {
    nav { padding: 0 20px; }
    .nav-links a:not(.nav-cta) { display: none; }
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
    position: relative;
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
    padding: 200px 48px 120px;
    overflow: hidden;
}

/* ═══ HERO DOT GRID (graph paper style) ═══ */
.hero-dot-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.2;
    background-image:
            radial-gradient(circle, rgba(255,255,255,0.8) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 10%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 10%, transparent 80%);
}

.pattern-glow, .pattern-pills {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}
.pattern-glow { z-index: 0; }
.pattern-pills { z-index: 1; }

.hero-inner {
    position: relative; z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1400px;
    width: 100%;
    align-items: center;
}

.hero-content {
    display: flex; flex-direction: column;
    align-items: flex-start;
}

.hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.18em; color: var(--accent);
    text-transform: uppercase; margin-bottom: 28px;
    opacity: 0; animation: rise 0.8s ease 0.1s forwards;
}

.htag-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent); animation: pdot 2s ease infinite;
}
@keyframes pdot { 0%,100%{opacity:1} 50%{opacity:0.3} }

.hero-h1 {
    font-size: clamp(56px, 7vw, 96px);
    font-weight: 300; line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    opacity: 0; animation: rise 0.8s ease 0.15s forwards;
    text-align: left;
}

.hero-h1 .g { color: var(--accent); }
.hero-h1 .d { color: rgba(255,255,255,0.9); }

.hero-sub {
    font-size: 16px; font-weight: 400;
    line-height: 1.65; color: var(--text2);
    max-width: 440px; margin-bottom: 36px;
    opacity: 0; animation: rise 0.8s ease 0.25s forwards;
    text-align: left;
}

.hero-btns {
    display: flex; gap: 12px; flex-wrap: wrap;
    opacity: 0; animation: rise 0.8s ease 0.35s forwards;
}

/* HERO WIDGET CARD */
.hero-widget {
    position: relative;
    opacity: 0; animation: rise 0.8s ease 0.3s forwards;
}
.hero-widget-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 20px;
    padding: 28px;
    z-index: 5;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    overflow: visible;
}

/* ═══ PATTERN INSIDE WIDGET CARD ═══ */
.hero-widget-card .hw-card-pattern {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.hero-widget-card .hw-card-pattern canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero-widget-card .hw-card-pattern .card-glow { z-index: 0; }
.hero-widget-card .hw-card-pattern .card-pills { z-index: 1; }

/* All card children above the pattern */
.hero-widget-card > *:not(.hw-card-pattern) { position: relative; z-index: 1; }

/* Pattern moved inside .hero-widget-card via CSS pseudo-elements */
.hw-group { margin-bottom: 14px; }
.hw-label {
    font-size: 9px; font-weight: 600;
    letter-spacing: 0.18em; color: #888;
    text-transform: uppercase; margin-bottom: 6px;
}
.hw-row { display: flex; gap: 8px; }
.hw-input {
    flex: 1; background: #222;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 12px 14px;
    font-family: var(--mono); font-size: 18px; font-weight: 500;
    color: var(--text); outline: none;
    transition: border-color 0.2s; height: 48px;
}
.hw-input:focus { border-color: var(--accent-border); }
.hw-input::placeholder { color: #555; }
.hw-coin {
    display: flex; align-items: center; gap: 6px;
    background: #1e1e1e; border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 0 14px; height: 48px;
    cursor: pointer; flex-shrink: 0;
    transition: border-color 0.2s; position: relative;
}
.hw-coin:hover { border-color: var(--accent-border); }
.hw-coin-ticker { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; }
.hw-coin-chev { color: #666; margin-left: 2px; }
.hw-coin-icon {
    width: 22px; height: 22px; border-radius: 50%;
    background: #2a2a2a; display: flex; align-items: center;
    justify-content: center; font-size: 8px; font-weight: 700; overflow: hidden;
}
.hw-coin-icon img { width: 100%; height: 100%; object-fit: cover; }
.hw-swap-row {
    display: flex; align-items: center; justify-content: center; padding: 4px 0;
}
.hw-swap-btn {
    width: 32px; height: 32px; background: #222;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #888; transition: all 0.2s;
}
.hw-swap-btn:hover { border-color: var(--accent-border); color: var(--accent); transform: rotate(180deg); }
.hw-rate {
    font-family: var(--mono); font-size: 12px; color: var(--text2);
    margin-bottom: 16px; min-height: 18px;
}
.hw-addr {
    width: 100%; background: #222;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 12px 14px;
    font-family: var(--mono); font-size: 13px; color: var(--text);
    outline: none; transition: border-color 0.2s; height: 48px;
}
.hw-addr:focus { border-color: var(--accent-border); }
.hw-addr::placeholder { color: #555; }
.hw-go {
    width: 100%; height: 48px;
    background: var(--accent); color: #000;
    border: none; border-radius: 12px;
    font-family: var(--font); font-size: 14px; font-weight: 700;
    letter-spacing: 0.04em; cursor: pointer;
    transition: all 0.2s; margin-top: 16px;
}
.hw-go:hover { box-shadow: 0 0 24px rgba(0,229,160,0.35); }
.hw-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0;
    width: 240px; background: var(--surface);
    border: 1px solid var(--border2); border-radius: 10px;
    z-index: 999; display: none;
    box-shadow: 0 16px 48px rgba(0,0,0,0.8); overflow: hidden;
}
.hw-dropdown.open { display: block; }
.hw-coin:has(.hw-dropdown.open) { z-index: 100; }
.hw-group:has(.hw-dropdown.open) { z-index: 100; }
.hw-row:has(.hw-dropdown.open) { z-index: 100; position: relative; }

/* Bottom panel hidden by default */
.panel-wrap {
    position: fixed; bottom: 16px;
    left: 50%; transform: translateX(-50%) translateY(120px);
    width: calc(100% - 48px); max-width: 1400px;
    z-index: 1000; perspective: 1200px;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
    opacity: 0; pointer-events: none;
}
.panel-wrap.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1; pointer-events: all;
}

@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding: 100px 24px 40px; min-height: auto; }
    .hero-content { align-items: center; text-align: center; }
    .hero-h1 { text-align: center; }
    .hero-sub { text-align: center; }
    .hero-btns { justify-content: center; }
}

.btn-g {
    height: 46px; padding: 0 26px;
    background: var(--accent); color: #000;
    border: none; border-radius: 100px;
    font-family: var(--font); font-size: 13px; font-weight: 700;
    letter-spacing: 0.04em; cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
    transition: all 0.2s;
}
.btn-g:hover { box-shadow: 0 0 28px rgba(0,229,160,0.4); }

.btn-o {
    height: 46px; padding: 0 26px;
    background: transparent; color: var(--text2);
    border: 1px solid var(--border2); border-radius: 100px;
    font-family: var(--font); font-size: 13px; font-weight: 500;
    cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all 0.2s; letter-spacing: 0.04em;
}
.btn-o:hover { color: var(--text); border-color: var(--text3); }

/* ══════════════════════════════
   LOGO BAR
══════════════════════════════ */
.logo-bar {
    position: relative; z-index: 1;
    border-top: 1px solid var(--border);
    padding: 40px 48px;
    display: flex; align-items: center; justify-content: center;
    gap: 48px; flex-wrap: wrap;
    background: var(--bg);
}

.logo-item {
    font-size: 15px; font-weight: 600;
    color: var(--text3); letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ══════════════════════════════
   STATS
══════════════════════════════ */
.stats-section {
    position: relative; z-index: 1;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

#rainCanvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none; opacity: 0.35;
}

.stats-inner {
    position: relative; z-index: 2;
    max-width: 1400px; margin: 0 auto;
    padding: 140px 48px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.stat-col {
    padding: 0 48px;
    border-right: 1px solid var(--border);
}
.stat-col:first-child { padding-left: 0; }
.stat-col:last-child { border-right: none; }

.stat-label {
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.2em; color: var(--text2);
    text-transform: uppercase; margin-bottom: 16px;
}

.stat-num {
    font-size: clamp(56px, 7vw, 88px);
    font-weight: 800; line-height: 1;
    letter-spacing: -0.04em; color: var(--text);
}

@media (max-width: 768px) {
    .stats-inner { grid-template-columns: 1fr; padding: 48px 24px; gap: 40px; }
    .stat-col { padding: 0; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 40px; }
    .stat-col:last-child { border-bottom: none; padding-bottom: 0; }
}

/* ══════════════════════════════
   MARQUEE
══════════════════════════════ */
.marquee {
    position: relative; z-index: 1;
    border-bottom: 1px solid var(--border);
    padding: 18px 0; overflow: hidden;
    background: var(--bg);
}

.marquee-track {
    display: flex; gap: 40px;
    animation: mq 28s linear infinite;
    width: max-content;
}

@keyframes mq { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

.mq-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.18em; color: var(--text3);
    text-transform: uppercase; flex-shrink: 0;
}
.mq-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: 0.5; }

/* ══════════════════════════════
   HOW IT WORKS
══════════════════════════════ */
.section-wrap {
    position: relative; z-index: 1;
    max-width: 1340px; margin: 0 auto;
    padding: 160px 48px;
}
@media (max-width: 768px) { .section-wrap { padding: 60px 24px; } }

.s-eyebrow {
    font-size: 10px; font-weight: 600;
    letter-spacing: 0.2em; color: var(--accent);
    text-transform: uppercase; margin-bottom: 20px;
    display: block;
}

.s-h2 {
    font-size: clamp(48px, 6vw, 88px);
    font-weight: 300; line-height: 0.95;
    letter-spacing: -0.03em; margin-bottom: 20px;
}

.s-sub {
    font-size: 16px; font-weight: 400;
    color: var(--text2); line-height: 1.65;
    max-width: 500px;
}

.how-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px; margin-top: 56px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden;
}

.how-card {
    background: var(--bg2);
    padding: 0 0 28px;
    transition: background 0.2s;
}
.how-card:hover { background: var(--bg3); }

.how-card-canvas-wrap {
    width: 100%; height: 180px;
    position: relative; overflow: hidden;
    margin-bottom: 24px;
}

.how-card-canvas-wrap canvas {
    width: 100%; height: 100%;
}

.how-card-body { padding: 0 28px; }

.how-num {
    font-size: 10px; font-weight: 600;
    letter-spacing: 0.15em; color: var(--text3);
    margin-bottom: 10px;
}

.how-title {
    font-size: 18px; font-weight: 700;
    letter-spacing: -0.02em; margin-bottom: 8px;
}

.how-desc { font-size: 13px; color: var(--text2); line-height: 1.65; }

@media (max-width: 768px) { .how-cards { grid-template-columns: 1fr; } }

/* ══════════════════════════════
   FEATURES
══════════════════════════════ */
.feat-list {
    margin-top: 56px;
    border-top: 1px solid var(--border);
}

.feat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border);
}

.feat-cell {
    padding: 28px 0;
    display: flex; align-items: flex-start; gap: 20px;
    border-right: 1px solid var(--border);
    transition: background 0.2s;
}
.feat-cell:last-child { border-right: none; padding-left: 40px; }
.feat-cell:hover { background: rgba(255,255,255,0.02); }

.feat-icon-wrap {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--surface2);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}

.feat-name {
    font-size: 15px; font-weight: 600;
    letter-spacing: -0.01em; margin-bottom: 6px;
}

.feat-desc { font-size: 13px; color: var(--text2); line-height: 1.6; }

@media (max-width: 640px) {
    .feat-row { grid-template-columns: 1fr; }
    .feat-cell:last-child { padding-left: 0; border-right: none; border-top: 1px solid var(--border); }
}

/* ══════════════════════════════
   CREAM SECTION
══════════════════════════════ */
.cream-section {
    position: relative; z-index: 1;
    background: var(--cream);
    color: var(--text-cream);
    overflow: hidden;
}

.cream-inner {
    max-width: 1340px; margin: 0 auto;
    padding: 160px 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px; align-items: start;
}

.cream-left {}

.cream-eyebrow {
    font-size: 10px; font-weight: 600;
    letter-spacing: 0.2em; color: #b05a2a;
    text-transform: uppercase; margin-bottom: 20px;
    display: block;
}

.cream-h2 {
    font-size: clamp(52px, 7vw, 96px);
    font-weight: 300; line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--text-cream);
}

.cream-list { margin-top: 48px; }

.cream-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px; padding: 24px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    align-items: start;
}
.cream-item:first-child { border-top: 1px solid rgba(0,0,0,0.08); }

.cream-item-title {
    font-size: 15px; font-weight: 700;
    letter-spacing: -0.01em; color: var(--text-cream);
}

.cream-item-desc {
    font-size: 14px; color: var(--text-cream2); line-height: 1.65;
}

.cream-pattern-left {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 50%;
    overflow: hidden;
    pointer-events: none;
}
.cream-pattern-left .pattern-glow,
.cream-pattern-left .pattern-pills {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
}
.cream-pattern-left .pattern-glow { z-index: 0; }
.cream-pattern-left .pattern-pills { z-index: 1; }
.cream-left { position: relative; z-index: 3; }
.cream-inner { position: relative; z-index: 3; }

@media (max-width: 900px) {
    .cream-inner { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 640px) { .cream-inner { padding: 60px 24px; } }

/* ══════════════════════════════
   CTA
══════════════════════════════ */
.cta-section {
    position: relative; z-index: 1;
    text-align: center; padding: 180px 24px;
}

.cta-section .s-eyebrow { text-align: center; }
.cta-section .s-h2 { margin-bottom: 16px; }
.cta-section .s-sub { margin: 0 auto 40px; text-align: center; }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.footer-wrap {
    position: relative; z-index: 1;
    border-top: 1px solid var(--border);
    overflow: hidden;
}

.footer-wrap .pattern-pills {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none; opacity: 0.4;
    z-index: 0;
}

.footer-inner {
    position: relative; z-index: 2;
    max-width: 1340px; margin: 0 auto;
    padding: 64px 48px 32px;
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 48px; align-items: start;
}

.footer-brand {
    font-size: 16px; font-weight: 800;
    letter-spacing: -0.02em;
}
.footer-brand em { color: var(--accent); font-style: normal; }

.footer-col {}

.footer-col-title {
    font-size: 10px; font-weight: 600;
    letter-spacing: 0.15em; color: var(--text3);
    text-transform: uppercase; margin-bottom: 16px;
}

.footer-col a {
    display: block; font-size: 13px; color: var(--text2);
    text-decoration: none; margin-bottom: 10px;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
    position: relative; z-index: 2;
    border-top: 1px solid var(--border);
    padding: 20px 48px;
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1340px; margin: 0 auto;
}

.footer-copy { font-size: 11px; color: var(--text3); letter-spacing: 0.06em; }

@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr 1fr; padding: 40px 24px 24px; }
    .footer-bottom { padding: 16px 24px; }
}

/* ══════════════════════════════
   STICKY BOTTOM PANEL
══════════════════════════════ */

.panel-flipper {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
}

.panel-flipper.flipped {
    transform: rotateX(180deg);
}

.panel-front,
.panel-back {
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
}

.panel-front { overflow: visible; }
.panel-back { overflow: hidden; }

.panel-back {
    position: absolute;
    top: 0; left: 0;
    transform: rotateX(180deg);
}

.panel-front {
    background: #141414;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 -4px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
}

.panel-front-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    height: var(--panel-h);
}

.p-char {
    width: 44px; height: 44px; flex-shrink: 0;
}
.p-char svg { width: 44px; height: 44px; }

.p-group {
    display: flex; flex-direction: column; gap: 3px;
    flex: 1; min-width: 0;
}

.p-label {
    font-size: 9px; font-weight: 600;
    letter-spacing: 0.18em; color: #888;
    text-transform: uppercase;
}

.p-row {
    display: flex; align-items: center; gap: 8px;
}

.p-input {
    background: #222;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: var(--mono);
    font-size: 16px; font-weight: 500;
    color: #f0f0f0;
    width: 100%; outline: none;
    transition: border-color 0.2s;
    height: 38px;
}
.p-input:focus { border-color: var(--accent-border); }
.p-input::placeholder { color: #666; font-size: 14px; }

.p-coin {
    display: flex; align-items: center; gap: 6px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 0 10px;
    height: 38px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
}
.p-coin:hover { border-color: var(--accent-border); }

.p-coin-icon {
    width: 18px; height: 18px; border-radius: 50%;
    background: #2a2a2a;
    display: flex; align-items: center; justify-content: center;
    font-size: 7px; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.p-coin-icon img { width: 100%; height: 100%; object-fit: cover; }

.p-coin-ticker {
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.04em;
}

.p-coin-chev { color: #666; margin-left: 2px; }

.p-dropdown {
    position: absolute;
    bottom: calc(100% + 8px); left: 0;
    width: 240px;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 10px;
    z-index: 600; display: none;
    box-shadow: 0 -16px 48px rgba(0,0,0,0.8);
    overflow: hidden;
}
.p-dropdown.open { display: block; }

.pd-search { padding: 10px; border-bottom: 1px solid var(--border); }
.pd-search input {
    width: 100%; background: var(--surface2);
    border: 1px solid var(--border); border-radius: 7px;
    padding: 7px 10px; font-family: var(--mono);
    font-size: 12px; color: var(--text); outline: none;
}
.pd-list { max-height: 200px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--text3) transparent; }
.pd-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; cursor: pointer;
    font-size: 12px; transition: background 0.1s;
}
.pd-item:hover { background: var(--surface2); }
.pd-item-name { color: var(--text2); font-size: 10px; margin-left: auto; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.p-divider {
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    padding: 0 4px; flex-shrink: 0;
}

.p-swap-btn {
    width: 28px; height: 28px;
    background: #222;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #888; transition: all 0.2s;
}
.p-swap-btn:hover { border-color: var(--accent-border); color: var(--accent); transform: rotate(180deg); }

.p-addr-wrap {
    flex: 1.5; min-width: 0;
}

.p-addr {
    width: 100%; background: #222;
    border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
    padding: 8px 10px; font-family: var(--mono);
    font-size: 12px; color: #f0f0f0;
    outline: none; transition: border-color 0.2s;
    height: 38px;
}
.p-addr:focus { border-color: var(--accent-border); }
.p-addr::placeholder { color: #666; }

.p-action {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
}

.p-go {
    height: 44px; padding: 0 22px;
    background: var(--accent); color: #000;
    border: none; border-radius: 10px;
    font-family: var(--font); font-size: 13px; font-weight: 700;
    letter-spacing: 0.04em; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
.p-go:hover { box-shadow: 0 0 20px rgba(0,229,160,0.35); }
.p-go:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.p-error {
    position: absolute;
    bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    background: rgba(255,77,77,0.9);
    color: #fff; font-size: 11px;
    padding: 6px 14px; border-radius: 6px;
    white-space: nowrap; pointer-events: none;
    opacity: 0; transition: opacity 0.2s;
}
.p-error.show { opacity: 1; }

/* Panel cream theme */
.panel-front,
.panel-front .p-label,
.panel-front .p-input,
.panel-front .p-coin,
.panel-front .p-coin-icon,
.panel-front .p-coin-ticker,
.panel-front .p-coin-chev,
.panel-front .p-swap-btn,
.panel-front .p-addr,
.panel-front .p-go {
    transition: all 0.45s ease;
}

.panel-cream .panel-front {
    background: var(--cream);
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 -4px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.08);
}

.panel-cream .p-label { color: #777; }
.panel-cream .p-input { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.15); color: #1a1a1a; }
.panel-cream .p-input::placeholder { color: #999; }
.panel-cream .p-input:focus { border-color: rgba(0,229,160,0.5); }
.panel-cream .p-coin { background: rgba(0,0,0,0.07); border-color: rgba(0,0,0,0.15); }
.panel-cream .p-coin:hover { border-color: rgba(0,229,160,0.4); }
.panel-cream .p-coin-icon { background: rgba(0,0,0,0.1); }
.panel-cream .p-coin-ticker { color: #1a1a1a; }
.panel-cream .p-coin-chev { color: #777; }
.panel-cream .p-swap-btn { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.15); color: #777; }
.panel-cream .p-swap-btn:hover { border-color: rgba(0,229,160,0.4); color: var(--accent); }
.panel-cream .p-addr { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.15); color: #1a1a1a; }
.panel-cream .p-addr::placeholder { color: #999; }
.panel-cream .p-addr:focus { border-color: rgba(0,229,160,0.5); }
.panel-cream .p-go { background: #1a1a1a; color: var(--accent); }
.panel-cream .p-go:hover { box-shadow: 0 0 20px rgba(0,0,0,0.3); }
.panel-cream .p-expand-hint { color: #0a8a60; }
.panel-cream .p-mobile-pair { color: #1a1a1a; }
.panel-cream .p-mobile-arrow { color: #0a8a60; }
.panel-cream .p-mobile-swap { background: #1a1a1a; color: var(--accent); }
.panel-cream .p-mobile-swap:hover { box-shadow: 0 0 20px rgba(0,0,0,0.3); }
.panel-cream #pRate { color: #555 !important; }
.panel-cream #pRate span { color: #0a8a60 !important; }

/* BACK — progress */
.panel-back {
    background: var(--accent);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 -4px 60px rgba(0,229,160,0.3), 0 0 0 1px rgba(0,229,160,0.2);
}

.panel-glow {
    position: absolute; inset: 0; border-radius: 16px;
    background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.panel-back-inner {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 24px; height: var(--panel-h); position: relative;
}

.pb-char { width: 52px; height: 52px; flex-shrink: 0; position: relative; }
.pb-char svg { width: 52px; height: 52px; }
.pb-pulse {
    position: absolute; inset: -5px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.3);
    animation: pring 1.5s ease-out infinite; pointer-events: none;
}
@keyframes pring { 0%{transform:scale(0.8);opacity:0.8} 100%{transform:scale(1.8);opacity:0} }

.pb-deposit { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; min-width: 0; }
.pb-deposit-label { font-size: 9px; font-weight: 600; letter-spacing: 0.15em; color: rgba(0,0,0,0.5); text-transform: uppercase; }
.pb-deposit-addr { font-family: var(--mono); font-size: 12px; color: #000; cursor: pointer; transition: opacity 0.2s; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-deposit-addr:hover { opacity: 0.7; }
.pb-copy { font-size: 9px; color: rgba(0,0,0,0.4); }

.pb-steps { display: flex; align-items: center; gap: 0; flex: 1; }
.pb-step { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; position: relative; }
.pb-step::after { content: ''; position: absolute; top: 13px; left: 50%; right: -50%; height: 1px; background: rgba(0,0,0,0.15); z-index: 0; }
.pb-step:last-child::after { display: none; }
.pb-step.done::after { background: rgba(0,0,0,0.4); }
.pb-dot { width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: rgba(0,0,0,0.3); transition: all 0.4s; z-index: 1; position: relative; }
.pb-step.active .pb-dot { border-color: #000; color: #000; box-shadow: 0 0 12px rgba(0,0,0,0.2); background: rgba(0,0,0,0.08); }
.pb-step.done .pb-dot { background: #000; border-color: #000; color: var(--accent); }
.pb-lbl { font-size: 8px; font-weight: 600; letter-spacing: 0.1em; color: rgba(0,0,0,0.3); text-transform: uppercase; white-space: nowrap; }
.pb-step.active .pb-lbl { color: #000; }
.pb-step.done .pb-lbl { color: rgba(0,0,0,0.6); }

.pb-status { font-size: 11px; color: rgba(0,0,0,0.7); letter-spacing: 0.06em; white-space: nowrap; flex-shrink: 0; font-weight: 600; }
.pb-txid { font-family: var(--mono); font-size: 9px; color: rgba(0,0,0,0.4); white-space: nowrap; flex-shrink: 0; }

.pb-new { display: none; height: 36px; padding: 0 16px; background: #000; color: var(--accent); border: 1px solid rgba(0,0,0,0.3); border-radius: 8px; font-family: var(--font); font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.2s; flex-shrink: 0; white-space: nowrap; }
.pb-new:hover { background: rgba(0,0,0,0.85); }
.pb-new.show { display: flex; align-items: center; }

/* Character animations */
.ch-eye-l, .ch-eye-r { animation: cblink 5s infinite; transform-origin: center; }
@keyframes cblink { 0%,93%,100%{transform:scaleY(1)} 95%{transform:scaleY(0.05)} }
.c-idle .ch-body { animation: cbobn 3s ease-in-out infinite; }
@keyframes cbobn { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-2px)} }
.c-working .ch-gear { animation: cgear 0.7s linear infinite; transform-origin: center; }
@keyframes cgear { to{transform:rotate(360deg)} }
.c-success .ch-body { animation: cpop 0.5s ease; }
@keyframes cpop { 0%,100%{transform:scale(1)} 40%{transform:scale(1.12)} 70%{transform:scale(0.96)} }

/* Utils */
@keyframes rise { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }

@keyframes panelBounce {
    0%   { transform: translateX(-50%) translateY(0) scale(1); }
    12%  { transform: translateX(-50%) translateY(0) scale(1.06); }
    20%  { transform: translateX(-50%) translateY(0) scale(1.045); }
    55%  { transform: translateX(-50%) translateY(0) scale(1.045); }
    100% { transform: translateX(-50%) translateY(0) scale(1); }
}
.panel-bounce { animation: panelBounce 1.2s cubic-bezier(0.22, 1, 0.36, 1); }

.reveal { opacity:0; transform:translateY(22px); transition:opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity:1; transform:translateY(0); }
.d1{transition-delay:.1s} .d2{transition-delay:.2s} .d3{transition-delay:.3s}

/* Mobile panel */
@media (max-width: 640px) {
    :root { --panel-h: auto; }
    .panel-wrap { width: calc(100% - 24px); bottom: 12px; }
    .p-char { display: none; }
    .p-divider { display: none; }

    .panel-front-inner {
        display: flex; flex-wrap: wrap;
        height: auto; padding: 14px 16px 10px; gap: 0;
    }

    /* Mobile collapsed bar — always visible */
    .p-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 10px;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    .p-mobile-pair {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 600;
    }
    .p-mobile-pair .p-coin-icon { width: 22px; height: 22px; }
    .p-mobile-arrow { color: var(--accent); font-size: 12px; }
    .p-mobile-swap {
        height: 38px; padding: 0 20px;
        background: var(--accent); color: #000;
        border: none; border-radius: 10px;
        font-family: var(--font); font-size: 13px; font-weight: 700;
        letter-spacing: 0.04em; cursor: pointer;
        transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
    }
    .p-mobile-swap:hover { box-shadow: 0 0 20px rgba(0,229,160,0.35); }
    .panel-front.p-expanded .p-mobile-swap { display: none; }
    .panel-front.p-expanded .p-mobile-bar { border-bottom: none; margin-bottom: 4px; padding-bottom: 0; }

    /* You Send — always visible on mobile */
    .panel-front-inner > .p-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        flex: none;
        gap: 3px;
        margin-bottom: 4px;
    }
    .panel-front-inner > .p-group .p-input {
        max-width: none !important;
        font-size: 16px;
        height: 44px;
        flex: 1;
    }
    .panel-front-inner > .p-group .p-coin { height: 44px; }
    .panel-front-inner > .p-group .p-dropdown {
        left: auto !important;
        right: 0;
        max-width: calc(100vw - 60px);
    }

    /* Collapsible — grid animation, no overflow clip */
    .p-collapsible {
        display: grid;
        grid-template-rows: 0fr;
        opacity: 0;
        transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
        width: 100%;
    }
    .p-collapsible-inner {
        overflow: hidden;
    }
    .panel-front.p-expanded .p-collapsible {
        grid-template-rows: 1fr;
        opacity: 1;
    }
    .panel-front.p-expanded .p-collapsible-inner {
        overflow: visible;
    }

    /* Expanded inner layout */
    .p-collapsible-inner .p-divider {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
        padding: 6px 0;
    }
    .p-collapsible-inner .p-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        flex: none;
        gap: 3px;
        margin-bottom: 8px;
    }
    .p-collapsible-inner .p-input {
        max-width: none !important;
        font-size: 16px;
        height: 44px;
    }
    .p-collapsible-inner .p-coin {
        height: 44px;
    }
    .p-collapsible-inner .p-rate-group {
        flex: none !important;
        margin-bottom: 12px;
    }
    .p-collapsible-inner .p-rate-group .p-label {
        white-space: nowrap;
    }
    .p-collapsible-inner #pRate {
        height: auto !important;
        font-size: 12px;
    }

    .p-collapsible .p-addr-wrap { width: 100%; margin-top: 4px; margin-bottom: 10px; }
    .p-collapsible .p-addr-wrap .p-label { margin-bottom: 4px; }
    .p-collapsible .p-addr { height: 44px; font-size: 16px; padding: 10px 12px; }
    .p-collapsible .p-action { width: 100%; margin-top: 0; }
    .p-collapsible .p-go { width: 100%; height: 44px; font-size: 14px; }

    /* Prevent viewport overflow */
    .panel-front-inner { max-width: 100%; }
    .p-row { width: 100%; }
    .p-input { min-width: 0; flex: 1; }
    .p-coin { max-width: 120px; }
    .p-coin-ticker { overflow: hidden; text-overflow: ellipsis; max-width: 60px; }

    /* Dropdown positioning — keep on screen */
    .p-dropdown {
        left: auto !important;
        right: 0;
        max-width: calc(100vw - 60px);
    }
    .p-dropdown .pd-search input,
    .hw-dropdown .pd-search input {
        font-size: 16px;
    }

    /* Expand hint */
    .p-expand-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 6px 0 0;
        cursor: pointer;
        color: var(--accent);
    }
    .p-expand-chev { transition: transform 0.4s ease; }
    .panel-front.p-expanded .p-expand-chev { transform: rotate(180deg); }

    /* Cream theme mobile bar */
    .panel-cream .p-mobile-bar { border-bottom-color: rgba(0,0,0,0.08); }

    /* Panel back (progress) mobile */
    .panel-back-inner { flex-wrap: wrap; height: auto; padding: 16px; gap: 12px; }
    .pb-steps { width: 100%; }
    .pb-deposit { width: 100%; }
    .pb-deposit-addr { max-width: 100%; }
    .pb-status { display: none; }

    /* Hero mobile */
    .hero { padding: 90px 16px 32px; }
    .hero-inner { gap: 28px; }
    .hero-h1 { font-size: 38px; }
    .hero-sub { font-size: 14px; max-width: 100%; }
    .hero-tag { font-size: 9px; margin-bottom: 16px; }

    /* Hero widget mobile */
    .hero-widget { width: 100%; min-width: 0; }
    .hero-widget-card { padding: 20px; border-radius: 16px; width: 100%; box-sizing: border-box; }
    .hw-input { font-size: 16px; height: 44px; padding: 10px 12px; min-width: 0; }
    .hw-coin { height: 44px; padding: 0 10px; flex-shrink: 1; min-width: 0; }
    .hw-coin-ticker { font-size: 13px; }
    .hw-addr { height: 44px; padding: 10px 12px; font-size: 16px; width: 100%; box-sizing: border-box; }
    .hw-go { height: 44px; font-size: 13px; margin-top: 12px; }
    .hw-label { font-size: 8px; }
    .hw-rate { font-size: 11px; }
    .hw-swap-btn { width: 28px; height: 28px; }
    .hw-group { margin-bottom: 10px; }
    .hw-dropdown { width: 200px; right: 0; left: auto; }
    .hero-widget-card .hw-card-pattern { display: none; }

    /* Logo bar mobile */
    .logo-bar { padding: 16px 20px; gap: 24px; }
    .logo-item { font-size: 11px; }

    /* Stats mobile */
    .stats-inner { grid-template-columns: 1fr; padding: 40px 24px; gap: 32px; }
    .stat-col { padding: 0; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 32px; }
    .stat-col:last-child { border-bottom: none; padding-bottom: 0; }
    .stat-num { font-size: 48px; }

    /* Marquee mobile */
    .marquee { padding: 12px 0; }

    /* How it works mobile */
    .how-cards { grid-template-columns: 1fr; }

    /* Features mobile */
    .feat-row { grid-template-columns: 1fr; }
    .feat-cell:last-child { padding-left: 0; border-right: none; border-top: 1px solid var(--border); }

    /* Cream mobile */
    .cream-inner { grid-template-columns: 1fr; gap: 36px; padding: 48px 20px; }
    .cream-h2 { font-size: 32px; }
    .cream-item { grid-template-columns: 1fr; gap: 8px; }
    .cream-pattern-left { width: 100%; }

    /* CTA mobile */
    .cta-section { padding: 80px 20px; }

    /* Footer mobile */
    .footer-inner { grid-template-columns: 1fr 1fr; padding: 32px 20px 24px; gap: 32px; }
    .footer-bottom { padding: 16px 20px; flex-direction: column; gap: 8px; text-align: center; }
}

/* Extra small screens */
@media (max-width: 380px) {
    .hero-h1 { font-size: 32px; }
    .hero { padding: 80px 12px 24px; }
    .hero-widget-card { padding: 16px; }
    .hw-input { font-size: 16px; }
    .stat-num { font-size: 40px; }
    .s-h2 { font-size: 28px; }
    .cream-h2 { font-size: 28px; }
}

/* ══════════════════════════════
   STICKY WIDGET — desktop overrides
══════════════════════════════ */
@media (min-width: 641px) {
    .p-expand-hint { display: none; }
    .p-mobile-bar { display: none; }
    .p-collapsible { display: contents; }
    .p-collapsible-inner { display: contents; }
}

/* Landscape phone fix */
@media (max-width: 900px) and (orientation: landscape) {
    .hero { padding: 70px 24px 32px; }
    .hero-inner { gap: 20px; }
    .hero-h1 { font-size: 32px; margin-bottom: 12px; }
    .hero-sub { font-size: 13px; margin-bottom: 16px; }
    .hero-tag { margin-bottom: 12px; }
    .hero-widget-card { padding: 16px; }
    .hw-group { margin-bottom: 8px; }
    .hw-input, .hw-coin, .hw-addr { height: 40px; }
    .hw-go { height: 40px; margin-top: 8px; }
    .hw-swap-row { padding: 2px 0; }
}