/* Type Traveler — felt board look.
   Everything sits on a blue felt board; panels and buttons are felt pieces with running stitches. */
:root{
  --board:#4a82b5; --board-dk:#3a6c9c;
  --cream:#f7f0e1; --cream2:#efe4cc; --tan:#d9b382; --sand:#e8cf9c;
  --ink:#3b2f2a; --muted:#7a6a5e;
  --red:#c0443c; --green:#5f9e4a; --grass:#5f9e4a; --mustard:#e9b949; --orange:#e0803a; --plum:#8e5fb0; --teal:#3f8f8a; --sky:#a9d3ec; --brown:#8a5a36;
  --stitch:rgba(90,60,40,.38); --stitch-l:rgba(255,255,255,.65);
  --f-pinky:#a585c9; --f-pinky-l:#e6daf2; --f-ring:#5f9fd4; --f-ring-l:#d4e6f5;
  --f-mid:#6fae5a; --f-mid-l:#dbecd2; --f-lpt:#e9b949; --f-lpt-l:#f7e7b6;
  --f-rpt:#e8873a; --f-rpt-l:#f8dcc4; --f-thumb:#b5a999; --f-thumb-l:#ebe5dc;
  --display:"Fredoka","Baloo 2","Arial Rounded MT Bold","Trebuchet MS",sans-serif;
  --body:"Nunito","Segoe UI",system-ui,sans-serif;
  --type:"Atkinson Hyperlegible","Verdana",sans-serif;
  --shadow:0 2px 0 rgba(40,25,15,.18), 0 6px 14px rgba(30,20,10,.22);
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.2 0 0 0 -.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  --grain-l:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='230'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1.2 0 0 -.52'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --mottle:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='3' seed='8' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.9 0 0 0 -.38'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  color-scheme: light;
}
html,body{height:100%}
*{box-sizing:border-box}
body{
  margin:0;
  background-color:var(--board);
  background-image:var(--grain),var(--grain-l),var(--mottle);
  color:var(--ink); font-family:var(--body); font-weight:600; font-size:16px;
  padding:16px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
}
.stage{margin:0 auto; display:flex; flex-direction:column; gap:16px}
main > section{width:100%}
h1,h2,h3{font-family:var(--display); font-weight:600; margin:0; text-wrap:balance; letter-spacing:.005em; line-height:1.1}
[hidden]{display:none!important}
.row{display:flex; gap:12px; align-items:center; flex-wrap:wrap}
.spacer{flex:1}
.muted{color:var(--muted)}

/* ---------- Felt pieces ---------- */
.felt, .panel, .btn, .modal, .bubble, .stat, .who, .starcount, .pcard, .cap, .seg, .vcard, .tag{
  background-image:var(--grain),var(--grain-l);
}
.panel{position:relative; background-color:var(--cream); border-radius:20px; box-shadow:var(--shadow); padding:20px;
  outline:2px dashed var(--stitch); outline-offset:-9px}
.title-felt{color:var(--cream); text-shadow:0 2px 0 rgba(40,25,15,.35), 0 4px 10px rgba(30,20,10,.3)}
.banner{display:inline-block; position:relative; background-color:var(--red); color:var(--cream); font-family:var(--display); font-weight:600;
  padding:8px 34px 10px; border-radius:6px; box-shadow:var(--shadow); outline:2px dashed rgba(255,240,225,.6); outline-offset:-6px;
  background-image:var(--grain),var(--grain-l);
  clip-path:polygon(0 0,100% 0,calc(100% - 16px) 50%,100% 100%,0 100%,16px 50%)}

/* ---------- Buttons ---------- */
.btn{font-family:var(--display); font-weight:600; font-size:19px; color:var(--ink); background-color:var(--mustard);
  border:0; border-radius:14px; box-shadow:var(--shadow); padding:11px 20px; cursor:pointer;
  outline:2px dashed var(--stitch-l); outline-offset:-6px;
  transition:transform .08s, box-shadow .08s, filter .1s; display:inline-flex; align-items:center; gap:8px; justify-content:center; line-height:1.1}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform:translateY(2px); box-shadow:0 1px 0 rgba(40,25,15,.2), 0 2px 6px rgba(30,20,10,.2)}
.btn.small{font-size:16px; padding:8px 14px; border-radius:12px; outline-offset:-5px}
.btn.tang{background-color:var(--orange); color:#fff}
.btn.grass{ color:#fff}
.btn.white{background-color:var(--cream); outline-color:var(--stitch)}
.btn.cherry{background-color:var(--red); color:#fff}
.btn.grape{background-color:var(--plum); color:#fff}
.btn.sky{background-color:var(--sky)}
.btn[disabled]{background-color:#d8cfc2; color:var(--muted); cursor:not-allowed; filter:none}
:focus-visible{outline:3px solid #fff!important; outline-offset:3px!important; box-shadow:0 0 0 6px var(--plum)!important}

/* ---------- Characters ---------- */
.char{display:block; width:100%; height:auto}
img.char.cut{object-fit:contain; filter:drop-shadow(0 3px 3px rgba(40,25,15,.3))}
.licon{width:100%; height:100%; display:block}
.licon.dim{opacity:.35; filter:grayscale(.6)}

/* ---------- Home ---------- */
.hero{display:flex; flex-direction:column; align-items:flex-start}
.logo{ line-height:.95; font-weight:700}
.logo span{display:block; font-size:.36em; margin-top:.4em; font-weight:600; color:#f7e7b6}
.tagline{font-size:18px; max-width:48ch;}
.players{display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:16px}
.pcard{position:relative; border:0; border-radius:20px; box-shadow:var(--shadow); padding:14px 12px 16px; cursor:pointer; text-align:center;
  display:flex; flex-direction:column; align-items:center; gap:6px; font-family:var(--body); color:var(--ink); transition:transform .12s;
  outline:2px dashed var(--stitch-l); outline-offset:-8px}
.pcard:hover{transform:translateY(-3px) rotate(-1deg)}
.pcard .av{width:100px; height:100px}
.pcard .av > *{width:100%; height:100%; object-fit:contain}
.pcard .nm{font-family:var(--display); font-weight:600; font-size:24px}
.pcard .st{font-weight:800; font-size:14px}
.pcard .agechip{font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.06em; opacity:.75}
.pcard.add{background-color:var(--cream); justify-content:center; min-height:180px; outline-color:var(--stitch)}
.pcard .del{position:absolute; top:8px; right:8px}
.pcard .edit-hint{position:absolute; top:8px; left:8px}
.plus{font-family:var(--display); font-size:54px; line-height:1}

/* ---------- Modal ---------- */
.overlay{position:fixed; inset:0; background:rgba(30,25,35,.55); display:flex; align-items:center; justify-content:center; z-index:50; overflow:auto}
.modal{position:relative; width:min(580px,100%); overflow:auto; background-color:var(--cream); border-radius:24px; box-shadow:0 10px 40px rgba(20,10,5,.4);
  padding:24px; display:flex; flex-direction:column; gap:14px; animation:popin .25s cubic-bezier(.3,1.6,.6,1);
  outline:2px dashed var(--stitch); outline-offset:-10px}
.modal.wide{width:min(760px,100%)}
.modal > *{flex-shrink:0}
@keyframes popin{from{transform:scale(.88); opacity:0}}
.modal h2{font-size:32px}
label.lbl,.lbl{font-weight:900; font-size:13px; text-transform:uppercase; letter-spacing:.07em; color:var(--muted)}
input[type=text],textarea{font:inherit; font-size:18px; width:100%; padding:10px 12px; border:2px solid #d8c9ae; border-radius:12px; background:#fffdf8; color:var(--ink)}
textarea{min-height:110px; resize:vertical; font-family:var(--type)}
select.select{font:inherit; font-size:16px; flex:1; min-width:0; padding:9px 12px; border:2px solid #d8c9ae; border-radius:12px; background:#fffdf8; color:var(--ink); cursor:pointer}
textarea.code{font-family:ui-monospace,Consolas,monospace; font-size:13px; min-height:120px; word-break:break-all}
.choices{display:flex; gap:10px; flex-wrap:wrap}
.choice{border:0; border-radius:14px; background-color:#fffdf8; padding:6px; cursor:pointer; box-shadow:0 2px 0 rgba(40,25,15,.15); color:var(--ink); font-family:var(--body)}
.choice[aria-pressed=true]{background-color:var(--mustard); transform:translateY(-3px); box-shadow:var(--shadow)}
.choice small{display:block; font-weight:900; font-size:12px; text-align:center}
.agechoice{flex:1; min-width:118px; padding:10px; text-align:left}
.agechoice b{font-family:var(--display); font-weight:600; font-size:20px; display:block}
.agechoice span{font-size:13px}
.swatch{width:44px; height:44px; border-radius:50%; border:0; cursor:pointer; box-shadow:var(--shadow); outline:2px dashed var(--stitch-l); outline-offset:-6px}
.swatch[aria-pressed=true]{box-shadow:0 0 0 4px var(--cream), 0 0 0 7px var(--ink)}

/* ---------- Top bar ---------- */
.topbar{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.who{display:flex; align-items:center; gap:10px; background-color:var(--cream); border-radius:16px; padding:4px 14px 4px 4px; box-shadow:var(--shadow)}
.who .av{width:48px; height:48px; border-radius:12px; padding:2px; display:flex; align-items:flex-end; justify-content:center}
.who .av > *{max-width:100%; max-height:100%; object-fit:contain}
.who b{font-family:var(--display); font-weight:600; font-size:22px}
.starcount{font-family:var(--display); font-weight:600; font-size:20px; background-color:var(--mustard); border-radius:14px; padding:6px 12px; box-shadow:var(--shadow); display:flex; align-items:center; gap:6px}
.starcount svg{width:24px; height:24px}
.screen-title{font-size:clamp(30px,5vw,42px)}

/* ---------- Map ---------- */
.mapwrap{position:relative; padding:0; border-radius:18px; overflow:hidden; box-shadow:var(--shadow); line-height:0}
.mapinner{position:relative; overflow:hidden; border-radius:18px; background-color:#5a8fc0; background-image:var(--grain),var(--grain-l),var(--mottle); outline:2px dashed rgba(255,255,255,.4); outline-offset:-10px}
.mapart svg.mapsvg{width:100%; height:auto; display:block}
.kbpanel{width:100%; max-width:calc(var(--fit-h, 900px) * 1.6); align-self:center}
.mk{position:absolute; transform:translate(-50%,-50%); border:0; background:none; padding:0; cursor:pointer; line-height:1; display:flex; flex-direction:column; align-items:center; gap:2px}
.mk .disc{width:clamp(30px,4.6vw,50px); height:clamp(30px,4.6vw,50px); border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-family:var(--display); font-weight:700; font-size:clamp(15px,2.3vw,24px); color:var(--ink); background-color:var(--cream);
  background-image:var(--grain),var(--grain-l); box-shadow:var(--shadow); outline:2px dashed var(--stitch); outline-offset:-5px}
.mk.done .disc{background-color:var(--mustard)}
.mk.next .disc{background-color:var(--orange); color:#fff; outline-color:var(--stitch-l)}
.mk.next .disc::after{content:""; position:absolute; width:inherit; height:inherit; border-radius:50%; border:4px solid #fff; animation:ring 1.4s ease-out infinite}
.mk.locked{cursor:not-allowed}
.mk.locked .disc{background-color:#cfc6b8; color:var(--muted); width:clamp(24px,3.6vw,38px); height:clamp(24px,3.6vw,38px); padding:5px}
.mk .lbl2{font-family:var(--display); font-weight:600; color:var(--ink); background-color:rgba(247,240,225,.92); border-radius:8px; padding:2px 7px; white-space:nowrap; box-shadow:0 1px 3px rgba(0,0,0,.2)}
.mk .mstars{display:flex; gap:1px}
.mk .mstars svg{width:clamp(10px,1.6vw,16px); height:clamp(10px,1.6vw,16px)}
.mk:not(.locked):hover .disc{transform:scale(1.08)}
.me{position:absolute; width:clamp(40px,6vw,70px); height:clamp(40px,6vw,70px); transform:translate(30%,-110%); pointer-events:none; animation:hop 1.6s ease-in-out infinite}
.me > *{width:100%; height:100%; object-fit:contain}
@keyframes ring{from{transform:scale(1); opacity:.9}to{transform:scale(1.7); opacity:0}}
@keyframes hop{50%{transform:translate(30%,-120%)}}
.nextbar{display:flex; gap:14px; align-items:center; flex-wrap:wrap}
.nextbar .txt{flex:1; min-width:200px}
.nextbar h3{font-size:24px}
.keycaps{display:inline-flex; gap:6px; flex-wrap:wrap; vertical-align:middle}
.cap{font-family:var(--display); font-weight:600; min-width:36px; height:36px; padding:0 8px; display:inline-flex; align-items:center; justify-content:center; border-radius:9px; box-shadow:0 2px 0 rgba(40,25,15,.2); font-size:19px; background-color:#fffdf8; outline:1.5px dashed var(--stitch); outline-offset:-4px}
.cap.big{min-width:64px; height:64px; font-size:32px; border-radius:14px; outline-offset:-6px}
.cap.ok{background-color:var(--green); color:#fff}
.cap.now{background-color:var(--mustard); transform:translateY(-4px)}
/* the map's ☰ menu (Settings, Keyboard tour, Switch player, Full screen) */
#s-map .who{cursor:pointer}
.menuwrap{position:relative}
.menubtn{padding-left:14px; padding-right:14px}
.burger{display:inline-flex; flex-direction:column; justify-content:center; gap:4px; width:22px; height:22px}
.burger i{display:block; height:3px; border-radius:2px; background:currentColor}
.menupop{position:absolute; right:0; top:calc(100% + 8px); z-index:40; display:flex; flex-direction:column; gap:8px; padding:10px; min-width:200px}
.menupop[hidden]{display:none}
.menupop .btn{width:100%}
/* the next-chapter bar: a small "Tricky keys" button beside a big Start */
.trickybtn{display:inline-flex; align-items:center; gap:8px}
.trickybtn .cap{min-width:28px; height:28px; font-size:15px; padding:0 6px}
.nextbar .bigstart{font-size:clamp(20px,2.2vw,26px); padding-left:clamp(24px,3vw,40px); padding-right:clamp(24px,3vw,40px)}

/* ---------- Land screen ---------- */
.scenebox{position:relative; border-radius:18px; overflow:hidden; box-shadow:var(--shadow); height:clamp(150px,24vw,260px); background:var(--sky)}
.scenebox .scene,.scenebox .scene-img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block}
.scenebox .host{position:absolute; bottom:4%; height:78%; width:auto; aspect-ratio:1/1.1}
.scenebox .host.l{left:3%} .scenebox .host.r{right:3%}
.scenebox .host > *{width:100%; height:100%; object-fit:contain; object-position:bottom}
.hudicons{display:flex; gap:3px; padding:5px 8px; border-radius:12px; background:rgba(247,240,225,.85); box-shadow:var(--shadow)}
.hudicons[hidden]{display:none}
.hudicons > span{width:clamp(18px,2.4vw,28px); height:clamp(18px,2.4vw,28px)}
.hudicons > span.pop{animation:starpop .45s cubic-bezier(.3,1.8,.5,1)}
.scenebox .host.group{display:flex; align-items:flex-end}
.scenebox .host.group > span{flex:1 1 0; height:100%; min-width:0}
.scenebox .host.group > span > svg{width:100%; height:100%; display:block}
.scenebox .scene-title{position:absolute; top:12px; left:50%; transform:translateX(-50%); font-size:clamp(20px,3.4vw,34px); white-space:nowrap}
.scenebox .scene-icons{position:absolute; bottom:10px; left:50%; transform:translateX(-50%); display:flex; gap:4px; padding:6px 10px; border-radius:14px; background:rgba(247,240,225,.85)}
.scenebox .scene-icons > span{width:clamp(20px,3vw,32px); height:clamp(20px,3vw,32px)}
.scenebox .scene-icons > span.pop{animation:starpop .45s cubic-bezier(.3,1.8,.5,1)}

/* ---------- Typing ---------- */
.hud{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.hud h2{font-size:clamp(20px,3vw,26px); flex:1; min-width:160px; color:var(--cream); text-shadow:0 1px 2px rgba(20,10,5,.35)}
.stat{background-color:var(--cream); border-radius:14px; padding:4px 12px; text-align:center; box-shadow:var(--shadow); min-width:84px}
.stat small{display:block; text-transform:uppercase; font-weight:900; color:var(--muted)}
.stat b{font-family:var(--display); font-weight:600; font-size:22px; font-variant-numeric:tabular-nums}
.stat.goal b{color:var(--green)}
.typescene{height:clamp(110px,16vw,170px)}
.textpanel{font-family:var(--type); font-size:clamp(22px,3.3vw,36px); line-height:1.75; letter-spacing:.04em; max-height:calc(1.75em * 4 + 40px); overflow-y:auto; cursor:text; padding:22px 26px}
.age-little .textpanel{font-size:clamp(30px,5vw,52px); letter-spacing:.08em}
.w{display:inline-block; white-space:nowrap}
.c{border-radius:6px; padding:0 1px; transition:color .1s}
.c.sp{display:inline-block; min-width:.55em}
.c.done{color:#bfb09c}
.c.done.miss{color:var(--red); text-decoration:underline wavy var(--red); text-underline-offset:6px}
.c.cur{background-color:var(--mustard); color:var(--ink); box-shadow:0 0 0 2px #fff, 0 3px 0 2px rgba(40,25,15,.25); animation:bob .7s ease-in-out infinite alternate}
.c.cur.oops{background-color:var(--red); color:#fff; animation:shake .25s}
@keyframes bob{to{transform:translateY(-2px)}}
@keyframes shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
.c.hid{color:transparent; border-bottom:3px dotted #c4b49c; border-radius:0}
.c.hid.sp{border-bottom:none}
.c.cur.hid{color:transparent}
.coach{display:flex; gap:12px; align-items:center}
.coach .cbox{width:84px; height:84px; flex:none; display:flex; align-items:flex-end; justify-content:center}
.coach .cbox > *{max-width:100%; max-height:100%; object-fit:contain}
.bubble{position:relative; background-color:#fffdf8; border-radius:16px; padding:10px 14px; font-weight:800; box-shadow:var(--shadow); min-width:0; outline:1.5px dashed var(--stitch); outline-offset:-6px}
.fchip{display:inline-block; width:16px; height:16px; border-radius:50%; vertical-align:-2px; margin-right:6px; box-shadow:inset 0 0 0 2px rgba(255,255,255,.5)}
.touchnote{font-size:14px}
.hostname{font-family:var(--display); font-weight:600; font-size:15px; color:var(--muted); display:block; margin-bottom:2px}

/* ---------- Keyboard ---------- */
.kbpanel{padding:0}
.kb{display:flex; flex-direction:column; gap:6px; padding:16px; user-select:none; --kh:clamp(28px,5vw,52px)}
#kbGame{--kh:clamp(24px,3.8vw,42px)}
.kr{display:flex; gap:6px}
.kb{position:relative}
.handlay{position:absolute; left:0; top:0; width:100%; height:100%; pointer-events:none; overflow:visible; z-index:3}
.kbpanel{overflow:hidden}
.handlay .padglow{animation:padglow 1s ease-in-out infinite alternate}
@keyframes padglow{from{opacity:.35}to{opacity:1}}
.minikb .kb{--kh:clamp(22px,4.2vw,34px); padding:10px}
.minikb .key{font-size:clamp(9px,1.4vw,14px)}
.minikb .key.mod{font-size:8px}
.key{flex-basis:0; flex-shrink:1; min-width:0; height:var(--kh); border-radius:10px; background-color:var(--kl,#fff); background-image:var(--grain),var(--grain-l);
  font-family:var(--display); font-weight:600; font-size:clamp(11px,1.9vw,20px); display:flex; align-items:center; justify-content:center; position:relative;
  box-shadow:0 2px 0 rgba(40,25,15,.2); outline:1.5px dashed rgba(60,40,30,.22); outline-offset:-4px; transition:transform .1s, background-color .1s}
.key.mod{font-family:var(--body); font-weight:900; font-size:clamp(8px,1.2vw,13px); text-transform:lowercase; color:var(--muted)}
.key.ghost{visibility:hidden}
.key.bump::after{content:""; position:absolute; bottom:5px; width:30%; height:3px; border-radius:2px; background:var(--ink); opacity:.6}
.key.next{background-color:var(--ks); color:#fff; transform:translateY(-4px) scale(1.08); z-index:2; outline-color:rgba(255,255,255,.7)}
@keyframes keyglow{to{transform:translateY(-6px) scale(1.12)}}
.key.bad{background-color:var(--red)!important; color:#fff}
.key.hit{background-color:var(--ks)}
.legend{display:flex; gap:12px; flex-wrap:wrap; font-size:13px; font-weight:800; justify-content:center; padding:0 14px 14px}

/* ---------- Results ---------- */
.stars{display:flex; gap:8px; justify-content:center}
.stars svg{width:72px; height:72px}
.stars svg.on{animation:starpop .5s cubic-bezier(.3,1.8,.5,1) backwards}
.stars svg:nth-child(2){animation-delay:.2s} .stars svg:nth-child(3){animation-delay:.4s}
@keyframes starpop{from{transform:scale(0) rotate(-90deg)}}
.results-stats{display:flex; gap:12px; justify-content:center; flex-wrap:wrap}
.versequote{font-family:var(--type); font-size:18px; background-color:#fffdf8; border-radius:14px; padding:12px 14px; outline:1.5px dashed var(--stitch); outline-offset:-6px}
.versequote cite{display:block; font-style:normal; font-weight:700; margin-top:4px; color:var(--muted); font-size:15px}
.badge{display:inline-block; font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.06em; border-radius:999px; padding:3px 9px; background-color:var(--green); color:#fff}
.badge.kjv{background-color:var(--sky); color:var(--ink)}
.badge.mine{background-color:var(--f-pinky-l); color:var(--ink)}
.badge.gold{background-color:var(--mustard); color:var(--ink)}
.bigmsg{text-align:center; font-size:18px; margin:0}

/* ---------- Games ---------- */
.gamegrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px}
.gcard{display:flex; flex-direction:column; gap:10px; padding:0; overflow:hidden}
.gcard .art{height:170px; position:relative; overflow:hidden; border-radius:20px 20px 0 0}
.gcard .art svg{width:100%; height:100%; display:block}
.gcard .body{padding:0 20px 20px; display:flex; flex-direction:column; gap:10px}
.gcard h3{font-size:28px}
.seg{display:inline-flex; border-radius:14px; overflow:hidden; box-shadow:var(--shadow); background-color:var(--cream)}
.seg button{font-family:var(--display); font-weight:600; font-size:16px; border:0; background:transparent; padding:9px 14px; cursor:pointer; color:var(--ink)}
.seg button+button{border-left:2px dashed var(--stitch)}
.seg button[aria-pressed=true]{background-color:var(--plum); color:#fff}

.playarea{position:relative; height:clamp(300px,50vh,500px); border-radius:20px; box-shadow:var(--shadow); overflow:hidden; cursor:text}
.manna{position:absolute; top:0; left:0; background-color:#fffdf8; background-image:var(--grain); border-radius:999px; padding:4px 14px 6px; font-family:var(--type); font-weight:700; font-size:clamp(18px,2.4vw,26px); white-space:nowrap; box-shadow:0 3px 6px rgba(40,25,15,.3); outline:1.5px dashed var(--stitch); outline-offset:-4px; will-change:transform}
.manna .t{color:var(--orange)}
.manna.locked{background-color:var(--mustard); z-index:3}
.burst{position:absolute; font-family:var(--display); font-weight:700; font-size:26px; pointer-events:none; animation:floatup .8s ease-out forwards; z-index:4; text-shadow:0 2px 0 rgba(40,25,15,.5)}
@keyframes floatup{to{transform:translateY(-50px); opacity:0}}
.ghud{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.ghud h2{flex:1; font-size:24px; min-width:150px; color:var(--cream); text-shadow:0 1px 2px rgba(20,10,5,.35)}
.hearts{display:flex; gap:4px}
.hearts svg{width:26px; height:24px}
.sign{position:absolute; background-color:var(--brown); background-image:var(--grain),var(--grain-l); color:#fff; border-radius:10px; padding:4px 12px 6px; font-family:var(--type); font-weight:700; font-size:clamp(20px,2.6vw,28px); white-space:nowrap; box-shadow:0 3px 6px rgba(40,25,15,.35); outline:1.5px dashed rgba(255,255,255,.5); outline-offset:-4px; transform:translateX(-50%); z-index:3}
.sign .t{color:var(--mustard)}
.animal{position:absolute; width:clamp(70px,10vw,110px); transition:left .5s ease}
.animal svg{width:100%; display:block}
.animal.walk svg{animation:waddle .35s ease-in-out infinite alternate}
@keyframes waddle{from{transform:rotate(-4deg)}to{transform:rotate(4deg) translateY(-3px)}}
.water{position:absolute; left:0; right:0; bottom:0; height:0; background:rgba(79,134,198,.8); transition:height 1s linear; z-index:5}
.rain{position:absolute; inset:0; pointer-events:none; z-index:4; transition:opacity 1s}
.drop{position:absolute; top:-20px; width:3px; height:16px; background:#e8f2fa; border-radius:2px; animation:fall linear infinite}
@keyframes fall{to{transform:translateY(600px)}}
.countdown{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-family:var(--display); font-weight:700; font-size:110px; z-index:8; pointer-events:none; color:var(--cream); text-shadow:0 4px 0 rgba(40,25,15,.4)}
.gamechar{position:absolute; bottom:5%; width:clamp(56px,9vw,100px); height:clamp(64px,10vw,116px); display:flex; align-items:flex-end}
.gamechar > *{width:100%; height:100%; object-fit:contain; object-position:bottom}

/* ---------- Themed land games ---------- */
.gcard .art .scene{width:100%; height:100%; display:block}
.gland{position:absolute; left:12px; top:12px}
.gcard.glocked .art{filter:grayscale(.7) brightness(.85)}
.gbg{position:absolute; inset:0}
.gbg svg{width:100%; height:100%; display:block}
.gitem{position:absolute; left:0; top:0; will-change:transform; z-index:3}
.gitem .gi svg{width:100%; display:block}
.tagwrap{position:absolute; left:50%; transform:translateX(-50%); white-space:nowrap; z-index:2; margin-bottom:4px}
.wtag{display:inline-block; background-color:#fffdf8; background-image:var(--grain); border-radius:999px; padding:3px 12px 5px; font-family:var(--type); font-weight:700; font-size:clamp(17px,2.2vw,25px); white-space:nowrap; color:var(--ink); box-shadow:0 3px 6px rgba(40,25,15,.3); outline:1.5px dashed var(--stitch); outline-offset:-4px}
.wtag .t{color:var(--orange)}
.gitem.locked .wtag{background-color:var(--mustard)}
@keyframes twinkle{from{transform:scale(.92) rotate(-6deg)}to{transform:scale(1.06) rotate(6deg)}}
.ggrass{position:absolute; left:0; right:0; bottom:0; height:12%; background-color:#6f9e4a; background-image:var(--grain),var(--grain-l); z-index:2}
.tinystars i{position:absolute; width:3px; height:3px; border-radius:50%; background:#f2e3a0; opacity:.7}
.gdunes{position:absolute; left:0; right:0; bottom:0; width:100%; height:22%}
.gbubble{position:absolute; bottom:102%; left:50%; transform:translateX(-30%); background:#fffdf8; color:var(--ink); font-family:var(--display); font-weight:600; font-size:clamp(14px,1.8vw,20px); padding:6px 12px; border-radius:14px; white-space:nowrap; box-shadow:0 3px 8px rgba(30,20,10,.35); z-index:9; animation:popin .25s cubic-bezier(.3,1.6,.6,1)}
.playarea .gamechar{z-index:4}
/* Grow the Garden */
.gardenback{position:absolute; left:0; right:0; top:4%; width:100%; height:30%; overflow:visible}
.plantT{transform:translate(-50%,-100%); width:clamp(70px,9.5vw,120px); text-align:center}
.mound{height:14px; margin:-6px 8% 0; border-radius:50%; background-color:#7a5236; background-image:var(--grain)}
.plantT .tagwrap{position:relative; left:auto; transform:none; display:block; margin:0 0 2px}
.plantT .plant{transform-origin:50% 100%; transition:transform .3s, filter .3s}
.plantT .plant svg{width:100%; display:block}
.meter{height:8px; border-radius:6px; background:rgba(255,255,255,.6); overflow:hidden; margin-top:2px}
.meter i{display:block; height:100%; width:100%; background:#4f86c6; border-radius:6px}
.splash{position:absolute; left:50%; top:20%; width:34px; height:34px; transform:translateX(-50%); animation:splashdrop .7s ease-in forwards; pointer-events:none}
@keyframes splashdrop{from{transform:translate(-50%,-30px); opacity:1}to{transform:translate(-50%,40px); opacity:0}}
/* Build the Ark */
.rainclouds{position:absolute; top:3%; right:0; width:70%; display:flex; gap:2%; z-index:2; transition:transform .5s linear}
.rainclouds svg{width:32%}
.arkbuild{position:absolute; left:54%; transform:translateX(-50%); bottom:10%; width:min(50%,480px); max-height:78%; z-index:3}
.arkbuild svg{display:block; width:100%}
.arkghost{opacity:.18; filter:grayscale(1)}
.arkbuilt{position:absolute; inset:0; transition:clip-path .4s ease-out}
.boarders{display:flex; gap:4px; width:clamp(110px,16vw,190px)}
.boarders .faceleft{width:50%; transform:scaleX(-1)}
.boarders svg{width:100%; display:block}
/* Star Pictures */
.skyframe{position:absolute; left:16%; right:6%; top:6%; bottom:24%; z-index:2}
.starlines{position:absolute; inset:0; width:100%; height:100%; overflow:visible}
.pstar{position:absolute; width:clamp(26px,3.4vw,44px); height:clamp(26px,3.4vw,44px); transform:translate(-50%,-50%); opacity:.45; transition:opacity .3s, transform .3s}
.pstar svg{width:100%; height:100%}
.pstar.now{opacity:1; transform:translate(-50%,-50%) scale(1.25); z-index:3}
.pstar.lit{opacity:1; filter:drop-shadow(0 0 8px #f2cf4a)}
.pstar .ptag{position:absolute; left:50%; bottom:110%; white-space:nowrap}
/* Manna Morning */
.mornsun{position:absolute; right:8%; width:clamp(50px,7vw,80px); height:clamp(50px,7vw,80px); border-radius:50%; background:#efbe3f; box-shadow:0 0 30px #f6d68a; transition:top .5s linear}
.mannaT{width:clamp(46px,5.5vw,64px)}
.mannaT.spoiled .wtag{background-color:#e7e2c6; color:#6a5a3a}
.omer{position:absolute; right:3%; bottom:10%; width:clamp(60px,7vw,90px); height:clamp(80px,10vw,120px); border-radius:14px 14px 20px 20px; background-color:#b87a4a; background-image:var(--grain); overflow:hidden; z-index:4; box-shadow:var(--shadow)}
.omerfill{position:absolute; left:0; right:0; bottom:0; background:#fbf6ea; transition:height .3s}
.omer b{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-family:var(--display); font-weight:600; font-size:clamp(16px,2vw,22px); color:#5a3a24}
/* Run to the Sea */
.seawall2{position:absolute; left:0; right:0; top:14%; height:58%; background-color:#3f73b0; background-image:var(--grain),var(--grain-l),linear-gradient(#6aa0d8,#2f5f9a); border-bottom:6px dashed #dcebf7}
.seabed{position:absolute; left:0; right:0; bottom:0; height:30%; background-color:#e2c294; background-image:var(--grain),repeating-linear-gradient(90deg, transparent 0 140px, rgba(184,146,90,.35) 140px 150px); z-index:1}
.farshore{position:absolute; right:0; bottom:0; width:22%; height:44%; background-color:#7cb85a; background-image:var(--grain),var(--grain-l); border-top-left-radius:60px; z-index:2}
.runner{left:30%; bottom:14%; z-index:4}
.pharaoh{position:absolute; bottom:12%; width:clamp(110px,15vw,180px); z-index:3; transition:left .4s}
.pharaoh svg{width:100%; display:block}
.popwheel{position:absolute; left:10%; bottom:10%; width:40px; height:40px; animation:popwheel .9s ease-out forwards}
@keyframes popwheel{to{transform:translate(-60px,-90px) rotate(-540deg); opacity:0}}
.obstT{width:clamp(56px,7vw,86px); z-index:3}
/* March Around Jericho */
.marchtrack{position:absolute; left:max(12%, 84px); top:4%; width:50%; height:74%}
.drum{position:absolute; right:6%; bottom:10%; width:clamp(90px,12vw,150px); aspect-ratio:1; border-radius:50%; background-color:#b8433b; background-image:var(--grain); border:8px solid #e2c294; box-shadow:var(--shadow); display:flex; align-items:center; justify-content:center; z-index:3}
.drum b{font-family:var(--type); font-weight:700; font-size:clamp(40px,5.5vw,70px); color:#fff; z-index:2}
.drum .ring{position:absolute; inset:-10px; border-radius:50%; border:5px solid #efbe3f; opacity:.8}
.drum.hit{background-color:var(--grass)}
.drum.hit .ring{opacity:0}
/* Guard the Flock */
.flockpen{position:absolute; left:50%; bottom:5%; transform:translateX(-50%); width:30%; display:flex; justify-content:center; z-index:5}
.flockpen span{width:20%}
.flockpen svg{width:100%; display:block}
.gamechar.david{left:26%; bottom:5%; transform:translateX(-50%); z-index:4}
.predT{width:clamp(70px,9vw,110px)}
.slingstone{position:absolute; left:0; top:0; width:12px; height:12px; border-radius:50%; background:#9a9590; z-index:6}
/* Another Way Home */
.trail{position:absolute; left:max(12%, 84px); right:4%; top:7%; display:flex; align-items:center; gap:2%; z-index:3}
.trail i{flex:1; height:10px; border-radius:6px; background:rgba(255,255,255,.25)}
.trail i.on{background:#f2cf4a}
.trailhome{width:34px; height:34px; flex:none}
.crossT{transform:translate(-50%,0); z-index:3}
.signpost2{display:flex; flex-direction:column; align-items:center; gap:4px}
.signicon{width:clamp(34px,4.5vw,56px); height:clamp(34px,4.5vw,56px); display:block}
.signicon svg{width:100%; height:100%}
.signpost2 .post{display:block; width:8px; height:clamp(40px,8vh,80px); background:#7a4e30; border-radius:3px}
/* Chariot Race */
.track{position:absolute; left:0; right:0; bottom:6%; height:40%; z-index:2}
.track::before{content:""; position:absolute; left:0; right:0; bottom:0; height:62%; background-color:#d9b382; background-image:var(--grain),var(--grain-l); border-top:3px dashed rgba(255,255,255,.5)}
.finishline{position:absolute; right:7%; bottom:0; width:14px; height:62%; background:repeating-linear-gradient(#fff 0 12px,#3b2a1e 12px 24px); opacity:.85}
.racer{position:absolute; left:2%; width:clamp(110px,16vw,190px); will-change:transform}
.racer svg{width:100%; display:block}
.racer.ghost{bottom:34%; opacity:.45; filter:grayscale(.6)}
.racer.mine{bottom:0}
/* Chariot Race as a TypeRacer-style race (games.js NG.chariot) */
.racetext{position:absolute; left:3%; right:3%; top:5%; z-index:4; padding:10px 16px 12px; border-radius:16px; background-color:#fffdf8; background-image:var(--grain); box-shadow:0 4px 10px rgba(30,20,10,.3); outline:1.5px dashed var(--stitch); outline-offset:-5px;
  font-family:var(--type); font-weight:700; font-size:clamp(19px,2.3vw,28px); line-height:1.45; color:var(--ink); letter-spacing:.02em; word-spacing:.12em}
.playarea:has(.racetext) .gbuddy{display:none}   /* in the race your avatar rides on your chariot's name tag */
.racetext .rdone{color:#4f8f3f}
.racetext .rnow{background:var(--mustard); border-radius:5px; padding:0 2px; box-shadow:0 2px 0 rgba(90,58,36,.35)}
.racetext .rrest{color:#6a5a4e}
.track.race{bottom:3%; height:56%}
.track.race::before{height:100%; border-top:3px dashed rgba(255,255,255,.5); background-image:var(--grain),var(--grain-l),repeating-linear-gradient(180deg, transparent 0 calc(var(--lanes-h,25%) - 2px), rgba(255,255,255,.35) calc(var(--lanes-h,25%) - 2px) var(--lanes-h,25%))}
.track.race .finishline{height:100%}
.track.race.lanes2{--lanes-h:50%} .track.race.lanes3{--lanes-h:33.33%} .track.race.lanes4{--lanes-h:25%}
.track.race .racer{width:clamp(80px,11vw,140px); height:var(--lane); display:flex; flex-direction:column; justify-content:flex-end}
.track.race .racer svg{width:100%}
.track.race .racer.ghost{opacity:.72; filter:saturate(.75)}
.rname{display:inline-flex; align-items:center; gap:5px; align-self:flex-start; max-width:220px; white-space:nowrap; font-family:var(--display); font-weight:600; font-size:13px; color:var(--ink); background:#fffdf8e6; border-radius:999px; padding:1px 9px 1px 2px; margin-bottom:-6px; position:relative; z-index:1}
.rname small{font-weight:500; color:#7a5a3a}
.rav{width:22px; height:22px; display:inline-block; border-radius:50%; overflow:hidden; background:#e8dcc4}
.rav svg{width:100%; height:100%}
.racer.mine .rname{background:var(--mustard)}
/* the family leaderboard (game.js leaderboardModal) */
.lbtabs{flex-wrap:wrap; gap:8px}
.modal.lbmodal{width:min(900px,100%)}
.lbgames{align-self:flex-start} .lbgames button{font-size:15px; padding-left:13px; padding-right:13px; white-space:nowrap}
.lboard{list-style:none; margin:4px 0; padding:0; display:flex; flex-direction:column; gap:6px; max-height:min(52vh,460px); overflow:auto}
.lboard li{display:grid; grid-template-columns:44px 40px 1fr auto auto auto; gap:10px; align-items:center; padding:6px 12px; border-radius:14px; background-color:#fffdf8; background-image:var(--grain); outline:1.5px dashed var(--stitch); outline-offset:-4px}
.lboard li.lbme{background-color:#fbefc4}
.lrank{font-family:var(--display); font-weight:700; font-size:20px; text-align:center}
.lav{width:38px; height:38px; display:block}
.lav svg{width:100%; height:100%}
.lname{font-family:var(--display); font-weight:600; font-size:18px} .lname small{font-weight:500; font-size:12px; color:#7a5a3a}
.lwpm{font-size:15px} .lwpm b{font-family:var(--display); font-size:22px}
.lacc, .ldate{font-size:13px; color:#7a5a3a}
.lempty{text-align:center; font-family:var(--display); font-size:20px; color:#7a5a3a; margin:24px 0}
@media (max-width:640px){ .lboard li{grid-template-columns:36px 32px 1fr auto; gap:6px} .lacc,.ldate{display:none} }
/* Full Nets */
.lakehills{position:absolute; left:0; right:0; top:30%; width:100%; height:20%}
.lakewater{position:absolute; left:0; right:0; bottom:0; height:52%; background-color:#3f73b0; background-image:var(--grain),var(--grain-l),linear-gradient(#4f86c6, #2f5f9a); z-index:1}
.netzone{position:absolute; left:40%; width:20%; top:46%; bottom:4%; z-index:2; border-left:3px dashed #e9d9a8; border-right:3px dashed #e9d9a8}
.netmesh{position:absolute; inset:0; background-image:linear-gradient(45deg, rgba(233,217,168,.35) 1.5px, transparent 1.5px), linear-gradient(-45deg, rgba(233,217,168,.35) 1.5px, transparent 1.5px); background-size:18px 18px}
.netboat{position:absolute; left:50%; top:22%; width:clamp(120px,17vw,210px); height:clamp(110px,15vw,190px); transform:translateX(-50%); transform-origin:50% 90%; z-index:3}
.fishT{width:clamp(64px,8vw,96px)}
.fishT .gi svg{width:100%}
.fishT.over .wtag{outline:2.5px solid var(--grass); outline-offset:0}
.playarea.storm{filter:saturate(.75) brightness(.9)}
/* The Upper Room */
.urroom{position:absolute; left:0; top:0; bottom:0; width:72%; overflow:hidden}
.urwall{position:absolute; inset:0 0 30% 0; background-color:#d9c3a0; background-image:var(--grain),var(--grain-l)}
.urwindow{position:absolute; left:40%; top:8%; width:18%; height:26%; background:#22335c; border:6px solid #8a6a40; border-radius:6px}
.urfloor{position:absolute; left:0; right:0; bottom:0; height:30%; background-color:#a8703e; background-image:var(--grain),var(--grain-l)}
.urshelf{position:absolute; left:6%; right:6%; top:44%; height:3.5%; background-color:#8a5a36; border-radius:4px; box-shadow:0 5px 0 rgba(0,0,0,.15)}
.urtable{position:absolute; left:18%; right:18%; top:66%; height:5%; background-color:#7a4e30; border-radius:6px; box-shadow:0 6px 0 rgba(0,0,0,.15)}
.urobj{position:absolute; width:clamp(54px,7vw,90px); height:clamp(46px,6vw,76px); transform:translate(-50%,-50%); z-index:2; filter:saturate(.85)}
.urobj svg{width:100%; height:100%}
.urobj.found{filter:drop-shadow(0 0 10px #fff4c4) drop-shadow(0 0 4px #efbe3f)}
.urlist{position:absolute; right:0; top:0; bottom:0; width:28%; background-color:#f2e6c9; background-image:var(--grain); padding:12px 14px; display:flex; flex-direction:column; gap:6px; overflow:auto; border-left:4px dashed #d9bf8f}
.urlist b{font-family:var(--display); font-weight:600; font-size:clamp(14px,1.6vw,19px); margin-bottom:4px}
.urrow{font-family:var(--type); font-weight:700; font-size:clamp(17px,2vw,24px); padding:2px 10px; border-radius:10px; background:#fffdf8}
.urrow .t{color:var(--orange)}
.urrow.done{background:#dcecd2; text-decoration:line-through; color:var(--muted)}
.urrow.done .t{color:var(--muted)}
.playarea .gitem.locked, .urrow.locked{background-color:var(--mustard)}
/* River of Life */
.riverpath{position:absolute; inset:0; width:100%; height:100%; z-index:1}
.lifetree{position:absolute; left:4%; bottom:6%; width:clamp(130px,20vw,240px); height:clamp(120px,19vw,230px); z-index:2}
.fruits{position:absolute; inset:0}
.fruits i{position:absolute; width:8%; height:8%; border-radius:50%; box-shadow:0 2px 0 rgba(0,0,0,.2); animation:popin .4s cubic-bezier(.3,1.6,.6,1)}
/* Hidden treasures */
.treasure{position:absolute; transform:translate(-50%,-50%); padding:0; border:0; background:none; cursor:pointer; z-index:2; opacity:.75; animation:glint 3.2s ease-in-out infinite}
.treasure svg{ display:block; filter:drop-shadow(0 0 3px rgba(255,240,180,.9))}
.treasure:hover,.treasure:focus-visible{opacity:1; animation-play-state:paused; transform:translate(-50%,-50%) scale(1.3)}
@keyframes glint{0%,70%,100%{opacity:.35; transform:translate(-50%,-50%) scale(.75) rotate(0)} 80%{opacity:1; transform:translate(-50%,-50%) scale(1.15) rotate(25deg)}}
@media (prefers-reduced-motion:reduce){ .treasure{animation:none; opacity:.8} }
.lostcoin{cursor:pointer}
.treasurefound{text-align:center; display:flex; flex-direction:column; align-items:center; gap:6px}
.treasurefound .tart{width:120px; height:120px; display:block; animation:popin .5s cubic-bezier(.3,1.6,.6,1)}
.treasurefound .tart svg{width:100%; height:100%}
.tverse{margin:0; font-style:italic; max-width:520px}
.tverse cite{display:block; font-style:normal; font-size:14px; color:var(--muted); margin-top:4px}
.tgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px}
.tcard{background:#fffdf8; border-radius:12px; padding:8px; display:flex; flex-direction:column; align-items:center; text-align:center; gap:2px; box-shadow:0 2px 0 rgba(40,25,15,.12)}
.tcard .tart{width:64px; height:64px; display:flex; align-items:center; justify-content:center}
.tcard .tart svg{width:100%; height:100%}
.tcard .tart.unknown{font-family:var(--display); font-size:34px; color:var(--muted); background:#efe4cc; border-radius:50%; width:56px; height:56px}
.tcard b{font-family:var(--display); font-weight:600; font-size:15px; line-height:1.15}
.tcard small{font-size:12px; color:var(--muted); line-height:1.2}
.tcard:not(.found){opacity:.8}
/* the sticker book (stickerBook in game.js): one page per land, then camp and verses; stickers not earned yet are faint shapes */
.modal.sbookmodal{width:min(980px,100%); display:flex; flex-direction:column; gap:8px}
.sbookmodal h2{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap}
.sbtotal{font-family:var(--body); font-size:16px; font-weight:700; color:var(--muted)}
.sbtabs{display:grid; grid-template-columns:repeat(var(--n),minmax(0,1fr)); gap:4px}
.sbtab{min-height:48px; border:0; border-radius:10px; background:#efe4cc; color:var(--ink); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; padding:3px 2px; cursor:pointer; position:relative; font:inherit}
.sbtab .sbpic{width:26px; height:26px; display:block}
.sbtab .sbpic svg{width:100%; height:100%; display:block}
.sbtab small{font-size:13px; font-weight:700; line-height:1}
.sbtab[aria-pressed=true]{background:var(--plum); color:#fff}
.sbtab.new::after{content:''; position:absolute; top:3px; right:5px; width:9px; height:9px; border-radius:50%; background:#efbe3f; box-shadow:0 0 0 2px #fff}
.sbhead{display:flex; align-items:baseline; gap:10px}
.sbhead h3{margin:0; font-size:22px}
.sbcount{font-weight:700; color:var(--muted)}
.sbnote{font-size:14px}
.sgrid{display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px 12px; padding:8px 6px}
.sgrid.many{grid-template-columns:repeat(7,minmax(0,1fr))}
.sticker{position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; gap:2px; padding:8px 6px 6px; border-radius:20px; background:#fffdf8;
  box-shadow:0 0 0 4px #fff, 0 4px 8px rgba(40,25,15,.28); transform:rotate(var(--tilt,0deg))}
.sticker:nth-child(3n+1){--tilt:-2deg} .sticker:nth-child(3n+2){--tilt:1.5deg}
.sticker .sart{width:min(96px,13vh); height:min(96px,13vh); display:flex; align-items:center; justify-content:center}
.sgrid.many .sticker .sart{width:min(76px,10vh); height:min(76px,10vh)}
.sticker .sart svg{width:100%; height:100%; display:block}
.sticker b{font-family:var(--display); font-weight:600; font-size:14px; line-height:1.15; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.sticker small{font-size:13px; color:var(--muted); line-height:1.2}
.sticker.gold{background:#fff7dc; box-shadow:0 0 0 4px #efbe3f, 0 0 0 6px #fff, 0 4px 10px rgba(120,80,10,.35)}
.sticker .sstars{color:#c98a12; letter-spacing:-1px}
.sticker.locked{background:transparent; box-shadow:none; outline:2.5px dashed rgba(122,106,94,.45); outline-offset:-3px; transform:none}
.sticker.locked .sart{filter:brightness(0); opacity:.13}
.sticker.locked b{color:var(--muted); font-weight:500}
.sticker .snew{position:absolute; top:-10px; right:-6px; z-index:1; background:var(--red); color:#fff; font-weight:700; font-size:13px; padding:2px 8px; border-radius:10px; transform:rotate(8deg)}
.tchestbtn{display:inline-flex; align-items:center; gap:6px; white-space:nowrap}
.tchestbtn svg{width:26px; height:26px}
/* End-of-land challenges */
.mk.chstop.next .disc{background-color:#cfe3f4}
.mk.chstop.done .disc{background-color:var(--mustard)}
.mk.chstop .disc .licon{width:78%; height:78%}
.chbars{position:absolute; left:50%; transform:translateX(-50%); top:10px; width:min(560px,70%); display:flex; flex-direction:column; gap:6px; z-index:4}
.chbar{display:flex; align-items:center; gap:8px; background:rgba(251,246,234,.92); border-radius:999px; padding:4px 10px; box-shadow:var(--shadow)}
.chbar b{font-family:var(--display); font-size:14px; white-space:nowrap; min-width:7.5em}
.chbar span{flex:1; height:12px; background:rgba(90,60,40,.15); border-radius:999px; overflow:hidden}
.chbar i{display:block; height:100%; width:0; border-radius:999px; transition:width .25s}
.chbar.good i{background:var(--green)} .chbar.bad i{background:var(--red)}
/* the heroes stand on the left third, out in front of the trees; the threat comes from the right */
.chcast{bottom:8%; width:clamp(84px,12vw,150px)}
.chfoe{position:absolute; right:3%; bottom:8%; width:clamp(110px,16vw,200px); z-index:2; transition:right .3s linear}
.chfoe svg{width:100%; height:auto; display:block; overflow:visible}
.chfoe.person{width:clamp(150px,23vw,300px)}
.chwater{position:absolute; left:0; right:0; bottom:0; height:4%; background:rgba(79,134,198,.7); border-top:4px solid rgba(220,235,247,.8); z-index:3; transition:height .3s linear}
/* Bonus games */
.digT{transform:translate(-50%,-100%); width:clamp(90px,11vw,150px); text-align:center}
.digT .gi svg{width:100%; display:block}
.digT .tagwrap{position:relative; left:auto; transform:none; display:block; margin:0 0 2px}
.sprintbar{position:absolute; left:10%; right:10%; top:12px; height:12px; border-radius:999px; background:rgba(255,255,255,.6); overflow:hidden; z-index:2}
.sprintbar i{display:block; height:100%; width:100%; background:var(--orange); border-radius:999px}
.gcard.bonus .gland{background-color:var(--mustard); color:#5a3a10}
/* Walking around camp: word tags, speech bubbles, little effects */
.campsvg{touch-action:manipulation}
.ctag{cursor:pointer}
.ctag rect{fill:#fffdf8; stroke:rgba(90,60,40,.45); stroke-width:2; stroke-dasharray:5 4}
.ctag .ptr{fill:#fffdf8}
.ctag text{font-family:var(--display); font-weight:700; font-size:22px; fill:var(--ink)}
.ctag text .t{fill:var(--orange)}
.ctag.locked rect{stroke:var(--orange); stroke-dasharray:none; stroke-width:3}
.ctag.space text{font-size:17px; fill:var(--muted); letter-spacing:.06em}
.ctag{animation:tagpop .25s ease-out}
@keyframes tagpop{from{opacity:0}to{opacity:1}}
.cbubble rect{fill:#fffdf8; stroke:rgba(90,60,40,.35); stroke-width:1.5}
.cbubble text{font-family:var(--body, sans-serif); font-size:18px; fill:var(--ink)}
.cbubble{animation:tagpop .25s ease-out}
.spk{animation:spk 1.2s ease-out forwards; transform-box:fill-box}
@keyframes spk{to{transform:translateY(-50px); opacity:0}}
.note{ fill:#7a4e30; animation:note 1.8s ease-out forwards; transform-box:fill-box}
@keyframes note{to{transform:translate(20px,-60px); opacity:0}}
.drop2{animation:drop2 1s ease-in forwards; transform-box:fill-box}
@keyframes drop2{to{transform:translateY(40px); opacity:0}}
.figdrop{animation:figdrop 1.2s cubic-bezier(.5,0,.8,.4) forwards; transform-box:fill-box}
@keyframes figdrop{70%{transform:translateY(80px)} 100%{transform:translate(14px,80px); opacity:0}}
.fishjump{animation:fishjump 1.2s ease-in-out forwards; transform-box:fill-box}
@keyframes fishjump{50%{transform:translate(20px,-60px) rotate(-30deg)} 100%{transform:translate(40px,0) rotate(30deg); opacity:0}}
.conf{animation:conf 1.4s ease-out forwards; transform-box:fill-box}
@keyframes conf{to{transform:translate(var(--dx),var(--dy)) rotate(200deg); opacity:0}}
@media (prefers-reduced-motion:reduce){ .spk,.note,.drop2,.figdrop,.fishjump,.conf{animation-duration:.01s} }
/* Legendary items twinkle */
.spark{transform-box:fill-box; transform-origin:center; animation:twinkle2 1.8s ease-in-out infinite}
@keyframes twinkle2{0%,100%{opacity:.25; transform:scale(.6)} 50%{opacity:1; transform:scale(1.1)}}
@media (prefers-reduced-motion:reduce){ .spark{animation:none; opacity:.8} }
/* Shop cards: upgrades */
.tierbadge{display:inline-block; font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; border-radius:999px; padding:2px 8px; background:#e8dcc4; color:#5a3a24}
.tierbadge.t2{background:#cfe3f4; color:#2f4f7a}
.tierbadge.t3{background:linear-gradient(90deg,#f2d27a,#e2b04a); color:#5a3a10}
.shopcard .upg{display:flex; flex-direction:column; align-items:center; gap:3px; margin-top:auto}
.shopcard .upg .btn{white-space:nowrap}
.shopcard.small .upg .btn{padding:5px 8px; font-size:13px}
.shopcard .upg small{font-size:11px; color:var(--muted); text-align:center; line-height:1.2}
/* For grown-ups (the parent page) */
.modal.parentmodal{width:min(1080px,100%)}
.parentmodal h2{margin-bottom:2px}
.ptabs{margin:2px 0 6px}
.ptiles{display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px}
.ptile{background:#fffdf8; border-radius:12px; padding:8px 10px; box-shadow:0 2px 0 rgba(40,25,15,.12); display:flex; flex-direction:column}
.ptile b{font-family:var(--display); font-size:24px; color:var(--ink); line-height:1.1}
.ptile b span{font-size:15px; color:var(--muted)}
.ptile small{font-size:12px; color:var(--muted)}
.pgrid2{display:grid; grid-template-columns:repeat(auto-fit,minmax(min(360px,100%),1fr)); gap:10px; margin:10px 0}
.ppanel{background:#fffdf8; border-radius:12px; padding:10px 12px; box-shadow:0 2px 0 rgba(40,25,15,.12); min-width:0}
.ppanel h3{font-size:17px; margin:0 0 4px}
.pchart{width:100%; height:auto; display:block}
.pchart .pgrid{stroke:rgba(90,60,40,.14); stroke-width:1}
.pchart .pgoal{stroke:var(--muted); stroke-width:1.2; stroke-dasharray:4 4}
.pchart .ptick{font:13px var(--body, sans-serif); fill:var(--muted)}
.pchart .pdot{cursor:default}
.pchart .pdot:hover circle:last-of-type{r:6}
.pweek{display:grid; grid-template-columns:repeat(7,1fr); gap:6px; height:120px; align-items:end}
.pday{display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; gap:2px}
.pbar{display:block; width:70%; max-width:34px; background:var(--board); border-radius:4px 4px 0 0}
.pday b{font-size:12px; color:var(--ink); min-height:15px}
.pday small{font-size:11px; color:var(--muted)}
.pnote{font-size:12.5px; margin:6px 0 0}
.pnone{margin:6px 0}
.ptricky{display:flex; flex-wrap:wrap; gap:10px}
.ptricky span{display:flex; flex-direction:column; align-items:center; gap:2px}
.ptricky small{font-size:12px; color:var(--muted)}
.ptablewrap{overflow-x:auto}
.ptable{width:100%; border-collapse:collapse; font-size:14px}
.ptable th{text-align:left; font-size:12px; color:var(--muted); font-weight:700; padding:4px 8px; border-bottom:1.5px solid rgba(90,60,40,.2)}
.ptable td{padding:4px 8px; border-bottom:1px solid rgba(90,60,40,.1); white-space:nowrap}
.ptable tr.plocked td{color:var(--muted)}
.plist{margin:4px 0 0; padding-left:18px; columns:2; column-gap:18px; font-size:14px}
.plist li{break-inside:avoid; margin-bottom:2px}
/* The journey certificate */
.cert{position:relative; text-align:center; padding:clamp(16px,3vw,32px); border-radius:16px; background-color:#fbf6ea; background-image:var(--grain);
  outline:3px double var(--mustard); outline-offset:-10px; box-shadow:inset 0 0 0 14px #fbf6ea, inset 0 0 0 16px rgba(201,165,122,.5)}
.certhead{font-family:var(--display); font-weight:700; font-size:clamp(24px,3.4vw,38px); color:#7a4e30}
.certav{width:clamp(70px,9vw,110px); height:clamp(80px,10vw,126px); margin:6px auto 0}
.certav > *{width:100%; height:100%}
.certline{margin:4px 0; color:var(--ink)}
.certname{font-family:var(--display); font-weight:700; font-size:clamp(30px,4.6vw,52px); color:var(--ink); border-bottom:2px solid var(--mustard); display:inline-block; padding:0 18px; margin:2px 0 6px}
.certlands{display:flex; justify-content:center; flex-wrap:wrap; gap:6px; margin:10px 0}
.certlands svg{width:clamp(22px,2.6vw,32px); height:clamp(22px,2.6vw,32px)}
.certstats{display:flex; justify-content:center; flex-wrap:wrap; gap:clamp(10px,2.4vw,28px); margin:8px 0}
.certstats div{display:flex; flex-direction:column; align-items:center; min-width:90px}
.certstats b{font-family:var(--display); font-size:clamp(22px,2.8vw,32px); color:#7a4e30}
.certstats small{color:var(--muted); font-size:13px}
.certverse{margin:10px auto; max-width:640px; font-style:italic}
.certverse small{display:block; font-style:normal; color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.06em}
.certverse cite{display:block; font-style:normal; font-size:13px; color:var(--muted); margin-top:2px}
.certsign{display:flex; justify-content:space-around; gap:16px; margin-top:16px}
.certsign > div{display:flex; flex-direction:column; align-items:center; min-width:120px}
.certsign .sig{font-family:var(--display); font-size:22px; min-height:30px; min-width:140px; border-bottom:1.5px solid var(--ink); padding:0 6px}
.certsign .sig.date{font-size:16px; line-height:30px}
.certsign small{color:var(--muted); font-size:12px}
/* land certificates (landCertificate): a smaller certificate for one land */
.certkick{font-size:13px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
.landcert .certhead{display:flex; align-items:center; justify-content:center; gap:12px}
.certicon{width:clamp(28px,3vw,40px); height:clamp(28px,3vw,40px); display:inline-block}
.certicon svg{width:100%; height:100%; display:block}
.modal.landcertmodal{width:min(900px,100%)}
.landcert .certmid{display:flex; align-items:center; justify-content:center; gap:clamp(12px,2vw,24px); text-align:center}
.landcert .certmid .certav{margin:0; flex:none}
.landcert .certline{max-width:620px; margin-left:auto; margin-right:auto}
.certmarks{display:flex; justify-content:center; gap:clamp(6px,1.2vw,14px); margin:6px 0}
.certmarks svg{width:clamp(34px,4vw,52px); height:clamp(34px,4vw,52px); display:block}
#certPick{font:inherit; padding:6px 8px; border-radius:10px; border:1.5px solid var(--stitch); background:#fffdf8; max-width:100%}
@media screen and (max-height:820px){
  .cert{padding:12px 20px} .certav{width:64px; height:72px; margin-top:2px} .certname{font-size:36px}
  .certlands{margin:6px 0} .certverse{margin:6px auto} .certsign{margin-top:8px}
}
/* Printing: only the certificate, on one page */
@media print{
  body.printcert{background:#fff !important}
  body.printcert > *:not(#modalRoot):not(svg){display:none !important}
  body.printcert #modalRoot .overlay{position:static; background:none; padding:0; display:block}
  body.printcert .modal.certmodal{box-shadow:none; max-width:none; width:100%; max-height:none; overflow:visible; background:none; outline:none; padding:0; margin:0}
  body.printcert .noprint{display:none !important}
  @page{size:landscape; margin:12mm}
}
/* River of Life: the journey review (one line from each land; a trail of 12 land markers lights up) */
.jtrail{position:absolute; left:50%; top:10px; transform:translateX(-50%); display:flex; gap:clamp(3px,.6vw,8px); z-index:5; background:rgba(251,246,234,.85); border-radius:999px; padding:5px 10px; box-shadow:var(--shadow)}
.jstop{width:clamp(22px,2.6vw,34px); height:clamp(22px,2.6vw,34px); display:flex; transition:transform .3s}
.jstop > svg{width:100%; height:100%}
.jstop.lit{transform:scale(1.18)}
.jreview{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:6; min-width:min(80%,420px); max-width:92%; text-align:center;
  background-color:var(--cream); background-image:var(--grain),var(--grain-l); border-radius:18px; padding:14px 22px 18px; box-shadow:var(--shadow); outline:2px dashed var(--stitch); outline-offset:-8px}
.jrhead{font-family:var(--display); font-weight:600; font-size:14px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em}
.jrland{display:flex; align-items:center; justify-content:center; gap:8px; margin:6px 0 10px; font-family:var(--display); font-size:clamp(18px,2vw,24px)}
.jrland svg{width:32px; height:32px}
.jrtext{font-family:var(--mono, ui-monospace, monospace); font-weight:700; font-size:clamp(24px,3.4vw,40px); line-height:1.25}
.jrtext .t{color:var(--green)}
.leafT{width:clamp(50px,6vw,76px)}
/* Red Sea */
.chariot{width:clamp(110px,14vw,180px); top:auto!important; bottom:24%; transform:none!important; z-index:2}
.chariot svg{width:100%; display:block}
/* Valley of Elah: Count the Flock */
.fence{position:absolute; left:47%; bottom:8%; width:5%; height:22%; z-index:4; background:
  linear-gradient(#8a5a36,#8a5a36) 20% 0/18% 100% no-repeat, linear-gradient(#8a5a36,#8a5a36) 80% 0/18% 100% no-repeat,
  linear-gradient(#a8703e,#a8703e) 0 25%/100% 16% no-repeat, linear-gradient(#a8703e,#a8703e) 0 70%/100% 16% no-repeat}
.fold{position:absolute; right:2%; bottom:8%; width:36%; height:30%; border:6px solid #a8703e; border-bottom:none; border-radius:10px 10px 0 0; z-index:1; background:rgba(255,255,255,.08)}

/* Jericho */
.brick{display:flex; align-items:center; justify-content:center; background-color:#e2cba5; background-image:var(--grain),var(--grain-l); border-radius:6px; box-shadow:0 2px 0 rgba(40,25,15,.25); outline:1.5px dashed rgba(90,60,40,.3); outline-offset:-4px; font-family:var(--type); font-weight:700; font-size:clamp(14px,1.9vw,24px); color:var(--ink); min-width:0}
.brick .t{color:var(--orange)}
.brick.locked{background-color:var(--mustard)}
.countdown.shout{color:var(--mustard); font-size:clamp(60px,10vw,120px)}
/* Bethlehem */
.bigstar{position:absolute; right:8%; top:6%; width:clamp(56px,8vw,96px); filter:drop-shadow(0 0 14px rgba(255,220,120,.8)); animation:twinkle 1.6s ease-in-out infinite alternate; z-index:2}
.bigstar svg{width:100%; display:block}
.dunes2{position:absolute; left:0; bottom:0; width:250%; height:24%; transition:transform .6s ease-out; z-index:1}
.dunes2 svg{width:100%; height:100%; display:block}
.caravan{position:absolute; left:6%; bottom:12%; display:flex; gap:4px; align-items:flex-end; transition:transform 1.2s ease-in-out; z-index:3}
.camel{position:relative; width:clamp(70px,9vw,110px)}
.camel svg{width:100%; display:block}

/* ---------- Buddy: companion, game watcher, outfits ---------- */
.who{cursor:pointer}
.scenebox .host.r.buddyhost{height:62%; width:auto; aspect-ratio:1/1; right:3%; bottom:4%; z-index:2}
.scenebox .buddyhost svg{width:100%; height:100%; display:block}
.scenebox .buddyhost .gbubble{left:auto; right:30%; transform:none}
.gbuddy{position:absolute; left:10px; top:10px; width:clamp(52px,7vw,84px); height:clamp(52px,7vw,84px); z-index:7; background:rgba(247,240,225,.55); border-radius:50%; padding:6px; box-shadow:0 2px 6px rgba(30,20,10,.2)}
.gbuddy svg{width:100%; height:100%; display:block}
.gbuddy .gbubble{left:100%; bottom:auto; top:20%; transform:none; margin-left:6px}
.modal .resbuddy{position:absolute; top:14px; width:clamp(64px,9vw,92px); height:clamp(64px,9vw,92px); z-index:2}
.modal .resbuddy svg{width:100%; height:100%; display:block; transform-origin:50% 100%}
.modal .resbuddy.cheer svg{animation:cheerhop .7s ease-in-out 3}
.modal .resbuddy.sad svg{animation:sadsway 1.4s ease-in-out 2}
.modal .resbuddy .gbubble{right:80%; left:auto; bottom:70%; transform:none; font-size:14px}
@keyframes cheerhop{0%,100%{transform:translateY(0) rotate(0)}40%{transform:translateY(-22%) rotate(-10deg)}70%{transform:translateY(-8%) rotate(8deg)}}
@keyframes sadsway{0%,100%{transform:rotate(0) scaleY(1)}50%{transform:rotate(-6deg) scaleY(.92)}}
.newitems{background:#fbe3b6; border-radius:14px; padding:10px 14px; outline:1.5px dashed var(--stitch); outline-offset:-5px}
.newitem{display:inline-flex; align-items:center; gap:6px; font-family:var(--display); font-weight:600}
.newitem .iicon{width:34px; height:34px}
.iicon{display:inline-block}
.iicon svg{width:100%; height:100%; display:block}
.newdot{display:inline-block; background:var(--red); color:#fff; font-size:11px; border-radius:999px; padding:1px 6px; margin-left:4px; vertical-align:2px}
.dressgrid{display:grid; grid-template-columns:minmax(160px,1fr) 2fr; gap:18px; align-items:start}
.dresspreview{background:#fffdf8; border-radius:18px; aspect-ratio:1/1.05; display:flex; align-items:flex-end; justify-content:center; padding:12px; outline:1.5px dashed var(--stitch); outline-offset:-6px; position:sticky; top:0}
.dresspreview svg{width:100%; height:100%}
.items{display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:8px; margin:4px 0 10px}
.itemcard{border:0; border-radius:14px; background-color:#fffdf8; padding:8px 6px; display:flex; flex-direction:column; align-items:center; gap:4px; cursor:pointer; box-shadow:0 2px 0 rgba(40,25,15,.15); color:var(--ink); font-family:var(--body)}
.itemcard .iicon{width:52px; height:52px}
.itemcard small{font-size:12px; font-weight:800; text-align:center; line-height:1.2}
.itemcard[aria-pressed=true]{background-color:var(--mustard); transform:translateY(-2px); box-shadow:var(--shadow)}
.itemcard.locked{cursor:default; opacity:.6}
.itemcard.locked .iicon{filter:grayscale(1) brightness(.6); opacity:.5}
.itemcard.locked small{color:var(--muted); font-weight:700}
@media (max-width:640px){ .dressgrid{grid-template-columns:1fr} .dresspreview{max-width:200px; margin:0 auto; position:static} }
.itemcard .swatchdot{width:44px; height:44px; border-radius:50%; display:block; box-shadow:inset 0 -4px 0 rgba(0,0,0,.18); outline:1.5px dashed rgba(255,255,255,.6); outline-offset:-5px}

/* ---------- Character creator ---------- */
.creator{display:grid; grid-template-columns:minmax(130px,190px) 1fr; gap:16px; align-items:start}
.creatorprev{background:#fffdf8; border-radius:18px; aspect-ratio:1/1.1; display:flex; align-items:flex-end; justify-content:center; padding:10px; outline:1.5px dashed var(--stitch); outline-offset:-6px}
.creatorprev svg{width:100%; height:100%}
.creatoropts{display:flex; flex-direction:column; gap:4px}
.creatoropts .choices{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:6px}
.creatoropts .choice{min-width:0}
@media (max-width:640px){ .creator{grid-template-columns:1fr} .creatorprev{max-width:170px; margin:0 auto} }

/* ---------- Shekels, camp and the trader ---------- */
.coin{display:inline-flex; width:1.2em; height:1.2em; vertical-align:-.25em}
.coin svg{width:100%; height:100%}
.starcount.coins{background-color:#f4dc93}
.earned{font-family:var(--display); font-weight:600; font-size:20px; margin:6px 0 0; display:flex; align-items:center; justify-content:center; gap:6px; color:#7a5414}
.campbox{border-radius:18px; overflow:hidden; box-shadow:var(--shadow); background-color:#bcd98a; position:relative}
.campbox > svg{display:block; width:100%; height:auto}
.campbox .campme, .campbox .camppet{position:absolute}
.traderhead{display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.traderhead .cbox{width:84px; height:84px; flex:none}
.traderhead .cbox svg{width:100%; height:100%}
.shoptabs{flex-wrap:wrap; max-width:100%}
.shopgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px}
.shopcard{background-color:#fffdf8; border-radius:14px; padding:10px; display:flex; flex-direction:column; align-items:center; gap:5px; text-align:center; box-shadow:0 2px 0 rgba(40,25,15,.15)}
.shopcard .shopart{width:72px; height:72px; display:block}
.shopcard .shopart svg{width:100%; height:100%}
.shopcard b{font-family:var(--display); font-weight:600; font-size:17px; line-height:1.15}
.shopcard small{font-size:12.5px; line-height:1.25}
.shopcard .btn{margin-top:auto; display:inline-flex; align-items:center; gap:5px}
.shopcard .btn[disabled]{opacity:.55; cursor:not-allowed}
.shopcard.have{background-color:#eef5df}
.shopcard .badge{margin-top:auto}

/* ---------- Verses ---------- */
.vgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px}
.vcard{display:flex; flex-direction:column; gap:8px; padding:18px}
.vcard h3{font-size:22px}
.vcard p{margin:0; font-family:var(--type); font-size:16px; color:var(--muted); flex:1; min-width:0}
.beedots{display:flex; gap:5px; align-items:center}
.beedots i{width:14px; height:14px; border-radius:50%; background:#e2d6c0; display:inline-block}
.beedots i.on{background:var(--mustard)}
.toggle{display:inline-flex; gap:10px; align-items:center; font-weight:900; cursor:pointer; color:var(--cream)}
.toggle input{width:22px; height:22px; accent-color:var(--plum)}
.note{font-size:15px; max-width:75ch}
.stages{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px}
.stage-btn{border:0; border-radius:14px; background-color:#fffdf8; background-image:var(--grain); padding:12px; text-align:left; cursor:pointer; box-shadow:var(--shadow); color:var(--ink); font-family:var(--body); outline:1.5px dashed var(--stitch); outline-offset:-6px}
.stage-btn b{font-family:var(--display); font-weight:600; font-size:18px; display:block}
.stage-btn small{font-size:13px; color:var(--muted)}
.stage-btn.done{background-color:#dcecd2}
.stage-btn.next{background-color:#fbe3b6}
.stage-btn[disabled]{opacity:.55; cursor:not-allowed}
.parts{display:flex; gap:6px; flex-wrap:wrap}
.parts button{min-width:44px}

.spk{display:inline-flex; align-items:center; justify-content:center; border-radius:50%; border:0; background-color:var(--sky); color:var(--ink); cursor:pointer; vertical-align:middle; margin-left:8px; box-shadow:0 2px 0 rgba(40,25,15,.2); padding:0; flex:none}
.spk:active{transform:translateY(2px); box-shadow:none}
svg.hands{display:block; width:100%; max-width:640px; height:auto; margin:0 auto}
.pulse{animation:ring 1.4s ease-out infinite; transform-box:fill-box; transform-origin:center}
.coach.big .cbox{width:clamp(80px,12vw,120px); height:clamp(80px,12vw,120px)}
.coach.big .bubble{font-size:clamp(17px,2.2vw,21px)}
.dots{display:flex; gap:6px}
.dots i{width:14px; height:14px; border-radius:50%; background:rgba(247,240,225,.5)}
.dots i.on{background:var(--mustard)}
.seqchips{display:flex; gap:8px; flex-wrap:wrap; justify-content:center; padding-top:14px}
#ti{position:fixed; left:-9999px; top:0; width:10px; height:10px; opacity:0}

@media (max-width:640px){
  .hero{align-items:center; text-align:center}
  .kb{gap:4px; padding:8px} .kr{gap:3px} .key{border-radius:6px; outline:none}
  .key.mod{font-size:7px}
  .panel{padding:16px}
  .coach .cbox{width:56px; height:56px}
  .mk .lbl2{display:none}
  .scenebox .scene-title{font-size:18px; padding:6px 26px 8px}
  /* phones: the instruction bubble goes under the scene, not on top of it */
  #s-type .typetop.has-scene .coach{position:static; transform:none; max-width:none}
  .scenebox .scene-icons{padding:3px 5px; gap:2px; bottom:6px}
  .scenebox .scene-icons > span{width:13px; height:13px}
  .mapinner .me{display:none} /* phones: the map is crowded; the next land already has its orange ring */
  .textpanel{padding:16px 18px}
  .modal{padding:20px 18px}
}
/* ---------- Fit play screens to the window (computers and tablets) ----------
   The typing, game, tour and map screens are exactly one window tall; the
   keyboard, pictures and text area shrink to make room. Phones scroll as usual. */
.typetop{position:relative; display:flex; flex-direction:column; gap:12px}
.typetop.has-scene .coach{position:absolute; left:clamp(84px,15%,190px); top:50%; transform:translateY(-50%); max-width:min(64%,620px); z-index:2}
.typetop.has-scene .coach .cbox{display:none}
.typetop.has-scene .scene-icons{top:8px; right:10px; left:auto; bottom:auto; transform:none}
@media (min-width:641px){
  body{padding-top:12px; padding-bottom:12px}
  #s-type,#s-play,#s-tour,#s-map,#s-camp{height:calc(100vh - 24px); height:var(--fit-h, calc(100dvh - 24px)); min-height:420px; gap:12px}
  #s-type > *,#s-play > *,#s-tour > *,#s-map > *,#s-camp > *{flex-shrink:0}
  #s-camp .campbox{flex:1 1 0; min-height:0}
  #s-camp .campbox > svg{height:100%}
  #s-camp .nextbar{padding:12px 20px}
  .kb{--kh:clamp(22px, min(5vw, 5.4vh), 64px); padding:12px 14px; gap:5px}
  .kr{gap:5px}
  .key{font-size:clamp(11px, min(1.9vw, 2.5vh), 24px)}
  .textpanel{font-size:clamp(22px, min(3.3vw, 4.6vh), 50px)}
  .age-little .textpanel{font-size:clamp(30px, min(5vw, 6.5vh), 72px)}
  .legend{padding-bottom:10px}
  /* typing */
  .typescene{height:clamp(84px,17vh,170px)}
  #s-type #typeTop.has-scene{flex:1 1 0; min-height:84px}
  #s-type #typeTop.has-scene .typescene{height:100%}
  /* the bubble sits between the host (left, ~0.71 x scene height wide) and the buddy (right, ~0.62 x height) */
  #s-type #typeTop.has-scene{container-type:size}
  #s-type #typeTop.has-scene .coach{left:max(calc(3cqw + 71cqh * var(--hostn, 1) + 12px), min(46cqw, calc(97cqw - 62cqh - 432px))); right:calc(3cqw + 62cqh + 12px); max-width:none; justify-content:center}
  #s-type #typeTop.has-scene .coach .bubble{max-width:100%; font-size:clamp(12px, 11.5cqh, 17px); line-height:1.3; padding:clamp(6px,5cqh,14px) clamp(10px,8cqh,18px)}
  #s-type #typeTop.has-scene ~ .textpanel{flex:0 1 auto; min-height:90px; max-height:calc(1.75em * 4 + 36px)}
  #s-type #typeTop:not(.has-scene) ~ .textpanel{flex:1 1 0; min-height:90px; max-height:none}
  /* game */
  #s-play .playarea{flex:1 1 0; height:auto; min-height:200px}
  #kbGame{--kh:clamp(20px, min(3.8vw, 4.6vh), 42px)}
  /* tour */
  #s-tour #tourKbWrap{flex:1 1 0; min-height:0; display:flex; flex-direction:column; justify-content:center}
  #s-tour #kbTour{--kh:clamp(28px, min(6vw, 8vh), 84px)}
  #s-tour #kbTour .key{font-size:clamp(12px, min(2.2vw, 3vh), 28px)}
  #s-tour .coach.big .cbox{width:clamp(64px,10vh,110px); height:clamp(64px,10vh,110px)}
  /* world map and land maps */
  #s-land,#s-tent{height:calc(100vh - 24px); height:var(--fit-h, calc(100dvh - 24px)); min-height:420px; gap:12px}
  #s-land > *,#s-tent > *{flex-shrink:0}
  #s-map .mapwrap,#s-land .mapwrap{flex:1 1 0; min-height:0; display:flex; align-items:center; justify-content:center; background:none; box-shadow:none; overflow:visible; border-radius:0; container-type:size}
  #s-map .mapinner,#s-land .mapinner{width:min(100cqw, 100cqh * var(--map-ar, 1.5385)); border-radius:18px; box-shadow:var(--shadow);
    /* markers are sized from the map's own height, so a wide, short map gets smaller markers */
    --mh:min(100cqh, 100cqw / var(--map-ar, 1.5385)); --disc:clamp(26px, calc(var(--mh) * .085), 76px)}
  #s-land .mapinner{--disc:clamp(26px, calc(var(--mh) * .075), 66px)}
  #s-map .mk,#s-land .mk{transform:translate(-50%, calc(var(--disc) / -2))}
  #s-map .mk .disc,#s-land .mk .disc{width:var(--disc); height:var(--disc); font-size:calc(var(--disc) * .5); outline-offset:-4px}
  #s-map .mk.locked .disc,#s-land .mk.locked .disc{width:calc(var(--disc) * .8); height:calc(var(--disc) * .8); padding:calc(var(--disc) * .12)}
  #s-map .mk .lbl2,#s-land .mk .lbl2{font-size:clamp(11px, calc(var(--mh) * .029), 24px); padding:1px 7px}
  #s-map .mk .mstars svg,#s-land .mk .mstars svg{width:clamp(8px, calc(var(--disc) * .3), 20px); height:clamp(8px, calc(var(--disc) * .3), 20px)}
  #s-map .me,#s-land .me{width:calc(var(--disc) * 1.4); height:calc(var(--disc) * 1.4)}
  #s-map .nextbar,#s-land .nextbar{padding:12px 20px}
  #s-map .nextbar h3,#s-land .nextbar h3{font-size:21px}
  #s-land .campmk{width:calc(var(--disc) * 1.5); height:calc(var(--disc) * 1.2)}
  #s-tent .tentbox{flex:1 1 0; min-height:0}
  #s-tent .tentbox > svg{height:100%}
}
/* ---------- Clouds over lands not reached yet ---------- */
.fog{position:absolute; width:23%; transform:translate(-50%,-50%); pointer-events:none; z-index:1; line-height:0; transition:transform 1.6s ease-in, opacity 1.6s ease-in}
.fog svg{width:100%; height:auto}
/* the cloud bank drifts: the back clouds one way, the front clouds the other, each bank on its own timing */
.fog .fogback{position:absolute; left:0; top:0; animation:fogBack 9s ease-in-out infinite alternate}
.fog .fogfront{position:relative; animation:fogFront 7s ease-in-out infinite alternate}
.fog:nth-of-type(2n) .fogback, .fog:nth-of-type(2n) .fogfront{animation-delay:-3s}
.fog:nth-of-type(3n) .fogback, .fog:nth-of-type(3n) .fogfront{animation-delay:-5s; animation-duration:11s}
@keyframes fogBack{from{transform:translate(-5%,1%)} to{transform:translate(5%,-2%)}}
@keyframes fogFront{from{transform:translate(4%,0) scale(1)} to{transform:translate(-4%,-3%) scale(1.03)}}
.fog.blow{transform:translate(40%,-70%) scale(1.25); opacity:0}
.fog.gold svg{filter:drop-shadow(0 0 14px rgba(242,207,74,.7))}
.mapinner .mk{z-index:2}
.mapinner .me{z-index:3}
.me.walk{transition:left 1.4s ease-in-out, top 1.4s ease-in-out, transform 1.4s ease-in-out}
.mapinner .me.lside{transform:translate(-130%,-110%); animation:hopleft 1.6s ease-in-out infinite}
@keyframes hopleft{50%{transform:translate(-130%,-120%)}}
.mk.finale .disc{background-color:#f7f0e1}
.mk.finale.done .disc{background-color:var(--mustard)}
.landinner .mapart svg{width:100%; height:auto; display:block}
.campmk{position:absolute; transform:translate(-50%,-80%); border:0; background:none; cursor:pointer; display:flex; align-items:flex-end; justify-content:center; width:64px; height:52px; z-index:2}
.campmk .lbl2{font-family:var(--display); font-weight:600; font-size:14px; color:#fff; background-color:var(--orange); border-radius:8px; padding:2px 8px; box-shadow:0 1px 3px rgba(0,0,0,.25); line-height:1.2}
.campmk:hover .lbl2{transform:scale(1.08)}
#landBar .cbox{width:64px; height:64px}
/* ---------- Story cards ---------- */
.storyscene{position:relative; height:clamp(150px, 26vh, 250px); border-radius:16px; overflow:hidden}
@media (max-height:740px){ .storyscene{height:clamp(130px, 22vh, 170px)} .modal:has(.questbox) .storyscene{height:clamp(110px, 17vh, 130px)} }
.storyscene > svg{position:absolute; inset:0; width:100%; height:100%}
.storychar{position:absolute; bottom:4%; height:62%; aspect-ratio:110/126; transform:translateX(-50%); z-index:1}
.storychar.big{height:82%}
.storycast{position:absolute; left:3%; bottom:4%; height:66%; display:flex; align-items:flex-end; z-index:1}
.storycast > span{height:100%; aspect-ratio:110/126; display:block}
.storycast > span.big{height:140%}   /* Goliath: a giant, he towers over David */
.storycast > span > svg{width:100%; height:100%; display:block}
.storychar > svg, .storychar > .char{width:100%; height:100%}
/* Art direction (ART.md): people stand on the ground with a soft shadow, and are dimmed to match night and storm scenes */
.storychar, .storycast > span, .scenebox .host, .gamechar, .chfoe{position:absolute}
.storycast > span{position:relative}
.storychar::after, .storycast > span::after, .scenebox .host::after, .gamechar::after, .chfoe::after{content:""; position:absolute; left:18%; right:18%; bottom:-1%; height:7%; border-radius:50%;
  background:radial-gradient(ellipse at center, rgba(42,26,16,.32) 0%, rgba(42,26,16,0) 70%); z-index:-1; pointer-events:none}
.scenebox .host.group::after{left:6%; right:6%}
.storycast > span{z-index:0}
.dim, .scenebox .dim{filter:brightness(.78) saturate(.82) hue-rotate(-6deg)}
/* challenge tension: the edges darken and redden as danger grows */
.chdanger{position:absolute; inset:0; pointer-events:none; z-index:3; opacity:0; transition:opacity .4s;
  background:radial-gradient(ellipse at center, rgba(120,20,10,0) 45%, rgba(120,20,10,.45) 80%, rgba(40,5,0,.7) 100%)}
.chfoe{transform-origin:50% 100%}
/* ---------- What to do next (game.js markMain / mainBtn / hintShow) ----------
   One main button per screen or pop-up: always at the bottom right, always glowing gently. */
.footrow{flex-wrap:wrap}
.footrow .mainbtn, #nextBar .mainbtn, #landBar .mainbtn{order:99; margin-left:auto}
.mainbtn{animation:mainGlow 2.2s ease-in-out infinite}
@keyframes mainGlow{0%,100%{filter:drop-shadow(0 0 0 rgba(255,214,90,0))} 50%{filter:drop-shadow(0 0 9px rgba(255,214,90,.95)) drop-shadow(0 0 3px rgba(255,236,170,.9))}}
.hintbox{position:fixed; inset:0; pointer-events:none; z-index:60}
.hintsay{position:absolute; display:flex; align-items:center; gap:10px; padding:8px 14px 8px 8px; background-color:#fffdf8; background-image:var(--grain); border-radius:16px; box-shadow:0 6px 16px rgba(30,20,10,.35); outline:1.5px dashed var(--stitch); outline-offset:-5px; animation:popin .3s cubic-bezier(.3,1.6,.6,1)}
.hintface{flex:0 0 auto; width:46px; height:50px; display:block}
.hintface svg{width:100%; height:100%}
.hinttext{font-family:var(--display); font-weight:600; font-size:17px; line-height:1.25; color:var(--ink)}
.hinthand{position:absolute; width:88px; height:52px; filter:drop-shadow(0 3px 4px rgba(30,20,10,.35)); animation:hintPoke .9s ease-in-out infinite}
@keyframes hintPoke{0%,100%{transform:translateX(0)} 50%{transform:translateX(10px)}}
/* a land's mission (LAND_QUEST): the trouble, your goal, and "you did it" at the ending */
.questbox{display:flex; flex-direction:column; gap:6px; margin:10px 0 4px}
.qrow{display:flex; gap:10px; align-items:baseline; padding:7px 12px; border-radius:12px; background-color:#fffdf8; background-image:var(--grain); outline:1.5px dashed var(--stitch); outline-offset:-4px; font-size:15px; line-height:1.35}
.qrow b{flex:0 0 auto; font-family:var(--display); font-size:13px; letter-spacing:.04em; text-transform:uppercase; padding:2px 8px; border-radius:999px; color:#fff}
.qrow.trouble b{background:#b8433b}
.qrow.goal b{background:#4f86c6}
.qrow.done{background-color:#f6efcf}
.qrow.done b{background:#5f9e4a}
.aim{font-weight:700;}
.aim.reached{color:#3f7f35}
/* "Goal reached!" on the world map (game.js goalCelebrate) */
.goalok{position:absolute; left:calc(50% + 14px); top:-8px; width:22px; height:22px; border-radius:50%; background:#5f9e4a; color:#fff; font:700 14px/22px system-ui, sans-serif; text-align:center; box-shadow:0 2px 4px rgba(30,20,10,.35); pointer-events:none}
.mk.goalburst .disc{animation:goalPop 1.2s ease-out}
@keyframes goalPop{0%{transform:scale(1)} 25%{transform:scale(1.35)} 50%{transform:scale(.95)} 75%{transform:scale(1.1)} 100%{transform:scale(1)}}
.goalspark{position:absolute; left:50%; top:30%; color:#f2cf4a; font-size:20px; pointer-events:none; text-shadow:0 0 6px rgba(255,240,180,.9); animation:goalSpark 1.4s ease-out forwards}
@keyframes goalSpark{from{transform:translate(-50%,-50%) scale(.3); opacity:1} to{transform:translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(160deg); opacity:0}}
.gbubble.goalbubble{background:#e8f3df; border:2px solid #5f9e4a; color:#2f5f27; font-weight:700; white-space:normal; width:max-content; max-width:240px; text-align:center}
@media (max-width:640px){ .qrow{flex-direction:column; gap:4px} }
@media (min-width:641px) and (max-height:760px){
  .questbox{gap:4px; margin:6px 0 2px} .qrow{padding:4px 10px; font-size:13.5px; line-height:1.3} .qrow b{font-size:11px}
  .modal.story .versequote{padding-top:6px; padding-bottom:6px; font-size:14px}
  .modal:has(.qrow.scroll) .versequote{display:none}   /* the scroll line already carries a verse */
}
.qrow.scroll{background-color:#fbf3dc}
.qrow.scroll b{background:#a8703e}
.qrow cite{font-style:normal; font-size:12px; color:#8a6a4a}
/* the promise scroll (game.js promiseScroll): parchment between two wooden rollers */
.pscroll{position:relative; margin:4px auto 10px;}
.proll{height:22px; border-radius:11px; background:linear-gradient(#a8703e, #7a4e30 60%, #5a3a24); box-shadow:0 3px 6px rgba(40,25,15,.35); position:relative; z-index:1; margin:0 -14px}
.pbody{background-color:#f6ecd0; background-image:var(--grain); margin:-8px 4px; padding:18px 26px 16px; box-shadow:inset 0 10px 14px -10px rgba(90,58,36,.45), inset 0 -10px 14px -10px rgba(90,58,36,.45);}
.pbody h2{text-align:center; margin:0 0 4px; font-size:28px; color:#5a3a24}
.pintro{text-align:center; margin:0 0 12px; color:#7a5a3a; font-size:15px}
.plines{margin:0; padding:0; list-style:none; flex-direction:column; gap:8px}
.plines li{display:grid; gap:2px 12px; align-items:baseline; border-bottom:1.5px dashed rgba(138,90,54,.3)}
.plines li:last-child{border-bottom:0}
.pland{font-family:var(--display); font-weight:700; color:#8a5a36; font-size:14px}
.ptext{font-family:var(--type); color:#3a2416; line-height:1.35}
.plines cite{grid-column:2; font-style:normal; font-size:12.5px; color:#8a6a4a}
.plines li.wait .ptext, .plines li.wait .pland{opacity:.4}
.plines li.fresh{background:rgba(242,207,74,.28); border-radius:10px; padding:6px 8px; animation:pfresh 1.6s ease-out}
@keyframes pfresh{from{background:rgba(242,207,74,.8)}}
@media (max-width:640px){ .plines li{grid-template-columns:1fr} .plines cite{grid-column:1} .pbody{padding:14px 16px} }
/* challenge endings (games.js CH_FINALE) */
.fx{position:absolute; pointer-events:none; z-index:6}
.fxpuff{border-radius:50%; filter:blur(1px)}
.fxspark{line-height:1; text-shadow:0 0 6px rgba(255,240,180,.9)}
.fxglow{border-radius:50%; z-index:1; mix-blend-mode:screen}
.fxshade{inset:0; opacity:0; z-index:5}
.fxsling{width:46px; height:46px; border:2px dashed #7a4e30; border-radius:50%}
.fxsling i{position:absolute; right:-6px; top:50%; width:11px; height:11px; margin-top:-5px; border-radius:50%; background:#8d8a86}
.fxstone{width:13px; height:13px; border-radius:50%; background:#8d8a86; box-shadow:inset -2px -2px 0 rgba(0,0,0,.25)}
.fxsea{left:38%; right:-4%; bottom:0; height:0; z-index:3; border-radius:46% 54% 0 0 / 30px 30px 0 0; background-color:#3f73b0; background-image:var(--grain),linear-gradient(#6fa8d8, #2f5f9a); opacity:.94}
.fxram{width:clamp(90px,12vw,150px); z-index:2}
.fxram svg{width:100%; display:block}
.fxgrain{width:12px; height:18px; border-radius:50%; background:#e2b04a}
.fxleaf{width:14px; height:34px; border-radius:50% 50% 50% 50% / 80% 80% 20% 20%; background:#4f9a45}
/* a showdown: the light goes a little heavier and warmer, with darker edges pulling your eye to the middle */
.gbg.tense{filter:saturate(.9) contrast(1.04)}
.gbg.tense::after{content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg, rgba(90,40,20,.22) 0%, rgba(90,40,20,0) 45%), radial-gradient(ellipse at 50% 55%, rgba(30,15,5,0) 55%, rgba(30,15,5,.28) 100%)}
.storytext{font-size:18px; line-height:1.5}
.storylist{display:flex; flex-direction:column; gap:8px; max-height:58vh; overflow:auto}
.storyrow{display:flex; flex-direction:column; align-items:flex-start; gap:3px; text-align:left; border:0; border-radius:12px; background-color:#fffdf8; padding:10px 14px; cursor:pointer; box-shadow:0 2px 0 rgba(40,25,15,.15); color:var(--ink); font-family:var(--body)}
.storyrow b{font-family:var(--display); font-weight:600; font-size:18px}
.storyrow:hover{background-color:#fff6e0}
/* ---------- Camp and tent: tap the trader and the tent ---------- */
.campbox > svg{overflow:visible}
.campsvg .hot{cursor:pointer}
.campsvg .hot:hover, .campsvg .hot:focus-visible{filter:brightness(1.08) drop-shadow(0 0 6px rgba(255,240,180,.9))}
.campsvg .hot:focus{outline:none}
.tentbox{background-color:#8a6a40}
.tentshop{padding:10px 14px}
.tenthead{display:flex; gap:12px; align-items:baseline; flex-wrap:wrap; margin-bottom:6px}
.tenthead b{font-family:var(--display); font-weight:600; font-size:19px}
.shopstrip{display:flex; gap:8px; overflow-x:auto; padding-bottom:4px}
.shopcard.small{flex:0 0 112px; padding:8px 6px; gap:3px}
.shopcard.small .shopart{width:64px; height:48px}
.shopcard.small b{font-size:14px}
.shopcard.small .btn{font-size:14px; padding:5px 10px}
@media (min-width:641px) and (max-height:760px){
  .legend{display:none}
  .textpanel{padding:14px 20px}
  .hud .stat{padding:2px 10px} .stat b{font-size:19px}
  #s-type .hud h2{font-size:20px}
}
/* ---------- Life: gentle always-on motion in every picture (art.js sceneLife, world.js MARK_LIFE, ART.md).
   Distances are in picture units (a scene is 3000 units wide), so they look larger than they read here. ---------- */
.lf, .lf-glow, .lf-flap, .lf-twinkle, .lf-wings, .eye{transform-box:fill-box}
.lf{transform-origin:50% 100%; animation:lfBob 2.6s ease-in-out infinite alternate}
.lf-glow, .lf-flap, .lf-twinkle, .lf-wings, .eye{transform-origin:50% 50%}
@keyframes lfBob{to{transform:translateY(-9px)}}
.lf-hop{animation:lfHop 2.2s ease-in-out infinite}
@keyframes lfHop{0%,60%,100%{transform:translateY(0) scaleY(1)} 70%{transform:translateY(0) scaleY(.9)} 82%{transform:translateY(-30px) scaleY(1.05)}}
.lf-float{animation:lfFloat 3.4s ease-in-out infinite alternate}
@keyframes lfFloat{from{transform:translateY(0) rotate(-2deg)} to{transform:translateY(-18px) rotate(2deg)}}
.lf-rock{animation:lfRock 3.2s ease-in-out infinite alternate}
@keyframes lfRock{from{transform:rotate(-3deg) translateY(0)} to{transform:rotate(3deg) translateY(-6px)}}
.lf-sway, .lf-slither{animation:lfSway 3.8s ease-in-out infinite alternate}
@keyframes lfSway{from{transform:rotate(-1.6deg)} to{transform:rotate(1.6deg)}}
.lf-slither{animation-name:lfSlither; animation-duration:2.4s}
@keyframes lfSlither{from{transform:skewX(-5deg)} to{transform:skewX(5deg)}}
.lf-pulse, .lf-glint{transform-origin:50% 60%; animation:lfPulse 2.4s ease-in-out infinite alternate}
.lf-glint{animation-duration:3.6s}
@keyframes lfPulse{to{transform:scale(1.07)}}
.lf-flicker{animation:lfFlicker .5s ease-in-out infinite alternate}
@keyframes lfFlicker{from{transform:scale(1,1)} to{transform:scale(.95,1.08)}}
.lf-rattle{animation:lfRattle .35s linear infinite}
@keyframes lfRattle{0%,100%{transform:translate(0,0)} 25%{transform:translate(2px,-3px)} 75%{transform:translate(-2px,-1px)}}
.lf-drift{animation:lfDrift 6s ease-in-out infinite alternate}
@keyframes lfDrift{from{transform:translateX(-20px)} to{transform:translateX(20px)}}
.lf-toot{animation:lfToot 2s ease-in-out infinite}
@keyframes lfToot{0%,70%,100%{transform:rotate(0) scale(1)} 80%{transform:rotate(-5deg) scale(1.06)}}
.lf-breathe{animation:lfBreathe 3s ease-in-out infinite alternate}
@keyframes lfBreathe{to{transform:scaleY(1.025)}}
.lf-cloud{animation:lfCloud 30s ease-in-out infinite alternate}
@keyframes lfCloud{from{transform:translateX(-60px)} to{transform:translateX(60px)}}
.lf-glow{animation:lfGlow 3.2s ease-in-out infinite alternate}
@keyframes lfGlow{to{transform:scale(1.12)}}
.lf-fly{animation:lfFly 45s linear infinite}
@keyframes lfFly{from{transform:translate(0,0)} 50%{transform:translate(1300px,-24px)} to{transform:translate(2600px,0)}}
.lf-flap{animation:lfFlap .38s ease-in-out infinite alternate}
@keyframes lfFlap{to{transform:scaleY(-.5)}}
.lf-twinkle{animation:lfTwinkle 3s ease-in-out infinite alternate}
@keyframes lfTwinkle{from{opacity:.15; transform:scale(.5)} to{opacity:1; transform:scale(1.15)}}
.lf-flash{opacity:0; pointer-events:none; animation:lfFlash 8s linear infinite}
@keyframes lfFlash{0%,88%,91%,93%,100%{opacity:0} 89%{opacity:.6} 92%{opacity:.4}}
.lf-rain{animation:lfRain .8s linear infinite}
@keyframes lfRain{from{transform:translate(0,0)} to{transform:translate(-94px,300px)}}
.lf-rise{opacity:0; animation:lfRise 7s ease-in-out infinite}
@keyframes lfRise{0%{opacity:0; transform:translateY(0)} 30%,70%{opacity:.95} 100%{opacity:0; transform:translateY(-110px)}}
.lf-shim{opacity:0; animation:lfShim 3.2s ease-in-out infinite}
@keyframes lfShim{0%,100%{opacity:0; transform:translateX(0)} 50%{opacity:.7; transform:translateX(14px)}}
.lf-flutter{animation:lfFlutter 11s ease-in-out infinite}
@keyframes lfFlutter{0%,100%{transform:translate(0,0)} 25%{transform:translate(90px,-40px)} 50%{transform:translate(170px,-6px)} 75%{transform:translate(80px,22px)}}
.lf-wings{animation:lfWings .16s linear infinite alternate}
@keyframes lfWings{to{transform:scaleX(.25)}}
.lf-firefly{opacity:0; animation:lfFirefly 4s ease-in-out infinite}
@keyframes lfFirefly{0%,100%{opacity:0; transform:translate(0,0)} 50%{opacity:1; transform:translate(18px,-12px)}}
.lf-smoke{opacity:0; animation:lfSmoke 4s ease-out infinite}
@keyframes lfSmoke{0%{opacity:0; transform:translate(0,0) scale(.6)} 20%{opacity:.55} 100%{opacity:0; transform:translate(-26px,-120px) scale(2.4)}}
.lf-smoke{transform-box:fill-box; transform-origin:50% 50%}
/* people breathe, standing still, and blink now and then (game.js blinker) */
.storycast > span > svg, .scenebox .host > svg, .gamechar > svg, .chfoe > svg, .storychar > svg, .whobox .avatar svg{transform-origin:50% 100%; animation:lfBreathe 3.2s ease-in-out infinite alternate}
.storycast > span:nth-child(2) > svg{animation-delay:-1.1s} .storycast > span:nth-child(3) > svg{animation-delay:-2.2s}
.blink .eye{transform:scaleY(.12)}
@media (prefers-reduced-motion:reduce){*{animation:none!important; transition:none!important}}

.credits{margin:0; padding-left:20px; display:flex; flex-direction:column; gap:8px; font-size:14px}
.credits a{color:var(--plum)}

/* ================= UI best-practice pass (Nov 2026; check with dev/ui-audit.js) =================
   - Button text at least 4.5:1 contrast (WCAG AA): the orange and green buttons are a shade deeper.
   - Every button and choice at least 40 px tall, so small fingers and shaky mice can hit it (44 px on touch screens).
   - Kid-facing text at least 13 px. */
:root{--btn-orange:#c0560c; --btn-green:#4f833d}
.btn.tang, .campmk .lbl2{background-color:var(--btn-orange)}
.btn.grass{background-color:var(--btn-green)}
.btn.small{min-height:40px; padding-top:9px; padding-bottom:9px}
.seg button{min-height:40px}
.spk{width:40px; height:40px}
@media (pointer:coarse){ .btn, .seg button{min-height:44px} .spk{width:44px; height:44px} }
/* the hidden treasure stays a small, faint twinkle, but its tap area is a comfortable 44 px */
.treasure{width:54px; height:54px; display:flex; align-items:center; justify-content:center}   /* it twinkles down to 75%, so 54 px keeps it above 40 */
.treasure svg{width:clamp(18px,1.9vw,26px); height:clamp(18px,1.9vw,26px)}
/* small labels: at least 13 px */
.badge, .pcard .agechip, .choice small, .itemcard small, .tcard small, .newdot, .lname small, .qrow cite{font-size:13px}
.stat small{font-size:12.5px; letter-spacing:.06em}
.mk .lbl2{font-size:clamp(12px,1.5vw,15px)}
/* readable text on the blue felt and on cream */
.tagline{color:#fffaf2; text-shadow:0 1px 3px rgba(10,5,0,.55); background-color:rgba(28,48,78,.45); border-radius:12px; padding:4px 10px; display:inline-block}
.aim{color:#6a3f8e}
.showall{display:inline-flex; align-items:center; gap:8px; cursor:pointer; min-height:40px}
.showall input{width:20px; height:20px}
/* the next key to press: the most important thing on the typing screen, so it gets a thick pulsing gold ring */
.key.next{box-shadow:0 0 0 3px #fff, 0 0 0 7px var(--mustard), 0 8px 14px rgba(30,20,10,.4); animation:nextKeyPulse .9s ease-in-out infinite alternate}
@keyframes nextKeyPulse{from{box-shadow:0 0 0 3px #fff, 0 0 0 6px var(--mustard), 0 8px 14px rgba(30,20,10,.4)} to{box-shadow:0 0 0 3px #fff, 0 0 0 10px rgba(233,185,73,.55), 0 8px 14px rgba(30,20,10,.4)}}
/* the progress pictures in the typing bar get a label, like Speed and Accuracy */
.hudicons{position:relative; flex-direction:row; align-items:center; padding-top:18px}
.hudicons::before{content:"Progress"; position:absolute; top:3px; left:0; right:0; text-align:center; font-size:12.5px; text-transform:uppercase; letter-spacing:.06em; font-weight:900; color:var(--muted)}
.landbar .mainbtn, #landBar .mainbtn{font-size:clamp(20px,2.2vw,26px); padding-left:clamp(24px,3vw,40px); padding-right:clamp(24px,3vw,40px)}
/* Games screen: the Play buttons line up along the bottom of every card; leaderboard games are marked */
.gcard .body{flex:1}
.gcard .body > .row:last-child{margin-top:auto}
.gcard .lbbadge{position:absolute; left:12px; bottom:10px; background-color:var(--mustard); color:#4a2f10}
.speedlbl{font-family:var(--display); font-weight:600; font-size:15px; color:var(--cream); text-shadow:0 1px 2px rgba(20,10,5,.4); margin-right:6px}
/* touch screens: every map stop gets an invisible 48 px tap area around its small disc */
@media (pointer:coarse){ .mk::after{content:""; position:absolute; left:50%; top:50%; width:48px; height:48px; transform:translate(-50%,-50%); border-radius:50%} }
/* cream titles on the blue felt: a firm dark outline-shadow keeps them easy to read on the texture */
.title-felt, .logo span, .speedlbl, .ghud h2, #s-type .hud h2, .topbar h2{text-shadow:0 2px 0 rgba(18,36,62,.6), 0 0 2px rgba(18,36,62,.7), 0 0 8px rgba(18,36,62,.45)}
/* bonus scenes (three stars on every chapter in a land) */
.mk.bonusstop .disc{background-color:#f2cf4a; color:#5a3a10; font-size:1.1em}
.mk.bonusstop.locked .disc{background-color:#d9cdb0}
.mk.bonusstop .lbl2{background-color:#fff4cf; border:1.5px dashed #c9a23a}
.mk.perfect .disc{box-shadow:0 0 0 4px #f2cf4a, 0 0 16px rgba(242,207,74,.95)}
/* ================= Laptop and landscape iPad: nothing scrolls (check with dev/noscroll.js) =================
   Target: about 1024 x 660 (iPad landscape in Safari) up to big laptops; a 1366 x 768 laptop leaves about 1366 x 620. */
.modal{max-height:calc(100dvh - 20px)}
.overlay{padding:10px}
/* results: how you did on the left, what's new and what to do on the right */
.modal.results{width:min(940px,100%)}
.resgrid{display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start}
.resgrid.one{grid-template-columns:1fr; max-width:560px; margin:0 auto; width:100%}
.rescol{display:flex; flex-direction:column; gap:10px; min-width:0}
.rescol .stars{margin:0}
.restip{margin:0; font-size:14px}
/* story-type windows: the picture at the top shrinks to leave room for the words and buttons */
.modal .storyscene{flex-shrink:1; min-height:84px}
/* settings in tabs */
.stab{display:flex; flex-direction:column; gap:10px; min-height:240px}
.stab[hidden]{display:none}
.settabs{align-self:flex-start}
/* dress up: tabs for each kind of item, the traveler always in view */
.dressleft{display:flex; flex-direction:column; gap:10px; align-items:center}
.dresstabs{align-self:flex-start; flex-wrap:wrap}
.dpanel[hidden]{display:none}
.dressitems{display:flex; flex-direction:column; gap:10px; min-height:280px}
/* explorer editor: two columns */
.modal.profile{width:min(1000px,100%)}
.profgrid{display:grid; grid-template-columns:minmax(280px,1fr) 1.3fr; gap:22px; align-items:start}
.profcol{display:flex; flex-direction:column; gap:10px; min-width:0}
/* grown-ups page: one section at a time */
.ptabs2{align-self:flex-start; flex-wrap:wrap}
.parentmodal [data-ppanel][hidden]{display:none}
.parentmodal .ptablewrap{max-height:none}
.parentmodal .ptable td, .parentmodal .ptable th{padding-top:3px; padding-bottom:3px}
/* music credits: compact columns */
.modal.creditsmodal{width:min(1200px,100%)}
.creditsmodal .credits{display:block;}
/* promise scroll: two columns of lines */
.pbody{max-height:none; overflow:visible}
.plines{display:grid; grid-template-columns:1fr 1fr; column-gap:24px; row-gap:6px}
.plines li{grid-template-columns:118px 1fr; padding-bottom:6px}
.ptext{font-size:15.5px}
.pscroll{max-width:none}
.modal:has(.pscroll){width:min(1060px,100%)}
/* wider windows on short screens: text wraps onto fewer lines, so nothing has to scroll */
.modal.story{width:min(1000px,96vw); max-width:min(1000px,96vw)}
.modal:has(#kbMini){width:min(860px,100%)}
.modal:has(.traderhead){width:min(1080px,100%)}
/* ---- Home: the felt journey picture fills the screen (world.js homeSceneSVG); the title sits in its sky and the
   explorer cards stand on the meadow in front. Sized by height too, so it all fits on a short laptop screen. ---- */
#s-home{position:relative; isolation:isolate; padding:16px 20px 18px; gap:10px}
@media (min-width:641px){ #s-home{height:calc(100vh - 24px); height:var(--fit-h, calc(100dvh - 24px)); min-height:420px} }
.homescene{position:absolute; inset:0; z-index:-1; border-radius:20px; overflow:hidden; box-shadow:var(--shadow); line-height:0; background-color:#a9d3ec}
.homescene svg{display:block; width:100%; height:100%}
.homesvg .hstep{transform-box:fill-box; transform-origin:50% 100%; animation:homeStep .7s ease-in-out infinite alternate}
@keyframes homeStep{from{transform:translateY(0) rotate(-2deg)} to{transform:translateY(-4px) rotate(2deg)}}
.homesvg .lf-float{transform-box:fill-box}
#s-home .hero{padding-right:120px; flex-shrink:0}
.logo{font-size:clamp(40px,min(7vw,10.5vh),88px)}
#s-home .tagline{margin:min(10px,1.4vh) 0 0; font-size:16px; max-width:52ch}
.corner{display:flex; gap:8px; align-items:center}
.homecorner{position:absolute; top:14px; right:16px; z-index:5}
.homefront{margin-top:auto; display:flex; flex-direction:column; gap:10px; flex-shrink:0}
.homehead{gap:10px; align-items:center; flex-wrap:nowrap; min-width:0}
.homesign{font-size:24px; padding:6px 16px 8px; border-radius:14px; background-color:#fffdf8; background-image:var(--grain); box-shadow:var(--shadow); white-space:nowrap; outline:1.5px dashed var(--stitch); outline-offset:-5px}
.dayverse{min-width:0; max-width:min(60ch,52%); padding:6px 14px 8px; border-radius:14px; background-color:#fbf3dc; background-image:var(--grain); box-shadow:var(--shadow); font-size:15px; line-height:1.3; outline:1.5px dashed var(--stitch); outline-offset:-5px}
.dayverse small{display:block; font-size:13px; font-weight:900; text-transform:uppercase; letter-spacing:.06em; color:var(--muted)}
.dayverse cite{font-style:normal; font-weight:800; color:#8a5a2a; white-space:nowrap}
.backupnag{border:1.5px dashed #c9a23a; border-radius:14px; background-color:#fff3c4; color:#5a3a10; font:700 15px var(--body); padding:8px 14px; cursor:pointer; box-shadow:var(--shadow); min-height:40px; max-width:30ch; text-align:left}
.backupnag:hover{background-color:#ffeaa0}
#s-home .players{display:flex; gap:14px; align-items:stretch}
#s-home .pcard{flex:0 1 190px; min-width:0; box-shadow:0 0 0 3px rgba(255,253,248,.85), var(--shadow)}
#s-home .pcard.add{min-height:0}
@media (max-height:760px){ #s-home .pcard{padding-top:10px; padding-bottom:12px} #s-home .pcard .av{width:84px; height:84px} .homesign{font-size:21px} }
/* the land you are in, as a little felt landmark in the card's corner; your traveler hops when you point at the card */
.pcard .landbadge{position:absolute; top:6px; right:6px; width:42px; height:38px; border-radius:12px; background-color:rgba(255,253,248,.75); line-height:0}
.pcard .landbadge svg{width:100%; height:100%}
.pcard:hover .av > *{animation:cheerhop .8s ease-in-out}
.pcard .st svg{width:15px; height:15px; vertical-align:-2px; margin-right:2px}
/* the full screen button: a picture of four corners; it says "Full screen" when you point at it */
.fsbtn{padding-left:10px; padding-right:10px; min-width:44px}
.fsbtn svg{width:22px; height:22px; display:block; fill:none; stroke:currentColor; stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round}
/* the menu button wears a dot when a backup is due */
.menubtn{position:relative}
.menubtn.menudot::before{content:""; position:absolute; top:4px; right:4px; width:11px; height:11px; border-radius:50%; background:#e0503c; box-shadow:0 0 0 2px #fffdf8}

/* ---- Games screen: all 14 games on one screen (laptop / landscape iPad, no scrolling) ---- */
#s-games{height:calc(100dvh - 24px); gap:12px}
#s-games .gamegrid{flex:1; min-height:0; grid-template-columns:repeat(7,minmax(0,1fr)); grid-auto-rows:minmax(0,1fr); gap:12px}
#s-games .gcard{gap:6px; min-height:0}
#s-games .gcard .art{height:auto; flex:1 1 0; border-radius:20px 20px 0 0}
#s-games .gcard .body{flex:0 0 auto; padding:0 12px 12px; gap:5px}
#s-games .gcard h3{font-size:clamp(17px,1.45vw,22px)}
#s-games .gdesc{margin:0; font-size:13px; line-height:1.3; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden}
#s-games .gcard .row{gap:6px; flex-wrap:nowrap}
#s-games .gcard .badge{font-size:12px}
#s-games .glock{font-size:13px; line-height:1.25}
#s-games .gcard .btn{min-height:40px; padding:6px 16px}
@media (max-width:1199px){ #s-games .gamegrid{grid-template-columns:repeat(5,minmax(0,1fr))} #s-games .gdesc{-webkit-line-clamp:2} }
@media (max-height:700px){ #s-games .gdesc{-webkit-line-clamp:2} }

/* ---- Verses screen: cards in pages sized to the screen (no scrolling) ---- */
#s-verses{height:calc(100dvh - 24px); gap:12px}
#s-verses .vgrid{flex:1; min-height:0; grid-template-columns:repeat(var(--vcols,3),minmax(0,1fr)); grid-template-rows:repeat(var(--vrows,2),minmax(0,1fr)); gap:12px}
#s-verses .vcard{min-height:0;}
#s-verses .vcard h3{font-size:20px}
#s-verses .vtext{ min-height:0; overflow:hidden; font-size:15px; line-height:1.4; display:-webkit-box; -webkit-box-orient:vertical;}
#s-verses .vcard .row{gap:6px}
.vpager{display:flex; align-items:center; gap:8px}
.vpager .btn{min-width:44px; font-size:22px; line-height:1}
.vpagelbl{font-weight:700; font-size:15px; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.35)}
@media (max-height:700px){ #s-verses .vtext{-webkit-line-clamp:4} }
#s-verses .vcard .row:last-child{flex-wrap:nowrap}
#s-verses .vcard .row:last-child .btn{padding-left:12px; padding-right:12px; white-space:nowrap}
#s-verses .vcard{padding:12px 14px; gap:6px}
#s-verses .vtext{flex:0 1 auto; -webkit-line-clamp:2; max-height:calc(2 * 1.4em)}
#s-verses .vtext + .row{margin-top:auto}
@media (min-height:800px){ #s-verses .vtext{-webkit-line-clamp:3; max-height:calc(3 * 1.4em)} }
.creditsmodal .credits{columns:4 190px; column-gap:18px; line-height:1.3}
.creditsmodal .credits{font-size:12px; margin:0; padding-left:14px} .creditsmodal .credits li{margin:0 0 3px; break-inside:avoid} .modal.creditsmodal{gap:8px}
#s-games .gcard .lbbadge{bottom:auto; top:36px; left:12px} #s-games .gcard .art{min-height:62px}

/* ---- About window (for parents) ---- */
.modal.aboutmodal{width:min(980px,100%)}
.aboutmodal h3{font-size:20px; margin:4px 0 0}
.aboutlist{margin:0; padding-left:20px; display:flex; flex-direction:column; gap:6px}

/* ---- Close X on every window (top right; Esc does the same) ---- */
.modal .modalx{position:absolute; top:10px; right:10px; z-index:5; width:40px; height:40px; min-height:40px; padding:0; border:0; border-radius:50%;
  background-color:#fffdf8; background-image:var(--grain); color:var(--ink); font:700 20px/1 var(--body); cursor:pointer;
  box-shadow:0 2px 6px rgba(40,25,10,.25); outline:1.5px dashed var(--stitch); outline-offset:-5px; display:grid; place-items:center}
.modal .modalx:hover{background-color:#f6ecd0}
.modal .modalx:focus-visible{outline:3px solid var(--btn-orange); outline-offset:2px}
@media (pointer:coarse){ .modal .modalx{width:44px; height:44px} }
.modal > h2:first-of-type{padding-right:44px}
.modal .resbuddy{right:62px}

/* ---- ☰ menu groups ---- */
.menupop .menusep{border:0; border-top:1.5px dashed var(--stitch); margin:2px 4px; width:auto}
/* ---- Home Base shortcuts (camp top bar) ---- */
.basebar{display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end}
.modal:has(.tgrid){width:min(1000px,100%)}

/* ---- Sparkle: "something new here!" (Camp button, Promise scroll, treasure chest, backup reminder) ---- */
.btn.sparkle{position:relative; overflow:visible;}
.btn.sparkle::before, .btn.sparkle::after{content:'✦'; position:absolute; line-height:1; pointer-events:none; animation:sparkTwinkle 1.6s ease-in-out infinite}
.btn.sparkle::after{ animation-delay:.8s}
@keyframes sparkTwinkle{0%,100%{opacity:.35; transform:scale(.7) rotate(0)} 50%{opacity:1; transform:scale(1.25) rotate(25deg)}}

/* ---- Settings > Screen: two choices side by side ---- */
.setpair{display:flex; flex-wrap:wrap; gap:8px 24px}
.setpair > div{display:flex; flex-direction:column; gap:6px}
/* ---- Calm motion (Settings > Screen > Motion): no looping scenery, sways or sparkles ---- */
body.calm *, body.calm *::before, body.calm *::after{animation-iteration-count:1 !important; animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important}
body.calm .btn.sparkle{box-shadow:0 0 0 3px #ffd65a, 0 0 14px 4px rgba(255,214,90,.7)}
body.calm .btn.sparkle::before, body.calm .btn.sparkle::after{opacity:1}
/* stronger sparkle: gold ring, shimmer sweep, bigger twinkling stars, a little hop */
.btn.sparkle{outline:2.5px solid #f2c230 !important; outline-offset:2px !important;
  background-image:linear-gradient(110deg, transparent 30%, rgba(255,246,196,.9) 45%, rgba(255,255,255,.95) 50%, rgba(255,246,196,.9) 55%, transparent 70%), var(--grain, none) !important;
  background-size:250% 100%, auto !important; background-repeat:no-repeat, repeat !important;
  animation:sparkGlow 1.4s ease-in-out infinite, sparkSweep 2.4s linear infinite, sparkHop 2.4s ease-in-out infinite}
.btn.sparkle::before, .btn.sparkle::after{font-size:22px; color:#ffcf33; text-shadow:0 0 8px #fff3b0, 0 0 3px #a8790a, 0 1px 0 #7a5608}
.btn.sparkle::before{top:-15px; right:-11px}
.btn.sparkle::after{bottom:-13px; left:-10px; font-size:16px}
@keyframes sparkSweep{0%{background-position:150% 0, 0 0} 100%{background-position:-150% 0, 0 0}}
@keyframes sparkHop{0%,70%,100%{transform:translateY(0)} 80%{transform:translateY(-4px)} 90%{transform:translateY(0)}}
@keyframes sparkGlow{0%,100%{box-shadow:0 0 8px 2px rgba(255,207,51,.75)} 50%{box-shadow:0 0 22px 8px rgba(255,214,90,.95)}}

/* ---- Typing check ---- */
.tcline{font:600 clamp(22px,3vw,32px)/1.5 var(--type, monospace); background:#fffdf8; border-radius:14px; padding:14px 18px; letter-spacing:.04em; cursor:text;
  box-shadow:inset 0 2px 6px rgba(40,25,10,.12);}
.tcline span{border-radius:4px; padding:0 1px}
.tcline span.ok{color:#4f833d}
.tcline span.fixed{color:#b8732a}
.tcline span.cur{background:#ffe9a8; box-shadow:inset 0 -3px 0 #c0560c}
.tcline span.cur.bad{background:#f6c2bb; box-shadow:inset 0 -3px 0 #b8433b}
.tcin{position:absolute; width:1px; height:1px; opacity:0}
.tcdots{display:flex; gap:8px; justify-content:center}
.tcdots i{width:12px; height:12px; border-radius:50%; background:#e2d4b8}
.tcdots i.done{background:#4f833d}
.tcdots i.now{background:#c0560c}
.tcin{left:0 !important; top:0; pointer-events:none}
.tcline{word-break:normal; overflow-wrap:normal} .tcline .w{white-space:nowrap; display:inline-block}

/* ---- Camp: story corner and hover notes ---- */
#campScene .station{cursor:pointer}
#campScene .station:hover, #campScene .station:focus-visible{filter:drop-shadow(0 0 6px #fff3b0) drop-shadow(0 0 2px #e2b04a)}
#campScene .hot:focus-visible{outline:none}
.camptip{position:absolute; z-index:6; max-width:260px; pointer-events:none; background:#fffdf8; color:var(--ink); border-radius:12px; padding:8px 12px;
  box-shadow:0 4px 14px rgba(40,25,10,.3); display:flex; flex-direction:column; gap:2px; font-size:14px; line-height:1.3; outline:1.5px dashed var(--stitch); outline-offset:-5px}
.camptip b{font-family:var(--display); font-weight:600; font-size:16px}
.camptip[hidden]{display:none}
.camptip small{display:block; margin-top:4px; font-size:13px; color:var(--muted)}
#campScene .svgsparkle{animation:svgSpark 1.4s ease-in-out infinite}
@keyframes svgSpark{0%,100%{filter:drop-shadow(0 0 4px #ffd65a) drop-shadow(0 0 2px #fff3b0)} 50%{filter:drop-shadow(0 0 14px #ffcf33) drop-shadow(0 0 4px #fff)}}

/* ---- Inside the tent: walking and moving things ---- */
#tentScene{position:relative}
#tentScene svg.arranging{touch-action:none}
#tentScene svg.arranging .tentitem{cursor:grab}
#tentScene svg.arranging .tentitem:hover{filter:drop-shadow(0 0 5px #fff3b0) drop-shadow(0 0 2px #c0560c)}
#tentScene svg.arranging .tentitem.dragging{cursor:grabbing; filter:drop-shadow(0 8px 6px rgba(40,25,10,.35)) drop-shadow(0 0 3px #fff3b0)}
.tentnote{position:absolute; left:12px; right:12px; top:10px; z-index:4; display:flex; align-items:center; gap:12px; background:#fffdf8; border-radius:12px;
  padding:8px 12px; font-size:15px; box-shadow:0 3px 10px rgba(40,25,10,.25); outline:1.5px dashed var(--stitch); outline-offset:-5px}
.tentnote span{flex:1}
/* tent shop: a bar under the tent, and a window with every item at once */
#tentShop{display:flex; align-items:center; gap:14px; flex-direction:row}
#tentShop .tenthead{flex:1; display:flex; flex-direction:column; gap:2px}
.modal.tentshopmodal{width:min(1100px,100%)}
.tentgrid{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px}
.tentgrid .shopcard{padding:8px 6px}
.tentgrid .shopcard .shopart{width:56px; height:56px}
.tentgrid .shopcard b{font-size:15px}
/* the Promise scroll on shorter screens (iPad): a bit tighter, so all 12 lines fit */
@media (max-height:720px){
  .plines{ font-size:14.5px; line-height:1.3}
  .plines li{grid-template-columns:104px 1fr;}
  .plines cite{font-size:12px}
  .pscroll .pbody h2{font-size:26px}
}
@media (max-height:720px){
  .pscroll{margin:0 auto 4px}
  .pbody{padding:10px 22px 8px}
  .pintro{margin:0 0 6px; font-size:14px}
  .plines{row-gap:2px}
  .plines li{padding-bottom:3px}
  .modal:has(.pscroll){gap:8px; padding-top:14px; padding-bottom:14px}
}
/* Story so far: every chapter at once, in two columns (no scrolling list) */
.modal.storysofar{width:min(980px,100%)}
.storysofar .storylist{display:grid; grid-template-columns:1fr 1fr; gap:8px; max-height:none; overflow:visible}
.storysofar .storyrow{padding:8px 12px}
/* ---- Camp: moving things ---- */
#campScene svg.arranging{touch-action:none}
#campScene svg.arranging [data-move]{cursor:grab}
#campScene svg.arranging [data-move]:hover{filter:drop-shadow(0 0 5px #fff3b0) drop-shadow(0 0 2px #c0560c)}
#campScene svg.arranging .dragging{cursor:grabbing; filter:drop-shadow(0 8px 6px rgba(40,25,10,.35)) drop-shadow(0 0 3px #fff3b0)}
/* "or press Enter" above the tent's word tag */
#campScene .ctag .ehint{font:700 19px var(--body); fill:#fffdf8; paint-order:stroke; stroke:#3b2f2a; stroke-width:4px}

/* ---------- Performance: stitching drawn by an overlay (HANDOFF.md "Performance rules") ----------
   A dashed stitch drawn with outline-offset (inside the edge) is painted on top of everything in the box, and Edge/Chrome
   then redraws the whole box on every frame of any animation inside it (the map's clouds, the glowing main button...).
   So panels, windows, the map frame and the main button draw the very same outline from an ::after overlay instead:
   same width, color, offset and corners, so it looks identical. A game card's picture sits above the overlay (z-index),
   just as it covered the outline. The text panel keeps its outline (it scrolls, and an overlay would scroll with it). */
.panel:not(.textpanel), .modal, .mapinner, .mainbtn:not(.sparkle){outline-style:none}
.mainbtn:not(.sparkle){position:relative}
.panel:not(.textpanel):not(:focus-visible)::after, .modal:not(:focus-visible)::after, .mapinner::after, .mainbtn:not(.sparkle):not(:focus-visible)::after{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; outline:2px dashed; outline-color:inherit; outline-offset:inherit}
body.printcert .modal.certmodal::after{display:none}
.gcard .art{z-index:1}
/* The map's cloud banks grow a little as they drift (fogFront), and people breathe (lfBreathe); told ahead that they
   move, Edge keeps their picture instead of redrawing it on every frame at each new size (it did at 125% and 150%). */
.fog .fogback, .fog .fogfront,
.storycast > span > svg, .scenebox .host > svg, .gamechar > svg, .chfoe > svg, .storychar > svg, .whobox .avatar svg{will-change:transform}
/* The arrival moment (art.js feltWake): while a screen's felt pictures are first made, its looping motion holds still,
   and a little felt sign says where you are arriving. */
body.felt-waking main > section:not([hidden]) *, body.felt-waking main > section:not([hidden]) *::before, body.felt-waking main > section:not([hidden]) *::after,
body.felt-waking #modalRoot *, body.felt-waking #modalRoot *::before, body.felt-waking #modalRoot *::after{animation-play-state:paused !important}
.wakesign{position:fixed; left:50%; top:26%; transform:translate(-50%,-50%); z-index:70; pointer-events:none; opacity:0; transition:opacity .35s ease;
  font-family:var(--display); font-weight:600; font-size:22px; color:var(--ink); padding:12px 26px 14px; border-radius:16px;
  background-color:#fffdf8; background-image:var(--grain); box-shadow:0 6px 16px rgba(30,20,10,.3); outline:2px dashed var(--stitch); outline-offset:-7px}
.wakesign.show{opacity:1}
