:root{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:#fff;background:#0b1332;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 80% 0%,#31447d 0,transparent 40%),linear-gradient(#14224e,#0b1332)}.app{max-width:650px;margin:auto;padding:22px 16px 90px}header,.between,.entry,.rule,.buttons{display:flex;align-items:center;justify-content:space-between;gap:12px}header{margin-bottom:22px}.eyebrow{font-size:10px;letter-spacing:1.8px;color:#b4c9ff;font-weight:800}h1{font-size:26px;margin:4px 0}h2{font-size:20px;margin:0 0 12px}p{color:#d1dafa;line-height:1.55}small,.hint{font-size:12px;color:#b9c7ee}.panel{background:#192951e8;border:1px solid #42598b;border-radius:22px;padding:18px;margin:14px 0;box-shadow:0 8px 22px #0002}button{font:inherit;font-weight:750;border:0;background:#ffda65;color:#162044;border-radius:12px;padding:12px 14px;cursor:pointer}button:disabled{opacity:.45;cursor:default}.secondary{background:#2a3e70;color:#fff;border:1px solid #6379ad}.small{padding:8px 10px;font-size:12px}.buttons{justify-content:flex-start;flex-wrap:wrap;margin-top:12px}label{display:block;font-size:13px;color:#d1ddff;margin:12px 0}input,select{display:block;width:100%;background:#0e1b3c;border:1px solid #6b7ca8;color:#fff;padding:12px;border-radius:10px;font:inherit;margin-top:6px}input::placeholder{color:#8da3d2}.selector{display:grid;grid-template-columns:1fr 1fr;gap:12px}.score{font-size:52px;font-weight:900;color:#ffdf6b;margin:10px 0}.progress{height:15px;border-radius:20px;background:#34446e;overflow:hidden}.progress span{display:block;height:100%;background:linear-gradient(90deg,#ffc94e,#fff3a3);border-radius:20px}.tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.tiles>div{background:#243762;border-radius:14px;padding:12px}.tiles small,.tiles strong{display:block}.tiles strong{font-size:21px;margin-top:5px}.rules{display:grid;grid-template-columns:1fr 1fr;gap:8px}.rule{background:#263b66;color:white;text-align:left;font-size:13px;padding:12px;min-height:65px}.rule b{white-space:nowrap;font-size:18px}.positive b,.good{color:#7ce8b2}.negative b,.bad{color:#ffaaa9}.custom{display:grid;grid-template-columns:1fr 70px auto;gap:7px;margin-top:12px}.custom input{margin:0;min-width:0}.entry{border-bottom:1px solid #40517b;padding:12px 0}.entry:last-child{border:0}.entry small{display:block;margin-top:4px}.entry>span:last-child{text-align:right}.entry button{display:block;margin:5px 0 0 auto}.note{font-size:12px;color:#b7d3ff}.error{color:#ffb5b5}.childscreen{text-align:center;background:radial-gradient(circle at 50% 30%,#354d93,#15234c 70%)}.robot{width:min(75%,270px);filter:drop-shadow(0 10px 20px #0006);animation:float 3s ease-in-out infinite}.stars{font-size:28px;color:#ffdc6c}.speech{padding:18px;background:#eaf6ff;color:#17284c;border-radius:22px;font-size:17px;font-weight:700;min-height:84px;margin:12px auto;max-width:400px}.childscreen button{display:block;margin:12px auto;width:min(100%,300px)}@keyframes float{50%{transform:translateY(-10px)}}@media(max-width:390px){.rules{grid-template-columns:1fr}.app{padding:14px 10px 60px}.panel{padding:14px}.custom{grid-template-columns:1fr 62px auto}}
.tabs{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin:12px 0}.tab{background:#22345f;color:#c9d6f7;border:1px solid #415582;border-radius:13px;padding:10px 2px;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:21px}.tab small{font-size:10px;color:inherit}.tab.active{background:#ffe077;color:#19244a}.home-hero{overflow:hidden}.mini-score{font-size:30px;white-space:nowrap}.map-wrap{background:radial-gradient(ellipse at center,#344e91,#121e48 75%);border-radius:20px;overflow:hidden;margin:12px 0 16px;border:1px solid #4566a2}.map-wrap svg{width:100%;max-height:510px;display:block}.map-caption{text-align:center;padding:0 10px 14px;color:#ffdf75;font-weight:750}.planet.unlocked{filter:drop-shadow(0 0 10px #ffe17b)}.rocket-float{animation:float 2s ease-in-out infinite;transform-box:fill-box;transform-origin:center}.robot-launch{width:100%;min-height:100px;display:flex;align-items:center;justify-content:flex-start;gap:8px;text-align:left;font-size:20px;overflow:hidden;background:linear-gradient(115deg,#ffe27c,#ffc14c);color:#17244d}.robot-launch small{display:block;font-size:12px;color:#35415c;margin-top:5px}.robot-peek{width:105px;height:90px;overflow:hidden;flex:none;display:block}.robot-peek .robot{width:110px;transform:translateY(12px);animation:float 3s ease-in-out infinite}.bedtime{width:100%;margin-top:15px}.point-columns{display:grid;grid-template-columns:1fr 1fr;gap:10px}.point-columns>div{min-width:0}.point-columns h3{font-size:15px;min-height:35px}.point-columns .rule{width:100%;margin-bottom:8px;min-height:70px;font-size:12px;padding:9px;gap:5px}.point-columns .rule b{font-size:15px}.point-columns .rule.positive{background:#1f4d56}.point-columns .rule.negative{background:#4a2d50}.toggle{display:flex;align-items:center;gap:10px}.toggle input{width:22px;height:22px;margin:0}.robot-overlay{position:fixed;inset:0;background:#070e29ed;z-index:99;display:grid;place-items:center;padding:20px}.robot-cutscene{width:min(100%,420px);text-align:center;background:radial-gradient(#345b91,#18244e);padding:22px;border:2px solid #ffdc78;border-radius:25px}.robot-cutscene .robot{max-width:190px}.robot-cutscene button{width:100%}hr{border:0;border-top:1px solid #455785;margin:25px 0}.childscreen .map-wrap{max-width:370px;margin:auto}.childscreen .map-wrap svg{max-height:370px}@media(max-width:390px){.point-columns{gap:6px}.point-columns .rule{font-size:11px;padding:7px}.tabs{gap:3px}.tab small{font-size:9px}}

/* V3 visual journey and child-facing improvements */
.journey{background:radial-gradient(ellipse at 45% 28%,#263c79 0%,#101a40 72%);border:1px solid #3b5183;border-radius:22px;padding:8px;overflow:hidden}.journey svg{width:100%;max-height:540px;display:block}.journey .planet{transition:opacity .3s,filter .3s}.journey .planet.unlocked{filter:drop-shadow(0 0 9px #ffd65c)}.journey .trail-progress{transition:stroke-dasharray 900ms ease}.rocket-float{animation:rocketBob 2.3s ease-in-out infinite}.rocket-flame{animation:flame 450ms ease-in-out infinite alternate;transform-origin:0 19px}@keyframes rocketBob{50%{translate:0 -6px}}@keyframes flame{to{transform:scaleY(.6)}}.robot-launch{min-height:105px!important;width:100%;display:flex!important;align-items:center!important;gap:12px!important;text-align:left!important;font-size:1.1rem!important;background:linear-gradient(110deg,#ffe17a,#ffbc4c)!important;color:#142044!important;box-shadow:0 6px 24px #f5c55044}.robot-launch small{display:block;font-size:.75rem;margin-top:5px}.robot-peek{display:block;min-width:85px;width:85px;align-self:end}.robot-peek svg{width:100%;height:auto;animation:robotPeek 3s ease-in-out infinite}@keyframes robotPeek{50%{transform:rotate(-7deg) translateY(-5px)}}.point-columns{align-items:start}.point-columns .rule{min-height:68px}.childscreen .robot{max-width:240px;animation:robotPeek 4s ease-in-out infinite}select{width:100%;padding:12px;border-radius:12px;background:#142247;color:white;border:1px solid #6074a5}/* V4: integrated mission dashboard */
.tabs{grid-template-columns:repeat(4,1fr);gap:7px}.tab{font-size:13px;background:#1c3265;border:1px solid #536fa6;border-radius:16px;min-height:65px;gap:7px}.tab svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.tab.active{background:#f8d779;color:#15254d}.tab small{font-size:11px}.journey svg{max-height:none!important;height:auto}.journey .champion{animation:championGlow 7s ease-in-out infinite}@keyframes championGlow{50%{filter:hue-rotate(95deg) brightness(1.15)}}.robot .robot-whole{transform-origin:center;animation:robotHover 3.2s ease-in-out infinite}@keyframes robotHover{50%{transform:translateY(-11px)}}.robot,.robot-peek svg,.childscreen .robot{animation:none!important}.robot-launch{background:linear-gradient(120deg,#1e3d76,#24396c)!important;border:1px solid #70bce7!important;color:#f7faff!important;box-shadow:0 0 22px #55b4ec26!important;border-radius:24px!important;padding:14px!important;min-height:145px!important}.robot-launch small{color:#b7ddff!important}.robot-peek{height:120px;width:105px;min-width:105px;overflow:visible}.robot-peek svg{width:110px;height:140px}.point-switch{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:15px 0}.point-switch button{background:#283e70;color:#dce8ff;border:1px solid #536fa2}.point-switch button.selected{background:#ffdf77;color:#18284c}.point-list{display:grid;grid-template-columns:1fr 1fr;gap:9px}.point-list .rule{min-height:75px;width:100%;margin:0;font-size:12px;line-height:1.35;align-items:center;padding:12px;background:#23505a}.point-list .negative{background:#56334c}.point-list .rule b{font-size:16px}.points-panel h3{margin-top:20px}.home-hero .score{color:#ffe178}.robot-cutscene .robot{height:235px}.childscreen .robot{height:270px}.map-caption{padding:4px 8px 15px}.rocket-float{animation:rocketBob 2.3s ease-in-out infinite}.rule:active{transform:scale(.98)}@media(max-width:390px){.point-list{gap:6px}.point-list .rule{padding:9px;font-size:11px}.tab small{font-size:10px}.robot-peek{min-width:85px;width:85px}}

/* V5 */
.childscreen{min-height:70vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.childscreen .robot{width:min(75vw,280px);height:auto;max-height:38vh}.childscreen .speech{width:100%;margin:0 auto}.childscreen .score{margin:0}.childscreen button{margin:5px auto}.history-week{border:1px solid #53699a;border-radius:15px;margin:12px 0;background:#22365f;overflow:hidden}.history-week summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding:15px;gap:12px;list-style:none}.history-week summary span{display:grid;gap:4px}.history-week summary small{font-size:12px}.history-details{padding:0 14px 12px}.history-day{border-top:1px solid #4c628e;padding:12px 0}.history-day>strong{display:block;margin-bottom:8px}.history-event{display:flex;justify-content:space-between;gap:12px;font-size:13px;padding:5px 0}.history-event small{color:#bdc9e8}

.undo-bar{display:flex;justify-content:flex-end;margin:10px 0 14px}.undo-bar button{font-size:.92rem;padding:11px 14px}
