/* Law of Attraction — mobile-first, tema navy/ungu dengan aksen emas */
:root {
  --bg: #0b0d24;
  --bg2: #12153a;
  --card: rgba(255, 255, 255, .06);
  --card2: rgba(255, 255, 255, .09);
  --stroke: rgba(255, 255, 255, .11);
  --text: #f4f1ff;
  --muted: #a9acd2;
  --gold: #f5d27a;
  --gold2: #e9b44c;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --emerald: #34d399;
  --red: #fb7185;
  --radius: 22px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; font-family: var(--font); color: var(--text); line-height: 1.45;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, .28), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(236, 72, 153, .14), transparent 60%),
    var(--bg);
  background-attachment: fixed; min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: contain;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--text); width: 100%; background: rgba(255, 255, 255, .07);
  border: 1px solid var(--stroke); border-radius: 14px; padding: 13px 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 210, 122, .15); }
input::placeholder, textarea::placeholder { color: rgba(169, 172, 210, .6); }
select option { color: #111; }
textarea { resize: vertical; min-height: 96px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Splash ---------- */
#splash { position: fixed; inset: 0; z-index: 99; display: grid; place-content: center; gap: 10px; text-align: center; background: var(--bg); transition: opacity .4s; }
#splash.gone { opacity: 0; pointer-events: none; }
.splash-logo { font-size: 56px; animation: w3dpulse 1.6s ease-in-out infinite; }
.splash-name { font-weight: 800; letter-spacing: .5px; color: var(--gold); }
@keyframes pulse { 50% { transform: scale(1.12); filter: drop-shadow(0 0 18px rgba(245, 210, 122, .6)); } }

/* ---------- Shell ---------- */
.app-wrap, #shell, #auth { max-width: 520px; margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + var(--safe-t)) 18px 10px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(11, 13, 36, .88), rgba(11, 13, 36, .55));
}
.brand { display: flex; gap: 8px; align-items: center; font-weight: 800; letter-spacing: .3px; color: var(--gold); }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--stroke); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
#view { padding: 6px 16px calc(var(--nav-h) + 28px + var(--safe-b)); animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(520px, 100%); z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(14, 16, 44, .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--stroke); border-radius: 22px 22px 0 0;
}
.tabbar button { display: grid; justify-items: center; gap: 3px; padding: 6px 0; color: var(--muted); font-size: 11px; font-weight: 700; border-radius: 14px; transition: color .2s; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--gold); }
.tabbar button.on svg { filter: drop-shadow(0 0 8px rgba(245, 210, 122, .55)); }

/* ---------- Kartu & elemen umum ---------- */
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 18px; margin-top: 14px; }
.card h3 { font-size: 15px; color: var(--muted); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 2px 10px; }
.sec-title h2 { font-size: 18px; }
.link { color: var(--gold); font-size: 13px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.gap8 { gap: 8px; } .mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; } .mt20 { margin-top: 20px; }
.pos { color: var(--emerald); } .neg { color: var(--red); } .gold { color: var(--gold); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--card2); border: 1px solid var(--stroke); }
.chip.gold { background: rgba(245, 210, 122, .14); border-color: rgba(245, 210, 122, .35); color: var(--gold); }
.chip.green { background: rgba(52, 211, 153, .13); border-color: rgba(52, 211, 153, .35); color: var(--emerald); }
.chip.purple { background: rgba(139, 92, 246, .18); border-color: rgba(139, 92, 246, .45); color: #c4b5fd; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 16px; font-weight: 800; font-size: 15px; background: var(--card2); border: 1px solid var(--stroke); transition: transform .12s, filter .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #2a1d00; border: 0; box-shadow: 0 8px 24px rgba(233, 180, 76, .3); }
.btn.purple { background: linear-gradient(135deg, var(--purple), var(--pink)); border: 0; box-shadow: 0 8px 24px rgba(139, 92, 246, .35); }
.btn.danger { background: rgba(251, 113, 133, .14); border-color: rgba(251, 113, 133, .4); color: var(--red); }
.btn.block { display: flex; width: 100%; }
.btn.sm { padding: 9px 13px; font-size: 13px; border-radius: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.bar { height: 9px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--pink)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar.gold > i { background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.bar.green > i { background: linear-gradient(90deg, #10b981, var(--emerald)); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button, .pill { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--stroke); font-size: 13px; font-weight: 700; color: var(--muted); }
.chips button.on, .pill.on { background: rgba(245, 210, 122, .16); border-color: var(--gold); color: var(--gold); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--stroke); }
.seg button { padding: 10px 6px; border-radius: 12px; font-weight: 800; font-size: 13px; color: var(--muted); }
.seg button.on { background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff; }

/* ---------- Latar avatar ---------- */
.bg-aurora  { background: linear-gradient(135deg, #3b2a8f, #7c3aed 55%, #ec4899); }
.bg-sunrise { background: linear-gradient(135deg, #f97316, #f43f5e 55%, #7c3aed); }
.bg-ocean   { background: linear-gradient(135deg, #0ea5e9, #2563eb 55%, #4c1d95); }
.bg-forest  { background: linear-gradient(135deg, #059669, #0d9488 55%, #1e3a8a); }
.bg-rose    { background: linear-gradient(135deg, #f472b6, #c026d3 55%, #4c1d95); }
.bg-gold    { background: linear-gradient(135deg, #f59e0b, #d97706 55%, #78350f); }

/* ---------- Auth ---------- */
#auth { padding: calc(36px + var(--safe-t)) 22px 40px; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.auth-hero { text-align: center; margin-bottom: 22px; }
.auth-hero .logo { font-size: 58px; filter: drop-shadow(0 0 22px rgba(245, 210, 122, .55)); }
.auth-hero h1 { font-size: 28px; margin-top: 6px; letter-spacing: .3px; }
.auth-hero p { color: var(--gold); margin: 6px 0 0; font-weight: 700; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 8px; font-size: 18px; }
.err { color: var(--red); font-size: 13.5px; font-weight: 700; margin-top: 12px; min-height: 18px; }
.disclaimer { font-size: 12px; color: var(--muted); text-align: center; margin-top: 18px; }

/* ---------- Onboarding ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 20px; }
.steps i { flex: 1; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .14); }
.steps i.on { background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-grid button { aspect-ratio: 1; border-radius: 16px; font-size: 28px; background: var(--card); border: 2px solid transparent; }
.avatar-grid button.on { border-color: var(--gold); background: rgba(245, 210, 122, .12); }
.bg-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.bg-grid button { aspect-ratio: 1; border-radius: 14px; border: 3px solid transparent; }
.bg-grid button.on { border-color: #fff; }
.avatar-preview { width: 120px; height: 120px; border-radius: 36px; display: grid; place-items: center; font-size: 66px; margin: 0 auto 18px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }

/* ---------- Home ---------- */
.hero { position: relative; margin-top: 8px; border-radius: 28px; padding: 22px 20px 20px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .2); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.hero::before { width: 220px; height: 220px; right: -70px; top: -80px; }
.hero::after { width: 120px; height: 120px; left: -40px; bottom: -50px; background: rgba(255, 255, 255, .09); }
.hero > * { position: relative; z-index: 1; }
.hero .greet { font-size: 14px; opacity: .9; font-weight: 700; }
.hero h1 { font-size: 26px; margin: 2px 0 14px; }
.hero-body { display: flex; align-items: center; gap: 16px; }
.avatar-big { width: 96px; height: 96px; flex: none; border-radius: 30px; display: grid; place-items: center; font-size: 56px; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.lvl { font-weight: 800; font-size: 14px; }
.hero .bar { background: rgba(255, 255, 255, .25); margin-top: 8px; }
.hero .bar > i { background: #fff; }
.wealth { margin-top: 14px; padding: 20px; border-radius: var(--radius); background: linear-gradient(160deg, rgba(245, 210, 122, .16), rgba(245, 210, 122, .04)); border: 1px solid rgba(245, 210, 122, .35); }
.wealth .label { color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.wealth .big { font-size: 34px; font-weight: 900; margin: 4px 0 10px; letter-spacing: -.5px; }
.income-list { display: grid; gap: 8px; margin: 12px 0; }
.income-list .row { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.income-total { font-size: 28px; font-weight: 900; color: var(--emerald); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.quick button { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 18px; background: var(--card); border: 1px solid var(--stroke); font-size: 12.5px; font-weight: 800; }
.quick button b { font-size: 24px; }
.intent-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.intent-chips button { padding: 6px 11px; border-radius: 999px; background: var(--card2); border: 1px solid var(--stroke); font-size: 12px; font-weight: 700; color: var(--muted); }
.h-scroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scroll-snap-type: x proximity; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { scroll-snap-align: start; flex: none; }

/* ---------- Bisnis ---------- */
.biz-grid { display: grid; gap: 12px; }
.biz-card { position: relative; border-radius: 24px; padding: 16px; background: var(--card); border: 1px solid var(--stroke); overflow: hidden; text-align: left; display: block; width: 100%; }
.biz-card.mini { width: 210px; }
.biz-top { display: flex; gap: 12px; align-items: center; }
.biz-icon { width: 52px; height: 52px; flex: none; border-radius: 18px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(135deg, rgba(139, 92, 246, .35), rgba(236, 72, 153, .25)); border: 1px solid var(--stroke); }
.biz-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 10px; }
.biz-stats div { background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 8px 10px; }
.biz-stats small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.biz-stats b { font-size: 14px; }
.pending-row { margin: 0 0 10px; }
.fab { position: fixed; z-index: 25; right: max(18px, calc(50% - 260px + 18px)); bottom: calc(var(--nav-h) + 18px + var(--safe-b)); width: 58px; height: 58px; border-radius: 20px; font-size: 30px; font-weight: 700; color: #2a1d00; background: linear-gradient(135deg, var(--gold), var(--gold2)); box-shadow: 0 10px 30px rgba(233, 180, 76, .45); display: grid; place-items: center; }
.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.empty .em { font-size: 52px; margin-bottom: 8px; }
.hist { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 12px; }
.hist i { flex: 1; min-height: 6px; border-radius: 6px 6px 3px 3px; background: linear-gradient(to top, #10b981, var(--emerald)); }

/* ---------- Dreams ---------- */
.dream-card { border-radius: 26px; overflow: hidden; background: var(--card); border: 1px solid var(--stroke); margin-bottom: 14px; }
.dream-art { position: relative; height: 128px; display: grid; place-items: center; font-size: 66px; background: linear-gradient(135deg, rgba(139, 92, 246, .55), rgba(236, 72, 153, .4)); }
.dream-art.bought { background: linear-gradient(135deg, rgba(52, 211, 153, .45), rgba(16, 185, 129, .25)); }
.dream-art .cat { position: absolute; left: 12px; top: 12px; }
.dream-body { padding: 16px; }
.dream-body h3 { font-size: 17px; color: var(--text); }
.dream-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 14px; }
.market-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--stroke); margin-bottom: 10px; }
.market-item .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(135deg, rgba(139, 92, 246, .35), rgba(236, 72, 153, .25)); flex: none; }
.search { position: relative; margin-bottom: 10px; }
.search input { padding-left: 40px; }
.search::before { content: "🔎"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 16px; }

/* ---------- Visualisasi ---------- */
.viz { position: relative; border-radius: 26px; height: 230px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .25); }
.viz .scene { display: flex; align-items: flex-end; gap: 6px; z-index: 2; }
.viz .a { font-size: 82px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); animation: float 4s ease-in-out infinite; }
.viz .o { font-size: 98px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .4)); animation: float 5s ease-in-out infinite reverse; }
.viz .spark { position: absolute; font-size: 18px; animation: twinkle 2.4s ease-in-out infinite; opacity: 0; }
@keyframes twinkle { 50% { opacity: 1; transform: scale(1.3) rotate(20deg); } }
.affirm { text-align: center; font-size: 17px; font-weight: 800; line-height: 1.5; margin: 18px 4px 4px; background: linear-gradient(90deg, var(--gold), #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Wallet ---------- */
.balance { text-align: center; padding: 26px 18px; border-radius: 28px; background: linear-gradient(160deg, rgba(139, 92, 246, .35), rgba(236, 72, 153, .18)); border: 1px solid var(--stroke); margin-top: 8px; }
.balance .big { font-size: 36px; font-weight: 900; margin: 6px 0; letter-spacing: -.5px; }
.stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .08); margin: 12px 0; }
.stack i { display: block; height: 100%; }
.legend { display: grid; gap: 8px; }
.legend .row { font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tx { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--stroke); }
.tx:last-child { border-bottom: 0; }
.tx .ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--card2); font-size: 20px; flex: none; }
.tx .t { font-weight: 700; font-size: 14px; }

/* ---------- Profil ---------- */
.profile-head { text-align: center; padding: 22px 16px; border-radius: 28px; margin-top: 8px; border: 1px solid rgba(255, 255, 255, .22); }
.profile-head .avatar-big { margin: 0 auto 12px; animation: none; }
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.ach { text-align: center; padding: 12px 6px; border-radius: 18px; background: var(--card); border: 1px solid var(--stroke); }
.ach .i { font-size: 30px; }
.ach b { display: block; font-size: 11.5px; margin-top: 4px; line-height: 1.25; }
.ach.locked { opacity: .38; filter: grayscale(1); }
.ach.done { border-color: rgba(245, 210, 122, .5); background: rgba(245, 210, 122, .08); }
.kv { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--stroke); font-size: 14px; }
.kv:last-child { border: 0; }
.kv span:first-child { color: var(--muted); }
.switch { width: 50px; height: 30px; border-radius: 999px; background: rgba(255, 255, 255, .18); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--emerald); }
.switch.on::after { transform: translateX(20px); }

/* ---------- Sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(4, 5, 20, .66); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(520px, 100%); max-height: 92dvh; overflow-y: auto; border-radius: 28px 28px 0 0; padding: 12px 20px calc(24px + var(--safe-b)); background: linear-gradient(180deg, #1a1c4d, #11133a); border: 1px solid var(--stroke); border-bottom: 0; animation: up .3s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .25); margin: 0 auto 14px; }
.sheet h2 { font-size: 20px; margin-bottom: 4px; }
.sheet .close { position: absolute; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.emoji-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.emoji-pick button { width: 42px; height: 42px; border-radius: 12px; font-size: 22px; background: var(--card); border: 2px solid transparent; }
.emoji-pick button.on { border-color: var(--gold); }
.preview-box { padding: 12px 14px; border-radius: 14px; background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); font-size: 14px; margin-top: 14px; display: flex; justify-content: space-between; }
.notif { padding: 12px 0; border-bottom: 1px solid var(--stroke); display: flex; gap: 12px; }
.notif.unread .t::after { content: " •"; color: var(--pink); }
.notif .t { font-weight: 800; font-size: 14px; }

/* ---------- Toast & FX ---------- */
#toast-root { position: fixed; z-index: 90; left: 0; right: 0; top: calc(12px + var(--safe-t)); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { pointer-events: auto; max-width: 440px; width: 100%; padding: 13px 16px; border-radius: 16px; font-weight: 700; font-size: 14px; display: flex; gap: 10px; align-items: center; background: #1f2160; border: 1px solid var(--stroke); box-shadow: 0 12px 34px rgba(0, 0, 0, .45); animation: drop .35s cubic-bezier(.2, .9, .2, 1) both; }
.toast.err { background: #4a1630; border-color: rgba(251, 113, 133, .5); }
.toast.ok { border-color: rgba(52, 211, 153, .5); }
.toast.ach { background: linear-gradient(135deg, #3b2a8f, #6d28d9); border-color: rgba(245, 210, 122, .6); }
.toast .em { font-size: 24px; }
.toast.out { animation: out .3s ease both; }
@keyframes drop { from { transform: translateY(-24px); opacity: 0; } }
@keyframes out { to { transform: translateY(-14px); opacity: 0; } }
#fx-root { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.coin { position: absolute; font-size: 26px; animation: coin 1s ease-out forwards; }
@keyframes coin { 0% { transform: translate(0, 0) scale(.6); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(360deg); opacity: 0; } }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; opacity: .95; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.celebrate { position: fixed; inset: 0; z-index: 85; display: grid; place-content: center; text-align: center; gap: 8px; padding: 24px; background: rgba(6, 7, 28, .9); backdrop-filter: blur(6px); animation: fade .3s both; }
.celebrate .big-em { font-size: 96px; animation: pop .7s cubic-bezier(.2, 1.4, .3, 1) both; }
.celebrate h2 { font-size: 28px; color: var(--gold); }
@keyframes pop { from { transform: scale(.2); opacity: 0; } }

@media (min-width: 560px) {
  body { padding: 0; }
  .tabbar { border-radius: 22px 22px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ======================= PHASE 2 ======================= */

/* Aksesori avatar */
.avatar-big, .avatar-preview { position: relative; }
.acc { position: absolute; top: -10px; right: -8px; font-size: 0.42em; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .4)); }
.avatar-big .acc { font-size: 30px; }
.avatar-preview .acc { font-size: 38px; top: -12px; right: -10px; }

/* Check-in */
.ck-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ck { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid transparent; }
.ck small { font-size: 9.5px; color: var(--muted); font-weight: 700; }
.ck b { font-size: 17px; line-height: 1.2; }
.ck.done { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .4); }
.ck.done b { color: var(--emerald); }
.ck.today { border-color: var(--gold); background: rgba(245, 210, 122, .12); animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 16px rgba(245, 210, 122, .55); } }

/* Event bisnis */
.ev-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--stroke); }
.ev-row:last-child { border-bottom: 0; }
.ev-row .t { font-weight: 700; font-size: 14px; }
.ev-ic { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: 20px; background: var(--card2); }

/* Upgrade & cabang */
.up-box { margin-top: 12px; padding: 14px; border-radius: 18px; background: rgba(139, 92, 246, .12); border: 1px solid rgba(139, 92, 246, .35); }
.up-box.locked { background: rgba(255, 255, 255, .05); border-color: var(--stroke); }

/* Pemandangan (Kehidupanku, visualisasi) */
.vscene { position: relative; overflow: hidden; border-radius: 24px; border: 1px solid rgba(255, 255, 255, .22); background: linear-gradient(to bottom, var(--s1), var(--s2)); }
.vscene.night::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(4, 5, 30, .62), rgba(4, 5, 30, .3)); pointer-events: none; z-index: 1; }
.vscene.night .sun, .vscene.night .actors, .vscene.night .spark { z-index: 2; }
.vscene .sun { position: absolute; top: 12px; right: 16px; font-size: 32px; filter: drop-shadow(0 0 14px rgba(255, 244, 180, .8)); z-index: 2; animation: float 6s ease-in-out infinite; }
.vscene .x { position: absolute; font-size: 28px; opacity: .92; z-index: 1; animation: drift 9s ease-in-out infinite; }
.vscene .x1 { left: 8%; top: 12%; } .vscene .x2 { left: 56%; top: 22%; animation-delay: -3s; } .vscene .x3 { left: 30%; top: 40%; animation-delay: -6s; font-size: 22px; }
@keyframes drift { 50% { transform: translateX(14px); } }
.vscene .ground { position: absolute; left: -10%; right: -10%; bottom: -14%; height: 40%; border-radius: 50%; background: var(--g); box-shadow: inset 0 14px 22px rgba(255, 255, 255, .12); }
.vscene .actors { position: absolute; left: 0; right: 0; bottom: 14%; display: flex; align-items: flex-end; justify-content: center; gap: 10px; z-index: 2; padding: 0 12px; }
.vscene .a, .vscene .o { position: relative; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); }
.vscene .a { font-size: 70px; animation: float 4s ease-in-out infinite; }
.vscene .o { font-size: 86px; animation: float 5s ease-in-out infinite reverse; }
.vscene .spark { position: absolute; font-size: 16px; opacity: 0; animation: twinkle 2.4s ease-in-out infinite; }
.vscene.life .av { position: relative; width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; font-size: 34px; border: 2px solid rgba(255, 255, 255, .6); flex: none; }
.vscene.life .av .acc { font-size: 22px; top: -12px; right: -8px; }
.vscene.life .big { font-size: 84px; line-height: 1; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); }
.vscene.life .big.dim { opacity: .55; font-size: 56px; }
.vscene.life .rest { display: flex; gap: 2px; font-size: 40px; flex-wrap: wrap; max-width: 46%; align-items: flex-end; }
.vscene .vcap { position: absolute; left: 12px; right: 12px; top: 14px; text-align: center; font-size: 13px; font-weight: 800; z-index: 3; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.life-card { margin-top: 0; border-radius: 26px; background: var(--card); border: 1px solid var(--stroke); overflow: hidden; cursor: pointer; }
.life-card .vscene { border-radius: 0; border: 0; }
.star { width: 42px; height: 42px; border-radius: 14px; font-size: 22px; color: var(--muted); background: var(--card2); flex: none; }
.star.on { color: var(--gold); background: rgba(245, 210, 122, .16); text-shadow: 0 0 12px rgba(245, 210, 122, .8); }

/* Vision Board */
.vb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vb-tile { position: relative; aspect-ratio: 1; border-radius: 20px; padding: 10px 8px 8px; display: flex; flex-direction: column; justify-content: space-between; text-align: center; background: linear-gradient(135deg, var(--s1), var(--s2)); border: 1px solid rgba(255, 255, 255, .25); cursor: pointer; overflow: hidden; }
.vb-ic { font-size: 38px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.vb-t { font-size: 11px; font-weight: 800; line-height: 1.2; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vb-tile .bar { height: 5px; background: rgba(255, 255, 255, .3); }
.vb-tile .bar > i { background: #fff; }
.vb-ok { position: absolute; top: 6px; right: 6px; font-size: 16px; }
.vb-tile.done { box-shadow: 0 0 0 2px rgba(52, 211, 153, .7) inset; }

/* Sesi visualisasi */
.viz-session { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: radial-gradient(circle at 50% 40%, #2d1f6e, #0b0d24 70%); animation: fade .4s both; }
.vs-top { font-weight: 800; font-size: 18px; color: var(--gold); margin-bottom: 28px; }
.breath { position: relative; width: 240px; height: 240px; display: grid; place-items: center; }
.orb { position: absolute; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c8, var(--gold) 45%, #8b5cf6); box-shadow: 0 0 60px rgba(245, 210, 122, .55); transition: transform 4s ease-in-out; transform: scale(.8); }
.orb.in { transform: scale(1.7); transition-duration: 4s; }
.orb.hold { transform: scale(1.7); transition-duration: 0s; }
.orb.out { transform: scale(.8); transition-duration: 4s; }
.vs-phase { position: relative; z-index: 2; font-weight: 800; font-size: 17px; color: #2a1d00; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.vs-line { min-height: 52px; max-width: 320px; margin-top: 18px; font-size: 18px; font-weight: 800; line-height: 1.5; background: linear-gradient(90deg, var(--gold), #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Peta jalan Life Level */
.roadmap { display: grid; gap: 6px; }
.rm { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 13px; opacity: .6; }
.rm.done { opacity: 1; background: rgba(52, 211, 153, .08); }
.rm.next { opacity: 1; background: rgba(245, 210, 122, .1); border: 1px solid rgba(245, 210, 122, .4); }
.rm-lv { font-weight: 900; color: var(--gold); }

/* Kelangkaan achievement */
.ach.r-rare.done { border-color: rgba(96, 165, 250, .7); background: rgba(96, 165, 250, .1); }
.ach.r-epic.done { border-color: rgba(168, 85, 247, .8); background: rgba(168, 85, 247, .14); }
.ach.r-legendary.done { border-color: var(--gold); background: linear-gradient(160deg, rgba(245, 210, 122, .22), rgba(236, 72, 153, .12)); box-shadow: 0 0 18px rgba(245, 210, 122, .25); }
.toast.ach.epic, .toast.ach.legendary { border-color: var(--gold); }
.emoji-pick button { position: relative; }
.emoji-pick button.lockd { opacity: .4; }
.emoji-pick button small { position: absolute; bottom: -2px; right: 0; left: 0; font-size: 8px; font-weight: 800; }

/* ---------- Phase 3: Dunia 3D ---------- */
.world-btn { margin-top: 12px; background: linear-gradient(135deg, #0ea5e9, #7c3aed); color: #fff; }
#world { position: fixed; inset: 0; z-index: 50; background: #0b0d2e; touch-action: none; }
.w3d-stage { position: absolute; inset: 0; }
.w3d-canvas { display: block; touch-action: none; }
.w3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.w3d-label { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 6px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; white-space: nowrap; max-width: 190px; background: rgba(14, 16, 48, .78); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(4px); pointer-events: auto; cursor: pointer; will-change: transform; }
.w3d-label b { overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.w3d-label .i { font-size: 15px; }
.w3d-label .p { background: var(--green, #2dd4a0); color: #052e1f; border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.w3d-label .p.g { background: var(--gold, #f5d27a); color: #3a2800; }
.w3d-label.asset { background: rgba(14, 16, 48, .62); font-weight: 700; }
.w3d-label.dream { border-color: rgba(245, 210, 122, .6); }
.w3d-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 0; pointer-events: none; }
.w3d-top > * { pointer-events: auto; }
.w3d-top { flex-wrap: wrap; }
.w3d-top > button { order: 1; }
.w3d-hours { order: 2; margin-left: auto; }
.w3d-hud { order: 3; flex-basis: 100%; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.w3d-chip { border: 1px solid rgba(255, 255, 255, .22); background: rgba(14, 16, 48, .72); color: #fff; font-weight: 800; font-size: 13px; padding: 6px 11px; border-radius: 999px; backdrop-filter: blur(4px); }
.w3d-chip.gold { background: linear-gradient(135deg, var(--gold, #f5d27a), var(--gold2, #e9b44c)); color: #2a1d00; border-color: transparent; animation: w3dpulse 1.6s ease-in-out infinite; }
.w3d-hours { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(14, 16, 48, .72); border: 1px solid rgba(255, 255, 255, .22); }
.w3d-hours button { width: 32px; height: 32px; border-radius: 50%; font-size: 15px; }
.w3d-hours button.on { background: rgba(255, 255, 255, .22); }
.w3d-info { position: absolute; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: rgba(14, 16, 48, .86); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(8px); max-width: 520px; margin: 0 auto; }
.w3d-info .i { font-size: 30px; }
.w3d-info[hidden], .w3d-hint[hidden] { display: none; }
.w3d-hint { position: absolute; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 6px rgba(0, 0, 0, .7); pointer-events: none; }
@keyframes w3dpulse { 50% { transform: scale(1.06); } }
.w3d-top > .icon-btn { background: rgba(14, 16, 48, .78); border-color: rgba(255, 255, 255, .25); color: #fff; backdrop-filter: blur(4px); }
