*{box-sizing:border-box} :root{color-scheme:dark;--cream:#fff5df;--muted:#d7cce5;--violet:#a18bff;--gold:#f5cf77;--ink:#251c35}body{margin:0;min-height:100svh;background:#22153d;color:var(--cream);font:16px/1.5 "Trebuchet MS",Arial,sans-serif;overflow-x:hidden}button{font:inherit;cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;opacity:.5}button:focus-visible{outline:3px solid #ffdb80;outline-offset:5px}#backdrop{position:fixed;inset:-3%;background:url('assets/cave.webp') center/cover;z-index:-3;animation:drift 28s ease-in-out infinite alternate;transition:background-image .65s} .shade{position:fixed;inset:0;z-index:-2;background:linear-gradient(90deg,rgba(20,12,38,.93),rgba(25,15,40,.60) 53%,rgba(25,15,40,.16)),linear-gradient(0deg,#170e2c 0%,transparent 55%)}header{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:24px clamp(20px,5vw,80px);border-bottom:1px solid #ffffff16;background:#21143070} .wordmark{display:flex;gap:12px;align-items:center;letter-spacing:3px;font-size:19px;line-height:1.15}.wordmark b{color:var(--gold)}.wordmark small{display:block;font-size:9px;letter-spacing:4px;color:#dac8ed;margin-top:7px}.crystal{font-size:40px;color:#e6b3ff;text-shadow:0 0 28px #ce8df9}.header-tools{display:flex;align-items:center;gap:18px}#stars{color:var(--gold);font-weight:bold;white-space:nowrap}.quiet{border:0;background:transparent;color:#dfd0ee;font-size:12px;padding:8px 4px;border-bottom:1px solid #ffffff25}.quiet:hover{color:white;border-color:var(--gold)}main{max-width:1320px;margin:auto;padding:clamp(28px,5vh,60px) clamp(20px,5vw,70px);min-height:calc(100svh - 164px)}h1,h2,h3,p{margin-top:0}h1{font:normal clamp(42px,6vw,76px)/1.04 Georgia,serif;letter-spacing:-2px;margin-bottom:20px}h1 em{font-style:normal;color:var(--gold)}h2{font:normal clamp(29px,3.7vw,45px)/1.1 Georgia,serif;letter-spacing:-.7px;margin-bottom:14px}h3{font:normal 24px Georgia,serif}.eyebrow{display:block;color:var(--gold);font-size:10px;font-weight:bold;letter-spacing:3px;margin-bottom:20px}.hero{max-width:590px;padding:25px 0 40px}.hero p{font-size:18px;max-width:480px;color:#dfd4e9}.primary,.secondary{border:1px solid #f4d59a;border-radius:9px;padding:13px 24px;background:var(--gold);color:#30213b;font-weight:bold;box-shadow:0 6px 24px #0003;min-height:48px}.primary:hover{background:#ffe6a9;transform:translateY(-1px)}.secondary{background:#ffffff0c;border-color:#ffffff40;color:var(--cream)}.secondary:hover{background:#ffffff20}.actions{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0 10px}.details{display:flex;gap:20px;color:#c8b8dc;font-size:12px;margin-top:24px}.trail{margin-top:20px}.trail-title{display:flex;align-items:center;justify-content:space-between}.trail-title p{font-size:12px;color:var(--muted)}.trail-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:11px}.chapter{position:relative;text-align:left;border:1px solid #ffffff35;border-radius:12px;overflow:hidden;padding:0;background:#2d2043;color:white;min-height:155px;box-shadow:0 12px 30px #0002}.chapter img{width:100%;height:88px;object-fit:cover;display:block;filter:brightness(.8)}.chapter .number{position:absolute;top:8px;left:9px;background:#201436c9;border:1px solid #ffffff4a;padding:1px 7px;border-radius:5px;font-size:11px}.chapter strong{display:block;padding:9px 10px 0;font-size:12px}.chapter small{display:block;padding:2px 10px 10px;color:var(--gold);font-size:11px}.chapter.current{border-color:var(--gold);box-shadow:0 0 0 1px #f5cf7740}.chapter:hover:not(:disabled){transform:translateY(-3px)}.chapter:disabled img{filter:grayscale(.8) brightness(.45)}.play-layout{display:grid;grid-template-columns:minmax(220px,.82fr) minmax(300px,1.18fr);gap:36px;align-items:start}.story{padding:14px 0}.story p{color:#e0d2ea;font-size:17px;max-width:390px}.companion{display:flex;align-items:center;gap:12px;margin-top:24px;font-size:12px;color:var(--gold)}.companion .badge{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#fff2;font-size:20px}.quote{font-style:italic;color:#dfc9ed!important;font-size:14px!important;margin-top:8px;padding-left:50px}.game-card{background:#fff8eb;color:var(--ink);padding:clamp(20px,3vw,32px);border-radius:18px;box-shadow:0 20px 80px #09031175;min-height:350px;border:1px solid #fff9}.game-card p{color:#695e76;font-size:14px}.game-card .eyebrow{color:#836239;font-size:9px;margin-bottom:12px}.game-card h3{margin-bottom:8px}.game-card .secondary{color:#5c4086;background:#ede5fb;border-color:#d6c5ee}.feedback{min-height:45px;padding:10px 0 0;font-size:14px;color:#59427b}.feedback.good{color:#347559}.mini-label{font-size:11px;color:#8b779d;font-weight:bold;letter-spacing:1px;display:flex;justify-content:space-between;margin:15px 0}.progress{display:flex;gap:7px;margin-top:14px}.progress i{height:4px;flex:1;background:#fff3;border-radius:5px}.progress i.done{background:var(--gold)}.colors{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:20px 0}.color-pad{height:90px;border:3px solid #ffffff7d;border-radius:14px;color:white;font-weight:bold;font-size:13px;box-shadow:inset 0 -8px 0 #0002;transition:filter .15s,transform .15s;position:relative}.color-pad span{display:block;font-size:25px}.color-pad.lit{filter:brightness(1.5);transform:scale(1.09);box-shadow:0 0 22px currentColor}.choices{display:grid;gap:10px;margin:18px 0}.choice{display:flex;gap:12px;align-items:center;text-align:left;background:white;border:1px solid #e4d9eb;border-radius:12px;color:#40304e;padding:14px 16px;min-height:58px}.choice .icon{font-size:26px}.choice strong{display:block;font-size:14px}.choice small{color:#85768e;font-size:12px}.choice:hover{border-color:#a98bd5;background:#f5efff}.choice.selected{border-color:#8461ae;background:#ece2fa}.choice.correct{border-color:#66a78a;background:#e2f3e7}.grid-board{display:grid;gap:8px;max-width:360px;margin:20px auto;position:relative}.grid-board.four{grid-template-columns:repeat(4,1fr)}.tile{height:65px;border:1px solid #d9cfdf;border-radius:10px;background:#e7dff0;color:#68517b;font-size:22px;font-weight:bold;position:relative;display:grid;place-items:center}.tile.dry{background:#aebd9b;border-color:#91a77b}.tile.water{background:#c2e1ed;border-color:#a4cddd;color:#5891a8}.tile.walked{background:#f5cf77;border-color:#d7aa52;color:#6f5124}.tile.current{box-shadow:0 0 0 3px #8966b3}.tile.goal{background:#a88dce;color:white}.tile:hover:not(:disabled){filter:brightness(1.08)}.card-back{background:#655080;color:white;min-height:74px}.card-back.matched{background:#d6ecdd;color:#347559;opacity:.65}.route-board{grid-template-columns:repeat(3,1fr);gap:7px;max-width:300px}.route-tile{height:80px;padding:5px;background:#e4efdf;border-color:#b4c3aa}.route-tile svg{width:100%;height:100%;overflow:visible}.route-tile.connected{background:#fff0b4;border-color:#e0ba66}.route-labels{display:flex;justify-content:space-between;font-size:11px;color:#7b6a85}.rescue-board{height:310px;background:linear-gradient(#30243a18,#30243a30),url('assets/home.webp') center/cover;border-radius:13px;position:relative;overflow:hidden;margin-top:15px}.butterfly{position:absolute;width:56px;height:56px;border-radius:50%;border:1px solid #fff9;background:#fff2;display:grid;place-items:center;color:#f5d58b;filter:drop-shadow(0 2px 4px #0007);animation:flutter 4s ease-in-out infinite alternate}.butterfly svg{width:44px;height:44px}.butterfly.caught{opacity:0;pointer-events:none;transform:scale(.2)}.saved-wings{font-size:25px;letter-spacing:7px;color:#b9a8c9;margin:12px 0}.saved-wings .safe{color:#ad6f2e}.celebration{text-align:center;max-width:700px;margin:auto;padding:35px 25px;background:#231537c4;border:1px solid #fff3;border-radius:22px}.big-wings{font-size:58px;margin-bottom:15px}.medals{display:flex;justify-content:center;gap:12px;margin:25px 0;font-size:32px;color:var(--gold)}footer{padding:16px clamp(20px,5vw,80px);display:flex;gap:15px;justify-content:space-between;align-items:center;color:#c6b5d7;font-size:10px;letter-spacing:.3px;border-top:1px solid #fff1}dialog{background:#fff7e7;color:#30233c;max-width:450px;width:calc(100% - 40px);padding:30px;border:1px solid #d9bded;border-radius:18px;box-shadow:0 25px 100px #0008}dialog::backdrop{background:#160d2bd4}dialog p{font-size:15px;color:#776781}dialog .primary{margin-top:15px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#322147;color:#fff1d1;padding:12px 22px;border:1px solid #a583bf;border-radius:10px;opacity:0;transition:opacity .3s;pointer-events:none;max-width:90vw;text-align:center;z-index:10}#toast.show{opacity:1}.motes{position:fixed;inset:0;pointer-events:none;z-index:-1}.motes i{position:absolute;width:3px;height:3px;border-radius:50%;background:#ffe4ac;box-shadow:0 0 12px 3px #ffda9860;animation:spark 7s ease-in-out infinite alternate}.motes i:nth-child(1){left:62%;top:24%}.motes i:nth-child(2){left:81%;top:50%;animation-delay:-2s}.motes i:nth-child(3){left:42%;top:70%;animation-delay:-4s}.motes i:nth-child(4){left:20%;top:30%;animation-delay:-5s}.motes i:nth-child(5){left:93%;top:75%;animation-delay:-1s}.motes i:nth-child(6){left:55%;top:12%;animation-delay:-3s}body[data-paused="true"] *{animation-play-state:paused!important;transition:none!important}@keyframes drift{from{transform:scale(1) translateX(-.5%)}to{transform:scale(1.055) translateX(.7%)}}@keyframes spark{from{opacity:.15;transform:translateY(0)}to{opacity:.9;transform:translateY(-25px)}}@keyframes flutter{from{transform:translateY(-4px) rotate(-7deg)}to{transform:translateY(7px) rotate(8deg)}}@media(max-width:850px){header{padding:18px 22px}.header-tools{gap:10px}.wordmark{font-size:15px;letter-spacing:2px}.wordmark small{letter-spacing:2px}.crystal{font-size:30px}.trail-grid{grid-template-columns:repeat(3,1fr)}.play-layout{gap:22px;grid-template-columns:.8fr 1.2fr}main{padding:30px 24px}.story p{font-size:15px}.game-card{padding:23px}.colors{gap:6px}.color-pad{height:74px;font-size:11px}.tile{height:57px}}@media(max-width:600px){header{align-items:start;padding:16px 18px}.header-tools{flex-wrap:wrap;max-width:142px;gap:0 12px;justify-content:end}#stars{width:100%;text-align:right;font-size:13px}.quiet{font-size:11px;padding:4px 0}.wordmark{font-size:14px}.wordmark small{font-size:7px}.crystal{font-size:29px}.hero{padding:12px 0 25px;max-width:440px}h1{font-size:51px}.hero p{font-size:16px}.details{font-size:10px;gap:15px}.trail-grid{gap:9px}.chapter{min-height:140px}.chapter img{height:73px}.chapter strong{font-size:11px;padding:8px 8px 0}.chapter small{padding:2px 8px 8px;font-size:10px}.play-layout{grid-template-columns:1fr;gap:14px}.story{padding:0}.story h2{font-size:33px}.story p{max-width:none;margin-bottom:10px}.companion{margin-top:10px}.quote{display:none}.eyebrow{font-size:9px;letter-spacing:2px;margin-bottom:12px}.game-card{border-radius:15px;padding:22px;min-height:0}.color-pad{height:77px}.grid-board{max-width:320px}.tile{height:61px}.route-tile{height:72px}.story .progress{margin-top:12px}.rescue-board{height:280px}.trail-title p{display:none}main{padding:25px 18px 30px}.shade{background:linear-gradient(0deg,#190f2bed,#21143277),linear-gradient(90deg,#180e2bc9,#180e2b20)}footer{padding:15px 18px}.celebration{padding:28px 18px}.celebration h1{font-size:43px}}@media(max-height:500px) and (min-width:601px){header{padding:10px 24px}.story .companion,.story .quote{display:none}main{padding:20px 25px}.game-card{min-height:0}.hero{padding:0}.hero h1{font-size:44px}.chapter img{height:60px}.chapter{min-height:115px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Time Hole palette, touch fixes and lifecycle controls. */
:root{--violet:#83c6ba;--gold:#f5cf77}body{background:#102f32}.shade{background:linear-gradient(90deg,#0b2429ed,#102f329e 53%,#102f3220),linear-gradient(0deg,#0b2029 0%,transparent 65%)}header{background:#0b242990}.crystal{color:#f5cf77;text-shadow:0 0 28px #e8ba68}.wordmark{font-size:16px;letter-spacing:2px}.wordmark small{letter-spacing:2px}.header-tools{gap:12px}.header-tools .quiet{min-height:44px;min-width:44px}.primary:active,.choice:active,.tile:active{transform:scale(.98)}.game-card .card-back{font-size:14px;padding:5px;overflow-wrap:anywhere;background:#326969}.game-card .card-back.matched{background:#d6ecdd}.game-card .quiet{min-height:44px}.memory-spark small{position:absolute;bottom:0;right:4px;background:#102f32;border-radius:8px;color:white;padding:0 4px;font-size:12px}.saved-wings{display:flex;flex-wrap:wrap;gap:7px;letter-spacing:0}.memory-label{border:1px solid #d6cbb7;border-radius:30px;padding:4px 9px;font:12px/1.4 Arial,sans-serif;color:#75635c}.memory-label.safe{background:#f9e8b9;color:#805016}.bravery-meter{height:65px;position:relative;border-radius:30px;background:#c9ddd5;border:2px solid #aac1b4;margin:32px 10px 22px}.kind-zone{position:absolute;inset:0 30%;background:#efd18a;border-inline:2px solid #b88b36}.kind-zone:after{content:'GENTLE';position:absolute;inset:17px 0;text-align:center;color:#674c22;font:bold 11px/1.5 Arial;letter-spacing:1px}#courage-marker{position:absolute;top:-8px;bottom:-8px;width:12px;background:#225a5c;border:2px solid white;border-radius:8px;transform:translateX(-50%);box-shadow:0 2px 8px #0004}#cheer-count{text-align:center;font-weight:bold}.pause-card{max-width:480px;background:#fff8eb;color:#251c35;padding:35px;border-radius:22px;box-shadow:0 30px 120px #0007}.pause-card .eyebrow{color:#876122}.pause-card .secondary{background:#e4efeb;color:#215a5b;border-color:#aac6be}#pause-layer{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:20px;background:#081c24dc}#pause-layer[hidden]{display:none}.chapter{background:#173e42}.chapter img{filter:brightness(.94)}.hero h1{max-width:650px}button{user-select:none;-webkit-tap-highlight-color:transparent}body[data-paused=true] #pause-layer,body[data-paused=true] #pause{pointer-events:auto}body[data-paused=true] #pause-layer button{animation:none}@media(max-width:600px){.wordmark{font-size:12px;max-width:164px}.wordmark small{font-size:7px}.header-tools{max-width:152px;gap:0 9px}.header-tools .quiet{font-size:10px;min-height:38px;min-width:38px}.hero h1{font-size:clamp(38px,11vw,51px)}.game-card .card-back{font-size:12px;min-height:64px}.colors{gap:5px}.color-pad{font-size:11px}.shade{background:linear-gradient(0deg,#0b2029f5,#102f3277),linear-gradient(90deg,#0b2429ce,#102f3220)}.pause-card{padding:26px}.pause-card .actions{display:grid}.memory-label{font-size:11px}}@media(max-width:360px){header{gap:8px;padding-inline:14px}.wordmark{font-size:11px;letter-spacing:1px}.crystal{font-size:24px}.header-tools{gap:0 6px;max-width:135px}.game-card{padding:17px}main{padding-inline:14px}.details{flex-wrap:wrap;gap:5px}}
