:root{color-scheme:light;--paper:#f2f0e9;--card:#fffaf0;--ink:#302d26;--muted:#625e52;--teal:#245f57;--teal-dark:#19473f;--focus:#143c55;--border:#c7bfab}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;width:100%;overscroll-behavior:none}
body{background:var(--paper);color:var(--ink);font-family:Nunito,sans-serif;overflow:hidden}
button,a,summary{-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer;touch-action:manipulation}
button:disabled{cursor:wait;opacity:.65}
button:focus-visible,a:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
button svg{width:23px;height:23px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.wrap{width:min(100%,1540px);height:100svh;margin:auto;padding:8px max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left));display:grid;grid-template-rows:54px minmax(0,1fr) 52px;gap:7px;container-type:inline-size}
.top{display:flex;align-items:center;gap:22px;min-width:0}
.brand{display:flex;align-items:center;gap:7px;color:#175a7a;text-decoration:none;flex:none;font-family:Fredoka,sans-serif;font-size:19px;font-weight:600;white-space:nowrap}
.brand img{width:41px;height:41px;object-fit:contain}
.brand.solo .back{display:none}
.brand .back{font-family:Nunito,sans-serif;font-size:30px;color:var(--ink)}
h1{margin:0;flex:1;min-width:0;font:600 clamp(18px,2.4cqw,30px)/1.1 Fredoka,Nunito,sans-serif;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.tools{display:flex;gap:8px;flex:none}
.btn{border:0;border-radius:9px;min-height:44px;padding:11px 17px;background:#e6e3d8;color:var(--ink);display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:800;line-height:1.15;transition:background-color .16s,transform .16s}
.btn:hover{background:#dcd7c9}
.btn:active{transform:translateY(2px)}
.btn.primary{background:var(--teal);color:#fffaf0;font-size:clamp(17px,2.1cqw,25px);padding:14px 22px}
.btn.primary:hover{background:var(--teal-dark)}
.primary svg{fill:currentColor;stroke:none;width:18px;height:18px}
.tool{padding:8px 11px;font-size:14px}
.stage-box{min-height:0;display:flex;align-items:center;justify-content:center}
.stage{position:relative;width:min(100%,calc((100svh - 136px)*16/9));aspect-ratio:16/9;max-height:100%;overflow:hidden;border-radius:16px;background:#e3e6da;isolation:isolate;container-type:inline-size;touch-action:none}
#game{display:block;width:100%;height:100%;outline-offset:-4px;touch-action:none;background:#e3e6da url('assets/art/places/mill_far.webp') center/cover}
/* Picture bubbles over the canvas (main.js updateBubbles): a round painted bubble with its picture and word. */
.bubbles{position:absolute;inset:0;z-index:2;pointer-events:none}
/* Everything inside is sized from the bubble's diameter (--d): the picture and the words, as one group, stay centred
   in the circle at any size (a bubble grows from small as it floats out), and the words wrap within it. */
.bubble{--s:1;--d:calc(clamp(84px,13cqw,140px)*var(--s));position:absolute;width:var(--d);height:var(--d);transform:translate(-50%,-50%);pointer-events:auto;border:0;padding:0;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--d)*.03);background:radial-gradient(circle at 34% 28%,#fffffff2 0 9%,#fffdf6d9 10% 46%,#f3ead6c4 70%,#e9d9b6b0 100%);box-shadow:inset 0 0 0 3px #fffaf0cc,inset 0 -6px 12px #c9a96a3d,0 6px 16px #2f281d38;transition:transform .18s ease-out,opacity .3s,filter .3s;touch-action:none}
.bubble img{flex:none;width:calc(var(--d)*.48);height:calc(var(--d)*.36);object-fit:contain;filter:drop-shadow(0 2px 2px #3a2a1240);pointer-events:none}
.bubble span{flex:none;max-width:calc(var(--d)*.82);font:600 calc(var(--d)*.13)/1.04 Fredoka,Nunito,sans-serif;color:#3a3226;text-align:center;text-wrap:balance;pointer-events:none}
.bubble.lie{background:radial-gradient(circle at 34% 28%,#fffffff2 0 9%,#fff4f0d9 10% 46%,#f6dccfc4 70%,#eac1aeb0 100%);box-shadow:inset 0 0 0 3px #fff3eccc,inset 0 -6px 12px #c46a4a3d,0 6px 16px #2f281d38}
.bubble.chosen{transform:translate(-50%,-50%) scale(1.1);box-shadow:inset 0 0 0 3px #fffaf0,0 0 0 4px var(--teal),0 6px 16px #2f281d38}
.bubble.popped{transform:translate(-50%,-50%) scale(1.35);opacity:0!important;pointer-events:none}
.bubble.shy{filter:saturate(.7) brightness(1.05)}
/* The arrow at the picture's edge toward something out of view (main.js updatePointer): a badge with its picture. */
.edge-pointer{--a:0rad;position:absolute;width:clamp(44px,6cqw,70px);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:#fffaf0ee;box-shadow:0 3px 12px #2f281d40,inset 0 0 0 3px #d77a33;display:grid;place-items:center;pointer-events:none;animation:edge-nudge 1s ease-in-out infinite}
.edge-pointer img{width:62%;height:62%;object-fit:contain}
.edge-pointer svg{position:absolute;inset:-28%;width:156%;height:156%;transform:rotate(var(--a));fill:none;stroke:#d77a33;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
@keyframes edge-nudge{50%{scale:1.08}}
.overlay{position:absolute;inset:0;z-index:5;display:flex;align-items:center;padding:clamp(16px,3.5cqw,52px);pointer-events:auto}
.hidden{display:none!important}
.title-overlay,.end-overlay{justify-content:flex-start}
.card{width:43%;max-height:100%;overflow:auto;padding:clamp(20px,3.3cqw,46px);background:var(--card);border-radius:12px;box-shadow:0 12px 35px #2f281d24}
.card h2{font:600 clamp(27px,5.3cqw,65px)/.98 Fredoka,Nunito,sans-serif;letter-spacing:-.025em;margin:0 0 22px}
.card p{font-size:clamp(14px,1.9cqw,23px);line-height:1.4;margin:0 0 21px}
.card .invitation{font-weight:700}
.title-card .primary,.end-card .primary{width:100%;justify-content:space-between}
.card .small{font-size:clamp(12px,1.35cqw,16px);min-height:1.4em;margin:12px 0 5px;color:var(--muted)}
.pick{margin-top:15px}
.pick summary{font-size:clamp(13px,1.55cqw,19px);font-weight:800;cursor:pointer;list-style:none;min-height:34px;display:flex;align-items:center}
.pick summary::before{content:'+';font-family:Nunito,sans-serif;margin-right:8px}
.pick[open] summary::before{content:'−'}
.chapters{display:grid;gap:6px;padding:8px 0 2px}
.chapter-button{background:#eee9dc;border:0;border-radius:6px;color:var(--ink);text-align:left;min-height:44px;padding:10px 12px;font-size:14px;font-weight:800}
.chapter-button:hover{background:#ded9ca}
.presents{display:flex;align-items:center;gap:8px;margin-top:25px;font:500 clamp(11px,1.3cqw,16px)/1.2 Fredoka,sans-serif;color:#175a7a}
.presents img{width:28px;height:28px;object-fit:contain}
.source-note{position:absolute;bottom:14px;left:3.5%;max-width:89%;font-size:clamp(10px,1.05cqw,13px);line-height:1.3;background:#fffaf0e8;color:var(--ink);padding:5px 8px;border-radius:4px;margin:0}
/* the version (main.js VERSION), small in the title screen's bottom-right corner (white with a soft shadow, readable on
   any picture; on a phone the source note sits just above it) */
.build-stamp{position:absolute;right:10px;bottom:5px;font:600 10px/1.2 Nunito,sans-serif;color:#fff;opacity:.8;text-shadow:0 1px 2px #0009,0 0 6px #0006;white-space:nowrap;pointer-events:none;z-index:2}
/* TR | EN on the title page, top right of the picture: the chosen language filled */
.lang-switch{position:absolute;top:clamp(12px,2cqw,26px);right:clamp(12px,2cqw,26px);display:flex;gap:4px;padding:4px;background:#fffaf0eb;border-radius:999px;box-shadow:0 6px 18px #2f281d24}
.lang-switch button{min-width:max(48px,5cqw);min-height:max(40px,3.8cqw);padding:0 12px;border:0;border-radius:999px;background:transparent;color:var(--ink);opacity:.62;font:600 clamp(15px,1.8cqw,21px)/1 Fredoka,sans-serif;transition:background-color .16s,opacity .16s}
.lang-switch button:hover{opacity:1}
.lang-switch button[aria-pressed="true"]{opacity:1;background:var(--teal);color:#fffaf0}
.lang-switch button:active{transform:scale(.94)}
.end-card h2{font-size:clamp(30px,4.4cqw,54px);line-height:1.05}
.end-card p{font-size:clamp(15px,1.8cqw,22px)}
.end-overlay{background:#28342824}
.subtitle{position:absolute;z-index:3;top:12px;left:24px;right:calc(clamp(44px,5.4cqw,56px) + 26px);width:auto;max-width:none;background:#fffaf059;padding:8px 16px 11px;border-radius:10px;pointer-events:none}
.speaker-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:5px}
#speaker{display:inline-block;font:600 clamp(12px,1.55cqw,18px)/1.2 Fredoka,sans-serif;color:var(--ink);padding:4px 10px;border-radius:5px}
.subtitle p{font-size:clamp(14px,2.05cqw,23px);line-height:1.28;font-weight:800;margin:0;text-wrap:pretty}
.subtitle p{text-shadow:0 0 3px #fffaf0,0 0 6px #fffaf0,0 0 10px #fffaf0cc}
.stage-pause{position:absolute;top:12px;right:12px;z-index:6;width:clamp(44px,5.4cqw,56px);aspect-ratio:1;border-radius:50%;border:3px solid #5c503a;background:#fff6dfef;color:#453c2c;display:grid;place-items:center;padding:0;box-shadow:0 4px 0 #463e3438;cursor:pointer;touch-action:manipulation}
.stage-pause svg{width:52%;height:52%;fill:none;stroke:currentColor;stroke-width:3.2;stroke-linecap:round}
.stage-pause:active{transform:translateY(2px);box-shadow:0 2px 0 #463e3438}
.stage .subtitle{left:24px;right:calc(clamp(44px,5.4cqw,56px) + 26px);width:auto;max-width:none;transform:none}
.skip{pointer-events:auto;display:grid;place-items:center;border:0;background:none;color:var(--muted);width:44px;height:32px;min-height:32px;padding:3px;border-radius:5px}
.skip:hover{background:#e5dfd0}
.skip svg{width:20px;height:20px;stroke-width:2}
.game-guidance{position:absolute;top:16px;left:24%;right:23%;z-index:2;pointer-events:none;text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px}
.game-guidance p{margin:0;padding:6px 11px;border-radius:6px;background:#fffaf0e8;font-size:clamp(12px,1.35cqw,17px);font-weight:800;line-height:1.25;text-wrap:balance}
.game-guidance p:empty{display:none}
#actionLabel{background:#245f57ed;color:#fffaf0;font-family:Fredoka,sans-serif;font-weight:500}
.star-hud{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);z-index:2;display:flex;align-items:center;gap:6px;padding:5px 12px 5px 9px;border-radius:999px;background:#fffaf0eb;color:#8a5a12;font:600 clamp(15px,1.9cqw,22px)/1 Fredoka,sans-serif;pointer-events:none;box-shadow:0 3px 10px #2f281d1f}
.star-hud svg{width:1.1em;height:1.1em;fill:#e7b44d;stroke:#b07a1c;stroke-width:1.2}
.star-hud.pop{animation:star-pop .28s ease-out}
@keyframes star-pop{0%{transform:translateX(-50%) scale(1)}40%{transform:translateX(-50%) scale(1.22)}100%{transform:translateX(-50%) scale(1)}}
.touch{position:absolute;inset:0;z-index:4;pointer-events:none;user-select:none;-webkit-user-select:none}
.touch.off{visibility:hidden;pointer-events:none}
.dpad{position:absolute;left:18px;bottom:18px;display:flex;gap:12px}
.tbtn{pointer-events:auto;display:grid;place-items:center;width:56px;height:56px;border:3px solid #5c503a;border-radius:16px;background:#fff6dfef;color:#453c2c;box-shadow:0 4px 0 #463e3438;touch-action:none;padding:11px;transition:transform .08s,background-color .08s}
.tbtn svg{width:29px;height:29px;stroke:none;fill:currentColor}
.tbtn.act svg{stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tbtn.held{transform:translateY(3px);background:#d9e4ce;box-shadow:none}
.tbtn.act{position:absolute;bottom:18px;right:91px}
.tbtn.act.ready{border-color:var(--teal);color:var(--teal)}
.tbtn.jump{position:absolute;bottom:18px;right:18px;width:62px;height:62px;border-radius:50%;background:var(--teal);color:#fffaf0;border-color:#173e37}
/* The walking arrows grow with the picture (a child's thumb on a small phone, a calm size on a tablet) and their
   arrows fill the middle: no padding, a rounded triangle drawn round its visual centre. */
.tbtn.arrow{--arrow:clamp(56px,8cqw,66px);width:var(--arrow);height:var(--arrow);padding:0;border-radius:calc(var(--arrow)*.28)}
.tbtn.arrow svg{width:60%;height:60%;stroke:currentColor;stroke-width:2.6;stroke-linejoin:round}
.touch .dpad{gap:clamp(8px,1.2cqw,12px)}
.touch.action-only .jump{display:none}
.touch.action-only .act{right:18px}
/* The hand does what its tag says (look, choose, smell...); it shows only when there is something to do with it. */
.tbtn.act{overflow:visible}
.act-tag{position:absolute;bottom:calc(100% + 7px);right:-4px;white-space:nowrap;font:700 13px/1.1 Nunito,sans-serif;color:#fffaf0;background:var(--teal);padding:5px 9px;border-radius:9px;box-shadow:0 2px 6px #2f281d33}
.act-tag:empty{display:none}
.touch.no-act .act,.touch.jump-only .act,.touch.jump-only .dpad{display:none}
.pause-overlay{z-index:7;justify-content:center;background:#f3eedebf}
.pause-card{width:auto;min-width:min(40%,360px);text-align:center}
.pause-card h2{margin-bottom:18px}
.error-overlay{background:#f2f0e9e8;justify-content:center;z-index:10}
.error-overlay .card{width:min(85%,650px)}
.error-overlay h2{font-size:32px;line-height:1.1}
.error-overlay p{font-size:16px;overflow-wrap:anywhere}
.bottom{min-width:0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;align-content:center;gap:2px 15px;color:var(--muted);font-size:11px;line-height:1.2}
.bottom p{margin:0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#status{grid-column:1;font-size:11px}
#controlsHelp{grid-row:2;grid-column:2;text-align:right}
.chapter-progress{grid-column:1/-1;display:flex;gap:12px;align-items:center;color:var(--ink);font-weight:800;min-height:13px}
#progressDots{display:flex;gap:4px}
#progressDots span{display:block;width:7px;height:7px;border-radius:50%;background:#c9c5b8}
#progressDots .current{background:var(--teal);transform:scale(1.25)}
#progressDots .passed{background:#8da58c}
.rotate{display:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.stage:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;max-height:none;border-radius:0}
.stage:fullscreen .overlay{padding:4vh 4vw}
@media(pointer:fine){.touch{display:none}.game-guidance{left:20%;right:20%;top:16px}}
@media(max-width:1000px),(max-height:650px){.wrap{grid-template-rows:44px minmax(0,1fr) 36px;padding:5px 10px;gap:4px}.top{gap:14px}.brand{font-size:16px}.brand img{width:34px;height:34px}.tool{font-size:12px;padding:6px 9px;min-height:40px}.tool svg{width:21px;height:21px}.stage{width:min(100%,calc((100svh - 98px)*16/9))}.bottom{font-size:10px;grid-template-rows:auto auto}.chapter-progress{font-size:10px}#status{font-size:10px}.card{padding:18px 22px}.card h2{margin-bottom:14px}.card p{margin-bottom:14px}.presents{margin-top:17px}.pick{margin-top:9px}.source-note{bottom:9px}.subtitle{top:8px;padding:6px 11px 8px;width:calc(100% - 32px)}.speaker-row{margin-bottom:3px}.skip{height:28px;min-height:28px}.game-guidance{top:12px;left:24%;right:23%}.game-guidance p{font-size:12px;padding:5px 8px}.tbtn{width:50px;height:50px;padding:10px;border-radius:14px}.tbtn.jump{width:56px;height:56px}.dpad{left:12px;bottom:12px;gap:10px}.tbtn.act{bottom:12px;right:80px}.tbtn.jump{bottom:12px;right:12px}.touch.action-only .act{right:12px}}
@media(max-width:720px){.brand span:not(.back){display:none}.tools{gap:5px}.tool span{display:none}.tool{width:40px;padding:8px}.top{gap:11px}.stage{border-radius:11px}.card{width:46%;padding:15px 18px}.card h2{font-size:clamp(25px,5.1cqw,40px)}.card .primary{font-size:16px;padding:12px 14px}.card .invitation{font-size:14px}.presents{font-size:10px;gap:5px}.presents img{width:22px;height:22px}.source-note{font-size:9px}.chapters{gap:4px}.chapter-button{font-size:12px;padding:8px;min-height:40px}#controlsHelp{display:none}.bottom{grid-template-columns:1fr}.game-guidance{left:26%;right:23%}.subtitle p{font-size:14px}}
@media(orientation:portrait) and (pointer:coarse) and (max-width:600px){
 .rotate{display:flex;position:fixed;inset:0;z-index:20;background:var(--paper);align-items:center;justify-content:center;flex-direction:column;gap:18px;padding:30px;text-align:center}
 .rotate p{font:500 29px/1.15 Fredoka,sans-serif;margin:0}
 .rot-icon{width:116px;height:116px;fill:none;stroke:var(--teal);stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
 body.turned .rotate{display:none}
 body.turned .wrap{position:fixed;left:50%;top:50%;width:100svh;height:100vw;max-width:none;margin:0;transform:translate(-50%,-50%) rotate(90deg);grid-template-rows:44px minmax(0,1fr) 32px;padding:4px 10px;gap:4px}
 body.turned .stage{width:min(100%,calc((100vw - 92px)*16/9));max-height:100%}
 body.turned h1{font-size:22px}
 body.turned .brand{font-size:15px}
 body.turned .brand span:not(.back){display:inline}
 body.turned .tool span{display:inline}
 body.turned .tool{width:auto;font-size:12px}
 body.turned #controlsHelp{display:none}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.card .small:empty{display:none}
.speaker-row{padding-right:44px}
.skip{position:absolute;right:6px;top:0;width:44px;height:44px;min-height:44px}
@media(pointer:coarse){.tool{min-width:44px;min-height:44px}.pick summary{min-height:44px}.chapter-button{min-height:44px}}
/* A small picture (a phone's page view, under 560 px wide): the title and end cards fit without scrolling, their
   button stays whole and on one line, the edition note moves right, clear of the card. With the chapter picker shown
   there is no room for the "Bir Ata7 Games masalı" line too; the Ata7 Games logo stays in the header. */
@container (max-width:560px){
 .title-card,.end-card{width:54%;padding:13px 16px}
 .title-card h2,.end-card h2{font-size:22px;margin-bottom:9px}
 .title-card .invitation,.end-card p{font-size:13px;margin-bottom:10px}
 .title-card .primary,.end-card .primary{font-size:15px;padding:10px 12px;min-height:42px;white-space:nowrap}
 .title-card .presents,.end-card .presents{margin-top:8px}
 .title-card:has(.pick:not(.hidden)) .presents,.end-card:has(.pick:not(.hidden)) .presents{display:none}
 .title-card .pick,.end-card .pick{margin-top:4px}
 .title-overlay .source-note{left:auto;right:2%;bottom:22px;max-width:40%}
 .lang-switch button{min-width:44px;min-height:40px;font-size:15px;padding:0 10px}
}

/* Waiting on Play (main.js showLoading; the parent, 13 Nov 2026: children can't read the waiting text and kept
   tapping): the button fills like a bar as the sounds arrive (--p, 0..1), a light runs across it, its ▶ becomes a
   turning ring; a tap meanwhile makes it bounce. It stays bright: a grey, "off" button looks broken to a child. */
#start .spin{display:none}
#start.loading{position:relative;overflow:hidden;cursor:progress;opacity:1}
#start.loading>span,#start.loading>.spin{position:relative;z-index:1}
#start.loading::before{content:"";position:absolute;inset:0 auto 0 0;width:calc(var(--p,0)*100%);background:rgba(255,255,255,.34);transition:width .3s ease-out}
#start.loading::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 38%,rgba(255,255,255,.5) 50%,transparent 62%) no-repeat;background-size:250% 100%;animation:startSweep 1.5s linear infinite}
#start.loading svg{display:none}
#start.loading .spin{display:block;flex:none;width:18px;height:18px;border:3px solid currentColor;border-right-color:transparent;border-radius:50%;animation:startSpin .8s linear infinite}
#start.loading.nudge{animation:startNudge .35s ease-out}
@keyframes startSweep{from{background-position:130% 0}to{background-position:-30% 0}}
@keyframes startSpin{to{transform:rotate(1turn)}}
@keyframes startNudge{30%{transform:scale(.94)}65%{transform:scale(1.04)}100%{transform:none}}
@media(prefers-reduced-motion:reduce){#start.loading::after{animation:none}#start.loading .spin{animation-duration:2.4s}}

/* Topach parent settings (the kit sets these classes from localStorage "ata7Prefs"; nothing set = none of them) */
html.ata7-subs-off #subtitle{visibility:hidden}
html.ata7-subs-off #subtitle #skipSpeech{visibility:visible}
html.ata7-subs-big #subtitleText,html.ata7-subs-big #speaker{zoom:1.35}
html.ata7-font-easy #subtitleText,html.ata7-font-easy #speaker,html.ata7-font-easy #hintText,html.ata7-font-easy #actionLabel,html.ata7-font-easy .title-card h2,html.ata7-font-easy .title-card .invitation,html.ata7-font-easy .end-card h2,html.ata7-font-easy .end-card p{font-family:"Ata7 Easy",Nunito,sans-serif}
/* left-handed: the whole touch layer mirrored (move buttons right, action/jump left); the d-pad and the buttons' own
   pictures and words are turned back so arrows still point their way and text reads forwards */
html.ata7-left #touch{transform:scaleX(-1)}
html.ata7-left #touch .dpad,html.ata7-left #touch .act>*,html.ata7-left #touch .jump>*{transform:scaleX(-1)}
