/* ===========================================================================
   Screen-specific styles
   =========================================================================== */

/* ---------------- Splash ---------------- */
.splash {
  position: absolute; inset: 0; background: #000; z-index: 500;
  display: grid; place-items: center; overflow: hidden;
}
.splash .stage { position: relative; height: 80px; display: grid; place-items: center; width: 100%; }
.splash .word {
  position: absolute; color: #fff; font-weight: var(--fw-black);
  font-size: 40px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0;
}
.splash .word.w1 { animation: word-cycle 1s var(--ease-out) 0.15s both; }
.splash .word.w2 { animation: word-cycle 1s var(--ease-out) 1.15s both; }
.splash .word.w3 { animation: word-cycle 1s var(--ease-out) 2.15s both; }
.splash .final {
  position: absolute; color: #fff; font-weight: var(--fw-black);
  font-size: 52px; letter-spacing: 0.04em; opacity: 0; transform: scale(0.86);
  animation: final-reveal 0.9s var(--ease-out) 3.15s both;
}
@keyframes word-cycle {
  0% { opacity: 0; transform: translateY(10px); }
  22% { opacity: 1; transform: translateY(0); }
  76% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}
@keyframes final-reveal { 0% { opacity: 0; transform: scale(0.86); } 60% { opacity: 1; transform: scale(1.04); } 100% { opacity: 1; transform: scale(1); } }
.splash .tag { position: absolute; bottom: 56px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.45); font-size: var(--fs-xs); letter-spacing: 0.18em; text-transform: uppercase; opacity: 0; animation: fade-in .6s ease 3.6s both; }

/* ---------------- Welcome / auth landing ---------------- */
.welcome { justify-content: flex-end; padding: var(--s-6); gap: var(--s-4); background-size: cover; }
.welcome .hero-mark { flex: 1; display: grid; place-items: center; }
.welcome .hero-mark .mono { width: 96px; height: 96px; border-radius: 26px; background: linear-gradient(135deg, #9D4EDD, #7B2CBF); border: 1px solid rgba(157,78,221,0.4); display: grid; place-items: center; box-shadow: 0 8px 32px rgba(157,78,221,0.3); }
.welcome .hero-mark .mono span { font-size: 56px; font-weight: var(--fw-black); color: #FFFFFF; }
.welcome h1 { font-size: var(--fs-3xl); font-weight: var(--fw-black); letter-spacing: -0.02em; }
.auth-form { padding: var(--s-5); }

/* ---------------- Onboarding ---------------- */
.onb { gap: 0; }
.onb .onb-head { padding: var(--s-5) var(--s-5) var(--s-3); }
.onb .onb-body { flex: 1; padding: var(--s-4) var(--s-5); }
.onb .onb-foot { padding: var(--s-4) var(--s-5) calc(var(--s-6) + var(--safe-bottom)); }
.onb h2 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: -0.02em; margin-bottom: 6px; }
.onb .step-sub { color: var(--text-muted); margin-bottom: var(--s-5); }

.tier-card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); margin-bottom: var(--s-3); transition: border-color var(--t-fast), background var(--t-fast); }
.tier-card.selected { border-color: var(--text); background: var(--glass-bg); }
.tier-card .row { gap: var(--s-3); }
.tier-card ul { margin-top: var(--s-3); display: flex; flex-direction: column; gap: 6px; }
.tier-card ul li { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-sm); color: var(--text-muted); }
.tier-card ul li i { color: var(--color-success); margin-top: 3px; font-size: var(--fs-xs); }

/* Liveness camera */
.liveness { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); }
.cam-ring { position: relative; width: 240px; height: 240px; border-radius: 50%; overflow: hidden; background: #000; border: 2px solid var(--glass-border); }
.cam-ring video, .cam-ring canvas, .cam-ring img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-ring::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 3px solid var(--plt-gold); opacity: .0; animation: scan 2.4s linear infinite; }
@keyframes scan { 0%,100%{opacity:.0} 50%{opacity:.8} }
.cam-ring.ok::after { border-color: var(--color-success); opacity: 1; animation: none; }
.cam-ring.fail::after { border-color: var(--color-error); opacity: 1; animation: none; }
.retry-pills { display: flex; gap: 8px; }
.retry-pills .pip { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border); }
.retry-pills .pip.used { background: var(--color-error); border-color: transparent; }

/* Intro walkthrough */
.intro-slide { text-align: center; padding: var(--s-6) var(--s-4); }
.intro-slide .glyph { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; font-size: 36px; margin: 0 auto var(--s-5); background: var(--glass-bg); border: 1px solid var(--glass-border); }

/* ---------------- Home ---------------- */
.home-top { display: flex; align-items: center; justify-content: space-between; padding: var(--s-5) var(--s-5) var(--s-3); }
.home-top .who { display: flex; align-items: center; gap: var(--s-3); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-soft); display: grid; place-items: center; font-weight: var(--fw-bold); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.switcher { display: flex; gap: var(--s-2); padding: 0 var(--s-5) var(--s-3); }
.switcher .pill { height: 34px; padding: 0 var(--s-4); border-radius: var(--r-pill); background: var(--glass-bg); border: 1px solid var(--glass-border); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-muted); }
.switcher .pill.active { background: var(--text); color: var(--bg); border-color: transparent; }
.switcher .pill.gold.active { background: var(--plt-gold); color: #FFFFFF; }

.balance-card { margin: 0 var(--s-5); border-radius: var(--r-xl); padding: var(--s-6); position: relative; overflow: hidden; }
.balance-card .label { color: var(--text-muted); font-size: var(--fs-sm); display: flex; align-items: center; gap: 8px; }
.balance-card .big { font-size: var(--fs-display); font-weight: var(--fw-black); letter-spacing: -0.03em; margin-top: 6px; }
.balance-card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s-4); }
.balance-card .holder { font-size: var(--fs-sm); color: var(--text-muted); }
.balance-card .cardno { font-size: var(--fs-sm); color: var(--text-faint); letter-spacing: 0.1em; }
.eye { cursor: pointer; }

.ticker { display: flex; align-items: center; gap: 8px; margin: var(--s-3) var(--s-5) 0; padding: 10px var(--s-4); border-radius: var(--r-pill); background: var(--glass-bg); border: 1px solid var(--glass-border); font-size: var(--fs-sm); }
.ticker .up { color: var(--color-success); }
.ticker .dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: live 1.8s infinite; }
@keyframes live { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.5)} 100%{box-shadow:0 0 0 8px rgba(34,197,94,0)} }

.plt-banner { margin: var(--s-4) var(--s-5) 0; border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); display: flex; align-items: center; justify-content: space-between; background: var(--plt-gold-soft); border: 1px solid var(--plt-gold-line); }
.plt-banner .pv { font-weight: var(--fw-bold); }

/* ---------------- Virtual card (net mesh) ---------------- */
.vcard {
  position: relative; border-radius: var(--r-lg); aspect-ratio: 1.586; padding: var(--s-5);
  color: #fff; background: #000; overflow: hidden; border: 1px solid #1c1c1c;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
}
.vcard::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--card-mesh) 1px, transparent 1px), linear-gradient(90deg, var(--card-mesh) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .9; pointer-events: none;
}
.vcard.frozen { filter: grayscale(1) brightness(.7); }
.vcard .vc-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; }
.vcard .vc-logo { font-weight: var(--fw-black); letter-spacing: 0.12em; font-size: var(--fs-md); }
.vcard .vc-scheme { font-size: var(--fs-xs); color: rgba(255,255,255,.6); }
.vcard .vc-num { position: relative; font-size: var(--fs-lg); letter-spacing: 0.14em; font-variant-numeric: tabular-nums; }
.vcard .vc-bottom { position: relative; display: flex; justify-content: space-between; align-items: flex-end; }
.vcard .vc-bottom .k { font-size: 9px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 0.08em; }
.vcard .vc-bottom .v { font-size: var(--fs-sm); letter-spacing: 0.06em; }
.vcard .vc-cur { position: absolute; top: var(--s-5); right: var(--s-5); font-size: var(--fs-xs); border: 1px solid rgba(255,255,255,.3); padding: 2px 8px; border-radius: var(--r-pill); }
.card-controls { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--s-2); margin-top: var(--s-4); }
.card-controls .cc { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s-3) 0; border-radius: var(--r-md); background: var(--glass-bg); border: 1px solid var(--glass-border); font-size: var(--fs-lg); }
.card-controls .cc span { font-size: 10px; color: var(--text-muted); }

/* ---------------- Quick actions / scroll snap for cards ---------------- */
.card-deck { display: flex; gap: var(--s-4); overflow-x: auto; padding: 0 var(--s-5) var(--s-2); scroll-snap-type: x mandatory; }
.card-deck > .vcard { flex: 0 0 86%; scroll-snap-align: center; }

/* ---------------- Rewards / PLT ---------------- */
.plt-hero { margin: 0 var(--s-5); border-radius: var(--r-xl); padding: var(--s-6); text-align: center; background: linear-gradient(160deg, rgba(157,78,221,.18), rgba(157,78,221,.04)); border: 1px solid var(--plt-gold-line); }
.plt-hero .coin { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto var(--s-3); display: grid; place-items: center; font-size: 28px; color: #FFFFFF; background: radial-gradient(circle at 35% 30%, #C77DFF, var(--plt-gold)); box-shadow: 0 8px 24px rgba(157,78,221,.4); }
.plt-hero .amt { font-size: var(--fs-display); font-weight: var(--fw-black); color: var(--plt-gold); }
.reward-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--s-3); padding: var(--s-4) var(--s-5); }
.reward-tile { padding: var(--s-4); border-radius: var(--r-lg); background: var(--glass-bg); border: 1px solid var(--glass-border); }
.reward-tile i { font-size: var(--fs-xl); }
.lb-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-md); }
.lb-row.you { background: var(--plt-gold-soft); border: 1px solid var(--plt-gold-line); }
.lb-rank { width: 28px; text-align: center; font-weight: var(--fw-bold); color: var(--text-muted); }
.lb-rank.top { color: var(--plt-gold); }

/* Tokenomics */
.alloc-bar { display: flex; height: 14px; border-radius: var(--r-pill); overflow: hidden; border: 1px solid var(--border-soft); }
.alloc-bar > span { height: 100%; }
.alloc-legend { display: flex; flex-direction: column; gap: 10px; margin-top: var(--s-4); }
.alloc-legend .li { display: flex; align-items: center; gap: var(--s-3); }
.alloc-legend .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }

/* ---------------- Friday chat ---------------- */
.friday { background: var(--bg); }
.friday-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--divider); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.friday-orb { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, #888); display: grid; place-items: center; color: #000; }
.chat-scroll { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-4) var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); }
.bubble { max-width: 82%; padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); font-size: var(--fs-md); line-height: 1.4; }
.bubble.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border-soft); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-text); border-bottom-right-radius: 6px; }
.bubble.typing { color: var(--text-muted); }
.chip-suggest { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--s-4) var(--s-3); }
.friday-input { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4) calc(var(--s-4) + var(--safe-bottom)); border-top: 1px solid var(--divider); }
.friday-input .input { height: 46px; }
.mic-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.mic-btn.listening { animation: live 1.2s infinite; background: var(--color-error); color: #fff; }

/* ---------------- Receipt ---------------- */
.receipt { padding: var(--s-5); }
.receipt .tick-wrap { display: grid; place-items: center; margin: var(--s-4) 0; }
.tick { width: 76px; height: 76px; border-radius: 50%; background: var(--color-success); display: grid; place-items: center; color: #04210f; font-size: 34px; animation: pop .4s var(--ease-out); }
.tick.fail { background: var(--color-error); color: #fff; }
.receipt-rows { margin-top: var(--s-5); }
.receipt-rows .r { display: flex; justify-content: space-between; padding: var(--s-3) 0; border-bottom: 1px dashed var(--divider); font-size: var(--fs-md); gap: var(--s-4); }
.receipt-rows .r .k { color: var(--text-muted); }
.receipt-rows .r .v { text-align: right; font-weight: var(--fw-medium); }
.receipt .thanks { text-align: center; color: var(--text-muted); margin-top: var(--s-5); font-size: var(--fs-sm); }

/* ---------------- Success overlay / bio ---------------- */
.success-pop { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--r-xl); padding: var(--s-7) var(--s-6); width: calc(100% - 80px); max-width: 320px; }
.bio-flow { padding: var(--s-6) 0; }
.bio-ring { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 38px; border: 2px solid var(--text); animation: live 1.4s infinite; }
.pin-screen { padding: var(--s-3) 0 var(--s-2); }

/* ---------------- Profile / settings ---------------- */
.profile-head { text-align: center; padding: var(--s-6) var(--s-5) var(--s-4); }
.profile-head .avatar.lg { width: 88px; height: 88px; margin: 0 auto var(--s-3); font-size: var(--fs-2xl); }
.set-group { margin: var(--s-4) var(--s-3); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border-soft); }
.set-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); background: var(--surface); }
.set-row + .set-row { border-top: 1px solid var(--divider); }
.set-row .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-soft); }
.set-row .grow { min-width: 0; }
.set-row .chev { color: var(--text-faint); }

/* QR */
.qr-box { width: 220px; height: 220px; margin: var(--s-5) auto; background: #fff; border-radius: var(--r-lg); display: grid; place-items: center; padding: 14px; }
.qr-box img, .qr-box svg, .qr-box canvas { width: 100%; height: 100%; }
.scan-frame { position: relative; width: 240px; height: 240px; margin: var(--s-6) auto; border-radius: var(--r-lg); border: 2px solid var(--glass-border); overflow: hidden; background: #000; }
.scan-frame .line { position: absolute; left: 8px; right: 8px; height: 2px; background: var(--plt-gold); box-shadow: 0 0 12px var(--plt-gold); animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 0%,100%{top:10%} 50%{top:88%} }

/* Coming soon (Invest) */
.coming { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-3); padding: var(--s-9) var(--s-6); }
.coming .glyph { width: 88px; height: 88px; border-radius: 26px; display: grid; place-items: center; font-size: 38px; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.feature-list { width: 100%; margin-top: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.feature-list .fl { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--glass-bg); border: 1px solid var(--glass-border); text-align: left; }

/* Generic content padding helper for non-tab screens */
.content { padding: 0 0 var(--s-7); }
.list-card { margin: var(--s-3) var(--s-5); border-radius: var(--r-lg); border: 1px solid var(--border-soft); overflow: hidden; }
.amount-display { text-align: center; padding: var(--s-6) 0 var(--s-4); }
.amount-display .big { font-size: var(--fs-display); font-weight: var(--fw-black); letter-spacing: -0.03em; }
.amount-display .cur { color: var(--text-muted); }
