/* =====================================================================
   HALMALL QUEST — STYLES (mengikuti Halmall GSM 2025)
   ===================================================================== */
@font-face { font-family: 'Montserrat'; src: url('../assets/fonts/montserrat-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../assets/fonts/montserrat-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../assets/fonts/nunito-var.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  --primary: #015085;
  --secondary: #00B29D;
  --accent: #75D0C6;
  --dark: #34495E;
  --light: #D0DFE3;
  --neutral: #F0F2F3;
  --beige: #DBD8D3;
  --white: #FFFFFF;
  --teal-ink: #00796B;      /* turunan Secondary untuk teks agar kontras ≥ 4.5:1 di atas putih */
  --error: #C2453D;         /* warna fungsional untuk status salah (bukan warna brand) */
  --error-bg: #FBEDEC;
  --ok-bg: #E3F6F3;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 6px 20px rgba(1, 80, 133, .10);
  --shadow-lg: 0 14px 36px rgba(1, 80, 133, .18);
  --font-head: 'Montserrat', 'Goodtime Grotesk', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--primary);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
h1, h2, h3 { font-family: var(--font-head); color: var(--primary); margin: 0; line-height: 1.2; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- App frame ---------- */
.app {
  position: relative;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--white);
  overflow: hidden;
  overflow: clip;
}
@media (min-width: 560px) {
  body::before { content: ''; position: fixed; right: -80px; bottom: -60px; width: 520px; height: 490px; background: url('../assets/img/supergraphic-h.png') no-repeat center / contain; opacity: .08; pointer-events: none; }
  body.staff::before { display: none; }
  .app { height: min(100dvh - 48px, 880px); margin-top: 24px; border-radius: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
}

.demo-banner {
  position: absolute; z-index: 50; top: 0; left: 50%; transform: translateX(-50%);
  background: var(--dark); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 0 0 10px 10px; opacity: .85;
}

/* ---------- Screens ---------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transform: translateX(24px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.screen.active { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .35s ease, visibility 0s; }
.screen.leaving { transform: translateX(-24px); }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 20px 24px; }
.footer { padding: 12px 20px calc(16px + var(--safe-b)); background: var(--white); box-shadow: 0 -8px 20px rgba(255, 255, 255, .9); }

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; padding: 14px 20px;
  border-radius: 16px;
  font-family: var(--font-head); font-weight: 800; font-size: 16px; letter-spacing: .02em;
  transition: transform .12s ease, box-shadow .2s ease, background .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(1, 80, 133, .28); }
.btn-primary:disabled { background: var(--light); color: #7d8f99; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: var(--neutral); color: var(--primary); }
.btn-teal { background: var(--secondary); color: #fff; }
.btn + .btn { margin-top: 10px; }
.link { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Welcome ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--primary);
  border-radius: 0 0 36px 36px;
  padding: 22px 22px 0;
  color: #fff;
  min-height: 52%;
  display: flex; flex-direction: column;
}
.hero::before {
  content: ''; position: absolute; right: -70px; top: -30px; width: 320px; height: 300px;
  background: url('../assets/img/supergraphic-h.png') no-repeat center / contain; opacity: .09;
}
.hero-logo { height: 64px; width: auto; align-self: flex-start; object-fit: contain; position: relative; }
.hero-title { position: relative; margin-top: 18px; }
.hero-title .eyebrow { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .24em; color: var(--accent); }
.hero-title h1 { color: #fff; font-size: clamp(34px, 10.5vw, 44px); font-weight: 800; letter-spacing: .01em; }
.hero-title h1 span { color: var(--accent); }
.hero-title .tag { margin-top: 6px; font-size: 15px; font-weight: 600; color: #DDEFF2; }
.hero-mascots { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 0; margin-top: 8px; min-height: 150px; }
.hero-mascots img { height: min(30vh, 230px); width: auto; animation: bob 3.2s ease-in-out infinite; }
.hero-mascots img:last-child { animation-delay: -1.6s; margin-left: -6px; }
.welcome-body { padding: 18px 22px 0; }
.welcome-body .intro { font-size: 16px; font-weight: 600; color: var(--dark); }
.reward-pill {
  margin-top: 14px; display: flex; gap: 12px; align-items: center;
  background: var(--neutral); border: 1.5px dashed var(--accent); border-radius: var(--radius-sm); padding: 12px 14px;
}
.reward-pill .ico { font-size: 26px; }
.reward-pill b { display: block; color: var(--primary); font-size: 14.5px; line-height: 1.35; }
.reward-pill small { color: #5d7384; font-size: 12.5px; }
.meta { text-align: center; font-size: 13px; color: #5d7384; margin-top: 10px; }
.notice { margin-top: 14px; background: var(--ok-bg); color: var(--primary); padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; }

/* ---------- Top bar (in-game) ---------- */
.topbar { padding: 14px 20px 10px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--neutral); }
.topbar .logo-sm { height: 24px; width: auto; flex: none; object-fit: contain; }
.topbar .spacer { flex: 1; }
.score-pill { font-family: var(--font-head); font-weight: 800; font-size: 14px; color: var(--primary); background: var(--neutral); padding: 6px 12px; border-radius: 999px; min-width: 76px; text-align: center; transition: transform .2s; }
.score-pill.bump { transform: scale(1.15); }
.progress { display: flex; gap: 6px; padding: 10px 20px 0; }
.progress i { flex: 1; height: 6px; border-radius: 6px; background: var(--neutral); overflow: hidden; position: relative; }
.progress i.done { background: var(--secondary); }
.progress i.now::after { content: ''; position: absolute; inset: 0; width: 50%; background: var(--accent); border-radius: 6px; animation: pulseBar 1.4s ease-in-out infinite alternate; }
.progress-label { padding: 6px 20px 0; font-size: 12.5px; font-weight: 700; color: #5d7384; display: flex; justify-content: space-between; }

/* ---------- Generic cards ---------- */
.card { background: var(--white); border: 1.5px solid var(--neutral); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-ink); background: var(--ok-bg); padding: 5px 10px; border-radius: 999px; }
.lead { font-size: 15.5px; color: var(--dark); margin-top: 8px; }
.muted { color: #5d7384; font-size: 14px; }

/* ---------- Nickname ---------- */
.ask { display: flex; align-items: flex-end; gap: 12px; margin: 8px 0 18px; }
.ask img { height: 150px; width: auto; flex: none; }
.bubble { position: relative; background: var(--neutral); border-radius: 18px 18px 18px 4px; padding: 14px 16px; margin-bottom: 70px; }
.bubble h2 { font-size: 19px; }
.bubble p { font-size: 14px; color: #5d7384; margin-top: 4px; }
.field { display: block; margin-top: 16px; }
.field > span { display: block; font-weight: 800; font-size: 14px; color: var(--primary); margin-bottom: 6px; }
.field > span em { font-style: normal; font-weight: 600; color: #6d8291; }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 1.5px solid var(--light); border-radius: 14px; background: var(--white);
  font-size: 16px; font-weight: 600; outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(1, 80, 133, .12); }
.input.big { font-size: 20px; font-family: var(--font-head); font-weight: 700; text-align: center; }
.field.has-error .input { border-color: var(--error); }
.field > .field-error, .field-error { display: none; color: var(--error); font-size: 13px; font-weight: 700; margin-top: 6px; }
.field.has-error > .field-error, .field.has-error .field-error { display: block; }

/* ---------- Mission intro ---------- */
.m-intro-art { position: relative; background: linear-gradient(180deg, var(--neutral), var(--white)); border-radius: var(--radius); height: 220px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; margin-bottom: 18px; }
.m-intro-art::before { content: ''; position: absolute; width: 230px; height: 230px; border-radius: 50%; background: var(--light); bottom: -40px; }
.m-intro-art img { position: relative; height: 205px; width: auto; }
.m-intro-art .duo { display: flex; gap: 0; }
.m-intro-art .duo img { height: 195px; }
.m-intro h2 { font-size: 26px; margin-top: 10px; }
.m-intro .task { margin-top: 14px; display: flex; gap: 10px; align-items: flex-start; background: var(--ok-bg); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 700; color: var(--primary); font-size: 14.5px; }

/* ---------- Mission 1: POS ---------- */
.timer { height: 8px; border-radius: 8px; background: var(--neutral); overflow: hidden; margin: 2px 0 12px; }
.timer i { display: block; height: 100%; width: 100%; background: var(--secondary); transform-origin: left; transition: background .3s; }
.timer.low i { background: #E6A23C; }
.order-ticket { background: var(--primary); color: #fff; border-radius: var(--radius-sm); padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.order-ticket .lbl { font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .1em; color: var(--accent); }
.order-ticket ul { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-weight: 800; font-size: 15px; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.prod {
  position: relative; background: var(--white); border: 1.5px solid var(--light); border-radius: 16px;
  padding: 10px 6px 8px; text-align: center; min-height: 96px;
  transition: transform .1s, border-color .2s, box-shadow .2s;
}
.prod:active { transform: scale(.95); }
.prod .em { font-size: 32px; line-height: 1.1; display: block; }
.prod .nm { font-size: 12.5px; font-weight: 800; color: var(--dark); line-height: 1.2; display: block; margin-top: 4px; }
.prod .st { font-size: 11px; color: #6d8291; font-weight: 700; }
.prod .qty { position: absolute; top: -8px; right: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--secondary); color: #fff; font-weight: 800; font-size: 13px; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.prod.in .qty { display: flex; }
.prod.in { border-color: var(--secondary); }
.prod.flash { animation: scanFlash .35s ease; }
.cart { margin-top: 12px; background: var(--neutral); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 52px; }
.cart-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 800; color: #5d7384; letter-spacing: .04em; text-transform: uppercase; }
.cart-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cart-items .ci { display: inline-flex; align-items: center; gap: 6px; background: var(--white); border-radius: 999px; padding: 4px 4px 4px 10px; font-weight: 700; font-size: 13.5px; }
.cart-items .ci button { width: 26px; height: 26px; border-radius: 50%; background: var(--neutral); color: var(--dark); font-weight: 800; }
.cart-empty { font-size: 13.5px; color: #8295a2; margin-top: 4px; }

/* ---------- Mission 2: steps ---------- */
.slots { display: grid; gap: 8px; margin-top: 6px; }
.slot { display: flex; align-items: center; gap: 10px; min-height: 52px; border: 1.5px dashed var(--light); border-radius: 14px; padding: 8px 12px; color: #8295a2; font-weight: 700; font-size: 14px; transition: all .25s; }
.slot .n { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--neutral); color: var(--primary); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 13px; }
.slot.filled { border-style: solid; border-color: var(--secondary); background: var(--ok-bg); color: var(--primary); animation: pop .3s ease; }
.slot.filled .n { background: var(--secondary); color: #fff; }
.pool { display: grid; gap: 8px; margin-top: 16px; }
.pool-label { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5d7384; margin-top: 16px; }
.step-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--white); border: 1.5px solid var(--light); border-radius: 14px; padding: 12px 14px; min-height: 56px; font-weight: 800; font-size: 14.5px; color: var(--dark); box-shadow: var(--shadow); transition: transform .12s, opacity .25s; }
.step-card .em { font-size: 22px; }
.step-card:active { transform: scale(.98); }
.step-card.used { opacity: 0; pointer-events: none; transform: scale(.9); height: 0; min-height: 0; padding: 0; margin: -4px 0; border: 0; overflow: hidden; }
.shake { animation: shake .4s ease; border-color: var(--error) !important; }

/* ---------- Mission 3: matching ---------- */
.needs { display: grid; gap: 10px; margin-top: 4px; }
.need { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: var(--white); border: 2px solid var(--light); border-radius: 16px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s, background .2s; }
.need .em { font-size: 24px; line-height: 1.2; }
.need .tx { font-weight: 700; font-size: 14.5px; color: var(--dark); }
.need .ans { display: block; margin-top: 6px; font-family: var(--font-head); font-weight: 800; font-size: 13px; color: var(--teal-ink); }
.need.sel { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(1, 80, 133, .12); }
.need.ok { border-color: var(--secondary); background: var(--ok-bg); }
.sols { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
.sol { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; background: var(--primary); color: #fff; border-radius: 14px; font-family: var(--font-head); font-weight: 800; font-size: 14.5px; text-align: left; transition: opacity .25s, transform .12s; }
.sol:active { transform: scale(.98); }
.sol.used { opacity: .25; pointer-events: none; }
.sol:disabled { opacity: .45; }
.hintline { font-size: 13px; font-weight: 700; color: #5d7384; margin-top: 12px; text-align: center; }

/* ---------- Mission feedback sheet ---------- */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(52, 73, 94, .45); z-index: 30; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; }
.sheet-backdrop.open { opacity: 1; visibility: visible; transition: opacity .3s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 31; background: var(--white); border-radius: 28px 28px 0 0; padding: 22px 20px calc(18px + var(--safe-b)); transform: translateY(105%); transition: transform .38s cubic-bezier(.2, .9, .3, 1.1); max-height: 88%; overflow-y: auto; }
.sheet.open { transform: none; }
.fb-head { display: flex; gap: 12px; align-items: center; }
.fb-badge { width: 52px; height: 52px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; background: var(--secondary); }
.fb-badge.partial { background: #E6A23C; }
.fb-score { font-family: var(--font-head); font-weight: 800; color: var(--teal-ink); font-size: 14px; }
.fb-head h3 { font-size: 18px; }
.fb-msg { margin-top: 10px; font-size: 15px; }
.reveal { margin-top: 14px; border-radius: var(--radius); background: var(--primary); color: #fff; padding: 16px; position: relative; overflow: hidden; }
.reveal::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 150px; background: url('../assets/img/supergraphic-h.png') no-repeat center / contain; opacity: .12; }
.reveal .rh { font-family: var(--font-head); font-weight: 800; font-size: 15.5px; color: #fff; display: flex; gap: 8px; align-items: center; }
.reveal ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; position: relative; z-index: 1; }
.reveal li { display: flex; gap: 8px; font-size: 14.5px; font-weight: 600; color: #EAF5F7; }
.reveal li::before { content: '✓'; color: var(--accent); font-weight: 900; }
.reveal li b { color: #fff; }
.stock-demo { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
.stock-demo span { background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; }
.stock-demo s { opacity: .7; }

/* ---------- Result ---------- */
.result-hero { position: relative; text-align: center; background: var(--primary); color: #fff; border-radius: 0 0 36px 36px; padding: 22px 20px 26px; overflow: hidden; }
.result-hero::before { content: ''; position: absolute; left: -60px; top: -40px; width: 260px; height: 250px; background: url('../assets/img/supergraphic-h.png') no-repeat center / contain; opacity: .08; }
.result-hero .hi { position: relative; font-weight: 700; color: #DDEFF2; }
.medal { position: relative; width: 132px; height: 132px; margin: 12px auto 4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #9fe3da, var(--secondary) 60%, #008a7a); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 8px rgba(117, 208, 198, .25), 0 12px 30px rgba(0, 0, 0, .25); animation: pop .6s ease; }
.medal .pts { font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1; color: #fff; }
.medal .of { font-size: 12px; font-weight: 800; color: #E6FFFB; letter-spacing: .06em; }
.tier { position: relative; font-family: var(--font-head); font-weight: 800; font-size: 24px; margin-top: 10px; color: #fff; }
.tier-desc { position: relative; font-size: 14px; color: #DDEFF2; margin-top: 4px; }
.res-rows { display: grid; gap: 8px; margin-top: 16px; }
.res-row { display: flex; align-items: center; gap: 12px; background: var(--neutral); border-radius: 14px; padding: 10px 12px; }
.res-row .ic { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 900; color: #fff; background: var(--secondary); }
.res-row .ic.partial { background: #E6A23C; }
.res-row .t { flex: 1; font-weight: 800; font-size: 14px; color: var(--dark); }
.res-row .t small { display: block; font-weight: 600; color: #5d7384; font-size: 12.5px; }
.res-row .s { font-family: var(--font-head); font-weight: 800; color: var(--primary); }
.sec-title { font-family: var(--font-head); font-weight: 800; color: var(--primary); font-size: 16px; margin-top: 22px; }
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.feat { background: var(--white); border: 1.5px solid var(--light); border-radius: 14px; padding: 10px 12px; }
.feat .em { font-size: 20px; }
.feat b { display: block; font-size: 13.5px; color: var(--primary); line-height: 1.25; margin-top: 2px; }
.feat small { font-size: 12px; color: #5d7384; }
.res-copy { margin-top: 18px; font-size: 15px; }
.tagline-strip { margin-top: 16px; text-align: center; font-family: var(--font-head); font-weight: 800; color: var(--teal-ink); font-size: 15px; }

/* ---------- Form ---------- */
.form-head { background: var(--neutral); border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; }
.form-head img { height: 92px; width: auto; flex: none; }
.form-head h2 { font-size: 21px; }
.form-head p { font-size: 14px; margin-top: 4px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 44px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--light); background: var(--white); font-weight: 700; font-size: 14px; color: var(--dark); transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.opt[aria-pressed="true"], .opt[aria-checked="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.cond { display: none; }
.cond.show { display: block; animation: fadeIn .3s ease; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { position: absolute; opacity: 0; }
.check .box { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 2px solid var(--light); background: var(--white); display: flex; align-items: center; justify-content: center; margin-top: 1px; transition: all .15s; }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .box::after { content: '✓'; color: #fff; font-weight: 900; font-size: 15px; }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(1, 80, 133, .2); }
.check small { display: block; color: #5d7384; font-weight: 600; font-size: 12.5px; margin-top: 2px; }
.check.has-error .box { border-color: var(--error); }
.privacy-line { margin-top: 14px; font-size: 13px; color: #5d7384; }
.form-alert { display: none; margin-top: 14px; background: var(--error-bg); color: var(--error); border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.form-alert.show { display: block; }

/* ---------- Reward ---------- */
.reward-wrap { text-align: center; }
.reward-art { position: relative; height: 200px; display: flex; justify-content: center; align-items: flex-end; margin-top: 4px; }
.reward-art::before { content: ''; position: absolute; width: 210px; height: 210px; border-radius: 50%; background: var(--ok-bg); bottom: -20px; }
.reward-art img { position: relative; height: 196px; width: auto; }
.reward-wrap h2 { font-size: 24px; margin-top: 14px; }
.reward-wrap .lead { margin-top: 8px; }
.code-card { margin: 18px auto 0; max-width: 320px; background: var(--primary); color: #fff; border-radius: 22px; padding: 16px 16px 18px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.code-card::before, .code-card::after { content: ''; position: absolute; top: 50%; width: 24px; height: 24px; border-radius: 50%; background: var(--white); transform: translateY(-50%); }
.code-card::before { left: -12px; } .code-card::after { right: -12px; }
.code-card .lbl { font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .16em; color: var(--accent); }
.code-card .code { font-family: var(--font-head); font-weight: 800; font-size: 40px; letter-spacing: .12em; margin-top: 4px; }
.code-card .nm { font-size: 13.5px; font-weight: 700; color: #DDEFF2; margin-top: 2px; }
.code-card.redeemed { background: var(--dark); }
.code-card.redeemed .code { text-decoration: line-through; opacity: .6; }
.stamp { display: none; margin: 14px auto 0; width: max-content; padding: 6px 14px; border: 3px solid var(--secondary); color: var(--teal-ink); border-radius: 10px; font-family: var(--font-head); font-weight: 800; letter-spacing: .08em; transform: rotate(-4deg); animation: pop .4s ease; }
.redeemed-mode .stamp { display: block; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #5d7384; font-weight: 700; margin-top: 12px; }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); animation: blink 1.4s infinite; }
.steps-mini { text-align: left; margin-top: 18px; display: grid; gap: 8px; }
.steps-mini div { display: flex; gap: 10px; align-items: center; background: var(--neutral); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; }
.steps-mini b { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; }

/* ---------- Modal (privacy) ---------- */
.modal .sheet h3 { font-size: 19px; }
.modal .sheet p { font-size: 14px; margin-top: 10px; }

/* ---------- Toast ---------- */
.toast { position: absolute; z-index: 60; left: 16px; right: 16px; bottom: calc(90px + var(--safe-b)); background: var(--dark); color: #fff; border-radius: 14px; padding: 12px 14px; font-weight: 700; font-size: 14px; text-align: center; opacity: 0; transform: translateY(10px); transition: all .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

/* ---------- Confetti ---------- */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }

/* ---------- Keyframes ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulseBar { from { width: 25%; } to { width: 75%; } }
@keyframes scanFlash { 0% { box-shadow: 0 0 0 0 rgba(0, 178, 157, .6); } 100% { box-shadow: 0 0 0 12px rgba(0, 178, 157, 0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 70% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-height: 680px) {
  .hero-mascots img { height: 170px; }
  .m-intro-art { height: 180px; } .m-intro-art img { height: 168px; } .m-intro-art .duo img { height: 160px; }
}

/* ---------- Panduan main (v2) ---------- */
.howto-box { margin-top: 14px; border: 1.5px solid var(--light); border-radius: var(--radius-sm); padding: 12px 14px; }
.howto-title { font-family: var(--font-head); font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.howto { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.howto li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.45; }
.howto .hn { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.howto .hi { font-size: 20px; line-height: 1.2; flex: none; }
.howto .ht b { color: var(--primary); }
.sheet .howto { margin-top: 12px; }
.m-intro .m-intro-art { height: 130px; margin-bottom: 12px; } .m-intro .m-intro-art::before { width: 160px; height: 160px; bottom: -30px; } .m-intro .m-intro-art img { height: 124px; } .m-intro .m-intro-art .duo img { height: 120px; }
.m-intro h2 { font-size: 23px; margin-top: 6px; } .m-intro .lead { margin-top: 4px; font-size: 15px; } .m-intro .task { margin-top: 10px; }
.slot { min-height: 44px; padding: 6px 12px; }
#m2msg { margin-top: 10px; }

.playbar { display: flex; align-items: center; gap: 10px; background: var(--ok-bg); border-radius: 12px; padding: 8px 8px 8px 12px; margin-bottom: 10px; }
.pb-text { flex: 1; font-weight: 800; font-size: 13.5px; color: var(--primary); line-height: 1.35; }
.pb-help { flex: none; min-height: 36px; padding: 6px 10px; border-radius: 10px; background: var(--white); color: var(--primary); font-weight: 800; font-size: 12.5px; border: 1.5px solid var(--light); }

.retry-box { display: none; margin-top: 12px; background: var(--error-bg); border: 1.5px solid var(--error); color: var(--error); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }
.retry-box.show { display: block; animation: shake .4s ease; }
.retry-box b { display: block; font-size: 15px; }
.retry-box ul { margin: 6px 0 4px; padding-left: 18px; font-weight: 700; color: var(--dark); }
.retry-box small { color: var(--dark); font-weight: 600; }
.prod.wrong { border-color: var(--error); box-shadow: 0 0 0 3px rgba(194, 69, 61, .15); }

.ask-card { margin-top: 16px; background: var(--primary); color: #fff; border-radius: var(--radius-sm); padding: 12px 14px; text-align: center; }
.ask-card.pulse { animation: pop .35s ease; }
.ask-step { font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ask-q { font-family: var(--font-head); font-weight: 800; font-size: 18px; margin-top: 2px; }
.ask-sub { font-size: 12.5px; color: #CFE6EA; font-weight: 600; margin-top: 2px; }
.pool { margin-top: 10px; }

.inline-msg { display: none; margin-top: 12px; border-radius: 12px; padding: 10px 12px; font-weight: 800; font-size: 14px; text-align: center; }
.inline-msg.show { display: block; animation: fadeIn .25s ease; }
.inline-msg.ok { background: var(--ok-bg); color: var(--teal-ink); }
.inline-msg.bad { background: var(--error-bg); color: var(--error); }

.need-dots { display: flex; gap: 6px; justify-content: center; margin: 2px 0 10px; }
.need-dots i { width: 28px; height: 6px; border-radius: 6px; background: var(--light); }
.need-dots i.now { background: var(--primary); }
.need-dots i.done { background: var(--secondary); }
.need-card { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 16px; position: relative; overflow: hidden; }
.need-card.pop { animation: pop .35s ease; }
.need-card::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 130px; height: 120px; background: url('../assets/img/supergraphic-h.png') no-repeat center / contain; opacity: .1; }
.nc-step { font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.nc-body { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; font-size: 16px; line-height: 1.4; color: #EAF5F7; position: relative; z-index: 1; }
.nc-body .em { font-size: 30px; line-height: 1.1; }
.nc-body b { color: #fff; }
#sols .sol { background: var(--white); color: var(--dark); border: 1.5px solid var(--light); font-family: var(--font-body); box-shadow: var(--shadow); min-height: 60px; }
#sols .sol > span:first-child { font-size: 24px; }
#sols .sol .sl { display: block; font-family: var(--font-head); font-weight: 800; font-size: 14.5px; color: var(--primary); }
#sols .sol small { display: block; font-size: 12.5px; color: #5d7384; font-weight: 600; }
#sols .sol.correct { border-color: var(--secondary); background: var(--ok-bg); }
#sols .sol.tried { opacity: .55; border-color: var(--error); }
.solved { display: grid; gap: 6px; margin-top: 14px; }
.solved .sv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; background: var(--neutral); border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.solved .sv b { grid-column: 2; color: var(--teal-ink); font-size: 13px; }
