:root {
  --ink: #17133f;
  --paper: #fffaf0;
  --cream: #f3e8c5;
  --yellow: #ffd54a;
  --orange: #ff8a3d;
  --blue: #4f80ff;
  --cyan: #57d3d0;
  --green: #56bd6a;
  --red: #f05262;
  font-family: "Courier New", Courier, monospace;
  color: var(--ink);
  background: #211b51;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; overflow-x: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
body {
  background:
    radial-gradient(circle at 20% 15%, rgba(87,211,208,.18), transparent 26rem),
    radial-gradient(circle at 80% 85%, rgba(255,138,61,.15), transparent 28rem),
    #17133f;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}

button { font: inherit; touch-action: manipulation; }
button:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.game-shell { width: min(1080px, 100%); margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; color: white; margin: 0 0 14px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 45px; height: 45px; background: var(--yellow); color: var(--ink); border: 4px solid white; box-shadow: 4px 4px 0 var(--orange); font-weight: 900; font-size: 1.5rem; }
h1 { margin: 0; font-size: clamp(1.1rem, 4vw, 1.55rem); line-height: 1.1; text-transform: uppercase; letter-spacing: -.04em; }
.brand p { margin: 4px 0 0; color: #b9b4e8; font-size: .8rem; }
.stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.stat { padding: 9px 11px; border: 3px solid white; box-shadow: 3px 3px 0 rgba(0,0,0,.35); font-size: 1rem; font-weight: 800; white-space: nowrap; }
.stars { background: var(--orange); }.energy { background: var(--red); }.sound { background: #765dc8; cursor: pointer; line-height: 1; }.fullscreen-toggle { background:#2d9252; color:white; cursor:pointer; line-height:1; }
.day-clock { background:#315b85; color:white; cursor:pointer; line-height:1; }.day-clock small { display:inline-block; margin-left:3px; padding:2px 3px; background:var(--yellow); color:var(--ink); font-size:.62rem; }
.tasks-toggle { background: var(--yellow); color: var(--ink); cursor: pointer; }.tasks-toggle b,.collection-toggle b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; background: var(--ink); color: white; font-size: .7rem; }.map-toggle { background: var(--cyan); color: var(--ink); cursor: pointer; }.collection-toggle { background: var(--red); color:white; cursor:pointer; }.fun-toggle { background:#ff9fc4; color:var(--ink); cursor:pointer; }
.help-toggle { background:var(--yellow); color:var(--ink); cursor:pointer; }

.play-layout { display: block; }
.screen-wrap { position: relative; background: #0b0925; border: 6px solid #f7f1db; box-shadow: 8px 8px 0 rgba(0,0,0,.4); overflow: hidden; aspect-ratio: 3/2; min-width: 0; }
canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: none; user-select:none; -webkit-user-select:none; }
.screen-gloss { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.1), transparent 35%); mix-blend-mode: screen; }
.dialog { position: absolute; left: 3%; right: 3%; bottom: 3%; min-height: 82px; display: flex; gap: 12px; align-items: center; background: rgba(255,250,240,.97); border: 4px solid var(--ink); padding: 10px 34px 10px 10px; box-shadow: inset 0 0 0 3px #d7cfae; }
.dialog.hidden, .toast.hidden { display: none; }
.portrait { flex: 0 0 52px; height: 52px; display: grid; place-items: center; border: 3px solid var(--ink); background: var(--yellow); font-size: 1.7rem; font-weight: 900; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.voice-playing { height: 48px; flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; }
.voice-playing i { display: block; width: 7px; background: #765dc8; border: 2px solid var(--ink); animation: voice .75s steps(3) infinite; }
.voice-playing i:nth-child(1),.voice-playing i:nth-child(5){height:18px}.voice-playing i:nth-child(2),.voice-playing i:nth-child(4){height:32px;animation-delay:.15s}.voice-playing i:nth-child(3){height:43px;animation-delay:.3s}
@keyframes voice { 50% { transform: scaleY(.45); background: var(--orange); } }
.dialog-next { position: absolute; right: 12px; bottom: 8px; color: var(--orange); animation: bob .7s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
.toast { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); background: var(--yellow); border: 3px solid var(--ink); padding: 8px 12px; font-weight: 900; box-shadow: 4px 4px 0 rgba(0,0,0,.35); white-space: nowrap; animation: toast-in .2s steps(2); }
@keyframes toast-in { from { transform: translate(-50%, -8px); opacity: 0; } }

.routine-card,.map-card,.collection-card,.audio-card,.adventure-card,.fun-card,.help-card { position: fixed; z-index: 12; top: 0; right: 0; width: min(520px, 96vw); height: 100dvh; background: var(--paper); border-left: 6px solid var(--ink); box-shadow: -10px 0 0 rgba(23,19,63,.25); padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom)); overflow-y: auto; transform: translateX(110%); transition: transform .22s steps(4); }
.map-card { width: min(620px, 96vw); }
.collection-card { width:min(650px,96vw); }
.routine-card.open,.map-card.open,.collection-card.open,.audio-card.open,.adventure-card.open,.fun-card.open,.help-card.open { transform: translateX(0); }
.routine-backdrop { display: none; position: fixed; z-index: 11; inset: 0; border: 0; background: rgba(14,10,45,.65); cursor: pointer; }.routine-backdrop.open { display: block; }
.routine-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.routine-actions { display: flex; align-items: center; gap: 10px; }.close-tasks { width: 42px; height: 42px; border: 3px solid var(--ink); background: var(--yellow); color: var(--ink); font-size: 1.7rem; font-weight: 900; line-height: 1; cursor: pointer; }
.eyebrow { color: #765dc8; font-size: .7rem; letter-spacing: .09em; font-weight: 900; }
.routine-heading h2 { margin: 3px 0 0; font-size: 1.2rem; text-transform: uppercase; }.progress-count { font-weight: 900; color: #765dc8; }
.progress-track { margin: 12px 0; height: 11px; border: 3px solid var(--ink); background: #dcd6c3; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--green); transition: width .35s steps(4); }
.panel-label,.map-heading h3 { margin: 0 0 10px; font-size: .85rem; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.task-list li { display: grid; place-items: center; min-width: 0; padding: 0; border: 0; }
.task-icon { display: grid; place-items: center; width: 39px; height: 39px; border: 3px solid var(--ink); background: #e5dfcb; font-size: 1.25rem; cursor: pointer; box-shadow: 2px 2px 0 #b9ad89; }
.task-list li.done { color: #4f8759; text-decoration: line-through; text-decoration-thickness: 2px; }.task-list li.done .task-icon { background: var(--green); color: white; }
.hint { margin-top: 12px; padding: 9px; background: #ebe5ff; border-left: 4px solid #765dc8; font-size: .68rem; line-height: 1.5; font-weight: 700; }
kbd { padding: 1px 4px; background: white; border: 1px solid #8276ad; box-shadow: 1px 1px 0 #8276ad; }
.text-button { width: 100%; margin-top: 9px; border: 0; background: none; color: #766b90; text-decoration: underline; font-size: .7rem; cursor: pointer; }
.reset-zone { display:grid; gap:9px; margin-top:14px; padding-top:12px; border-top:3px dashed #b9ad89; }
.reset-zone h3 { margin:0; color:#766b90; font-size:.68rem; letter-spacing:.08em; }
.reset-option { min-height:58px; display:grid; gap:3px; align-content:center; width:100%; padding:9px 12px; border:3px solid var(--ink); color:var(--ink); box-shadow:3px 3px 0 #b9ad89; text-align:left; cursor:pointer; touch-action:manipulation; }
.reset-option span { font-size:.75rem; font-weight:900; }
.reset-option small { font-size:.6rem; font-weight:700; line-height:1.3; }
.reset-option:active { translate:2px 2px; box-shadow:1px 1px 0 #b9ad89; }
.reset-day-button { background:#fff3b5; }
.reset-all-button { background:#ffe2e6; color:#8a2230; }
.collection-help { margin:12px 0 16px; padding:10px; background:#ffe2e6; border-left:4px solid var(--red); font-size:.8rem; font-weight:700; }
.character-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.character-card { min-height:108px; display:grid; place-items:center; align-content:center; gap:6px; padding:8px 4px; border:3px solid var(--ink); background:#e4dfd2; box-shadow:3px 3px 0 #b8ad91; text-align:center; }
.character-card .character-face { display:grid; place-items:center; width:53px; height:53px; border:3px solid var(--ink); background:#9a93ad; color:white; font:900 2rem/1 "Courier New"; }
.character-card b { font-size:.68rem; line-height:1.15; }.character-card.locked b { color:#777184; }.character-card.unlocked { background:#fff3b5; }.character-card.unlocked .character-face { background:var(--yellow); font-family:serif; }
.audio-controls { display:grid; gap:18px; margin:24px 0 18px; }.volume-control { display:grid; gap:12px; padding:16px; border:3px solid var(--ink); background:#ebe5ff; box-shadow:4px 4px 0 #b6acd8; }.volume-control span { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:1rem; }.volume-control output { min-width:56px; padding:4px 6px; background:white; border:2px solid var(--ink); text-align:center; font-weight:900; }.volume-control input { width:100%; height:30px; accent-color:var(--orange); cursor:pointer; }.audio-help { padding:10px; background:#fff3b5; border-left:4px solid var(--orange); font-size:.78rem; font-weight:700; }.audio-test { width:100%; margin-top:10px; }
.settings-toggle { background:#765dc8; color:white; cursor:pointer; line-height:1; }
.settings-card { width:min(580px,96vw); }
.settings-section { margin-top:18px; padding:14px; border:3px solid var(--ink); background:#fffaf0; box-shadow:3px 3px 0 #b9ad89; }
.settings-section h3 { margin:0 0 12px; font-size:.9rem; }
.settings-section .audio-controls { margin:0 0 12px; gap:12px; }
.mode-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.mode-option { display:grid; align-content:center; gap:7px; min-height:90px; padding:12px; border:3px solid var(--ink); background:#ebe5ff; color:var(--ink); text-align:left; cursor:pointer; touch-action:manipulation; }
.mode-option span { font-size:.85rem; font-weight:900; }.mode-option small { font-size:.75rem; line-height:1.35; font-weight:700; }
.mode-option[aria-pressed="true"] { background:var(--yellow); box-shadow:0 0 0 3px var(--orange); }
.setting-action { display:block; width:100%; min-height:52px; margin:0 0 12px; padding:10px 12px; border:3px solid var(--ink); background:#d9f2ff; color:var(--ink); font-size:.82rem; font-weight:900; text-align:left; cursor:pointer; touch-action:manipulation; }
.settings-section .calm-toggle { text-align:left; min-height:52px; font-size:.82rem; }
.settings-section .reset-option { font-size:.82rem; }
.help-card { width:min(640px,96vw); }
.help-topics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; margin:17px 0 14px; }
.help-topic { min-height:66px; display:grid; place-items:center; align-content:center; gap:2px; padding:4px; border:3px solid var(--ink); background:#e9e3f6; color:var(--ink); box-shadow:2px 2px 0 #b9ad89; cursor:pointer; }
.help-topic span { font-size:1.65rem; line-height:1.1; }.help-topic b { font-size:.64rem; line-height:1.1; text-align:center; }
.help-topic[aria-pressed="true"] { background:var(--yellow); box-shadow:0 0 0 3px var(--orange); }
.help-stage { border:4px solid var(--ink); background:#fff3cf; padding:10px; }
.help-visual { min-height:168px; display:grid; place-items:center; overflow:hidden; background:linear-gradient(#c8ecf5 0 60%,#9bd277 60% 100%); border:3px solid var(--ink); }
.help-demo { width:100%; min-height:158px; display:flex; align-items:center; justify-content:space-around; gap:7px; padding:12px; }
.help-big { font-size:clamp(2.3rem,7vw,4rem); line-height:1; }.help-mid { font-size:clamp(1.7rem,5vw,2.8rem); line-height:1; }.help-arrow { font-size:2rem; font-weight:900; color:var(--ink); }
.help-demo-card { min-width:0; flex:1; min-height:100px; display:grid; place-items:center; align-content:center; gap:6px; padding:7px; border:3px solid var(--ink); background:#fffaf0; text-align:center; }
.help-demo-card.active { background:var(--yellow); box-shadow:0 0 0 3px var(--orange); }.help-demo-card b { font-size:.7rem; }
.help-journey { display:flex; align-items:center; gap:4px; font-size:1.6rem; }.help-journey span { display:inline-grid; place-items:center; width:43px; height:43px; border:2px solid var(--ink); background:#fffaf0; }.help-journey .locked { background:#d9d5df; }
.help-demo-row { display:flex; align-items:center; justify-content:center; gap:13px; }.help-demo-stack { display:grid; gap:9px; place-items:center; }
.help-walk { animation:help-walk 2.8s ease-in-out infinite alternate; }.help-bob { animation:help-bob 1.2s ease-in-out infinite; }.help-pop { animation:help-pop 2.3s steps(3) infinite; }
.help-volume { width:min(130px,26vw); height:18px; border:3px solid var(--ink); background:#e4dfd2; }.help-volume i { display:block; height:100%; background:var(--green); }
.help-caption { display:flex; align-items:center; justify-content:center; gap:9px; margin-top:9px; font-size:1rem; }.help-caption span { font-size:1.6rem; }.help-short-text { min-height:34px; margin:7px 0 0; text-align:center; font-size:.8rem; font-weight:800; line-height:1.35; }
.help-controls { display:grid; grid-template-columns:1fr 1.4fr 1fr; gap:10px; margin-top:14px; }.help-controls button { min-height:54px; border:3px solid var(--ink); background:var(--cyan); color:var(--ink); font-size:1.65rem; font-weight:900; cursor:pointer; }.help-controls #helpSpeakButton { background:var(--yellow); font-size:2rem; }
@keyframes help-walk { from { transform:translateX(-22px); } to { transform:translateX(22px); } }
@keyframes help-bob { 50% { transform:translateY(-14px); } }
@keyframes help-pop { 50% { transform:scale(1.17); } }
.help-card.calm .help-walk,.help-card.calm .help-bob,.help-card.calm .help-pop { animation-duration:5s; }
.calm-toggle { width:100%; padding:14px; border:3px solid var(--ink); background:#dff3dd; color:var(--ink); box-shadow:4px 4px 0 #76a873; font-weight:900; cursor:pointer; }.calm-toggle[aria-pressed="true"] { background:var(--green); color:white; }.calm-help { margin:12px 0; padding:10px; border-left:4px solid var(--green); background:#edf8eb; font-size:.78rem; font-weight:700; line-height:1.4; }
.adventure-toggle { background:#765dc8; color:white; cursor:pointer; }.adventure-toggle b { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 4px; background:var(--yellow); color:var(--ink); font-size:.7rem; }.mission-help { padding:10px; background:#ebe5ff; border-left:4px solid #765dc8; font-size:.8rem; font-weight:700; }.mission-steps { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:18px 0; }.mission-step { min-height:108px; display:grid; place-items:center; align-content:center; gap:7px; border:3px solid var(--ink); background:#fff3b5; box-shadow:3px 3px 0 #b8ad91; cursor:pointer; }.mission-step span { font-size:2.4rem; }.mission-step b { font-size:.7rem; text-align:center; padding:0 4px; }.mission-step.done { background:var(--green); color:white; }.calendar-title { margin:25px 0 10px; font-size:.9rem; }.calendar-week { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }.calendar-day { min-height:68px; display:grid; place-items:center; align-content:center; gap:4px; border:3px solid var(--ink); background:#e4dfd2; font-size:1.25rem; }.calendar-day small { font-size:.58rem; font-weight:900; }.calendar-day.done { background:var(--green); color:white; }.calendar-day.current { background:var(--yellow); box-shadow:0 0 0 3px var(--orange); }.weekly-gift { padding:12px; background:#ffe2e6; border-left:4px solid var(--red); font-size:.8rem; font-weight:900; line-height:1.4; }
.fun-card { width:min(660px,96vw); }.fun-section { margin-top:18px; padding:14px; border:3px solid var(--ink); background:#fffaf0; box-shadow:4px 4px 0 #b9ad89; }.fun-section h3 { margin:0 0 5px; font-size:.9rem; }.fun-section p { margin:0 0 12px; color:#6f6880; font-size:.8rem; font-weight:700; line-height:1.4; }.fun-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; }.fun-choice { min-height:90px; display:grid; place-items:center; align-content:center; gap:4px; padding:7px 4px; border:3px solid var(--ink); background:#e4dfd2; color:var(--ink); box-shadow:2px 2px 0 #b9ad89; text-align:center; cursor:pointer; touch-action:manipulation; }.fun-choice span { font-size:2rem; line-height:1; }.fun-choice b { font-size:.75rem; }.fun-choice small { font-size:.7rem; font-weight:800; }.fun-choice.selected { background:var(--yellow); box-shadow:0 0 0 3px var(--orange); }.fun-choice.locked { filter:grayscale(1); color:#777184; }.celebration-game { margin-top:13px; padding:12px; border:3px dashed #765dc8; background:#ebe5ff; }.party-title { margin:0 0 10px; text-align:center; font-size:.85rem; }.party-targets { display:grid; grid-template-columns:repeat(5,1fr); gap:7px; }.party-target { min-height:64px; border:3px solid var(--ink); background:#fff; font-size:1.8rem; box-shadow:2px 2px 0 #b9ad89; cursor:pointer; touch-action:manipulation; }.party-target.hit { visibility:hidden; }.party-result { margin:0; padding:12px; background:var(--yellow); border:3px solid var(--ink); text-align:center; font-size:.85rem; font-weight:900; }.party-order { display:block; font-size:.7rem; }
.map-panel { min-width: 0; }
.map-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin:12px 0; }.map-heading span { color: #765dc8; font-size: .68rem; font-weight: 900; }
.world-map { position: relative; min-height: 520px; overflow: hidden; background: linear-gradient(#bdebf4 0 43%,#74c66f 43% 100%); border: 4px solid var(--ink); box-shadow: inset 0 0 0 4px rgba(255,255,255,.42); }
.world-map::before { content:"MADRID"; position:absolute; left:10px; top:8px; color:#315b85; font-size:.7rem; font-weight:900; }.world-map::after { content:"ARGENTINA"; position:absolute; left:10px; top:50%; color:#28633c; font-size:.7rem; font-weight:900; }
.map-region { position:absolute; z-index:2; color:#315b85; font-size:.7rem; font-weight:900; }.italy-label { right:12px; top:8px; }
.map-routes { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }.map-routes path { fill:none; stroke:var(--ink); stroke-width:1.2; vector-effect:non-scaling-stroke; stroke-dasharray:5 4; }.map-routes .long-route { stroke:#765dc8; stroke-width:2; }
.map-place { position:absolute; z-index:2; width:88px; min-height:58px; display:grid; place-items:center; align-content:center; gap:1px; border:3px solid var(--ink); background:var(--paper); color:var(--ink); box-shadow:3px 3px 0 rgba(23,19,63,.3); cursor:pointer; }.map-place span { font-size:1.45rem; line-height:1; }.map-place b { font-size:.61rem; line-height:1.05; }.map-place.current { background:var(--yellow); box-shadow:0 0 0 4px var(--orange),4px 4px 0 rgba(23,19,63,.35); }.map-place.current::after { content:"★"; position:absolute; right:-8px; top:-11px; display:grid; place-items:center; width:22px; height:22px; border:2px solid var(--ink); background:var(--red); color:white; }
.map-place.locked { background:#d9d5df; color:#686276; box-shadow:2px 2px 0 rgba(23,19,63,.2); }
.place-home { left:2%; top:13%; }.place-silvestro { left:2%; top:35%; background:#ffe6d5; }.place-school { left:25%; top:4%; }.place-park { left:25%; top:28%; }.place-airport { left:48%; top:13%; }.place-waho { left:48%; top:35%; background:#f8d6f2; }.place-verona { right:2%; top:4%; }.place-dobbiaco { right:2%; top:28%; }.place-arg-airport { right:2%; top:50%; }.place-tilcara { left:2%; top:50%; }.place-torcuato { right:2%; top:72%; }.place-grandparents { left:2%; top:72%; }.place-cala { left:30%; top:59%; }.place-gonza { left:30%; top:83%; }
.route-icon { position:absolute; z-index:1; padding:2px 5px; background:rgba(255,250,240,.9); border:2px solid var(--ink); font-size:.75rem; }.flight-route { right:10%; top:31%; }.island-route { left:34%; top:70%; }.tilcara-route { left:25%; top:46%; }

.controls { display: flex; justify-content: space-between; align-items: center; margin: 18px auto 0; max-width: 650px; touch-action:none; user-select:none; -webkit-user-select:none; }
.dpad { display: grid; grid-template: repeat(3, 48px) / repeat(3, 48px); filter: drop-shadow(4px 5px 0 rgba(0,0,0,.4)); }
.dpad button { border: 0; background: #eee8d5; color: var(--ink); font-size: 1.1rem; cursor: pointer; touch-action: none; user-select: none; }.dpad button:active { background: var(--yellow); transform: translateY(2px); }
.up { grid-area: 1/2 }.left { grid-area: 2/1 }.right { grid-area: 2/3 }.down { grid-area: 3/2 }.dpad-center { grid-area: 2/2; background: #eee8d5; }
.action-button { width: 105px; height: 78px; border: 4px solid white; background: var(--orange); color: white; box-shadow: 5px 6px 0 #9b3d20; transform: rotate(-4deg); font-weight: 900; cursor: pointer; }
.action-button span { display: block; font-size: 1.8rem; line-height: 1; }.action-button:active { transform: rotate(-4deg) translateY(4px); box-shadow: 3px 2px 0 #9b3d20; }

.overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 18px; background: rgba(14,10,45,.9); backdrop-filter: blur(5px); }
.overlay.hidden { display: none; }
.welcome-card { width: min(460px, 100%); background: var(--paper); border: 6px solid white; outline: 5px solid var(--ink); padding: 0 24px 24px; text-align: center; box-shadow: 10px 10px 0 var(--orange); }
.pixel-scene { position: relative; height: 140px; margin: 0 -24px 21px; overflow: hidden; background: linear-gradient(#66cbef 0 65%, #65bd67 65%); border-bottom: 5px solid var(--ink); }
.pixel-scene::after { content:""; position:absolute; left:0; right:0; bottom:0; height:18px; background: repeating-linear-gradient(90deg,#d7b77b 0 18px,#e9c98e 18px 36px); }
.sun { position:absolute; width:42px; height:42px; right:34px; top:20px; background:var(--yellow); box-shadow: 0 0 0 7px rgba(255,213,74,.25); }
.cloud { position:absolute; width:60px; height:18px; background:white; box-shadow: 14px -10px 0 white; }.c1 {left:28px;top:31px}.c2{right:120px;top:54px;transform:scale(.7)}
.tree { position:absolute; bottom:18px; width:18px; height:52px; background:#835028; }.tree::after{content:"";position:absolute;width:58px;height:49px;background:#2b8c54;left:-20px;top:-24px;box-shadow: 0 -12px 0 #4cae5f}.t1{left:45px}.t2{right:47px;transform:scale(.8);transform-origin:bottom}
.hero-pixel { position:absolute; left:50%; bottom:20px; transform:translateX(-50%); width:35px; height:52px; background:#4f80ff; border:4px solid var(--ink); box-shadow: inset 0 -19px 0 #293f9d; }.hero-pixel::before {content:"";position:absolute;width:34px;height:27px;left:-4px;top:-29px;background:#f2b779;border:4px solid var(--ink);box-shadow:inset 0 8px 0 #5f3823}.hero-pixel i{position:absolute;left:-8px;top:10px;width:7px;height:25px;background:#f2b779;box-shadow:43px 0 0 #f2b779}
.welcome-card h2 { margin: 7px 0 10px; font-size: clamp(1.6rem, 7vw, 2.5rem); line-height: 1; text-transform: uppercase; }.welcome-card p { line-height: 1.5; font-family: system-ui, sans-serif; margin: 0 auto 20px; max-width: 37ch; }.welcome-card small { display: block; margin-top: 13px; color: #706984; font-family: system-ui, sans-serif; }
.journey-icons { margin: 20px 0; font-size: 2rem; letter-spacing: .1em; }.journey-icons b { color: var(--orange); }
.primary-button { border: 4px solid var(--ink); background: var(--yellow); color: var(--ink); padding: 13px 18px; box-shadow: 5px 5px 0 var(--orange); font-weight: 900; text-transform: uppercase; cursor: pointer; }.primary-button:hover { transform: translateY(-2px); box-shadow: 6px 7px 0 var(--orange); }
.install-button { margin:18px auto 0; border:3px solid var(--ink); background:#57d3d0; color:var(--ink); padding:10px 14px; box-shadow:4px 4px 0 #2d9252; font-weight:900; cursor:pointer; }.install-button.hidden { display:none; }

@media (max-width: 800px) {
  body { padding-left: 10px; padding-right: 10px; }
  .routine-card,.map-card,.collection-card,.audio-card,.adventure-card,.fun-card,.help-card { width: min(620px,96vw); }.task-list { grid-template-columns: repeat(7, 1fr); }.hint { display: none; }
  .screen-wrap { border-width: 4px; }.controls { margin-top: 14px; padding: 0 8px; }.dpad { grid-template: repeat(3, 48px) / repeat(3, 48px); }.action-button { width: 98px; height: 74px; }
}
@media (max-width: 430px) {
  .topbar { align-items:flex-start; }.brand { flex:1 1 105px; }.stats { flex:1 1 220px; gap: 3px; }.day-clock { order:-1; }h1 { font-size: .82rem; }.brand-mark { width: 34px; height: 34px; font-size: 1rem; }.brand p { font-size: .61rem; }.stat { padding: 5px; font-size: .72rem; border-width: 2px; }.energy { display: none; }.screen-wrap { margin-inline: -6px; }.dialog { min-height: 70px; padding: 7px 27px 7px 7px; gap: 7px; border-width: 3px; }.portrait { flex-basis: 42px; height: 42px; }.routine-card,.map-card,.collection-card,.audio-card,.adventure-card,.fun-card,.help-card { top: auto; bottom: 0; width: 100%; height: min(82dvh, 720px); border-left: 0; border-top: 6px solid var(--ink); transform: translateY(110%); padding: 14px 14px max(18px,env(safe-area-inset-bottom)); }.routine-card.open,.map-card.open,.collection-card.open,.audio-card.open,.adventure-card.open,.fun-card.open,.help-card.open { transform: translateY(0); }.task-list { grid-template-columns: repeat(5,1fr); }.task-icon { width: 38px; height: 38px; }.character-grid { grid-template-columns:repeat(3,1fr); }.world-map { min-height:520px; }.map-place { width:70px; min-height:53px; }.map-place b { font-size:.53rem; }.welcome-card { padding-inline: 18px; }.pixel-scene { margin-inline: -18px; }.calendar-week { gap:3px; }.calendar-day { min-height:58px; border-width:2px; font-size:1rem; }.fun-grid { grid-template-columns:repeat(3,1fr); }.party-targets { grid-template-columns:repeat(3,1fr); }.help-topics { grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; }.help-topic { min-height:55px; }.help-topic span { font-size:1.3rem; }.help-topic b { font-size:.55rem; }.help-visual { min-height:130px; }.help-demo { min-height:122px; }.help-demo-card { min-height:84px; }
}
@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
  body { padding: max(5px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left)); }
  .game-shell { display:grid; grid-template-columns:minmax(0,1fr) 174px; grid-template-rows:auto 1fr; column-gap:12px; height:calc(100dvh - 10px); }
  .topbar { grid-column:1/-1; margin-bottom:6px; min-width:0; }.brand { gap:7px; }.brand-mark { width:32px; height:32px; border-width:2px; font-size:1rem; box-shadow:2px 2px 0 var(--orange); }.brand p { display:none; }h1 { font-size:.85rem; }
  .stats { gap:4px; min-width:0; }.stat { padding:4px 6px; border-width:2px; box-shadow:2px 2px 0 rgba(0,0,0,.35); font-size:.72rem; }.stat b { min-width:16px; height:16px; font-size:.58rem; }.energy { display:none; }
  .play-layout { grid-column:1; grid-row:2; display:grid; place-items:center; min-height:0; }.screen-wrap { width:min(100%,calc((100dvh - 57px)*1.5)); max-height:calc(100dvh - 57px); border-width:4px; box-shadow:4px 4px 0 rgba(0,0,0,.4); }
  .controls { grid-column:2; grid-row:2; align-self:center; width:100%; height:100%; margin:0; padding:0; flex-direction:column; justify-content:center; gap:12px; }.dpad { grid-template:repeat(3,44px)/repeat(3,44px); }.action-button { width:102px; height:65px; }
  .dialog { min-height:62px; padding:5px 25px 5px 6px; }.portrait { flex-basis:38px; height:38px; }.voice-playing { height:35px; }
}
@media (pointer: fine) and (min-width: 801px) { .controls { opacity: .88; } }
@media (max-width: 430px) { .mode-options { grid-template-columns:1fr; }.mode-option { min-height:70px; } }
@media (prefers-reduced-motion: reduce) { .help-walk,.help-bob,.help-pop { animation:none; } }
