:root{color-scheme:dark;--bg:#111914;--surface:#1b251e;--line:#384339;--text:#f4f1e6;--soft:#b9c2b5;--gold:#dbbf87;--ink:#192219;--serif:'Baskerville','Iowan Old Style','Palatino Linotype','Book Antiqua',Georgia,serif;--sans:'Inter','Helvetica Neue',Arial,sans-serif;font-family:var(--sans);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 48% 0,#1b271e 0,transparent 56%),var(--bg);color:var(--text);min-height:100svh}button,a,select,input{font:inherit}button,select{color:inherit;cursor:pointer}a{color:inherit;text-decoration:none}button{border:0;background:none}button:disabled{opacity:.38;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--gold);outline-offset:4px}svg{width:20px;height:20px;display:block;flex:none}.top{border-bottom:1px solid #ffffff11;background:#111b15}.top-in,main{max-width:1440px;margin:auto;padding-left:clamp(18px,4.8vw,80px);padding-right:clamp(18px,4.8vw,80px)}.top-in{height:77px;display:flex;align-items:center;gap:clamp(30px,5vw,78px)}.brand{display:flex;align-items:center;gap:11px;font:500 34px/.96 var(--serif);letter-spacing:-1.7px}.brand svg{width:33px;height:33px;color:var(--gold)}nav{display:flex;gap:30px;align-self:stretch}nav a{display:grid;align-items:center;position:relative;font-size:14px;color:var(--soft)}nav a.current{color:var(--text)}nav a.current:after{content:'';height:2px;position:absolute;bottom:0;left:0;right:0;background:var(--gold)}.sound-btn{margin-left:auto;display:flex;align-items:center;gap:10px;border:1px solid var(--line);padding:9px 15px;border-radius:30px;font-size:13px;color:#e2e5d8}.wave{display:flex;align-items:center;gap:2px;height:16px;color:var(--gold)}.wave i{width:2px;height:6px;background:currentColor;border-radius:2px}.wave i:nth-child(2){height:12px}.wave i:nth-child(3){height:16px}.wave i:nth-child(4){height:10px}.sound-btn:hover,.iconbtn:hover,.btn:hover,.chip:hover{filter:brightness(1.15);border-color:#83917d}.sound-btn:active,.btn:active,.iconbtn:active{transform:translateY(1px)}main{padding-top:30px;padding-bottom:64px}.hero{position:relative;isolation:isolate;overflow:hidden;min-height:390px;height:min(34vw,460px);border-radius:17px;border:1px solid #4d554146;background:#18241b;box-shadow:0 14px 35px #070c091a}.hero-photo{position:absolute;inset:0 0 0 auto;width:83%;height:100%;object-fit:cover;object-position:center 46%;z-index:-4}.hero:before{content:'';position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,#15251b 5%,#15251bf7 18%,#15251bcc 32%,#15251b5c 48%,transparent 70%),linear-gradient(0deg,#101b14a8,transparent 40%)}.hero-content{padding:clamp(30px,3.6vw,58px);height:100%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.eyebrow{display:flex;align-items:center;gap:10px;color:var(--gold);font-size:10.5px;line-height:1.4;letter-spacing:2px;text-transform:uppercase;font-weight:650}.rule{width:25px;height:1px;background:var(--gold)}h1,h2,h3,p{margin:0}.hero h1{font:400 clamp(54px,5.3vw,83px)/.96 var(--serif);letter-spacing:-.055em;margin:16px 0}.hero p{max-width:350px;width:36vw;font-size:15px;line-height:1.6;color:#e0e5d7;text-wrap:pretty}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:42px;padding:0 18px;border:1px solid #556153;border-radius:8px;font-weight:550;font-size:14px;background:#223027;touch-action:manipulation}.btn.primary{background:#eee3c8;color:#1c281d;border-color:#eee3c8}.hero .btn{margin-top:23px}.hero .btn svg{width:14px}.hero-controls{position:absolute;right:23px;bottom:20px;display:flex;align-items:center;gap:8px}.index{color:#efe9d5;font:12px ui-monospace,monospace;letter-spacing:1px;text-shadow:0 1px 5px #000;margin-right:7px}.iconbtn{border-radius:50%;display:grid;place-items:center;width:36px;height:36px;background:#152018b8;border:1px solid #dfebcb63;color:#f4f1df}.iconbtn svg{width:16px}.lib{margin-top:36px}.libhead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.libhead h2,.gallery-title{font:400 clamp(29px,2.5vw,39px)/1.1 var(--serif);letter-spacing:-.045em}.filters{display:flex;gap:4px;background:#101913;border:1px solid #394239;border-radius:25px;padding:3px}.chip{font-size:13px;padding:7px 15px;color:#c0c9b9;border-radius:20px;white-space:nowrap}.chip.on{background:#354438;color:#f4f3e6}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:23px 18px}.card{display:block;text-align:left;min-width:0;padding:0}.thumb{aspect-ratio:1.68;overflow:hidden;border-radius:10px;position:relative;border:1px solid #b8c7a529;background:#263228}.thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .45s}.card:hover img{transform:scale(1.045)}.card:hover h3{color:var(--gold)}.cardmeta{color:#aebaa8;font-size:10px;letter-spacing:1.3px;text-transform:uppercase;font-weight:600;margin:13px 0 5px}.card h3{font:400 clamp(20px,1.7vw,26px)/1.15 var(--serif);letter-spacing:-.035em}.stamp{position:absolute;right:8px;bottom:8px;border-radius:25px;background:#132018e5;color:#ecdfbe;font-size:11px;padding:4px 9px;border:1px solid #cfddbd55}.gallery-title{font-size:45px}.empty{padding:32px;border:1px solid var(--line);border-radius:12px;color:var(--soft);line-height:1.6}.empty .btn{margin-top:12px}.sub{font-size:14px;line-height:1.55;color:var(--soft)}.back{color:var(--soft);font-size:13px;display:inline-flex;align-items:center;gap:6px}.back svg{width:14px}.game-head{margin:20px 0 22px;display:flex;align-items:end;justify-content:space-between;gap:12px}.game-head h1{font:400 clamp(36px,4.2vw,62px)/1.03 var(--serif);letter-spacing:-.05em;margin-top:7px}.stage-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(230px,23vw,310px);gap:clamp(20px,3vw,48px);align-items:start}.frame{padding:9px;background:#26332a;border-radius:12px;border:1px solid #56614e;box-shadow:0 12px 35px #060c082b}.viewport{aspect-ratio:1.5;width:100%;overflow:auto;overscroll-behavior:contain;position:relative;scrollbar-width:thin;scrollbar-color:#89947b #1e281f}.board{width:100%;aspect-ratio:1.5;display:grid;position:relative;background:#182219;isolation:isolate;touch-action:none}.board.zoomed{width:200%;touch-action:pan-x pan-y}.piece{display:block;padding:0;border:none;margin:0;position:relative;min-width:0;min-height:0;cursor:grab;background-repeat:no-repeat;border-radius:0;user-select:none;-webkit-user-select:none}.piece:after{content:'';position:absolute;inset:0;pointer-events:none;border:solid #182118b3;border-width:var(--edges)}.piece.selected{z-index:2;filter:brightness(1.25)}.piece.selected:after{border-color:#ffdd88;border-width:var(--edges);box-shadow:inset 0 0 0 1.8px #f4d479}.piece.hinted:after{border:3px dashed #fff0b3}.piece:focus-visible{outline:2px solid #ffde93;outline-offset:-3px;z-index:4}.piece.dragging{z-index:5;cursor:grabbing;filter:brightness(1.12);opacity:.88}.boardtools{display:flex;gap:7px;align-items:center;margin-top:12px;flex-wrap:wrap}.tool{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 11px;min-height:38px;border:1px solid #39483c;background:#1b281f;color:#e1e5d8;border-radius:7px;font-size:13px}.tool svg{width:15px;height:15px}.tool.on{border-color:var(--gold);color:var(--gold)}.control-panel{background:linear-gradient(115deg,#223025,#1a251e);border:1px solid var(--line);border-radius:13px;padding:22px}.control-panel label,.field-label{display:block;color:#dfe4d5;font-size:13px;font-weight:650;margin-bottom:8px}.mode{display:flex;padding:3px;border:1px solid #455546;border-radius:8px;background:#152119}.mode button{flex:1;font-size:13px;padding:9px 4px;color:var(--soft);border-radius:5px}.mode .on{color:#202b20;background:#e7dbbf}.control-panel .sub{margin:10px 0 19px;font-size:13px}select{width:100%;background:#19251d;border:1px solid #4a594b;border-radius:7px;padding:10px;color:var(--text);font-size:14px}.stats{border-top:1px solid var(--line);margin-top:21px;padding-top:15px;display:grid;gap:10px}.stat{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:var(--soft)}.stat strong{font-variant-numeric:tabular-nums;font-weight:600;color:var(--text)}.instructions{font-size:13px;line-height:1.5;color:var(--soft);margin:13px 0}.reveal-img,.living canvas,.living>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.reveal-img{z-index:6;pointer-events:none}.living{position:relative;width:100%;height:100%;grid-area:1 / 1 / -1 / -1}.portal{position:absolute;display:grid;place-items:center;transform:translate(-50%,-50%);width:42px;height:42px;border-radius:50%;border:1px solid #ffedbf;background:#192a21c2;color:white;box-shadow:0 0 0 5px #eee6c233}.portal svg{width:18px}.complete-line{display:flex;align-items:center;gap:8px;color:var(--gold);font-size:13px;margin-bottom:14px}.control-panel .primary,.control-panel .replay{width:100%;margin-top:14px}.replay{background:transparent}.sr{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}button:active{filter:brightness(.94)}.quick{width:100%;margin-top:14px}.gallery-intro{margin:10px 0 28px}
dialog{padding:0;width:min(420px,calc(100vw - 32px));max-height:90dvh;overflow:auto;color:var(--text);background:#1c2a20;border:1px solid #55614e;border-radius:16px;box-shadow:0 20px 65px #040a0688}dialog::backdrop{background:#09110cd2;backdrop-filter:blur(4px)}#dialogContent{padding:25px}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.dialog-head h2{font:32px var(--serif);letter-spacing:-1.2px}.mix-field{margin-bottom:16px}.mix-field label{font-size:13px;color:#e3e4d8;display:flex;justify-content:space-between;margin:7px 0}.mix-field output{color:var(--gold)}.mix-field input[type=range]{display:block;accent-color:#d4bc88;width:100%;height:20px}.dialog-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:18px}.dialog-actions .btn{font-size:13px;padding:0 11px}.mix-message{font-size:12px;min-height:16px;color:var(--gold);margin-top:10px}#toast{position:fixed;z-index:15;bottom:max(18px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:90vw;background:#263b2b;color:#fff5de;border:1px solid #67755f;border-radius:9px;padding:10px 16px;font-size:14px;line-height:1.35;box-shadow:0 5px 20px #050b0744;pointer-events:none;opacity:0}#toast.show{opacity:1}
@media(max-width:900px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.hero p{width:42vw}.stage-layout{grid-template-columns:minmax(0,1fr) 218px;gap:16px}.control-panel{padding:15px}.hero{min-height:350px}.top-in{height:66px}}
@media(max-width:680px){.top-in{gap:15px;height:62px}.brand{font-size:27px;gap:6px}.brand svg{width:26px;height:26px}nav{gap:14px;margin-left:auto}nav a{font-size:12px}.sound-btn{margin-left:0;padding:9px}.sound-btn>span:last-child{display:none}main{padding-top:17px}.hero{height:460px;min-height:0;border-radius:13px}.hero-photo{width:100%;height:70%;inset:0;object-position:center 43%}.hero:before{background:linear-gradient(0deg,#17271b 0%,#17271bfa 21%,#17271bd6 36%,#17271b44 58%,transparent 78%)}.hero-content{justify-content:flex-end;padding:22px}.hero h1{font-size:48px;margin:8px 0}.hero h1 br{display:none}.hero p{width:auto;max-width:310px;font-size:14px;line-height:1.44}.hero .btn{margin-top:16px}.hero-controls{right:16px;bottom:23px;gap:5px}.index{font-size:10px;margin-right:2px}.iconbtn{width:32px;height:32px}.lib{margin-top:27px}.libhead{align-items:start;flex-direction:column;gap:13px;margin-bottom:16px}.cards{gap:20px 12px}.cardmeta{font-size:9px;letter-spacing:.9px;margin:8px 0 4px}.card h3{font-size:19px}.thumb{border-radius:7px}.stage-layout{grid-template-columns:1fr}.game-head{margin:14px 0}.frame{padding:4px;border-radius:6px}.boardtools{gap:5px}.tool{font-size:12px;padding:7px 8px}.control-panel{padding:17px}.game-head h1{font-size:35px}.control-panel .stats{margin-top:14px}.eyebrow{font-size:9px;letter-spacing:1.6px}.gallery-title{font-size:37px}.top-in,main{padding-left:16px;padding-right:16px}}
@media(max-width:360px){nav{gap:8px}.brand{font-size:24px}.top-in{gap:8px}.hero-content{padding:16px}.hero-controls .index{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.game-head>.iconbtn{align-self:center;flex:none}

.tile-window { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.tile-art, .framed-art {
  position:absolute; display:block; object-fit:cover; object-position:var(--subject-x,50%) 50%;
  max-width:none; pointer-events:none; user-select:none; -webkit-user-drag:none;
}
.framed-art { inset:0; width:100%; height:100%; }
.drawer-handle { display:none; }
.puzzle-focus, .puzzle-focus body { overflow:hidden; overscroll-behavior:none; }
.puzzle-focus .top, .puzzle-focus .back, .puzzle-focus .game-head,
.puzzle-focus .control-panel, .puzzle-focus .instructions { display:none; }
.puzzle-focus main { padding:0; }
.puzzle-focus .stage-layout { display:block; }
.puzzle-focus .play-surface {
  position:fixed; inset:0; height:100%; height:100dvh; display:grid; place-items:center;
  padding: max(3px,env(safe-area-inset-top)) max(3px,env(safe-area-inset-right))
           calc(44px + env(safe-area-inset-bottom)) max(3px,env(safe-area-inset-left));
  container-type:size; overflow:hidden; background:#0b120e;
}
.puzzle-focus .frame {
  padding:0; width:min(100%, 146vh); width:min(100cqw,150cqh);
  border:0; border-radius:3px; overflow:hidden;
}
/* The shell changes width while the artwork and each 44px hit target stay still. */
.puzzle-focus {
  --pill-bottom:max(8px,env(safe-area-inset-bottom));
  --pill-height:50px;
  --pill-slot:clamp(44px,11.5vw,52px);
  --pill-edge:linear-gradient(155deg,rgba(43,48,45,.96),rgba(23,27,25,.96) 65%);
  --pill-shadow:inset 0 1px 1px #ffffff19,inset 0 -1px 2px #ffffff0c,0 5px 18px #0005;
  --pill-motion:cubic-bezier(.22,.82,.22,1);
}
.puzzle-focus .tool-dock,dialog.pill-dialog {
  border:1px solid #ffffff35; border-radius:999px; background:var(--pill-edge);
  box-shadow:var(--pill-shadow); color:#f5f5ef;
  -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px);
}
.puzzle-focus .tool-dock {
  --open-width:calc((var(--tool-count) + 1) * var(--pill-slot) + 6px);
  position:absolute; z-index:8; left:50%; bottom:var(--pill-bottom);
  width:var(--pill-height); height:var(--pill-height);
  max-width:calc(100% - max(8px,env(safe-area-inset-left)) - max(8px,env(safe-area-inset-right)));
  overflow:hidden; transform:translateX(-50%); isolation:isolate;
  transition:width .32s var(--pill-motion);
}
.puzzle-focus.drawer-open .tool-dock { width:var(--open-width); }
.puzzle-focus .drawer-handle {
  position:absolute; z-index:2; right:2px; top:2px; display:grid; place-items:center;
  width:44px; height:44px; padding:0; border-radius:50%;
  color:inherit; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent;
}
.puzzle-focus .drawer-handle svg { width:20px; height:20px; }
.pill-dots,.pill-cross { grid-area:1/1; pointer-events:none; transition:opacity .16s,transform .25s var(--pill-motion); }
.pill-cross { opacity:0; transform:rotate(-45deg) scale(.75); }
.drawer-open .pill-dots { opacity:0; transform:scale(.72) rotate(28deg); }
.drawer-open .pill-cross { opacity:1; transform:none; }
.puzzle-focus .drawer-handle::before {
  content:''; position:absolute; left:-1px; top:13px; width:1px; height:18px;
  background:#ffffff26; opacity:0; transition:opacity .17s;
}
.drawer-open .drawer-handle::before { opacity:1; }
.puzzle-focus .drawer-handle:focus-visible,.puzzle-focus .boardtools .tool:focus-visible,
dialog.pill-dialog :focus-visible { outline:2px solid #d9c598; outline-offset:-3px; }
.puzzle-focus .boardtools {
  position:absolute; right:49px; left:auto; top:2px; height:44px; margin:0; padding:0;
  width:calc(var(--tool-count) * var(--pill-slot)); display:flex; flex-flow:row nowrap;
  gap:0; align-items:center; justify-content:flex-start; border:0; background:transparent;
  opacity:0; transform:translateX(9px); transition:opacity .13s,transform .28s var(--pill-motion);
}
.puzzle-focus.drawer-open .boardtools {
  opacity:1; transform:none; transition-delay:.045s,0s;
}
.puzzle-focus .boardtools[inert] { pointer-events:none; }
.puzzle-focus .boardtools .tool {
  position:relative; flex:1 0 44px; display:grid; place-items:center;
  height:44px; min-height:44px; padding:0; border:0; border-radius:50%; background:transparent; color:#efefe8;
  -webkit-tap-highlight-color:transparent;
}
.puzzle-focus .boardtools .tool svg { width:19px; height:19px; }
.puzzle-focus .boardtools .tool span { display:none; }
.puzzle-focus .boardtools .tool small { position:absolute; top:3px; right:6px; color:var(--gold); font:10px/1 var(--sans); }
.puzzle-focus .boardtools .tool.on { color:#f5d396; background:#fff1ce12; }
.puzzle-focus .boardtools .tool:disabled { opacity:.32; }
@media (hover:hover) {
  .puzzle-focus .boardtools .tool:hover:enabled,.puzzle-focus .drawer-handle:hover { background:#ffffff10; }
}
.puzzle-focus .boardtools .tool:active:enabled,.puzzle-focus .drawer-handle:active { background:#ffffff1b; }
@media (max-width:324px) {
  .puzzle-focus .tool-dock { max-width:calc(100% - max(3px,env(safe-area-inset-left)) - max(3px,env(safe-area-inset-right))); }
  .puzzle-focus.drawer-open .boardtools { width:calc(100% - 52px); overflow-x:auto; scrollbar-width:none; }
}
dialog.pill-dialog {
  position:fixed; inset:auto 0 var(--pill-bottom); margin:0 auto; padding:0;
  width:max-content; max-width:calc(100% - 12px); height:var(--pill-height); max-height:none; overflow:hidden;
}
dialog.pill-dialog::backdrop { background:#080c0a33; backdrop-filter:none; }
.puzzle-focus:has(dialog.pill-dialog[open]) .tool-dock { visibility:hidden; }
.pill-dialog #dialogContent { display:flex; flex-flow:row nowrap; align-items:center; height:100%; gap:5px; padding:2px 2px 2px 12px; }
.pill-dialog #closeDlg,.pill-resume { padding:0; border:0; min-width:44px; height:44px; color:inherit; background:none; }
.pill-dialog #closeDlg { border-radius:50%; position:relative; }
.pill-dialog #closeDlg::before { content:''; position:absolute; height:18px; width:1px; left:0; background:#ffffff26; }
.pill-dialog #closeDlg svg { width:19px; }
.pill-dialog .paused-label { color:#bec5be; margin:0 6px; font-size:14px; }
.pill-resume { display:inline-flex; align-items:center; gap:6px; padding:0 9px; font-size:14px; }
.pill-resume svg { width:14px; height:14px; }
.pill-dialog .mix-field,.pill-dialog .dialog-actions { margin:0; }
.pill-dialog .mix-field label,.pill-dialog .mix-message { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.pill-dialog .mix-field:not([hidden]):has(input) { display:flex; align-items:center; gap:6px; }
.pill-dialog .mix-field:has(input) label { position:static; order:2; width:auto; height:auto; clip-path:none; margin:0; font-size:0; }
.pill-dialog .mix-field output { font-size:12px; font-variant-numeric:tabular-nums; }
.pill-dialog .mix-field input[type=range] { width:clamp(70px,24vw,140px); }
.pill-dialog .dialog-actions { display:flex; flex-wrap:nowrap; gap:2px; }
.pill-dialog .dialog-actions .btn { min-height:42px; border:0; padding:0 5px; border-radius:12px; background:transparent; }
.pill-dialog [hidden] { display:none; }
.pill-dialog .dialog-actions[hidden] { display:none; }
#focusPlay,#exitFocus { color:#ead8b0; border-color:#70674b; }
.puzzle-focus #toast { top:max(10px,env(safe-area-inset-top)); bottom:auto; width:max-content; }

.scene-card { position:relative; grid-area:1 / 1 / -1 / -1; width:100%; height:100%; perspective:1400px; }
.card-turn { position:absolute; inset:0; transform-style:preserve-3d; transition:transform .52s cubic-bezier(.23,.8,.27,1); }
.scene-card.turned .card-turn { transform:rotateY(180deg); }
.art-face,.story-face {
  position:absolute; inset:0; -webkit-backface-visibility:hidden; backface-visibility:hidden;
}
.art-face { overflow:hidden; background:var(--bg); }
.art-face .portal { z-index:2; }
.art-face .portal[hidden] { display:none; }
.read-story { position:absolute; inset:0; width:100%; height:100%; padding:0; z-index:1; border-radius:0; }
.read-story span {
  position:absolute; bottom:12px; left:12px; display:inline-flex; align-items:center; gap:7px;
  padding:7px 11px; border:1px solid #f3ead34a; border-radius:30px;
  font-size:12px; color:#fff5e4; background:#132016ce;
}
.read-story svg,.story-return svg { width:14px; height:14px; }
.read-story:focus-visible { outline-offset:-4px; }
.story-face {
  transform:rotateY(180deg); background:#efe8d4; color:#233125; overflow:auto;
  overscroll-behavior:contain; touch-action:pan-y; scrollbar-width:thin; scrollbar-color:#a69f88 #efe8d4;
}
.board:has(.scene-card) { touch-action:pan-y; }
.story-inner {
  min-height:100%; max-width:590px; margin:auto; padding:clamp(18px,4vmin,42px);
  display:flex; flex-direction:column; align-items:flex-start; justify-content:safe center;
}
.story-meta { font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:#53614f; font-weight:650; }
.story-strip { width:100%; height:auto; max-height:30vh; aspect-ratio:1.5; object-fit:contain; margin:16px 0; background:#e4ddc8; border-radius:3px; }
.story-scene { color:#5f6959; font-size:13px; margin-bottom:4px; }
.story-inner h2 { font:400 clamp(26px,4.9vmin,44px)/1.05 var(--serif); letter-spacing:-.04em; }
.story-inner p { font-size:clamp(15px,2vmin,17px); line-height:1.52; margin-top:11px; }
.story-inner .look-again { color:#485844; font-family:var(--serif); font-style:italic; font-size:clamp(17px,2.4vmin,21px); }
.story-return { display:inline-flex; gap:7px; align-items:center; margin-top:12px; padding:6px 0; min-height:44px; color:#314a36; font-size:14px; text-decoration:underline; text-underline-offset:4px; }
.story-face [type=button]:focus-visible { outline-color:#4e6a52; }

@media(max-width:680px) {
  .boardtools { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:4px; }
  .boardtools .tool { flex-direction:column; gap:3px; min-height:48px; padding:4px 1px; font-size:12px; line-height:1.1; text-align:center; }
  .boardtools .tool svg { width:17px; height:17px; }
}
@media(max-width:680px), (orientation:landscape) and (max-height:500px) {
  .puzzle-focus .frame, .puzzle-focus .viewport, .puzzle-focus .board { width:100%; height:100%; aspect-ratio:auto; }
  .puzzle-focus .board.zoomed { width:200%; height:200%; }
  .puzzle-focus .frame { border-radius:2px; }
}
@media(max-height:500px) and (orientation:landscape) {
  .story-strip { display:none; }
  .story-inner { padding:14px 22px; }
}
@media(prefers-reduced-motion:reduce) {
  .card-turn,.puzzle-focus .tool-dock,.puzzle-focus .boardtools,.pill-cross,.pill-dots,.drawer-handle::before { transition:none; }
}

/* Collection shelves and chapter navigation */
.hero-photo[data-world="faith"] { width:61%; object-position:50% 42%; }
.collection-links { display:flex; flex-wrap:wrap; align-items:center; gap:7px 19px; margin:14px 0 0; }
.collection-links a,.passage-link { display:inline-flex; align-items:center; min-height:38px; font-size:14px; text-decoration:underline; text-underline-offset:4px; text-decoration-color:#647661; }
.collection-links a { color:var(--soft); }
.collection-links .ideas-link { color:var(--gold); margin-left:auto; }
.ideas-head h1 { font:400 clamp(38px,5vw,72px)/.99 var(--serif); letter-spacing:-.05em; margin:10px 0 14px; }
.ideas-head p { max-width:52ch; color:#c4cdbd; font-size:16px; line-height:1.52; text-wrap:pretty; }
.series-section { margin:0 0 36px; }
.series-section h2 { font:400 clamp(31px,3.2vw,47px)/1.07 var(--serif); letter-spacing:-.045em; margin:5px 0 8px; }
[data-style="tonal"].board :is(.tile-art,.framed-art,.story-strip),img[data-style="tonal"] { filter:grayscale(1) sepia(.15); }
.story-actions { display:flex; flex-wrap:wrap; align-items:center; gap:4px 22px; }
.passage-link { color:#344e37; margin-top:8px; font-weight:600; }
.ideas-head { margin:24px 0 28px; }
.idea-group { border-top:1px solid var(--line); }
.idea-group:last-child { border-bottom:1px solid var(--line); }
.idea-group summary { display:flex; align-items:center; gap:14px; min-height:64px; font:400 clamp(23px,2.3vw,32px)/1.2 var(--serif); cursor:pointer; list-style:none; }
.idea-group summary::-webkit-details-marker { display:none; }
.idea-group summary span { margin-left:auto; color:var(--soft); font:13px var(--sans); }
.idea-group summary::after { content:'+'; color:var(--gold); font:22px var(--sans); width:18px; text-align:center; }
.idea-group[open] summary::after { content:'−'; }
.idea-entries { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:6px 0 22px; }
.idea-entries article { background:#1d2921; border:1px solid var(--line); border-radius:10px; padding:18px 21px; }
.idea-entries h2 { font:400 25px/1.1 var(--serif); letter-spacing:-.03em; }
.idea-entries dl { margin:14px 0 0; }
.idea-entries dt { color:var(--gold); font-size:12px; font-weight:650; margin:10px 0 3px; }
.idea-entries dd { margin:0; color:#d6ddcf; font-size:15px; line-height:1.45; }
@media(min-width:681px) and (min-height:501px) {
  main[data-world="faith"] .board,main[data-world="faith"] .viewport { aspect-ratio:4/5; }
  main[data-world="faith"] .frame { width:min(100%,max(360px,57vh)); margin-inline:auto; }
  .puzzle-focus main[data-world="faith"] .frame { width:min(100cqw,80cqh); }
}
@media(max-width:680px) {
  .hero-photo[data-world="faith"] { width:100%; object-position:50% 44%; }
  .collection-links { gap:1px 15px; }
  .collection-links .ideas-link { margin-left:0; }
  .idea-entries { grid-template-columns:1fr; }
}

/* Piece placement and a camera that stays anchored beneath the fingers. */
.board:not(:has(.scene-card,.detail-view)),.board.zoomed { touch-action:none; }
.viewport { scrollbar-width:none; }
.viewport::-webkit-scrollbar { display:none; }
#dropGuide { position:absolute; inset:0; pointer-events:none; z-index:7; }
#dropGuide i { position:absolute; box-sizing:border-box; border:solid #f7e2a4; background:#e9ce7824; }
#dropGuide.blocked i { border-style:dashed; border-color:#e8b8a7; background:#7c484a30; }
.preview-row { display:flex; gap:8px; align-items:center; }
.preview-row button { flex:none; min-width:44px; min-height:44px; }
.preview-row button svg { width:16px; }
.pill-dialog .preview-row { gap:2px; }
.pill-dialog #previewSound { padding:0; display:grid; place-items:center; border:0; }
.pill-dialog #previewSound>span:not(.audition-bars) { display:none; }
#frontDetails { position:absolute; z-index:2; top:12px; left:12px; min-height:40px; padding:0 13px; border-radius:99px; color:#fff5e4; border:1px solid #f3ead34a; background:#132016ce; font-size:14px; }
.detail-view { grid-area:1 / 1 / -1 / -1; display:grid; grid-template-rows:minmax(0,1fr) auto; min-height:0; height:100%; overflow:hidden; background:#101812; }
.detail-image { min-height:0; position:relative; overflow:hidden; }
.detail-image>img { display:block; width:100%; height:100%; object-fit:contain; }
.detail-pin { position:absolute; transform:translate(-50%,-50%); width:44px; height:44px; display:grid; place-items:center; padding:0; }
.detail-pin span,.spread-strip span { display:grid; place-items:center; width:26px; height:26px; border-radius:50%; border:1px solid #efdfb3; background:#15251bea; color:#fbefcf; font-size:13px; font-weight:600; }
.detail-pin[aria-pressed=true] span,.spread-strip [aria-pressed=true] span { background:#f1dba3; color:#17231b; box-shadow:0 0 0 3px #13201675; }
.detail-footer { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:12px clamp(12px,3vw,26px); background:#1d2b22; color:#eee7d4; max-height:45%; max-height:24vh; overflow:auto; }
.detail-footer h2,.spread-feature h2 { font:400 clamp(21px,3.6vmin,30px)/1.1 var(--serif); }
.detail-footer p,.series-spread header p,.spread-feature p:not(.eyebrow) { margin-top:6px; font-size:15px; line-height:1.46; color:#d2d9ca; }
.detail-footer .iconbtn { flex:none; width:44px; height:44px; }
.series-spread { max-width:1080px; margin:auto; }
.series-spread header { margin:20px 0; }
.series-spread h1 { font:400 clamp(38px,6vw,72px)/1 var(--serif); letter-spacing:-.04em; margin:8px 0 12px; }
.spread-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.spread-strip button { position:relative; padding:0; overflow:hidden; border-radius:7px; border:2px solid transparent; background:#19241e; opacity:.78; }
.spread-strip button[aria-pressed=true] { border-color:#e3c88a; opacity:1; }
.spread-strip img { width:100%; aspect-ratio:1.56; display:block; object-fit:cover; }
.spread-strip span { position:absolute; bottom:5px; left:5px; width:21px; height:21px; }
.spread-feature { margin-top:14px; display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); align-items:center; gap:24px; }
.spread-feature>img { width:100%; height:min(54vh,500px); background:#0f1712; object-fit:contain; border-radius:7px; }
.spread-feature .story-return { color:#e5cf9f; }
.spread-feature h2 { margin:8px 0; }
.spread-controls { margin-top:12px; display:flex; align-items:center; gap:12px; color:var(--soft); font-size:14px; }
.spread-controls input { accent-color:var(--gold); width:min(100%,350px); height:38px; }
@media(max-width:680px) {
 .spread-feature { grid-template-columns:100%; gap:13px; }
 .spread-feature>img { height:min(46dvh,460px); }
 .spread-controls { display:grid; gap:1px; }
 .spread-strip { gap:4px; }
}

.art-face .front-spread { position:absolute; z-index:2; bottom:12px; right:12px; display:inline-flex; align-items:center; min-height:38px; padding:0 13px; border-radius:24px; background:#e9d8ac; color:#17251b; font-size:14px; }
.puzzle-focus.drawer-open .boardtools { max-width:calc(100% - 48px); overflow-x:auto; scrollbar-width:none; }
.puzzle-focus.drawer-open .boardtools::-webkit-scrollbar { display:none; }

.collection-title { display:flex; align-items:center; gap:10px; margin:0 0 22px; }
.collection-title>a { display:grid; place-items:center; flex:none; width:40px; height:44px; margin-left:-7px; color:var(--soft); border-radius:9px; }
.collection-title>a:hover { background:#ffffff0c; }
.collection-title h1 { font:400 clamp(28px,3vw,40px)/1.06 var(--serif); letter-spacing:-.045em; }
.collection-shelf { margin-bottom:28px; }
.collection-shelf+.collection-shelf { border-top:1px solid var(--line); padding-top:22px; }
.collection-shelf h2 { margin:0; font:400 clamp(22px,2.25vw,30px)/1.1 var(--serif); letter-spacing:-.025em; }
.shelf-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.shelf-heading p { margin:4px 0 0; color:var(--soft); font-size:13px; }
.shelf-action { min-height:40px; padding-inline:16px; }
.shelf-row { --card-width:clamp(154px,21vw,246px); display:grid; grid-auto-flow:column; grid-auto-columns:var(--card-width); align-items:start; justify-content:start; gap:14px; overflow-x:auto; scroll-snap-type:x proximity; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:#596450 transparent; padding:3px 2px 9px; margin:9px -2px 0; }
.shelf-row .card { scroll-snap-align:start; }
.shelf-row .thumb { aspect-ratio:1.55; }
main[data-collection="faith"] .shelf-row .thumb img { object-position:50% 50%; }
.shelf-row .cardmeta { margin:8px 0 2px; }
.shelf-row h3 { font-size:clamp(17px,1.5vw,21px); }
.shelf-row .thumb+h3 { margin-top:7px; }
@media (max-width:680px){
 main[data-collection] { padding-top:12px; }
 .collection-title { gap:3px; margin-bottom:15px; }
 .collection-shelf { margin-bottom:12px; }
 .collection-shelf+.collection-shelf { padding-top:15px; }
 .shelf-row { --card-width:clamp(140px,43vw,210px); gap:10px; scrollbar-width:none; }
 .shelf-row::-webkit-scrollbar { display:none; }
}

/* The dock and sound controls share one footprint as their contents change. */
.puzzle-focus {
 --dock-wide:min(568px,calc(100vw - max(8px,env(safe-area-inset-left)) - max(8px,env(safe-area-inset-right))));
 --pill-height:54px;
}
.puzzle-focus .tool-dock { --open-width:var(--dock-wide); }
.puzzle-focus .drawer-handle { right:4px; top:4px; }
.puzzle-focus .boardtools,.puzzle-focus.drawer-open .boardtools {
 left:4px; right:52px; top:4px; width:auto; max-width:none; justify-content:stretch;
}
.puzzle-focus .boardtools .tool { flex:1 0 44px; }
dialog.pill-dialog { width:var(--dock-wide); max-width:var(--dock-wide); }
.pill-dialog #dialogContent { padding:4px 5px 4px 10px; justify-content:space-between; gap:5px; }
.pill-dialog #closeDlg { flex:0 0 44px; }
.choice-trigger {
 display:inline-flex; align-items:center; justify-content:space-between; gap:8px; min-width:0;
 width:100%; min-height:44px; padding:0 12px; font-size:15px; line-height:1.2; font-weight:500;
 color:#f0f0e9; background:#212924; border:1px solid #aab7a738; border-radius:10px; text-align:left;
}
.choice-trigger>span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.choice-trigger>svg { width:14px; height:14px; flex:none; opacity:.72; }
.choice-trigger[aria-expanded=true] { background:#3a413a; }
.choice-trigger[aria-expanded=true]>svg { transform:rotate(180deg); }
.pill-dialog.sound-panel { overflow:visible; }
.pill-dialog.sound-panel #dialogContent { gap:3px; }
.pill-dialog .choice-trigger { font-size:clamp(13px,3.55vw,16px); padding:0 8px; gap:4px; background:transparent; border:0; border-radius:22px; }
.pill-dialog .category-trigger { flex:0 1 auto; width:auto; max-width:44%; color:#e7dabd; }
.pill-dialog .category-trigger + .mix-field { flex:1 1 0; min-width:0; }
.pill-dialog .choice-trigger[aria-expanded=true],.pill-dialog .choice-trigger:hover { background:#ffffff0c; }
.pill-dialog .preview-row { gap:3px; }
.preview-row .choice-trigger { flex:1 1 auto; width:auto; }
#previewSound svg { pointer-events:none; }
.pill-dialog #previewSound { width:44px; height:44px; flex:0 0 44px; border-radius:50%; color:#eeeadf; background:#ffffff0b; }
.pill-dialog #previewSound[data-playing=true] { color:#ead9ae; background:#d3c7a316; }
.pill-dialog .mix-range input[type=range] { flex:1; min-width:42px; width:auto; }
.pill-dialog .mix-field.mix-range label { flex:0 0 auto; }
.pill-dialog .dialog-actions { justify-content:center; }
.pill-dialog .mix-message:not(:empty) { clip-path:none; width:max-content; max-width:100%; height:auto; left:50%; bottom:calc(100% + 9px); transform:translateX(-50%); margin:0; padding:8px 12px; border-radius:12px; background:#252924; color:#f3ecd7; text-align:center; }
.sound-panel:not(.pill-dialog) .mix-message:empty { display:none; }
.sound-panel:not(.pill-dialog) #previewSound { min-height:44px; gap:7px; font-size:13px; }
.audition-bars { display:inline-flex; align-items:center; justify-content:center; gap:2px; width:18px; height:19px; }
.audition-bars i { width:3px; height:12px; border-radius:4px; background:currentColor; animation:soundPulse .37s ease-in-out infinite alternate; }
.audition-bars i:nth-child(2) { height:18px; animation-delay:-.13s; }
.audition-bars i:nth-child(3) { height:9px; animation-delay:-.21s; }
@keyframes soundPulse { from{transform:scaleY(.4)} to{transform:scaleY(1)} }
.choice-popup {
 box-sizing:border-box; position:fixed; inset:auto; z-index:1000; margin:0; padding:6px;
 width:min(266px,calc(100vw - 20px)); border:1px solid #ffffff26; border-radius:24px;
 background:linear-gradient(135deg,#332e2bf7,#242524fa 65%); color:#f7f5f1;
 -webkit-backdrop-filter:blur(22px); backdrop-filter:blur(22px);
 box-shadow:0 14px 48px #0006,inset 0 1px 0 #ffffff0c; overflow-y:auto; overscroll-behavior:contain;
 scrollbar-width:thin; font-family:var(--sans); animation:menuIn .16s cubic-bezier(.22,.82,.22,1);
}
.choice-popup:popover-open { display:block; }
.choice-popup>button { display:flex; align-items:center; width:100%; min-height:50px; gap:11px; padding:5px 11px 5px 8px; color:inherit; background:transparent; border:0; border-radius:17px; text-align:left; font-size:16px; font-weight:500; }
.choice-popup>button:focus-visible { outline:2px solid #dbca9b; outline-offset:-2px; }
.choice-popup>button:active,.choice-popup>button[aria-checked=true] { background:#ffffff0b; }
.choice-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#ffffff0c; flex:none; }
.choice-icon svg { width:19px; height:19px; }
.choice-name { flex:1; }
.choice-tick { color:#ead9b2; width:18px; }
.choice-tick svg { width:17px; height:17px; }
@media(hover:hover) { .choice-popup>button:hover { background:#ffffff12; } }
@keyframes menuIn { from { opacity:0; scale:.975; } to { opacity:1; scale:1; } }
@media(max-width:359px){.pill-dialog .choice-trigger { padding:0 4px; gap:1px; font-size:13px; } .pill-dialog.sound-panel #dialogContent { padding-left:7px; gap:1px; }}
@media(prefers-reduced-motion:reduce){ .choice-popup,.audition-bars i { animation:none; } }

/* A score lives in the tools until the player finishes the picture. */
.race-hub{max-width:1000px;margin:0 auto 60px}
.race-hub header{margin:16px 0 25px}
.race-hub h1,.race-number,.race-daily h2,.race-series h2,.race-course h3,.race-side-title{font-family:var(--serif);font-weight:400;letter-spacing:-.04em}
.race-hub h1{font-size:clamp(45px,6vw,76px);line-height:1;margin:0 0 10px}
.race-hub p,.race-rules,.race-target{color:var(--soft);line-height:1.5;font-size:16px}
.race-daily{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#1b281f}
.race-daily>img{display:block;width:100%;height:clamp(205px,25vw,285px);object-fit:cover}
.race-daily>div{padding:clamp(20px,4vw,42px)}
.race-daily .eyebrow,.race-kicker{color:var(--gold);font:600 13px/1.4 var(--sans);letter-spacing:.055em;margin:0 0 10px}
.race-daily h2{font-size:clamp(30px,4vw,48px);line-height:1.05;margin:0 0 9px}
.race-daily .btn{margin-top:16px}
.race-series{margin-top:30px}
.race-series h2{font-size:33px;margin:0 0 4px}
.race-series>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:15px}
.race-course{display:flex;align-items:center;gap:14px;padding:10px 0;border-top:1px solid var(--line)}
.race-course img{height:68px;width:65px;border-radius:7px;object-fit:cover}
.race-course h3{font-size:23px;line-height:1.15;margin:0 0 4px}
.race-course p,.race-resume{font-size:14px}
.race-resume{display:inline-flex;align-items:center;min-height:44px;color:var(--gold)}
.shelf-challenge{display:inline-flex;align-items:center;gap:5px;min-height:44px;color:var(--soft);margin-left:auto;font-size:14px}
.shelf-challenge svg{width:16px;height:16px}
.race-counter{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;color:var(--gold);font:500 14px var(--sans);font-variant-numeric:tabular-nums;white-space:nowrap}
.race-counter svg{width:17px;height:17px}
.race-counter span{color:var(--soft)}
.puzzle-focus .race-counter{flex:0 0 auto;display:grid;gap:0;grid-template-columns:18px auto;text-align:left;column-gap:6px;padding:0 9px;align-content:center}
.puzzle-focus .race-counter svg{grid-row:span 2}
.puzzle-focus .race-counter span{font-size:12px}
.race-dialog{background:#202922;border-color:#555d50;border-radius:22px}
.race-dialog #dialogContent{padding:24px}
.race-dialog .dialog-head{margin-bottom:8px;gap:8px}
.race-dialog h2{line-height:1.08;text-wrap:balance}
.race-dialog .dialog-head button{flex:none}
.race-number{font-size:clamp(35px,6vw,47px);line-height:1.16;margin:12px 0 4px;font-variant-numeric:tabular-nums}
.race-number small{font:400 .48em var(--sans);color:#c0c6bd;white-space:nowrap}
.race-record{color:#e5cf9e;font-size:15px;margin:5px 0 16px}
.race-target,.race-rules{margin:8px 0}
.race-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.race-actions .btn,.race-chapter .btn{min-height:44px}
.race-facts{border-top:1px solid var(--line);margin:17px 0 3px;padding-top:9px}
.race-facts>div,.race-chapter{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 0}
.race-facts span,.race-chapter span,.race-chapter small{color:var(--soft);font-size:14px}
.race-facts strong,.race-chapter strong{font-size:15px;font-weight:500}
.race-chapter{border-top:1px solid var(--line);padding:9px 0}
.race-chapter div{display:grid;gap:2px}
.race-side-title{font-size:30px;margin:6px 0}
.race-url{width:100%;padding:11px;border-radius:8px;border:1px solid var(--line);background:var(--bg);color:var(--text);font:16px var(--sans)}
.scored:has(dialog[open]) .board:not(:has(.scene-card)){visibility:hidden}
.three-way::after{content:'';pointer-events:none;position:absolute;inset:0;border:solid #ead8a7;border-width:var(--joining-edges);animation:seamRelease .35s ease-out var(--seam-delay) both}
@keyframes seamRelease{from{opacity:.95}to{opacity:0}}
@media(max-width:680px){.race-hub header{margin:12px 0 18px}.race-daily{grid-template-columns:1fr}.race-daily>img{height:clamp(128px,36vw,205px)}.race-daily>div{padding:17px 20px 20px}.race-series>div{grid-template-columns:1fr;gap:0}.race-course img{height:56px;width:60px}.shelf-heading{flex-wrap:wrap}.shelf-challenge{font-size:13px}.race-dialog #dialogContent{padding:20px}}
@media(prefers-reduced-motion:reduce){.three-way::after{display:none}}
.share-choice{border-top:1px solid var(--line);padding-top:14px;margin-top:16px}
.share-choice h3{font-size:17px;font-weight:550;margin:0}
.share-choice p{color:var(--soft);font-size:14px;line-height:1.45;margin:4px 0 9px}
.share-choice .btn{min-height:44px}
#shareFile:not(:empty){margin-top:8px}
.guest-game .top,.guest-game main>a.back,.guest-game [data-race=hub],.guest-game [data-race=leave],.guest-game .front-spread,.guest-game a.story-return[href^="#series"],.guest-game main:not([data-world]){display:none}
#prepareFile[hidden],.guest-single #sceneDoor,.guest-single #nextFocus{display:none}
.race-facts strong{text-align:right}
.race-links{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:8px}
.race-links .btn{border:0;background:none;box-shadow:none;color:var(--soft);font-size:13px;min-height:44px;padding:0}
.race-links .btn:hover{color:var(--text);text-decoration:underline;text-underline-offset:4px}

.collection-name{min-width:0}
.collection-name p{margin:5px 0 0;color:var(--soft);font-size:14px;line-height:1.35}
.collection-detail{display:inline-flex;flex:none;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 15px;margin-left:auto;border:1px solid var(--line);border-radius:24px;background:#1c2821;color:var(--text);font-size:14px}
.collection-detail svg{width:17px;height:17px;color:var(--gold)}
.collection-detail:hover,.collection-detail[aria-expanded=true]{background:#2a372c}
.board .finish-veil{pointer-events:none;user-select:none}
@media(max-width:550px){.collection-title{align-items:flex-start}.collection-name{padding-top:5px}.collection-name p{font-size:13px;max-width:24ch}.collection-detail{padding:0 11px;gap:6px}.collection-detail svg{width:16px}}
@media(max-width:550px){
 .shelf-heading{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px}
 .shelf-heading .shelf-challenge{width:44px;justify-content:center;margin:0}
 .shelf-heading .shelf-challenge span{display:none}
}
