:root {
    --ink: #101541;
    --muted: #697092;
    --purple: #6446f2;
    --purple-deep: #472dc8;
    --purple-soft: #eeeaff;
    --blue: #2e8cff;
    --mint: #20c98b;
    --mint-soft: #e8fbf4;
    --gold: #ffc54b;
    --coral: #ff6f77;
    --white: #fff;
    --surface: rgba(255,255,255,.91);
    --border: rgba(255,255,255,.62);
    --shadow: 0 24px 70px rgba(27, 31, 91, .18);
    --font-display: "Baloo 2", system-ui, sans-serif;
    --font-body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--ink);
    background: #edf2ff;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 4px solid rgba(255,197,75,.7);
    outline-offset: 3px;
}
.app-shell { min-height: 100vh; overflow-x: hidden; padding-bottom: 104px; }
.glass-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 14px 45px rgba(17, 22, 71, .13);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.topbar {
    position: fixed;
    z-index: 40;
    top: 14px;
    left: 50%;
    width: min(1180px, calc(100% - 28px));
    min-height: 70px;
    padding: 10px 12px 10px 16px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(-50%);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
    position: relative;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(145deg, #7255ff, #4f34d3);
    box-shadow: 0 9px 20px rgba(100,70,242,.28), inset 0 1px 0 rgba(255,255,255,.45);
}
.brand-mark svg { width: 30px; fill: #fff; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.brand-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.brand-spark--one { top: -3px; right: -2px; }
.brand-spark--two { top: 5px; right: -8px; width: 3px; height: 3px; }
.brand strong { display: block; font: 800 24px/20px var(--font-display); letter-spacing: -.6px; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-button {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 15px;
    background: #f0edff;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
    text-decoration: none;
}
.icon-button:hover { transform: translateY(-2px); background: #e7e1ff; }
.icon-button svg { width: 23px; fill: none; stroke: var(--purple); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sound-on { display: none; }
.icon-button[aria-pressed="true"] .icon-sound-on { display: block; }
.icon-button[aria-pressed="true"] .icon-sound-off { display: none; }
.profile-chip { display: flex; align-items: center; gap: 9px; border: 0; border-radius: 17px; padding: 5px 10px 5px 5px; background: #f8f7ff; cursor: pointer; }
.profile-chip > svg { width: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
.avatar-mini { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #ff986e, #f0598b); border-radius: 13px; font: 800 20px var(--font-display); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.profile-chip__copy { min-width: 62px; text-align: left; }
.profile-chip__copy strong, .profile-chip__copy small { display: block; }
.profile-chip__copy strong { font-size: 13px; }
.profile-chip__copy small { color: var(--muted); font-size: 10px; font-weight: 800; }

.world-stage {
    position: relative;
    min-height: 780px;
    overflow: hidden;
    isolation: isolate;
    padding: 120px max(24px, calc((100vw - 1180px)/2)) 44px;
    background: #319fe8;
}
.world-stage__backdrop {
    position: absolute;
    z-index: -3;
    inset: 0;
    background-image: url('../images/jornada-mundos.png');
    background-size: cover;
    background-position: center center;
    transform: scale(1.025);
    animation: worldBreath 14s ease-in-out infinite alternate;
}
.world-stage__veil { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(5,24,73,.42) 0%, rgba(16,33,84,.08) 45%, rgba(42,19,97,.1) 100%), linear-gradient(0deg, rgba(12,19,61,.3) 0%, transparent 35%); }
.world-stage::after { content: ""; position: absolute; z-index: -1; inset: auto 0 0; height: 260px; background: linear-gradient(0deg, rgba(16,23,72,.7), transparent); pointer-events: none; }
@keyframes worldBreath { from { transform: scale(1.025) translate3d(0,0,0); } to { transform: scale(1.065) translate3d(-.5%, -.5%, 0); } }

.world-intro { max-width: 600px; color: #fff; text-shadow: 0 3px 16px rgba(15,21,70,.25); }
.eyebrow { margin: 0 0 7px; font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow--purple { color: var(--purple); }
.pulse-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: #4cf4b1; box-shadow: 0 0 0 0 rgba(76,244,177,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(76,244,177,0); } 100% { box-shadow: 0 0 0 0 rgba(76,244,177,0); } }
.world-intro h1 { margin: 0; font: 800 clamp(38px, 5vw, 64px)/.98 var(--font-display); letter-spacing: -1.9px; }
.world-intro h1 em { color: #ffe169; font-style: normal; }
.world-intro > p:last-child { max-width: 470px; margin: 15px 0 0; font-size: 16px; font-weight: 800; }

.hud-stats { position: absolute; top: 116px; right: max(24px, calc((100vw - 1180px)/2)); display: flex; gap: 10px; }
.stat-pill { display: flex; align-items: center; gap: 10px; min-width: 155px; padding: 10px 14px 10px 10px; border: 1px solid rgba(255,255,255,.65); border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: 0 12px 30px rgba(12,25,78,.14); backdrop-filter: blur(14px); }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; border-radius: 13px; font-size: 19px; }
.stat-pill--xp .stat-icon { background: linear-gradient(145deg, #7e61ff, #5737db); }
.stat-pill--coin .stat-icon { color: #8b5700; background: linear-gradient(145deg, #ffda67, #ffad2f); }
.stat-pill small, .stat-pill strong { display: block; }
.stat-pill small { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.stat-pill strong { margin-top: 2px; font-size: 14px; }

.world-hotspots { position: absolute; inset: 0; pointer-events: none; }
.world-pin { position: absolute; display: flex; align-items: center; gap: 9px; padding: 0; color: #fff; background: none; border: 0; filter: drop-shadow(0 8px 18px rgba(13,19,65,.38)); cursor: pointer; pointer-events: auto; transition: transform .25s ease, filter .25s ease; }
.world-pin:hover { transform: translateY(-6px) scale(1.03); filter: drop-shadow(0 14px 24px rgba(13,19,65,.42)); }
.world-pin__orb { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border: 4px solid rgba(255,255,255,.85); border-radius: 50%; background: linear-gradient(145deg, #7256ff, #3a27bd); box-shadow: inset 0 2px 7px rgba(255,255,255,.35); font-size: 25px; animation: pinFloat 3s ease-in-out infinite; }
.world-pin__orb::after { content: ""; position: absolute; width: 13px; height: 13px; bottom: -9px; transform: rotate(45deg); background: #4b31cb; border-right: 3px solid rgba(255,255,255,.85); border-bottom: 3px solid rgba(255,255,255,.85); }
.world-pin__orb i { position: absolute; right: -5px; bottom: -4px; width: 23px; height: 23px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #28304f; font-size: 10px; font-style: normal; }
.world-pin__label { padding: 8px 12px; border: 1px solid rgba(255,255,255,.38); border-radius: 13px; background: rgba(20,25,74,.72); backdrop-filter: blur(10px); text-align: left; }
.world-pin__label strong, .world-pin__label small { display: block; white-space: nowrap; }
.world-pin__label strong { font: 800 15px var(--font-display); }
.world-pin__label small { color: rgba(255,255,255,.75); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.world-pin--island { left: 17%; top: 43%; }
.world-pin--city { left: 52%; top: 36%; }
.world-pin--space { right: 8%; top: 21%; }
.world-pin--city .world-pin__orb { animation-delay: -.9s; }
.world-pin--space .world-pin__orb { animation-delay: -1.7s; }
.world-pin.is-locked { opacity: .88; }
@keyframes pinFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.daily-card { position: absolute; z-index: 4; left: max(24px, calc((100vw - 1180px)/2)); bottom: 34px; width: min(430px, calc(100% - 48px)); padding: 20px; border-radius: 26px; }
.daily-card__top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.daily-card h2 { margin: 0; font: 800 25px var(--font-display); }
.daily-ring { --progress: 0deg; position: relative; width: 65px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--purple) var(--progress), #e6e7f2 0); }
.daily-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.daily-ring span { position: relative; font-size: 10px; font-weight: 900; }
.daily-ring b { font-size: 17px; }
.progress-track, .mission-progress { height: 9px; overflow: hidden; border-radius: 20px; background: #e6e7f0; }
.progress-track { margin-top: 15px; }
.progress-track span, .mission-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), #9e6cff); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.milestones { display: flex; justify-content: space-between; margin: 7px 3px 13px; color: #9da1b8; font-size: 9px; font-weight: 900; }
.milestones span.is-reached { color: var(--purple); }
.primary-button, .whatsapp-button {
    position: relative;
    width: 100%;
    min-height: 53px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    border: 0;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(135deg, #7659ff, #5834dc);
    box-shadow: 0 11px 25px rgba(88,52,220,.28), inset 0 1px 0 rgba(255,255,255,.35);
    font-weight: 900;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.primary-button:hover, .whatsapp-button:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(88,52,220,.34), inset 0 1px 0 rgba(255,255,255,.35); }
.primary-button:active, .whatsapp-button:active { transform: translateY(1px); }
.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.button-glow { position: absolute; width: 60px; height: 150%; left: -80px; background: rgba(255,255,255,.22); transform: rotate(25deg); animation: buttonShine 3.5s infinite; }
@keyframes buttonShine { 0%,55% { left: -80px; } 80%,100% { left: 120%; } }
.play-only-button { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 9px; border: 1px solid #dcd5ff; border-radius: 14px; color: var(--purple-deep); background: #f2efff; font-size: 11px; font-weight: 900; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.play-only-button:hover { transform: translateY(-2px); background: #e9e3ff; }
.daily-card__note { margin: 10px 0 0; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }

.ambient-particles i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 15px #fff; opacity: .75; animation: drift 8s linear infinite; }
.ambient-particles i:nth-child(1) { left: 30%; top: 28%; }
.ambient-particles i:nth-child(2) { left: 46%; top: 19%; animation-delay: -3s; }
.ambient-particles i:nth-child(3) { right: 14%; top: 39%; animation-delay: -5s; }
.ambient-particles i:nth-child(4) { right: 30%; top: 12%; animation-delay: -1s; }
.ambient-particles i:nth-child(5) { left: 72%; top: 58%; animation-delay: -6s; }
@keyframes drift { 0% { transform: translateY(0) scale(.7); opacity: 0; } 20% { opacity: .8; } 80% { opacity: .7; } 100% { transform: translateY(-80px) scale(1.3); opacity: 0; } }

.dashboard-strip { width: min(1180px, calc(100% - 32px)); margin: 20px auto 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.shortcut-card { display: flex; align-items: center; gap: 13px; min-height: 82px; padding: 14px; border: 1px solid #e7e8f2; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(24,28,80,.08); cursor: pointer; text-align: left; transition: transform .2s ease, box-shadow .2s ease; }
.shortcut-card:hover { transform: translateY(-4px); box-shadow: 0 16px 35px rgba(24,28,80,.12); }
.shortcut-card__icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 16px; font-size: 23px; }
.shortcut-card--purple .shortcut-card__icon { background: #eeeaff; }
.shortcut-card--green .shortcut-card__icon { background: #e6fbf2; }
.shortcut-card--gold .shortcut-card__icon { background: #fff6df; }
.shortcut-card small, .shortcut-card strong { display: block; }
.shortcut-card small { margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.shortcut-card strong { font-size: 14px; }
.shortcut-card > svg { width: 19px; margin-left: auto; fill: none; stroke: #a0a4b9; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.bottom-nav { position: fixed; z-index: 42; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); width: min(520px, calc(100% - 24px)); height: 76px; display: none; align-items: center; justify-content: space-around; padding: 7px; border-radius: 24px; transform: translateX(-50%); }
.bottom-nav__item { position: relative; flex: 1; height: 61px; border: 0; border-radius: 18px; background: transparent; cursor: pointer; }
.bottom-nav__item span, .bottom-nav__item small { display: block; }
.bottom-nav__item span { font-size: 21px; filter: grayscale(1); opacity: .58; }
.bottom-nav__item small { margin-top: 3px; color: #7e829c; font-size: 9px; font-weight: 900; }
.bottom-nav__item.is-active { background: #eeeaff; }
.bottom-nav__item.is-active span { filter: none; opacity: 1; }
.bottom-nav__item.is-active small { color: var(--purple); }

.modal { position: fixed; z-index: 100; inset: 0; display: none; align-items: center; justify-content: center; padding: 22px; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(12,15,49,.63); backdrop-filter: blur(8px); animation: fadeIn .22s ease; }
.modal__sheet { position: relative; width: min(540px, 100%); max-height: min(820px, calc(100vh - 32px)); overflow: auto; padding: 27px; border: 1px solid rgba(255,255,255,.8); border-radius: 30px; background: #fff; box-shadow: var(--shadow); animation: sheetIn .36s cubic-bezier(.2,.85,.3,1.15); }
.modal__close { position: absolute; z-index: 4; top: 16px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 12px; color: #777d99; background: #f0f1f7; font-size: 25px; line-height: 1; cursor: pointer; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(25px) scale(.96); } }
.mission-heading { display: flex; align-items: center; gap: 11px; padding-right: 38px; }
.mission-heading__badge { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 16px; background: #eeeaff; font-size: 24px; }
.mission-heading h2 { margin: 0; font: 800 27px/1 var(--font-display); }
.step-chip { margin-left: auto; padding: 7px 10px; color: var(--purple); border-radius: 10px; background: var(--purple-soft); font-size: 10px; font-weight: 900; white-space: nowrap; }
.mission-progress { margin: 18px 0; }
.mission-progress span { width: 33.33%; }
.contact-card { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid #e5e6ef; border-radius: 18px; background: #fafafe; }
.contact-avatar { width: 45px; height: 45px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #32d6a0, #11aa78); font: 800 21px var(--font-display); }
.contact-card small, .contact-card strong, .contact-card div > span { display: block; }
.contact-card small { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.contact-card strong { margin: 1px 0; font-size: 14px; }
.contact-card div > span { color: var(--muted); font-size: 11px; }
.safe-chip { margin-left: auto; padding: 6px 8px; color: #14845f; border-radius: 9px; background: #e5f9f1; font-size: 9px; font-weight: 900; }
.message-preview { position: relative; margin: 15px 0; padding: 18px; border-radius: 21px 21px 7px 21px; background: linear-gradient(145deg, #efeaff, #f8f6ff); box-shadow: inset 0 0 0 1px #ded7ff; }
.message-preview__top { display: flex; justify-content: space-between; color: var(--purple); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.message-preview__top span:last-child { color: #9296ad; }
.message-preview p { margin: 12px 0; font-size: 14px; font-weight: 700; line-height: 1.55; }
.listen-button { padding: 7px 9px; border: 0; border-radius: 10px; color: var(--purple); background: #fff; font-size: 10px; font-weight: 900; cursor: pointer; }
.learning-tip { display: flex; gap: 10px; margin-bottom: 15px; padding: 12px; border-radius: 15px; background: #fff8e4; }
.learning-tip > span { font-size: 19px; }
.learning-tip p { margin: 0; color: #66582f; font-size: 11px; line-height: 1.45; }
.whatsapp-button { background: linear-gradient(135deg, #28cd74, #159e54); box-shadow: 0 11px 25px rgba(21,158,84,.24), inset 0 1px 0 rgba(255,255,255,.35); }
.whatsapp-button svg { width: 24px; fill: #fff; }
.whatsapp-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.privacy-note { margin: 9px 0 0; color: var(--muted); font-size: 9px; font-weight: 800; text-align: center; }
.confirm-sheet, .success-sheet, .small-sheet { max-width: 440px; text-align: center; }
.return-orb { width: 88px; height: 88px; display: grid; place-items: center; margin: -2px auto 14px; border-radius: 50%; background: linear-gradient(145deg, #ece7ff, #dcd3ff); box-shadow: 0 12px 30px rgba(100,70,242,.18); }
.return-orb span { display: inline-block; font-size: 43px; animation: wave 1.2s ease-in-out infinite; transform-origin: 70% 80%; }
@keyframes wave { 0%,100% { transform: rotate(0); } 35% { transform: rotate(16deg); } 70% { transform: rotate(-8deg); } }
.confirm-sheet h2, .success-sheet h2, .small-sheet h2, .panel-sheet h2 { margin: 0 0 7px; font: 800 30px/1.08 var(--font-display); }
.confirm-sheet > p:not(.eyebrow), .success-sheet > p:not(.eyebrow), .small-sheet > p { margin: 0 auto 19px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.result-options { display: grid; gap: 10px; }
.result-button { display: grid; grid-template-columns: 45px 1fr; column-gap: 11px; padding: 12px; border: 1px solid #e5e6ef; border-radius: 18px; background: #fff; text-align: left; cursor: pointer; transition: transform .2s ease, border .2s ease; }
.result-button:hover { transform: translateY(-2px); }
.result-button > span { grid-row: span 2; width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; font-size: 21px; font-weight: 900; }
.result-button strong { align-self: end; font-size: 14px; }
.result-button small { align-self: start; color: var(--muted); font-size: 10px; }
.result-button--success:hover { border-color: #42ce98; }
.result-button--success > span { color: #11815b; background: #dcf8ed; }
.result-button--neutral:hover { border-color: #ffba47; }
.result-button--neutral > span { color: #ad6d00; background: #fff3d5; }
.big-emoji { display: block; margin-bottom: 10px; font-size: 48px; }
.reason-list { display: grid; gap: 8px; }
.reason-list button { min-height: 46px; border: 1px solid #e5e6ef; border-radius: 14px; background: #fafafe; font-size: 12px; font-weight: 900; cursor: pointer; }
.reason-list button:hover { color: var(--purple); border-color: #bdb0ff; background: #f2efff; }
.success-sheet { overflow: hidden; padding-top: 40px; }
.success-rays { position: absolute; top: -120px; left: 50%; width: 350px; height: 350px; transform: translateX(-50%); background: repeating-conic-gradient(from 0deg, rgba(255,208,64,.24) 0 12deg, transparent 12deg 25deg); border-radius: 50%; animation: rotate 14s linear infinite; }
@keyframes rotate { to { transform: translateX(-50%) rotate(360deg); } }
.medal-burst { position: relative; width: 90px; height: 90px; display: grid; place-items: center; margin: 0 auto 13px; color: #fff; border: 7px solid #ffcc4f; border-radius: 27px; background: linear-gradient(145deg, #7758ff, #4e31d0); transform: rotate(-4deg); box-shadow: 0 15px 30px rgba(100,70,242,.26); }
.medal-burst span { font-size: 42px; animation: medalPop .8s cubic-bezier(.2,.9,.3,1.3); }
@keyframes medalPop { from { transform: scale(0) rotate(-180deg); } }
.reward-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.reward-row span { padding: 12px; color: #6a4b00; border-radius: 14px; background: #fff5d7; font-size: 11px; font-weight: 900; }
.reward-row b { display: block; font-size: 20px; }
.mini-game-sheet { width: min(680px, 100%); overflow: hidden; }
.mini-game-heading { display: flex; align-items: center; gap: 12px; padding-right: 2px; }
.mini-game-heading__icon { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 17px; background: linear-gradient(145deg, #eee9ff, #dcd4ff); font-size: 27px; }
.mini-game-heading h2 { margin: 0; font: 800 27px/1 var(--font-display); }
.mini-game-reward { margin-left: auto; padding: 7px 10px; color: #805a00; border-radius: 11px; background: #fff2ca; font-size: 9px; font-weight: 900; white-space: nowrap; }
.mini-game-instructions { margin: 14px 0 11px; color: var(--muted); font-size: 12px; text-align: center; }
.mini-game-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 10px; }
.mini-game-picker[hidden] { display: none; }
.mini-game-choice { min-height: 76px; padding: 9px 6px; border: 1px solid #e2dff5; border-radius: 15px; color: var(--ink); background: #faf9ff; cursor: pointer; }
.mini-game-choice span, .mini-game-choice strong { display: block; }
.mini-game-choice span { margin-bottom: 5px; font-size: 24px; }
.mini-game-choice strong { font-size: 9px; line-height: 1.25; }
.mini-game-choice.is-active { border-color: var(--purple); background: #eeeaff; box-shadow: inset 0 0 0 1px var(--purple); }
.mini-game-empty { max-width: 330px; padding: 24px; color: var(--muted); text-align: center; }
.mini-game-empty span { display: block; margin-bottom: 8px; font-size: 46px; }
.mini-game-empty strong { display: block; color: var(--ink); font: 800 21px var(--font-display); }
.mini-game-empty small { display: block; margin-top: 4px; font-size: 11px; font-weight: 800; }
.mini-game-stage { min-height: 270px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e4e2f2; border-radius: 22px; background: linear-gradient(180deg, #eef8ff, #f8f5ff); }
.mini-game-status { min-height: 22px; margin: 10px 0 0; color: #575d78; font-size: 12px; font-weight: 900; text-align: center; }
.mini-game-status.is-win { color: #10805a; }
.mini-game-status.is-lose { color: #a46800; }
.mini-game-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 10px; }
.mini-game-actions .secondary-button { min-height: 44px; padding: 0 17px; border: 1px solid #dfe1ec; border-radius: 13px; color: var(--ink); background: #fff; font-size: 10px; font-weight: 900; cursor: pointer; }
.primary-button--compact { width: auto; min-width: 180px; padding: 0 18px; }
.tic-board { width: min(300px, calc(100% - 30px)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tic-cell { aspect-ratio: 1; border: 0; border-radius: 17px; color: var(--purple); background: #fff; box-shadow: 0 6px 18px rgba(55,44,125,.1); font: 800 clamp(30px, 9vw, 50px)/1 var(--font-display); cursor: pointer; }
.tic-cell.is-o { color: #ef6b78; }
.tic-cell:disabled { cursor: default; }
.memory-board { width: min(480px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.memory-card { aspect-ratio: 1; border: 0; border-radius: 16px; color: transparent; background: linear-gradient(145deg, #7658ff, #4d32cf); box-shadow: 0 6px 14px rgba(78,50,207,.2); font-size: clamp(25px, 7vw, 38px); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.memory-card.is-open, .memory-card.is-matched { color: inherit; background: #fff; transform: rotateY(180deg); }
.memory-card.is-matched { background: #e5faef; box-shadow: inset 0 0 0 2px #3dcc98; }
.game-canvas-wrap { width: 100%; padding: 8px; text-align: center; }
.game-canvas { width: 100%; max-width: 640px; height: auto; display: block; margin: 0 auto; border-radius: 16px; background: #bfeaff; touch-action: none; outline: none; }
.game-canvas-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 800; }
.panel-sheet { max-width: 650px; }
.panel-heading { margin-bottom: 18px; padding-right: 42px; }
.panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.panel-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 11px; }
.achievement-card, .reward-card, .reply-card, .empty-card { padding: 15px; border: 1px solid #e8e8f1; border-radius: 19px; background: #fafafe; }
.achievement-card span { font-size: 29px; }
.achievement-card strong, .achievement-card small { display: block; }
.achievement-card strong { margin-top: 7px; font-size: 13px; }
.achievement-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.reward-card { display: flex; align-items: center; gap: 12px; }
.reward-card__icon { width: 51px; height: 51px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 16px; background: #fff4d7; font-size: 28px; }
.reward-card__copy { flex: 1; }
.reward-card__copy strong, .reward-card__copy small { display: block; }
.reward-card__copy strong { font-size: 13px; }
.reward-card__copy small { color: var(--muted); font-size: 10px; }
.reward-card button { padding: 7px 9px; border: 0; border-radius: 10px; color: #fff; background: var(--purple); font-size: 9px; font-weight: 900; cursor: pointer; }
.reward-card button:disabled { color: #9a9db1; background: #e8e9ef; cursor: not-allowed; }
.reply-card { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; margin-bottom: 9px; }
.reply-card__avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--purple); font-weight: 900; }
.reply-card strong, .reply-card small { display: block; }
.reply-card strong { font-size: 12px; }
.reply-card small { color: var(--muted); font-size: 9px; }
.reply-card button { border: 0; border-radius: 10px; padding: 7px 8px; color: #107451; background: #e3f9f0; font-size: 9px; font-weight: 900; cursor: pointer; }
.empty-card { grid-column: 1 / -1; color: var(--muted); text-align: center; }
.empty-card span { display: block; font-size: 37px; margin-bottom: 6px; }
.empty-card strong { display: block; color: var(--ink); font-size: 14px; }
.empty-card p { margin: 4px 0 0; font-size: 11px; }

.toast-region { position: fixed; z-index: 160; top: 100px; right: 18px; display: grid; gap: 9px; pointer-events: none; }
.toast { width: min(330px, calc(100vw - 36px)); padding: 12px 14px; border: 1px solid rgba(255,255,255,.65); border-radius: 16px; color: #fff; background: rgba(23,27,73,.92); box-shadow: 0 15px 35px rgba(17,20,62,.25); backdrop-filter: blur(15px); font-size: 11px; font-weight: 800; animation: toastIn .3s ease, toastOut .3s ease 3.2s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(25px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(25px); } }
.confetti-layer { position: fixed; z-index: 170; inset: 0; overflow: hidden; pointer-events: none; }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: confettiFall var(--fall-time) cubic-bezier(.25,.7,.5,1) forwards; }
@keyframes confettiFall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(var(--rotation)); opacity: .15; } }

@media (max-width: 900px) {
    .world-stage { min-height: 850px; padding-top: 117px; }
    .world-stage__backdrop { background-position: 43% center; }
    .hud-stats { top: 290px; left: 18px; right: auto; }
    .world-pin--island { left: 17%; top: 50%; }
    .world-pin--city { left: 55%; top: 41%; }
    .world-pin--space { right: 5%; top: 28%; }
    .world-pin__label { display: none; }
    .daily-card { bottom: 25px; }
    .dashboard-strip { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .app-shell { padding-bottom: 95px; }
    .topbar { top: 8px; width: calc(100% - 16px); min-height: 62px; padding: 8px 9px 8px 11px; border-radius: 20px; }
    .brand-mark { width: 40px; height: 40px; border-radius: 13px; }
    .brand-mark svg { width: 26px; }
    .brand strong { font-size: 21px; }
    .brand small, .profile-chip__copy { display: none; }
    .profile-chip { padding: 4px; }
    .profile-chip > svg { display: none; }
    .icon-button { width: 42px; height: 42px; }
    .world-stage { min-height: 750px; padding: 94px 17px 25px; }
    .world-stage__backdrop { background-position: 38% center; animation: none; transform: scale(1.03); }
    .world-stage__veil { background: linear-gradient(180deg, rgba(7,22,72,.43), rgba(11,26,75,.05) 35%, rgba(12,18,58,.55) 100%); }
    .world-intro h1 { font-size: 36px; letter-spacing: -1.2px; }
    .world-intro > p:last-child { max-width: 315px; font-size: 13px; }
    .hud-stats { top: 225px; left: 16px; gap: 7px; }
    .stat-pill { min-width: 0; padding: 7px 9px 7px 7px; border-radius: 14px; }
    .stat-icon { width: 33px; height: 33px; border-radius: 11px; font-size: 16px; }
    .stat-pill small { display: none; }
    .stat-pill strong { font-size: 11px; }
    .world-pin__orb { width: 51px; height: 51px; font-size: 22px; }
    .world-pin--island { left: 11%; top: 48%; }
    .world-pin--city { left: 52%; top: 39%; }
    .world-pin--space { right: 5%; top: 29%; }
    .daily-card { left: 13px; bottom: 15px; width: calc(100% - 26px); padding: 16px; border-radius: 23px; }
    .daily-card h2 { font-size: 22px; }
    .daily-ring { width: 57px; }
    .primary-button { min-height: 50px; }
    .dashboard-strip { width: calc(100% - 24px); margin-top: 12px; }
    .shortcut-card { min-height: 72px; border-radius: 19px; }
    .bottom-nav { display: flex; }
    .modal { padding: 0; align-items: flex-end; }
    .modal__sheet { width: 100%; max-height: calc(100vh - 18px); border-radius: 28px 28px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation-name: mobileSheetIn; }
    @keyframes mobileSheetIn { from { opacity: .6; transform: translateY(100%); } }
    .mission-heading { gap: 9px; }
    .mission-heading__badge { width: 43px; height: 43px; border-radius: 14px; }
    .mission-heading h2 { font-size: 23px; }
    .step-chip { font-size: 8px; padding: 6px 7px; }
    .safe-chip { display: none; }
    .panel-grid { grid-template-columns: 1fr; }
    .mini-game-sheet { border-radius: 28px 28px 0 0; }
    .mini-game-heading { align-items: flex-start; flex-wrap: wrap; }
    .mini-game-heading__icon { width: 45px; height: 45px; }
    .mini-game-heading h2 { font-size: 23px; }
    .mini-game-reward { margin-left: 0; }
    .mini-game-picker { grid-template-columns: repeat(2, 1fr); }
    .mini-game-stage { min-height: 245px; }
    .memory-board { gap: 7px; }
    .toast-region { top: 79px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
