:root{
  --navy:#0B1B3A;
  --navy-2:#122A54;
  --navy-3:#1B3A6E;
  --gold:#F4B400;
  --gold-2:#FFD966;
  --gold-deep:#C8860A;
  --cream:#FBF4E4;
  --cream-2:#F3E6C8;
  --red:#B4232E;
  --ink:#16213E;
  --ink-soft:#5B6787;
  --muted:#8A93AC;
  --ok:#2E8B57;
  --warn:#C8860A;
  --page-bg:#F8F6F0;
  --surface:#FFFFFF;
  --border:#E7E1CF;
  --border-soft:#EFEAD9;
  --line:rgba(244,180,0,0.35);
  --shadow:0 10px 28px rgba(22,33,62,0.10);
  --shadow-soft:0 6px 16px rgba(22,33,62,0.06);
  --radius:18px;
  --font-display:'Baloo 2','Arial Black', Impact, sans-serif;
  --font-body:'Poppins','Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{
  margin:0;padding:0; font-family:var(--font-body); color:var(--ink); overflow:hidden;
  height:100%; width:100%;
  background-color:#EFE9D8;
  background-image:
    linear-gradient(rgba(37,49,84,0.42),rgba(37,49,84,0.42)),
    url('../assets/bg-house.jpg');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}
#app{
  width:100%; max-width:400px; margin:0 auto; height:100vh; height:100svh; position:relative; overflow:hidden;
  background-color:var(--page-bg);
  background-image:
    linear-gradient(rgba(248,246,240,0.82),rgba(248,246,240,0.82)),
    url('../assets/bg-house.jpg');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  box-shadow:0 0 70px rgba(10,20,45,0.35);
}
.screen{display:none; height:100vh; height:100svh; flex-direction:column; animation:fadeIn .35s ease; overflow:hidden;}
.screen.active{display:flex;}
@keyframes fadeIn{from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);}}
button{font-family:inherit; cursor:pointer;}
/* Ensure every clickable element (not just <button>) shows a hand cursor and reacts on hover */
.choice-card, .role-opt, .mode-tab, .badge-tab, .dealer-card, .quick-login-card,
.share-btn, .chip-select, .icon-btn, .link-btn, .topbar .back, .stat-card.clickable,
.status-tag, .modal-close{cursor:pointer;}
.btn-primary, .btn-outline, .btn-ghost, .btn-danger{transition:filter .15s ease, background .15s ease, border-color .15s ease, transform .1s ease;}
.btn-primary:hover{filter:brightness(1.06);}
.btn-outline:hover{background:#FFF8E8; border-color:var(--gold);}
.btn-ghost:hover{background:var(--border-soft);}
.choice-card, .role-opt, .mode-tab, .badge-tab, .dealer-card, .quick-login-card, .share-btn, .chip-select, .icon-btn, .link-btn, .topbar .back{transition:background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;}
.choice-card:hover{border-color:var(--gold); background:#FFFBEF;}
.role-opt:hover{border-color:var(--gold); background:#FFF8E8;}
.mode-tab:hover, .badge-tab:hover{border-color:var(--gold); background:#FFF8E8;}
.dealer-card:hover{box-shadow:0 8px 20px rgba(11,27,58,0.12);}
.quick-login-card:hover{border-color:var(--gold); background:#FFF3D0;}
.share-btn:hover{border-color:var(--gold); background:#FFF8E8;}
.chip-select:hover{border-color:var(--gold-deep); background:#FFF8E8;}
.icon-btn:hover{background:rgba(255,255,255,0.2);}
.link-btn:hover{color:var(--gold);}
.topbar .back:hover{background:var(--border-soft);}
input,select{font-family:inherit;}
a{color:inherit;}
svg.icon{display:block; flex:none;}

/* ---------- shared bits ---------- */
.topbar{display:flex; align-items:center; gap:8px; padding:9px 16px; background:rgba(248,246,240,0.92); position:sticky; top:0; z-index:40; backdrop-filter:blur(6px); border-bottom:1px solid var(--border); flex:none;}
.topbar .back{width:30px;height:30px;border-radius:50%;background:var(--surface);border:1px solid var(--border);color:var(--navy);display:flex;align-items:center;justify-content:center;flex:none; box-shadow:var(--shadow-soft); font-size:14px;}
.topbar .title{font-weight:700; font-size:13.5px; letter-spacing:.3px; color:var(--ink); line-height:1.2;}
.topbar .sub{font-size:10px; color:var(--gold-deep); font-weight:600; line-height:1.2;}
.step-track{display:flex; gap:4px; padding:0 16px 8px; background:rgba(248,246,240,0.92); flex:none;}
.step-track i{flex:1; height:3px; border-radius:3px; background:var(--border);}
.step-track i.done{background:var(--gold);}
.content{flex:1; min-height:0; padding:12px 18px 6px; display:flex; flex-direction:column; overflow-y:auto; overflow-x:hidden;}
.footer-fixed{flex:none; position:sticky; bottom:0; padding:10px 18px 14px; background:linear-gradient(0deg,var(--page-bg) 65%,rgba(248,246,240,0)); }
.btn{display:flex;align-items:center;justify-content:center;gap:8px; width:100%; padding:11px 16px; border-radius:13px; border:none; font-weight:800; font-size:14px; letter-spacing:.2px;}
.btn-primary{background:linear-gradient(180deg,var(--gold-2),var(--gold)); color:var(--navy); box-shadow:0 8px 20px rgba(244,180,0,0.32);}
.btn-primary:active{transform:scale(.98);}
.btn-primary:disabled{opacity:.4; box-shadow:none;}
.btn-outline{background:var(--surface); border:1.5px solid var(--border); color:var(--navy);}
.btn-ghost{background:var(--surface); color:var(--ink-soft); border:1px solid var(--border);}
.btn-danger{background:#FBEAEA; color:var(--red); border:1px solid #F0C9CB;}
.eyebrow{color:var(--gold-deep); font-weight:800; font-size:10.5px; letter-spacing:1.4px; text-transform:uppercase; margin-bottom:4px;}
h1.h{font-size:18.5px; line-height:1.22; margin:0 0 5px; font-weight:800; color:var(--ink);}
p.lead{color:var(--ink-soft); font-size:12.5px; line-height:1.42; margin:0 0 12px;}
.field{margin-bottom:10px;}
.field label{display:block; font-size:11px; font-weight:700; color:var(--ink-soft); margin-bottom:4px; letter-spacing:.3px;}
.field input, .field select{width:100%; padding:10px 12px; border-radius:11px; border:1.5px solid var(--border); background:var(--surface); color:var(--ink); font-size:14px; outline:none;}
.field input::placeholder{color:var(--muted);}
.field input:focus, .field select:focus{border-color:var(--gold); box-shadow:0 0 0 3px rgba(244,180,0,0.14);}
.field .err{color:var(--red); font-size:10.5px; margin-top:4px; display:none; font-weight:600;}
.field.invalid input{border-color:var(--red);}
.field.invalid .err{display:block;}
.phone-row{display:flex; gap:8px;}
.phone-row .code{flex:none; width:52px; padding:10px 8px; border-radius:11px; border:1.5px solid var(--border); background:var(--surface); color:var(--ink); font-weight:700; text-align:center; font-size:14px;}
.choice-cards{display:flex; flex-direction:column; gap:8px;}
.choice-card{display:flex; align-items:center; gap:11px; padding:12px 14px; border-radius:14px; border:1.5px solid var(--border); background:var(--surface); box-shadow:var(--shadow-soft);}
.choice-card.selected{border-color:var(--gold); background:#FFFBEF; box-shadow:0 0 0 3px rgba(244,180,0,0.14) inset, var(--shadow-soft);}
.choice-card .icon{width:38px;height:38px;border-radius:11px;background:#FFF3D0;display:flex;align-items:center;justify-content:center; flex:none; color:var(--gold-deep);}
.choice-card .icon.emoji-icon{font-size:20px; line-height:1;}
.choice-card .txt b{display:block; font-size:14px; color:var(--ink);}
.choice-card .txt span{font-size:11px; color:var(--ink-soft);}
.badge-pill{display:inline-flex; align-items:center; gap:6px; background:#FFF3D0; color:var(--gold-deep); padding:4px 9px; border-radius:20px; font-size:10px; font-weight:800; letter-spacing:.4px;}

/* ---------- landing (built from the original artwork, cut into sections for fast, progressive loading) ---------- */
#screen-landing .hero{position:relative; padding:0; display:flex; flex-direction:column; justify-content:center; height:100%; overflow:hidden; background:#0B1B3A;}
#screen-landing .hero .art-stack{flex:none; width:100%; display:flex; flex-direction:column; overflow:visible; margin:0 auto;}
.art-slice{display:block; width:100%; height:auto; line-height:0; flex:none;}
.hotspot-wrap{position:relative; line-height:0; flex:none;}
.hotspot{position:absolute; background:transparent; border:none; padding:0; margin:0; cursor:pointer; -webkit-tap-highlight-color:rgba(244,180,0,0.25);}
.hotspot:active{background:rgba(255,255,255,0.08);}
.staff-link-onart{position:relative; display:flex; align-items:center; justify-content:center; gap:14px; text-align:center; padding:8px 20px; background:#0B1B3A; flex:none;}
.staff-link-onart button{background:none;border:none;color:#8FA0CC;font-size:11px; text-decoration:underline; font-weight:600;}
.landing-headline{position:relative; flex:none; text-align:center; padding:clamp(16px,3.6vh,26px) 20px clamp(18px,3.8vh,28px); background:linear-gradient(180deg,#3E639C 0%,#4C6EA0 100%);}
.landing-headline .lh-l1{font-family:var(--font-body); font-style:italic; font-weight:600; font-size:clamp(13px,2.8vh,18px); color:#EAF0FF;}
.landing-headline .lh-l2{font-family:var(--font-body); font-weight:700; font-size:clamp(14px,3vh,20px); color:#fff; margin-top:6px; line-height:1.35;}
.landing-headline .lh-l2 .lh-brand{display:inline-block; font-family:var(--font-display); font-weight:800; color:var(--gold); letter-spacing:.3px; font-size:1.2em; margin:0 2px; text-shadow:0 1px 0 #8C5D00, 0 4px 12px rgba(244,180,0,0.4);}
.landing-headline .lh-tagline{font-family:var(--font-body); font-weight:600; font-style:italic; font-size:clamp(11px,2.3vh,15px); color:var(--gold-2); letter-spacing:.3px; margin-top:8px;}
/* Native script fonts per language, kept separate from the Latin "ROOF KA RAKSHAK" which always stays in the brand display font */
.landing-headline[data-lang="hi"] .lh-l1, .landing-headline[data-lang="hi"] .lh-l2, .landing-headline[data-lang="hi"] .lh-tagline,
.landing-headline[data-lang="mr"] .lh-l1, .landing-headline[data-lang="mr"] .lh-l2, .landing-headline[data-lang="mr"] .lh-tagline{font-family:'Noto Sans Devanagari', var(--font-body);}
.landing-headline[data-lang="gu"] .lh-l1, .landing-headline[data-lang="gu"] .lh-l2, .landing-headline[data-lang="gu"] .lh-tagline{font-family:'Noto Sans Gujarati', var(--font-body);}
.landing-headline[data-lang="pa"] .lh-l1, .landing-headline[data-lang="pa"] .lh-l2, .landing-headline[data-lang="pa"] .lh-tagline{font-family:'Noto Sans Gurmukhi', var(--font-body);}
.landing-headline[data-lang="bn"] .lh-l1, .landing-headline[data-lang="bn"] .lh-l2, .landing-headline[data-lang="bn"] .lh-tagline{font-family:'Noto Sans Bengali', var(--font-body);}
.landing-headline[data-lang="or"] .lh-l1, .landing-headline[data-lang="or"] .lh-l2, .landing-headline[data-lang="or"] .lh-tagline{font-family:'Noto Sans Oriya', var(--font-body);}
.landing-headline[data-lang="ta"] .lh-l1, .landing-headline[data-lang="ta"] .lh-l2, .landing-headline[data-lang="ta"] .lh-tagline{font-family:'Noto Sans Tamil', var(--font-body);}
.landing-headline[data-lang="te"] .lh-l1, .landing-headline[data-lang="te"] .lh-l2, .landing-headline[data-lang="te"] .lh-tagline{font-family:'Noto Sans Telugu', var(--font-body);}
.landing-headline[data-lang="kn"] .lh-l1, .landing-headline[data-lang="kn"] .lh-l2, .landing-headline[data-lang="kn"] .lh-tagline{font-family:'Noto Sans Kannada', var(--font-body);}
.landing-headline[data-lang="ml"] .lh-l1, .landing-headline[data-lang="ml"] .lh-l2, .landing-headline[data-lang="ml"] .lh-tagline{font-family:'Noto Sans Malayalam', var(--font-body);}
/* Native <select> elements are visually hidden once enhanced — see csel-* below for the custom dropdown UI. */
.csel-native{display:none !important;}

/* ---------- custom dropdown component (replaces native select popups everywhere) ---------- */
.csel-wrap{position:relative;}
.csel-trigger{appearance:none; -webkit-appearance:none; -moz-appearance:none; width:100%; display:flex; align-items:center; justify-content:space-between; gap:8px; cursor:pointer; font-family:inherit; font-size:inherit; line-height:normal; text-align:left; border:none; background:none; margin:0; outline:none; box-shadow:none;}
.csel-trigger:focus{outline:none;}
.csel-trigger .csel-arrow{flex:none; transition:transform .18s ease; color:var(--gold-deep);}
.csel-trigger.open .csel-arrow{transform:rotate(180deg);}
.csel-trigger .csel-label.placeholder{color:var(--muted);}

/* "light" trigger — used inside forms/filter sheets (matches the existing input styling) */
.csel-trigger.light{padding:10px 12px; border-radius:11px; border:1.5px solid var(--border); background:var(--surface); color:var(--ink); font-size:14px;}
.csel-trigger.light.open{border-color:var(--gold); box-shadow:0 0 0 3px rgba(244,180,0,0.14);}
.filter-sheet .csel-trigger.light{border-color:#E3D9BE; background:#FBF6E9;}

/* "pill" trigger — used for the compact language switcher */
.csel-trigger.pill{display:inline-flex; background:rgba(255,255,255,0.08); color:#8FA0CC; border:1px solid rgba(244,180,0,0.35); border-radius:16px; font-size:10.5px; font-weight:700; padding:3px 10px;}
.csel-trigger.pill.open{border-color:var(--gold); color:#EAF0FF;}
.csel-trigger.pill .csel-arrow{width:9px; height:9px;}

/* the popup list itself — always brand-styled (navy + gold), regardless of trigger style */
.csel-list{position:absolute; z-index:90; top:calc(100% + 6px); left:0; right:0; min-width:160px; background:var(--navy); border:1px solid rgba(244,180,0,0.4); border-radius:13px; box-shadow:0 16px 34px rgba(6,14,35,0.4); padding:6px; max-height:280px; overflow-y:auto; display:none; animation:cselIn .14s ease;}
.csel-list.up{top:auto; bottom:calc(100% + 6px);}
.csel-list.open{display:flex; flex-direction:column;}
.csel-list.align-right{left:auto; right:0;}
.csel-search-wrap{flex:none; padding:2px 2px 8px;}
.csel-search{width:100%; padding:9px 11px; border-radius:9px; border:1px solid rgba(244,180,0,0.3); background:rgba(255,255,255,0.08); color:#fff; font-size:13px; font-family:inherit; outline:none;}
.csel-search::placeholder{color:#8FA0CC;}
.csel-search:focus{border-color:var(--gold); background:rgba(255,255,255,0.12);}
.csel-items{flex:1; min-height:0; overflow-y:auto;}
.csel-no-match{padding:16px 8px; text-align:center; color:#8FA0CC; font-size:12.5px; font-weight:600;}
.csel-item.hidden{display:none;}
@keyframes cselIn{from{opacity:0; transform:translateY(-4px);} to{opacity:1; transform:translateY(0);}}
.csel-item{padding:9px 12px; border-radius:9px; font-size:13.5px; font-weight:600; color:#DCE3F5; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.csel-item:hover, .csel-item.hover{background:rgba(244,180,0,0.16); color:#fff;}
.csel-item.selected{background:rgba(244,180,0,0.22); color:var(--gold-2); font-weight:800;}

/* ---------- camera (viewfinder stays dark by nature of a live camera feed; chrome around it is light) ---------- */
.cam-wrap{position:relative; flex:1; min-height:0; background:#000; border-radius:16px; overflow:hidden; display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow);}
/* Video, captured-photo canvas, and the guide overlay all share the SAME bounded portrait
   box (letterboxed within cam-wrap) instead of individually stretching to fill it. This keeps
   them in lockstep regardless of the container's actual aspect ratio — critical on desktop/
   laptop browsers, where cam-wrap can end up very tall and narrow (constrained to the app's
   mobile-width frame but stretched to the full screen height) while a laptop webcam streams
   in landscape (4:3/16:9). Without this, object-fit:cover crops way into a narrow vertical
   sliver of the landscape feed — a real zoom/framing mismatch, not an actual camera rotation —
   which is exactly what made the guide circle and the visible face disagree. */
.cam-wrap video, .cam-wrap canvas.captured, .frame-overlay{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  height:100%; width:auto; max-width:100%; aspect-ratio:3/4;
}
.cam-wrap video, .cam-wrap canvas.captured{object-fit:cover;}
.frame-overlay{pointer-events:none; z-index:5;}
.cam-toolbar{position:absolute; bottom:12px; left:0; right:0; display:flex; align-items:center; justify-content:center; gap:22px; z-index:6;}
.shutter{width:58px;height:58px;border-radius:50%; background:#fff; border:4px solid rgba(244,180,0,0.9); box-shadow:0 6px 18px rgba(0,0,0,0.5);}
.shutter.recording-video{background:var(--red); border-color:#fff; animation:pulseMic 1.2s infinite;}
.cam-side-btn{width:38px;height:38px;border-radius:50%; background:rgba(0,0,0,0.5); border:1px solid rgba(255,255,255,0.3); color:#fff; display:flex; align-items:center; justify-content:center;}
.cam-hint{position:absolute; top:10px; left:0; right:0; text-align:center; z-index:6;}
.cam-hint span{background:rgba(0,0,0,0.55); color:var(--gold-2); font-size:10.5px; font-weight:700; padding:5px 12px; border-radius:20px; border:1px solid rgba(244,180,0,0.3);}
.mode-tabs{display:flex; gap:6px; margin-bottom:8px; flex:none;}
.mode-tab{flex:1; display:flex; align-items:center; justify-content:center; gap:5px; text-align:center; padding:7px; border-radius:11px; font-size:11px; font-weight:800; background:var(--surface); border:1.5px solid var(--border); color:var(--ink-soft);}
.mode-tab.active{background:#FFF3D0; border-color:var(--gold); color:var(--gold-deep);}
.upload-fallback{text-align:center; margin-top:7px; font-size:11px; color:var(--ink-soft); flex:none;}
.upload-fallback label{color:var(--gold-deep); font-weight:700; text-decoration:underline; cursor:pointer;}

/* ---------- badge ---------- */
.badge-tabs{display:flex; gap:8px; margin:2px 0 8px; flex:none;}
.badge-tab{flex:1; text-align:center; padding:8px; border-radius:12px; border:1.5px solid var(--border); background:var(--surface); font-weight:800; font-size:11.5px; color:var(--ink-soft);}
.badge-tab.active{border-color:var(--gold); background:#FFF3D0; color:var(--gold-deep);}
.badge-tabs.three .badge-tab{font-size:10.5px; padding:8px 4px;}
.wish-empty{padding:26px 10px; display:flex; flex-direction:column; align-items:center; gap:12px;}
.wish-empty .btn{width:auto; padding-left:24px; padding-right:24px;}
#wishMediaWrap audio{width:90%; margin:20px auto;}
#wishMediaWrap video{width:100%; max-height:520px; object-fit:contain; display:block; border-radius:9px;}
.badge-canvas-wrap{flex:1; min-height:0; border-radius:16px; overflow:hidden; box-shadow:var(--shadow); background:var(--border-soft); display:flex; align-items:center; justify-content:center; padding:6px;}
.badge-canvas-wrap{position:relative;}
.badge-canvas-wrap canvas{width:auto; height:auto; max-width:100%; max-height:100%; display:block; border-radius:9px; cursor:zoom-in;}
.preview-corner-btn{position:absolute; top:10px; right:10px; width:32px;height:32px;border-radius:50%; background:rgba(11,27,58,0.72); color:#FFD966; border:none; display:flex; align-items:center; justify-content:center; z-index:3;}
.preview-corner-btn:hover{background:rgba(11,27,58,0.9); color:var(--gold);}
.preview-sheet{position:relative; max-width:480px; width:100%; max-height:88vh; display:flex; align-items:center; justify-content:center;}
.share-confirm-media{margin-bottom:14px; border-radius:14px; overflow:hidden; background:var(--border-soft); box-shadow:var(--shadow); max-height:52vh; display:flex; align-items:center; justify-content:center;}
.share-confirm-media img{width:100%; height:auto; max-height:52vh; object-fit:contain; display:block;}
.share-confirm-media video{width:100%; max-height:52vh; display:block; background:#000;}
.share-confirm-media audio{width:100%; margin:16px;}
.preview-sheet img{width:100%; height:auto; max-height:88vh; object-fit:contain; border-radius:14px; box-shadow:0 20px 50px rgba(0,0,0,0.5);}
.share-row{display:flex; gap:8px; margin-top:10px; flex:none;}
.share-btn{flex:1; display:flex; flex-direction:column; align-items:center; gap:5px; padding:9px 6px; border-radius:12px; background:var(--surface); border:1px solid var(--border); color:var(--ink); font-size:10px; font-weight:700; box-shadow:var(--shadow-soft);}
.share-btn:active{border-color:var(--gold);}
.share-btn .ic{color:var(--gold-deep);}
.more-actions{margin-top:16px;}
.more-actions-label{font-size:11px; font-weight:700; color:var(--ink-soft); margin-bottom:8px; text-align:center;}
.action-tile{width:100%; display:flex; align-items:center; gap:11px; background:var(--surface); border:1.5px solid var(--border); border-radius:14px; padding:11px 12px; margin-bottom:8px; text-align:left; box-shadow:var(--shadow-soft);}
.action-tile:hover{border-color:var(--gold); background:#FFFBEF;}
.action-tile .at-icon{width:36px;height:36px;border-radius:10px; background:#FFF3D0; color:var(--gold-deep); display:flex; align-items:center; justify-content:center; flex:none;}
.action-tile .at-txt{flex:1; display:flex; flex-direction:column; gap:1px;}
.action-tile .at-txt b{font-size:12.5px; color:var(--ink);}
.action-tile .at-txt span{font-size:10.5px; color:var(--ink-soft); font-weight:600;}
.action-tile .at-arrow{color:var(--gold-deep); flex:none;}
.dear-input-row{display:flex; gap:8px;}
.dear-input-row input{flex:1; padding:10px 12px; border-radius:11px; border:1.5px solid var(--border); background:var(--surface); color:var(--ink); font-size:14px; outline:none;}
.dear-input-row input:focus{border-color:var(--gold); box-shadow:0 0 0 3px rgba(244,180,0,0.14);}
.dear-lang-btn{flex:none; display:flex; align-items:center; gap:4px; padding:0 12px; border-radius:11px; border:1.5px solid var(--border); background:#FFF3D0; color:var(--gold-deep); font-size:11px; font-weight:800;}
.dear-lang-btn:hover{border-color:var(--gold);}
.dear-lang-hint{font-size:10.5px; color:var(--ink-soft); margin-top:6px; line-height:1.4;}
.dear-english-toggle{display:flex; align-items:flex-start; gap:8px; margin-top:10px; font-size:12px; color:var(--ink); cursor:pointer;}
.dear-english-toggle input{margin-top:2px; flex:none;}
#dearLangPicker{margin-top:8px;}
.dear-lang-grid{display:flex; flex-wrap:wrap; gap:6px;}
.dear-lang-pill{padding:7px 12px; border-radius:20px; border:1.5px solid var(--border); background:var(--surface); color:var(--ink-soft); font-size:12px; font-weight:700;}
.dear-lang-pill.active{border-color:var(--gold); background:#FFF3D0; color:var(--gold-deep);}

/* ---------- record wish ---------- */
.wish-recorder{display:flex; flex-direction:column; align-items:center; justify-content:center; padding:30px 20px; gap:14px;}
.wish-mic{width:84px;height:84px;border-radius:50%; background:#FFF3D0; color:var(--gold-deep); display:flex; align-items:center; justify-content:center; transition:background .2s ease, color .2s ease;}
.wish-mic.recording{background:#FBEAEA; color:var(--red); animation:pulseMic 1.2s infinite;}
@keyframes pulseMic{0%{box-shadow:0 0 0 0 rgba(180,35,46,0.35);} 70%{box-shadow:0 0 0 18px rgba(180,35,46,0);} 100%{box-shadow:0 0 0 0 rgba(180,35,46,0);}}
.wish-timer{font-size:28px; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums;}
.wish-hint{font-size:12px; color:var(--ink-soft); text-align:center;}
#wishAudioPlayer{width:100%; margin-top:6px;}
.theme-row{display:flex; gap:8px; margin-bottom:8px;}
.theme-swatch{flex:1; padding:8px; border-radius:11px; border:1.5px solid var(--border); background:var(--surface); font-size:11.5px; font-weight:800; color:var(--ink-soft);}
.theme-swatch.active{border-color:var(--gold); background:#FFF3D0; color:var(--gold-deep);}
/* opacity:0 (not display:none) — Chromium stops decoding video frames entirely for
   display:none videos, which silently produced a black canvas since nothing was ever
   available to draw. Kept fully transparent and behind the visible composited canvas instead. */
#wishVideoSrc{position:absolute; inset:0; width:100%; height:100%; opacity:0; pointer-events:none; z-index:0;}
#wishVideoCanvas{width:100%; height:100%; object-fit:cover; position:absolute; inset:0; background:#000; z-index:1;}
#wishVideoPlayback{width:100%; height:100%; object-fit:contain; position:absolute; inset:0; background:#000;}

/* ---------- my creations ---------- */
.creation-item{display:flex; align-items:center; gap:12px; background:var(--surface); border:1.5px solid var(--border); border-radius:14px; padding:12px; margin-bottom:10px; box-shadow:var(--shadow-soft);}
.creation-item .ci-thumb{width:52px;height:52px;border-radius:12px; object-fit:cover; flex:none; background:#F1EAD6;}
.creation-item .ci-icon{width:52px;height:52px;border-radius:12px; background:#FFF3D0; color:var(--gold-deep); display:flex; align-items:center; justify-content:center; flex:none;}
.creation-item .ci-info{flex:1; min-width:0;}
.creation-item .ci-info b{display:block; font-size:13px; color:var(--ink);}
.creation-item .ci-info span{font-size:10.5px; color:var(--ink-soft); font-weight:600;}
.creation-item .ci-actions{display:flex; gap:6px; flex:none;}
.creation-item .ci-actions button{width:34px;height:34px;border-radius:9px; background:#FFF3D0; color:var(--gold-deep); border:none; display:flex; align-items:center; justify-content:center;}
.creation-item .ci-actions button:hover{background:var(--gold); color:var(--navy);}
.creation-item audio{width:100%; margin-top:6px; height:32px;}

/* ---------- thanks ---------- */
.thanks-wrap{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:16px 24px; background:transparent;}
.thanks-wrap .big-shield{margin-bottom:8px;}
.thanks-wrap h1{font-size:20px; margin:0 0 6px; color:var(--ink);}
.thanks-wrap p{color:var(--ink-soft); font-size:12.5px; line-height:1.5;}

/* ---------- staff login ---------- */
.quick-login-box{background:#FFFBEF; border:1.5px solid var(--gold); border-radius:14px; padding:12px; margin-bottom:12px;}
.quick-login-label{font-size:10.5px; font-weight:800; color:var(--gold-deep); text-transform:uppercase; letter-spacing:.5px; margin-bottom:8px;}
.quick-login-row{display:flex; gap:8px;}
.quick-login-card{flex:1; display:flex; flex-direction:column; align-items:flex-start; gap:2px; background:var(--surface); border:1.5px solid var(--border); border-radius:11px; padding:9px 10px; text-align:left; cursor:pointer;}
.quick-login-card:active{border-color:var(--gold); background:#FFF3D0;}
.quick-login-card .qlc-name{font-size:12px; font-weight:800; color:var(--ink);}
.quick-login-card .qlc-meta{font-size:10px; font-weight:600; color:var(--ink-soft);}
.or-divider{display:flex; align-items:center; gap:10px; margin:4px 0 14px; color:var(--muted); font-size:11px; font-weight:700;}
.or-divider::before, .or-divider::after{content:''; flex:1; height:1px; background:var(--border);}
.role-select{display:flex; gap:8px; margin-bottom:10px;}
.role-opt{flex:1; text-align:center; padding:10px 6px; border-radius:12px; border:1.5px solid var(--border); background:var(--surface); font-size:11px; font-weight:800; color:var(--ink-soft); box-shadow:var(--shadow-soft);}
.role-opt.active{border-color:var(--gold); background:#FFF3D0; color:var(--gold-deep);}
.role-opt .r-ic{display:flex; align-items:center; justify-content:center; margin-bottom:4px; color:inherit;}

/* ---------- dashboard ---------- */
#screen-dashboard{background:var(--cream); color:var(--ink);}
.dash-top{background:var(--navy); padding:16px 18px 60px; position:relative;}
.dash-top-row{display:flex; align-items:center; justify-content:space-between;}
.dash-user{display:flex; align-items:center; gap:10px;}
.dash-user .av{width:38px;height:38px;border-radius:50%; background:var(--gold); color:var(--navy); font-weight:900; display:flex; align-items:center; justify-content:center; font-size:14px;}
.dash-user .nm{font-size:13.5px; font-weight:800; color:#fff;}
.dash-user .rl{font-size:11px; color:var(--gold-2); font-weight:700;}
.icon-btn{width:36px;height:36px;border-radius:10px; background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.15); color:#fff; display:flex; align-items:center; justify-content:center;}
.scope-line{margin-top:14px; font-size:12px; color:#AEB9DD;}
.scope-line b{color:var(--gold-2);}
.stat-cards{display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin:-46px 16px 0; position:relative; z-index:5;}
.stat-card{background:#fff; border-radius:14px; padding:14px; box-shadow:0 10px 24px rgba(11,27,58,0.12);}
.stat-card .num{font-size:22px; font-weight:900; color:var(--navy);}
.stat-card .lbl{font-size:11px; color:#7C8AAE; font-weight:700; margin-top:2px;}
.stat-card .delta{font-size:10.5px; font-weight:800; margin-top:6px; display:inline-block; padding:2px 7px; border-radius:8px;}
.delta.up{background:#E4F5EA; color:var(--ok);}
.delta.mid{background:#FFF3D6; color:var(--warn);}
.dash-body{flex:1; min-height:0; overflow-y:auto; padding:16px 16px 90px;}
.section-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:12px;}
.section-head h3{font-size:15.5px; margin:0; color:var(--navy);}
.link-btn{display:inline-flex; align-items:center; gap:5px; background:none;border:none; color:var(--gold-deep); font-weight:800; font-size:12.5px;}
.filter-bar{display:flex; gap:8px; overflow-x:auto; padding-bottom:10px; margin-bottom:12px; -webkit-overflow-scrolling:touch;}
.filter-bar::-webkit-scrollbar{display:none;}
.chip-select{flex:none; padding:9px 12px; border-radius:20px; border:1.5px solid #E3D9BE; background:#fff; font-size:12px; font-weight:700; color:#4A5578;}
.search-box{display:flex; align-items:center; gap:8px; background:#fff; border:1.5px solid #E3D9BE; border-radius:14px; padding:11px 14px; margin-bottom:12px; color:var(--muted);}
.search-box input{border:none; outline:none; flex:1; font-size:14px; background:none; color:var(--ink);}
.dealer-card{background:#fff; border-radius:16px; padding:14px; margin-bottom:10px; box-shadow:0 6px 16px rgba(11,27,58,0.06); display:flex; gap:12px; align-items:center;}
.dealer-card .thumb{width:50px;height:50px; border-radius:50%; background:linear-gradient(135deg,#1B3A6E,#0B1B3A); display:flex; align-items:center; justify-content:center; color:var(--gold-2); font-weight:900; font-size:16px; flex:none; border:2px solid var(--gold);}
.dealer-card .info{flex:1; min-width:0;}
.dealer-card .info .nm{font-size:14.5px; font-weight:800; color:var(--navy); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.dealer-card .info .meta{font-size:11.5px; color:#7C8AAE; margin-top:2px;}
.dealer-card .info .meta2{font-size:11px; color:#9AA6C4; margin-top:2px;}
.status-tag{font-size:10px; font-weight:800; padding:4px 9px; border-radius:20px; white-space:nowrap;}
.status-tag.invited{background:#EDEFF7; color:#5A6690;}
.status-tag.started{background:#FFF3D6; color:var(--warn);}
.status-tag.photo{background:#DDEBFF; color:#2A5FB0;}
.status-tag.completed{background:#E4F5EA; color:var(--ok);}
.chev{color:#C7CEE2;}
.empty-state{text-align:center; padding:40px 20px; color:#9AA6C4;}
/* ---------- reports view ---------- */
.report-card{background:#fff; border-radius:16px; padding:16px; margin-bottom:14px; box-shadow:0 6px 16px rgba(11,27,58,0.06);}
.report-card h4{margin:0 0 12px; font-size:13.5px; color:var(--navy);}
.report-bar-row{margin-bottom:11px;}
.report-bar-row:last-child{margin-bottom:0;}
.report-bar-label{display:flex; justify-content:space-between; font-size:12px; font-weight:700; color:var(--ink); margin-bottom:5px;}
.report-bar-label span:last-child{color:var(--ink-soft); font-weight:600;}
.report-bar-track{background:#F1EAD6; border-radius:8px; height:9px; overflow:hidden;}
.report-bar-fill{height:100%; border-radius:8px; background:linear-gradient(90deg,var(--gold-2),var(--gold));}
.report-bar-fill.ok{background:linear-gradient(90deg,#7FD8A0,var(--ok));}
.leaderboard-row{display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid #F1EAD6;}
.leaderboard-row:last-child{border-bottom:none;}
.leaderboard-rank{width:22px;height:22px;border-radius:50%; background:var(--navy); color:var(--gold-2); font-size:10.5px; font-weight:800; display:flex; align-items:center; justify-content:center; flex:none;}
.leaderboard-row:nth-child(1) .leaderboard-rank{background:var(--gold); color:var(--navy);}
.leaderboard-name{flex:1; font-size:12.5px; font-weight:700; color:var(--ink);}
.leaderboard-num{font-size:12.5px; font-weight:800; color:var(--gold-deep);}
.empty-state .ic{margin:0 auto 10px; color:#C7BE9E;}
.bottom-nav{position:fixed; bottom:0; left:0; right:0; max-width:400px; margin:0 auto; background:#fff; border-top:1px solid #EDE4C8; display:flex; z-index:50; box-shadow:0 -6px 18px rgba(11,27,58,0.06);}
.bottom-nav button{flex:1; background:none; border:none; padding:11px 4px 9px; display:flex; flex-direction:column; align-items:center; gap:3px; color:#9AA6C4; font-size:10.5px; font-weight:700;}
.bottom-nav button.active{color:var(--gold-deep);}
.bottom-nav button .ic{display:flex; justify-content:center;}

/* modal */
.modal-backdrop{position:fixed; inset:0; background:rgba(22,33,62,0.45); z-index:100; display:none; align-items:flex-end; justify-content:center;}
#imagePreviewModal{align-items:center; background:rgba(6,14,35,0.85); padding:20px;}
.modal-backdrop.active{display:flex;}
.modal-sheet{max-width:400px; width:100%; background:#fff; border-radius:22px 22px 0 0; max-height:90vh; overflow-y:auto; color:var(--ink); animation:slideUp .3s ease;}
@keyframes slideUp{from{transform:translateY(30px); opacity:0;} to{transform:translateY(0); opacity:1;}}
.modal-handle{width:40px; height:4px; background:#E3D9BE; border-radius:3px; margin:12px auto 4px;}
.modal-head{display:flex; align-items:center; justify-content:space-between; padding:14px 20px;}
.modal-head h3{margin:0; font-size:16px; color:var(--navy);}
.modal-close{width:30px;height:30px;border-radius:50%; background:#F3E6C8; border:none; font-size:15px; color:var(--navy);}
.modal-body{padding:0 20px 26px;}
.detail-row{display:flex; justify-content:space-between; padding:11px 0; border-bottom:1px solid #F1EAD6; font-size:13.5px;}
.detail-row span:first-child{color:#7C8AAE; font-weight:600;}
.detail-row span:last-child{font-weight:700; color:var(--navy); text-align:right;}
.mini-badge-preview{border-radius:16px; overflow:hidden; margin:16px 0; box-shadow:var(--shadow); background:var(--border-soft); padding:6px;}
.mini-badge-preview canvas{width:100%; display:block; border-radius:10px;}
.filter-sheet .field{margin-bottom:14px;}
.filter-sheet .field label{color:#7C8AAE;}
.filter-sheet .field input, .filter-sheet .field select{color:var(--ink); border-color:#E3D9BE; background:#FBF6E9;}
.toast{position:fixed; bottom:26px; left:50%; transform:translateX(-50%); background:var(--navy); color:#fff; padding:12px 20px; border-radius:30px; font-size:13px; font-weight:700; z-index:200; box-shadow:var(--shadow); display:none; border:1px solid var(--gold); max-width:88%; text-align:center;}
.toast.show{display:block; animation:fadeIn .25s ease;}
.hidden{display:none !important;}
