/* Umrah Aamani — pastel "gula-gula" game UI
   Susun atur: satu lajur telefon, butang tebal bertekan (gaya mainan), peta laluan berliku. */
:root {
  --bg: #FBF3FA;          /* kapas merah jambu */
  --bg2: #EEF4FD;         /* langit pagi */
  --card: #FFFFFF;
  --ink: #3B3550;         /* ungu kiswah lembut */
  --ink2: #7A7193;
  --line: #EADFF0;
  --pink: #F7BFD0; --pink-d: #E796AE;
  --lilac: #D7C9F3; --lilac-d: #B3A0E3;
  --mint: #A8E6CB; --mint-d: #6FCB9F;
  --sky: #CDE5F8; --sky-d: #9CC7EC;
  --butter: #FBE7A8; --butter-d: #EBC861;
  --peach: #F8D7B8;
  --gold: #E2B451;
  --kiswah: #2C2A38;
  --no: #F5A3A3; --no-d: #DE7C7C;
  --f-display: 'Fredoka', 'Baloo 2', ui-rounded, system-ui, sans-serif;
  --f-body: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-arab: 'Amiri', 'Scheherazade New', 'Noto Naskh Arabic', 'Geeza Pro', serif;
  --r: 22px;
  --press: 0 5px 0;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 60% at 50% 0%, var(--bg2), var(--bg) 60%) fixed, var(--bg);
  color: var(--ink); font: 500 16px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--lilac-d); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; margin: 0; text-wrap: balance; line-height: 1.15; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
p { margin: 0; }
#app { max-width: 520px; margin: 0 auto; min-height: 100%; position: relative; }
.screen {
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 16px;
}
.eyebrow { font: 700 .72rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.fine { font-size: .8rem; color: var(--ink2); text-align: center; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row.two > * { flex: 1; }

/* ---------- Butang mainan ---------- */
.btn {
  font: 600 1rem/1 var(--f-display); padding: 15px 20px; border-radius: 18px;
  background: var(--card); box-shadow: var(--press) var(--line); transition: transform .08s, box-shadow .08s;
  min-height: 52px;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.btn.primary { background: var(--pink); box-shadow: var(--press) var(--pink-d); }
.btn.primary:active { box-shadow: 0 1px 0 var(--pink-d); }
.btn.ok { background: var(--mint); box-shadow: var(--press) var(--mint-d); }
.btn.no { background: var(--no); box-shadow: var(--press) var(--no-d); color: #fff; }
.btn.ghost { background: var(--card); box-shadow: var(--press) var(--line); }
.btn.big { font-size: 1.12rem; padding: 18px 22px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; background: var(--card); box-shadow: 0 4px 0 var(--line); font-weight: 800; flex: none; }

/* ---------- Header ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: var(--sky); box-shadow: inset 0 -4px 0 var(--sky-d); flex: none; }
.avatar.f { background: var(--lilac); box-shadow: inset 0 -4px 0 var(--lilac-d); }
.hello { font-size: .78rem; color: var(--ink2); }
.pname { font: 600 1.15rem/1.1 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pts { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: var(--butter); box-shadow: 0 4px 0 var(--butter-d); font: 600 1.05rem/1 var(--f-display); font-variant-numeric: tabular-nums; flex: none; }
.pts.mini { padding: 7px 12px; font-size: .95rem; }
.pts.bump { animation: bump .45s; }
@keyframes bump { 40% { transform: scale(1.18) rotate(-3deg); } }
.lvl { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; background: var(--card); border-radius: 18px; padding: 12px 14px; box-shadow: 0 4px 0 var(--line); }
.lvl-name { font: 600 .92rem/1.2 var(--f-display); }
.lvl-next { font-size: .78rem; color: var(--ink2); grid-row: 1; grid-column: 2; }
.bar { grid-column: 1 / -1; height: 12px; border-radius: 99px; background: #F3ECF7; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: repeating-linear-gradient(45deg, var(--pink) 0 10px, #F9CFDC 10px 20px); transition: width .6s cubic-bezier(.3, 1.4, .5, 1); }

/* ---------- Maskot ---------- */
.guide { display: flex; align-items: flex-end; gap: 6px; cursor: pointer; }
.bubble { position: relative; background: var(--card); padding: 12px 14px; border-radius: 18px; box-shadow: 0 4px 0 var(--line); font-size: .95rem; }
.bubble.small { font-size: .88rem; border-bottom-left-radius: 6px; }
.mascot { flex: none; animation: idle 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes idle { 50% { transform: translateY(-3px) rotate(-2deg); } }

/* ---------- Peta perjalanan ---------- */
.map-title { display: flex; justify-content: space-between; align-items: center; }
.chip { font: 700 .78rem/1 var(--f-body); padding: 7px 11px; border-radius: 99px; background: var(--card); box-shadow: 0 3px 0 var(--line); color: var(--ink2); }
.journey { list-style: none; margin: 0; padding: 4px 0 0; display: flex; flex-direction: column; gap: 6px; position: relative; }
.journey::before { content: ''; position: absolute; left: 50%; top: 30px; bottom: 30px; width: 0; border-left: 4px dashed var(--lilac); transform: translateX(-2px); }
.node { position: relative; display: grid; grid-template-columns: 1fr 88px 1fr; align-items: center; gap: 10px; min-height: 104px; }
.node-btn { grid-column: 2; width: 84px; height: 84px; border-radius: 50%; background: var(--c); box-shadow: 0 7px 0 rgba(59, 53, 80, .14), inset 0 -6px 0 rgba(255, 255, 255, .5); display: grid; place-items: center; position: relative; z-index: 1; transition: transform .1s; }
.node-btn:active { transform: translateY(4px) scale(.97); }
.node-emoji { font-size: 2.2rem; }
.node-info { min-width: 0; }
.node.l .node-info { grid-column: 3; grid-row: 1; }
.node.r .node-info { grid-column: 1; grid-row: 1; text-align: right; }
.node-no { font: 700 .68rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.node-name { font: 600 1.05rem/1.2 var(--f-display); margin-top: 3px; }
.node-sub { font-size: .8rem; color: var(--ink2); }
.stars { letter-spacing: 2px; font-size: .95rem; color: #E6DDEB; }
.stars .on { color: var(--gold); }
.node.locked .node-btn { background: #EDE7F1; filter: saturate(.3); }
.node.locked .node-info { opacity: .55; }
.node.done .node-btn::after { content: '✓'; position: absolute; right: -2px; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); box-shadow: 0 2px 0 var(--mint-d); font: 700 .9rem/26px var(--f-display); text-align: center; }
.node.next .node-btn { animation: beckon 1.6s ease-in-out infinite; }
@keyframes beckon { 50% { transform: translateY(-6px); box-shadow: 0 13px 0 rgba(59, 53, 80, .1), inset 0 -6px 0 rgba(255, 255, 255, .5); } }
.here { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); background: var(--kiswah); color: #fff; font: 700 .7rem/1 var(--f-body); padding: 5px 9px; border-radius: 99px; z-index: 2; white-space: nowrap; }
.haji { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r); background: repeating-linear-gradient(-45deg, #F6F1FA 0 12px, #FFFFFF 12px 24px); box-shadow: 0 4px 0 var(--line); text-align: left; border: 2px dashed var(--lilac); }
.haji-ic { font-size: 2rem; }
.haji div { flex: 1; display: flex; flex-direction: column; }
.haji small { color: var(--ink2); }
.install { display: flex; gap: 12px; align-items: center; width: 100%; padding: 14px 16px; border-radius: var(--r); background: var(--sky); box-shadow: 0 4px 0 var(--sky-d); text-align: left; font-size: 1.4rem; }
.install span:last-child { display: flex; flex-direction: column; font-size: 1rem; }
.install small { font-size: .8rem; color: var(--ink2); }

/* ---------- Tab bawah ---------- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 520px; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-top: 2px solid var(--line); padding: 8px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); z-index: 20; border-radius: 24px 24px 0 0; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 700 .72rem/1 var(--f-body); color: var(--ink2); padding: 6px 0; border-radius: 14px; }
.tab span { font-size: 1.35rem; transition: transform .2s; }
.tab.on { color: var(--ink); background: var(--bg); }
.tab.on span { transform: translateY(-2px) scale(1.12); }

/* ---------- Onboarding ---------- */
.onboard { padding-bottom: 32px; }
.ob-hero { display: flex; align-items: flex-end; gap: 4px; margin-top: 12px; }
.ob-hero .bubble { border-bottom-left-radius: 6px; }
.logo { font-size: 2.6rem; text-align: center; letter-spacing: -.01em; }
.logo span { color: var(--pink-d); display: inline-block; transform: rotate(-3deg); }
.field { display: flex; flex-direction: column; gap: 6px; font: 600 .9rem/1 var(--f-display); }
.field input { font: 600 1.1rem var(--f-body); padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--ink); }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick-c { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border-radius: var(--r); background: var(--card); box-shadow: 0 5px 0 var(--line); font: 600 1.05rem/1.1 var(--f-display); border: 3px solid transparent; }
.pick-c span { font-size: 2.6rem; }
.pick-c small { font: 600 .74rem/1.2 var(--f-body); color: var(--ink2); text-align: center; }
.pick-c.on { border-color: var(--pink-d); background: #FFF2F6; }
.pick-c:active { transform: translateY(3px); }

/* ---------- Mod peringkat ---------- */
.stage { padding-bottom: 32px; min-height: 100vh; min-height: 100dvh; background: linear-gradient(180deg, var(--c) 0, var(--bg) 260px); }
.stage-top { display: flex; align-items: center; gap: 10px; }
.stage-prog { flex: 1; height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .7); overflow: hidden; }
.stage-prog i { display: block; height: 100%; background: var(--mint); border-radius: 99px; transition: width .4s; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .06); }
.stage-head { display: flex; flex-direction: column; gap: 4px; }
.stage-body { display: flex; flex-direction: column; gap: 16px; }
.learn, .quiz, .order, .sorter, .snip { display: flex; flex-direction: column; gap: 16px; }
.lcard { background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: 0 6px 0 var(--line); display: flex; flex-direction: column; gap: 10px; }
.lcard.soft { background: #FFFFFFAA; }
.l-ic { font-size: 2.6rem; }
.pill-list { margin: 0; padding: 0; list-style: none; counter-reset: p; display: flex; flex-direction: column; gap: 8px; }
.pill-list li { counter-increment: p; display: flex; gap: 10px; align-items: center; background: var(--bg); padding: 10px 12px; border-radius: 14px; font-weight: 700; }
.pill-list li::before { content: counter(p); width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--pink)); font: 600 .85rem/1 var(--f-display); }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.checks li::before { content: '✓ '; color: var(--mint-d); font-weight: 900; }
.dots { display: flex; justify-content: center; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #fff; transition: width .3s; }
.dots i.on { width: 26px; border-radius: 99px; background: var(--pink-d); }
.bila { font-size: .9rem; color: var(--ink2); background: var(--bg); padding: 10px 12px; border-radius: 14px; }

/* Doa */
.doa { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.doa-t { font: 600 .82rem/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
.arab { font: 400 1.75rem/2 var(--f-arab); color: var(--kiswah); }
.arab.sm { font-size: 1.2rem; line-height: 1.7; }
.doa.compact .arab { font-size: 1.5rem; }
.rumi { font-style: italic; font-weight: 700; color: #6C5AA8; }
.maksud { font-size: .95rem; color: var(--ink2); }

/* Kuiz */
.q-count { font: 700 .8rem/1 var(--f-body); color: var(--ink2); text-align: center; }
.q-card { display: flex; gap: 10px; align-items: center; background: var(--card); padding: 14px; border-radius: var(--r); box-shadow: 0 5px 0 var(--line); }
.q-card p { font: 600 1.08rem/1.35 var(--f-display); }
.opts { display: flex; flex-direction: column; gap: 12px; }
.opt { text-align: left; padding: 16px 18px; border-radius: 18px; background: var(--card); box-shadow: 0 5px 0 var(--line); font-weight: 800; border: 3px solid transparent; transition: transform .08s; }
.opt:active:not(.lock) { transform: translateY(3px); }
.opt.ok { border-color: var(--mint-d); background: #E8FAF1; }
.opt.bad { border-color: var(--no-d); background: #FFEDED; animation: shake .35s; }
.q-note { padding: 12px 14px; border-radius: 16px; background: #FFF4E0; font-weight: 700; }
.q-note.good { background: #E8FAF1; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.shake { animation: shake .35s; }

/* Susun langkah */
.slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.slot { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; border: 2px dashed var(--lilac-d); background: rgba(255, 255, 255, .5); font-weight: 800; }
.slot span { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--lilac); font: 600 .9rem/1 var(--f-display); }
.slot.filled { border-style: solid; border-color: var(--mint-d); background: #E8FAF1; animation: popin .3s; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chipbtn { padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: 0 4px 0 var(--line); font-weight: 800; text-align: left; }
.chipbtn:active { transform: translateY(3px); }

/* Boleh / larangan */
.sort-card { position: relative; background: var(--card); border-radius: 28px; padding: 28px 20px; box-shadow: 0 8px 0 var(--line); text-align: center; display: flex; flex-direction: column; gap: 8px; border: 4px solid transparent; }
.sort-card.good { border-color: var(--mint-d); } .sort-card.bad { border-color: var(--no-d); animation: shake .35s; }
.s-ic { font-size: 3.4rem; } .s-t { font: 600 1.3rem/1.25 var(--f-display); }
.s-n { position: absolute; top: 12px; right: 16px; font: 700 .78rem/1 var(--f-body); color: var(--ink2); }
.s-ans { font: 600 1rem var(--f-display); padding: 8px; border-radius: 12px; background: var(--bg); animation: popin .3s; }

/* Keputusan */
.result { display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: stretch; }
.res-stars { font-size: 3.6rem; letter-spacing: 6px; color: #EDE5F0; }
.res-stars span { display: inline-block; }
.res-stars .on { color: var(--gold); animation: starpop .5s backwards; text-shadow: 0 4px 0 #D49C34; }
@keyframes starpop { from { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3); } }
.sub-h { text-align: left; margin-top: 4px; }
.mini-cards { display: grid; gap: 10px; text-align: left; }
.mc { display: grid; grid-template-columns: 40px 1fr; gap: 2px 10px; background: var(--card); padding: 12px; border-radius: 16px; box-shadow: 0 4px 0 var(--line); }
.mc span { grid-row: span 2; font-size: 1.8rem; }
.mc small { color: var(--ink2); }
.cert { padding: 6px; border-radius: 24px; background: repeating-linear-gradient(45deg, var(--pink) 0 8px, var(--lilac) 8px 16px, var(--mint) 16px 24px, var(--butter) 24px 32px); }
.cert-in { background: #FFFDF9; border-radius: 19px; padding: 22px 18px; display: flex; flex-direction: column; gap: 8px; }
.cert-name { font: 600 2rem/1.1 var(--f-display); color: var(--pink-d); }
.cert-foot { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink2); border-top: 2px dotted var(--line); padding-top: 8px; gap: 8px; flex-wrap: wrap; }

/* Tahallul */
.hint { text-align: center; font: 600 1.05rem var(--f-display); }
.hair-box { background: var(--card); border-radius: 28px; padding: 14px; box-shadow: 0 6px 0 var(--line); }
.hair { width: 100%; height: auto; display: block; }
.hair .scalp { fill: #4A3730; }
.hair.f .scalp { fill: #FFFFFF; stroke: var(--line); stroke-width: 3; }
.strand { cursor: pointer; }
.strand path { fill: none; stroke: #5B4238; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .35s ease-out; stroke-dasharray: 260; stroke-dashoffset: 0; }
.strand circle { fill: var(--pink); transition: transform .4s, opacity .4s; }
.strand.cut path { stroke-dashoffset: 150; }
.strand.cut circle { transform: translateY(40px); opacity: 0; }
.count { text-align: center; font: 600 1.1rem var(--f-display); }
.count b { font-size: 1.8rem; color: var(--pink-d); }

/* Kitab doa / lencana / tetapan */
.doa-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doa-item { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 16px 10px; border-radius: var(--r); background: var(--card); box-shadow: 0 5px 0 var(--line); min-width: 0; }
.doa-item .arab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.doa-item b { font: 600 .95rem/1.2 var(--f-display); }
.doa-item.locked { background: #F4EFF7; box-shadow: none; border: 2px dashed var(--line); }
.doa-item.locked small { font-size: .74rem; color: var(--ink2); }
.lk { font-size: 1.6rem; }
.hafal { font: 700 .72rem/1 var(--f-body); background: var(--butter); padding: 4px 8px; border-radius: 99px; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--r); background: #F4EFF7; text-align: center; min-width: 0; }
.badge b { font: 600 .8rem/1.15 var(--f-display); color: var(--ink2); }
.b-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; background: #E9E2EE; filter: grayscale(1); opacity: .45; }
.badge.got { background: var(--card); box-shadow: 0 5px 0 var(--line); }
.badge.got b { color: var(--ink); }
.badge.got .b-ic { filter: none; opacity: 1; background: conic-gradient(from 0deg, var(--pink), var(--lilac), var(--mint), var(--butter), var(--pink)); box-shadow: inset 0 0 0 5px #fff; }
.set-list { display: flex; flex-direction: column; gap: 10px; }
.set { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-radius: 18px; background: var(--card); box-shadow: 0 4px 0 var(--line); font-weight: 800; text-align: left; width: 100%; position: relative; cursor: pointer; }
.set input { position: absolute; opacity: 0; pointer-events: none; }
.sw { width: 50px; height: 30px; border-radius: 99px; background: #E5DEEA; position: relative; transition: background .2s; flex: none; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); transition: transform .2s; }
.set input:checked + .sw { background: var(--mint-d); }
.set input:checked + .sw::after { transform: translateX(20px); }
.set input:focus-visible + .sw { outline: 3px solid var(--lilac-d); outline-offset: 2px; }
.set.danger { color: #C25B5B; }
.about { background: rgba(255, 255, 255, .6); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }

/* ---------- Modal, toast, mata terapung ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(59, 53, 80, .35); display: flex; align-items: flex-end; justify-content: center; padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); opacity: 0; transition: opacity .2s; }
.modal-wrap.in { opacity: 1; }
.modal { width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; background: var(--card); border-radius: 28px; padding: 22px; display: flex; flex-direction: column; gap: 12px; transform: translateY(30px); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 8px 0 var(--line); }
.modal-wrap.in .modal { transform: none; }
.modal.center { text-align: center; align-items: stretch; }
.badge-big { width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 3.6rem; background: conic-gradient(from 0deg, var(--pink), var(--lilac), var(--mint), var(--butter), var(--pink)); box-shadow: inset 0 0 0 8px #fff, 0 6px 0 var(--line); }
.badge-big.dim { filter: grayscale(1); opacity: .5; }
.pop { animation: popin .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes popin { from { transform: scale(.6); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--kiswah); color: #fff; padding: 12px 18px; border-radius: 16px; font-weight: 700; z-index: 60; animation: toast 2.4s forwards; max-width: calc(100% - 32px); text-align: center; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.floatpts { position: fixed; z-index: 70; pointer-events: none; transform: translate(-50%, 0); font: 600 1.3rem var(--f-display); color: var(--ink); background: var(--butter); padding: 4px 12px; border-radius: 99px; box-shadow: 0 3px 0 var(--butter-d); animation: floatup 1.1s ease-out forwards; }
@keyframes floatup { to { transform: translate(-50%, -70px) scale(1.1); opacity: 0; } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }

/* ---------- Mod 3D ---------- */
#app.play-mode { max-width: none; }
.play { position: fixed; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage3d { position: absolute; inset: 0; }
.stage3d canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 10px; align-items: center; padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-pill { flex: 1; min-width: 0; display: flex; flex-direction: column; background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); padding: 8px 14px; border-radius: 18px; box-shadow: 0 4px 0 rgba(59, 53, 80, .12); }
.hud-pill b { font: 600 1.05rem/1.2 var(--f-display); }
.hud-pill small { font-size: .78rem; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rounds { position: absolute; top: calc(max(12px, env(safe-area-inset-top, 0px)) + 62px); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.rounds i { --p: 0%; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 .8rem/1 var(--f-display); font-style: normal; background: rgba(255, 255, 255, .75); color: var(--ink2); }
.rounds i.on { background: conic-gradient(var(--pink-d) var(--p), #fff 0); color: var(--ink); box-shadow: 0 0 0 3px #fff; }
.rounds i.done { background: var(--mint); color: var(--ink); box-shadow: 0 3px 0 var(--mint-d); }
.banner { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(12px, env(safe-area-inset-top, 0px)) + 104px); width: min(460px, calc(100% - 24px)); }
.banner-in { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; background: rgba(255, 255, 255, .94); padding: 10px 14px; border-radius: 20px; box-shadow: 0 5px 0 rgba(59, 53, 80, .12); animation: popin .3s; }
.banner-in small { color: var(--ink2); font-size: .8rem; }
.mini-btn { margin-top: 6px; padding: 8px 16px; border-radius: 99px; background: var(--mint); box-shadow: 0 3px 0 var(--mint-d); font: 600 .9rem/1 var(--f-display); }
.mini-btn:active { transform: translateY(2px); box-shadow: none; }
.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 0 max(12px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.walk-btn { width: min(240px, 56vw); min-height: 76px; border-radius: 28px; background: var(--pink); box-shadow: 0 7px 0 var(--pink-d); font: 600 .88rem/1.15 var(--f-display); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px; touch-action: none; }
.walk-btn span { font-size: 1.7rem; }
.walk-btn.on { transform: translateY(5px); box-shadow: 0 2px 0 var(--pink-d); background: #F9CDDA; }
.walk-btn.on span { animation: steps .4s infinite alternate; }
@keyframes steps { to { transform: translateY(-3px) rotate(8deg); } }
.side-btn { width: 64px; height: 64px; border-radius: 22px; background: rgba(255, 255, 255, .95); box-shadow: 0 5px 0 rgba(59, 53, 80, .14); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.4rem; flex: none; }
.side-btn small { font: 700 .62rem/1 var(--f-body); }
.side-btn.on { background: var(--mint); box-shadow: 0 2px 0 var(--mint-d); transform: translateY(3px); }
.sheet { position: absolute; inset: 0; background: rgba(59, 53, 80, .25); display: flex; align-items: flex-end; justify-content: center; padding: 12px max(12px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); z-index: 5; }
.sheet-in { width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto; background: var(--card); border-radius: 28px; padding: 18px; display: flex; flex-direction: column; gap: 10px; text-align: center; box-shadow: 0 8px 0 var(--line); }
.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--bg); font: 600 1.05rem var(--f-display); z-index: 9; padding: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (min-width: 560px) { .screen { padding-top: 28px; } }

/* ---------- Ikon clay (aset PNG/WebP) ---------- */
.ico { display: inline-block; object-fit: contain; vertical-align: middle; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; flex: none; }
.ico.in { width: 1.4em; height: 1.4em; margin-right: 6px; vertical-align: -0.38em; }
.ico.in.lg { width: 1.8em; height: 1.8em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn .ico.in { margin-right: 0; }
.pts .star { width: 26px; height: 26px; margin: -4px 0; }
.pts.mini .star { width: 22px; height: 22px; }
.floatpts { display: inline-flex; align-items: center; gap: 4px; }
.floatpts .ico { width: 24px; height: 24px; }
.avatar { overflow: hidden; }
.avatar .ico { width: 46px; height: 46px; }
.pick-c .ico { width: 76px; height: 76px; }
.node-ic { width: 60px; height: 60px; filter: drop-shadow(0 3px 2px rgba(59, 53, 80, .12)); }
.haji .haji-ic { width: 52px; height: 52px; }
.haji .lock { width: 30px; height: 30px; opacity: .8; }
.stage-head h1 { display: flex; align-items: center; gap: 10px; }
.stage-head .h-ic { width: 48px; height: 48px; }
img.l-ic { width: 84px; height: 84px; }
.chipbtn, .slot { display: inline-flex; align-items: center; }
.chip-ic { width: 30px; height: 30px; margin-right: 8px; }
.sort-card .s-ic { width: 120px; height: 120px; margin: 0 auto; }
.mc .mc-ic { grid-row: span 2; width: 44px; height: 44px; }
.badge .b-ic { width: 76px; height: 76px; background: none; border-radius: 0; box-shadow: none; }
.badge.got .b-ic { background: none; box-shadow: none; filter: drop-shadow(0 3px 2px rgba(59, 53, 80, .12)); }
.badge-big, .badge-big.plain { width: 150px; height: 150px; background: none; box-shadow: none; border-radius: 0; }
.badge-big .ico { width: 150px; height: 150px; filter: drop-shadow(0 6px 4px rgba(59, 53, 80, .15)); }
.badge-big.dim .ico { filter: grayscale(1); }
.tab .tab-ic { width: 32px; height: 32px; transition: transform .2s, filter .2s; }
.tab:not(.on) .tab-ic { filter: saturate(.55) opacity(.8); }
.tab.on .tab-ic { transform: translateY(-2px) scale(1.12); }
.walk-btn .walk-ic { width: 42px; height: 42px; }
.walk-btn.on .walk-ic { animation: steps .4s infinite alternate; }
.side-btn .ico { width: 36px; height: 36px; }
.set > span { display: inline-flex; align-items: center; }
.set .set-ic { width: 32px; height: 32px; margin-right: 10px; }
.install .inst-ic { width: 46px; height: 46px; }
.doa-item .lk { width: 44px; height: 44px; }
.hafal { display: inline-flex; align-items: center; gap: 3px; }
.hafal .ico { width: 14px; height: 14px; }
.res-mascot { display: flex; justify-content: center; }
.res-mascot .mascot { animation: idle 1.6s ease-in-out infinite; }
.loading .mascot, .ob-hero .mascot { filter: drop-shadow(0 4px 3px rgba(59, 53, 80, .12)); }
img.mascot { object-fit: contain; }
.banner-in b { display: inline-flex; align-items: center; }
.cert-foot span { display: inline-flex; align-items: center; }
