@font-face{font-family:Temple;src:url('./assets/fonts/RuslanDisplay-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
:root{color-scheme:dark;--paper:#f3e5b6;--muted:#cad0af;--gold:#dac376;--blue:#79c8f2;--orange:#ffc17a;--wall:url('./assets/art-v2/temple-wall-v3.png');--focus:#ffe38b}
.language-choice{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 10px;color:var(--muted);font-size:14px}
.language-choice select{font:inherit;color:var(--paper);background:#17251b;border:1px solid #858153;border-radius:6px;min-height:44px;max-width:100%;padding:8px 12px}
.language-choice select:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
html:not([lang="ru"]) .menu-actions h2{overflow-wrap:break-word}
#story{width:800px;max-width:calc(100vw - max(24px,env(safe-area-inset-left)) - max(24px,env(safe-area-inset-right)));padding:20px;max-height:calc(100dvh - max(20px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom)));text-align:left}
#story .story-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}#story h2{font-size:clamp(24px,4vw,36px);margin:0}#story-step{white-space:nowrap;color:var(--gold);font-size:13px}
#story-art{aspect-ratio:720/280;margin-top:12px;border-block:1px solid #8d814f}#story .story-parts{font-size:12px;text-align:center;color:var(--gold);margin:10px 0}#story-speaker{font-weight:800;color:var(--gold)}#story-text{font-size:17px;color:var(--paper);max-width:66ch;min-height:3em}.story-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.story-actions button{min-height:44px}.story-actions .primary{margin-right:auto;min-width:120px}#journal{width:640px}#story-list{display:grid;gap:10px;margin:18px 0}#story-list button{text-align:left}
@media(max-width:600px){#story{padding:12px;border-width:8px}#story-text{font-size:15px}#story .story-parts{font-size:11px}.story-actions{display:grid;grid-template-columns:1fr 1fr}.story-actions .primary{margin:0;min-width:0}.story-actions button{padding:8px;font-size:12px}}
@media(max-height:500px) and (orientation:landscape){#story{width:900px;padding:12px;border-width:8px}#story[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:8px 18px}#story .story-heading{grid-column:1/-1}#story h2{font-size:24px}#story-art{grid-column:1;grid-row:2;align-self:center;margin:0}#story .story-parts{grid-column:1;grid-row:3;margin:0;font-size:10px}#story .story-copy{grid-column:2;grid-row:2/4;align-self:center}#story .story-copy p{margin:5px 0}#story-text{font-size:14px;min-height:0}#story .story-actions{grid-column:1/-1;display:flex;margin:0}#story .story-actions button{font-size:12px;padding:8px 12px}}
*{box-sizing:border-box;scrollbar-color:#858153 #17251b;scrollbar-width:thin}::selection{background:#c4a457;color:#15241a}
html,body{width:100%;height:100%;overscroll-behavior:none;overflow:hidden;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
img,canvas,a,button{-webkit-user-drag:none;-webkit-touch-callout:none;user-select:none}
dialog{overscroll-behavior:contain;touch-action:pan-y}
input,textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text}
@media(min-height:501px){#game-shell[data-layout="desktop"] .arena{max-width:calc((100dvh - 220px)*1.774)}}
body{margin:0;background:linear-gradient(#07140ee8,#07140ee8),var(--wall) center/cover fixed;color:var(--paper);font:16px/1.5 system-ui,sans-serif}
button,a{-webkit-tap-highlight-color:transparent}button{font:700 14px/1.3 system-ui;min-height:48px;border:2px solid #8e8955;border-radius:7px;background:linear-gradient(#4b533399,#192819aa),var(--wall) 30% 50%/640px auto;color:#fff1c5;padding:11px 17px;box-shadow:inset 0 2px 2px #e8da9a55,0 4px 7px #040b07a0;text-shadow:0 2px 2px #000;cursor:pointer;transition:filter .12s,transform .12s}button:hover:not(:disabled){filter:brightness(1.22)}button:active:not(:disabled){transform:translateY(2px)}button:disabled{opacity:.55;cursor:wait;box-shadow:none}
button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--focus);outline-offset:4px}.primary{background:linear-gradient(#baa658aa,#716027bb),var(--wall) 50% 20%/500px auto;border-color:#d7c171;color:#fff6d1;font-weight:800}
main{max-width:1240px;margin:auto;padding:12px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))}header{display:flex;align-items:center;gap:24px;padding:0 8px 12px}.logo{font:32px/1 Temple,Georgia,serif;color:var(--gold);text-decoration:none;text-shadow:0 3px 3px #000;white-space:nowrap}.logo span{font-size:42px}.chapter{display:flex;flex-direction:column;flex:1}.chapter small{font-size:12px;color:var(--muted)}.chapter strong{font-size:16px}.tools{display:flex;gap:8px}
.arena{position:relative;border:3px solid #777047;border-radius:5px;overflow:hidden;background:#18251d;box-shadow:0 10px 20px #020704b0;max-width:calc((100dvh - 190px)*1.774);margin:auto}canvas{display:block;width:100%;height:auto;aspect-ratio:1100/620;touch-action:none}.ready{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#1b281bef;padding:6px 16px;border:1px solid #888454;border-radius:4px;font-size:13px;pointer-events:none;white-space:nowrap}.ready:empty{display:none}
footer{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;padding:12px 4px}footer p{text-align:center;font-size:13px;max-width:340px}footer b{font-size:24px;margin-right:5px}kbd{display:inline-flex;border:1px solid #777651;border-bottom-width:3px;border-radius:4px;background:#1b281d;padding:2px 6px;margin:2px;color:#f0e9cc;font:inherit;min-width:23px;justify-content:center}.blue{color:var(--blue)}.orange{color:var(--orange)}.build-note{font-size:11px;color:#b9c3a3;text-align:center;margin:4px}
.touch{display:none;justify-content:space-between;gap:8px}.touch-group{display:flex;align-items:center;gap:5px}.touch-group b{font:28px Temple,serif}
dialog{color:var(--paper);background:linear-gradient(#0a160f55,#0a160f99),var(--wall) center/cover;border:10px ridge #797044;border-radius:14px;box-shadow:0 18px 50px #020704dd,inset 0 0 45px #0008;padding:30px;max-width:min(94vw,560px);max-height:94dvh;text-align:center;overflow:auto}dialog::backdrop{background:#030c08df}dialog h1,dialog h2{font-family:Temple,Georgia,serif;font-weight:400;color:#e6ce87;text-shadow:0 3px 2px #030804,0 -1px 0 #f7e5a2;line-height:1.1}dialog h2{font-size:40px;margin:0 0 14px;text-wrap:balance}dialog p{color:var(--muted);margin:12px 0}.small{font-size:12px}.result-label{font-size:12px;color:#f0d886;letter-spacing:.04em}
#menu{width:910px;max-width:94vw;padding:28px 34px}.menu-layout{display:grid;grid-template-columns:1.15fr 1fr;gap:30px;align-items:center}.menu-art{min-width:0}.menu-art h1{font-size:60px;line-height:.95;margin:8px 0 0}.menu-art h1 span{display:block;font-size:112px;line-height:1.1;color:#e5cf8e}.menu-art .tagline{color:#eee0b0;font-size:15px;margin:0}#menu-heroes{aspect-ratio:600/240;width:100%;height:auto;margin:-2px 0 4px}.menu-actions{padding:20px 8px}.menu-actions h2{font-size:30px}.menu-actions>p{font-size:14px}.menu-actions>button{display:block;width:100%;margin:12px 0;min-height:54px;font-size:16px}.menu-actions .small{font-size:12px}.demo-note{font-size:11px!important;color:#b8c2a0!important;padding-top:12px;border-top:1px solid #6b7251}.instructions{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 16px;margin:22px 0 10px}.instructions b{font:26px Temple,serif;vertical-align:middle;margin-right:3px}
#paused{width:420px}#paused button{display:block;width:100%;margin:12px 0}#paused p{margin:0 0 24px}.win{width:680px;max-width:94vw}.win h2{font-size:46px;margin-bottom:10px}.win h2 span{color:#ffe08c}.win p{margin:8px 0}#dance{width:100%;height:auto;aspect-ratio:600/240;object-fit:contain}.win-buttons{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.win .small{margin:18px 0 0}
@media(pointer:coarse),(max-width:900px){.touch{display:flex}footer>div{display:none}footer{justify-content:center;padding:4px}footer p{margin:6px 0}.chapter strong{font-size:14px}.tools button{padding:8px 10px}header{gap:12px}.logo{font-size:24px}.logo span{font-size:32px}}
@media(max-width:600px){main{padding:8px}header{gap:8px;flex-wrap:wrap}.chapter{min-width:155px}.tools{margin-left:auto}.chapter strong{font-size:13px}.touch{flex-wrap:wrap;justify-content:center;gap:8px 20px}dialog{padding:20px 14px;border-width:7px}#menu{padding:16px}.menu-layout{display:block}.menu-art h1{font-size:36px;margin:0}.menu-art h1 span{display:inline;font-size:56px;margin-left:8px}#menu-heroes{max-width:290px;margin:0 auto;height:110px;object-fit:contain}.tagline{font-size:12px!important}.menu-actions{padding:14px 0 0}.menu-actions h2{display:none}.menu-actions>p{font-size:13px;margin:8px 0}.menu-actions>button{min-height:48px;margin:10px 0;font-size:14px}.instructions{margin:12px 0 6px}.demo-note{padding-top:8px}.win h2{font-size:32px}.win-buttons{gap:6px}.win button{padding:10px;font-size:12px}.ready{font-size:11px}}
@media(max-height:500px) and (orientation:landscape){main{max-width:1000px;padding-top:4px}header{padding-bottom:4px}.logo{font-size:21px}.logo span{font-size:26px}.chapter small,.build-note,footer{display:none}.arena{width:min(100%,calc((100dvh - 120px)*1.774));max-width:calc((100dvh - 120px)*1.774)}.touch{margin-top:5px}dialog{padding:14px;max-height:96dvh;border-width:6px}#menu{padding:12px 20px}.menu-layout{display:grid;grid-template-columns:1fr 1fr;gap:20px}.menu-art h1{font-size:34px;margin:0}.menu-art h1 span{display:inline;font-size:62px}.menu-art .tagline{font-size:12px}#menu-heroes{height:116px;object-fit:contain}.menu-actions{padding:0}.menu-actions h2{font-size:24px;margin-bottom:8px}.menu-actions>p{font-size:12px;margin:6px 0}.menu-actions>button{min-height:44px;margin:7px 0;font-size:13px}.instructions{margin:8px 0 4px}.menu-actions .small,.demo-note{display:none}.win h2{font-size:30px}.win p{font-size:11px;margin:3px}.win .small{margin:8px 0 0}#dance{max-height:142px}.win-buttons{gap:6px}.win button{min-height:44px;padding:8px 12px}}
.screen-choice{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-bottom:12px}.screen-choice button{min-height:48px;margin:0}.screen-choice p{flex:1 1 200px;margin:0;font-size:13px;line-height:1.4}.screen-choice #fullscreen-status:empty{display:none}.fullscreen-tip{display:none}.fullscreen-tip[hidden]{display:none!important}
@media(any-pointer:coarse),(max-width:900px){.fullscreen-tip{display:block}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

/* Separate thumb panels share the same fixed game view. */
.touch-note{display:none;color:var(--muted);font-size:13px;text-align:center;margin:8px auto;max-width:64ch}
.touch{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px;padding-bottom:env(safe-area-inset-bottom)}
.touch-group{display:grid;grid-template-columns:110px;gap:6px;justify-content:start}
.touch-group:last-child{justify-content:end}
.joystick{position:relative;width:96px;height:96px;touch-action:none;user-select:none;border:2px solid currentColor;border-radius:50%;background:#15281ee8;box-shadow:inset 0 0 14px #0009;color:inherit;cursor:move}
.stick-track{position:absolute;inset:0;font:11px/1 system-ui;opacity:.7;pointer-events:none}
.stick-track>span{position:absolute}
.stick-left{left:5px;top:calc(50% - 5.5px)}.stick-right{right:5px;top:calc(50% - 5.5px)}
.stick-up{top:5px;left:calc(50% - 5.5px)}.stick-down{bottom:5px;left:calc(50% - 5.5px)}
.stick-help{display:block;margin:0;font:11px/18px system-ui;text-align:center;white-space:nowrap;color:inherit}
.joystick{justify-self:center}
.touch-group .stick-thumb{position:absolute;left:30%;top:30%;width:40%;height:40%;display:grid;place-items:center;border:2px solid currentColor;border-radius:50%;background:#283f30;line-height:1;font-size:26px;transform:translate(var(--stick-x,0px),var(--stick-y,0px));pointer-events:none}
.joystick.held .stick-thumb{background:#3b5540;box-shadow:0 0 12px #d6dfad30}
@media(any-pointer:coarse),(max-width:900px){.touch{display:grid}.touch-note{display:block}}
@media(max-width:600px){
  main{padding-inline:max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-right))}
  .touch{column-gap:20px;justify-content:stretch}
  .touch-group,.touch-group:last-child{grid-template-columns:110px;justify-content:center;gap:6px}
  .touch-group b{grid-column:1/-1;text-align:center;line-height:1.2}
  .joystick{grid-column:1/-1;justify-self:center}
}
@media(min-width:601px) and (max-height:500px) and (orientation:landscape){
  .touch{column-gap:12px}.touch-note{display:none}
}

/* Temple surfaces use the same painted masonry as the playable rooms. */
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
[hidden]{display:none!important}
#wardrobe{width:850px;max-width:95vw;text-align:left}#wardrobe-count{color:var(--paper)}#skin-list,#hat-list{display:flex;flex-direction:column}.skin-row{display:grid;grid-template-columns:180px minmax(0,1fr) auto;align-items:center;gap:20px;padding:14px 0;border-top:1px solid #777047}.skin-row canvas{width:180px;aspect-ratio:240/150}.skin-row h3{font:26px Temple,Georgia,serif;color:var(--gold);margin:0}.skin-row p{font-size:14px;margin:5px 0}.skin-row button{min-width:115px}.skin-row button[aria-pressed="true"]{border-color:#f2d689;background:#34412a}#collection-status{color:var(--muted);max-width:32ch;margin-inline:auto}#crystal-hud{color:var(--paper);font-variant-numeric:tabular-nums}
@media(max-width:600px){#wardrobe{padding:14px 10px}.skin-row{grid-template-columns:90px minmax(0,1fr);gap:8px 10px}.skin-row>div{min-width:0}.skin-row canvas{width:90px;grid-row:span 2}.skin-row h3{font-size:20px;line-height:1.15;overflow-wrap:anywhere}.skin-row p{font-size:12px}.skin-row button{grid-column:2;width:100%;min-width:0}.menu-actions #collection-status{font-size:11px;display:block}}
#hints{width:640px;max-width:94vw;text-align:left}#hints h2{text-align:center}#hints>p,#hints details{font-size:14px}#hints button{margin:7px 5px 0 0}#hints details{padding:12px 0;border-block:1px solid #777047}#hints summary{cursor:pointer;color:var(--paper);min-height:44px;display:flex;align-items:center}#hints summary:focus-visible{outline:3px solid var(--focus)}#hints .hint-content{white-space:pre-line;color:var(--paper);font-size:16px;line-height:1.6;margin:20px 0}#local-ad{padding:12px;background:#101e16;border:1px solid #c0a969}#ad-status{min-height:24px;color:#f4d58c}
header{background:linear-gradient(#101a10bb,#111c12cc),var(--wall) center top/cover;border-bottom:12px solid transparent;border-image:var(--wall) 32 70 32 70 stretch;padding:10px 15px 14px;margin-bottom:10px}
dialog{border:18px solid transparent;border-image:var(--wall) 62 72 62 72 stretch;border-radius:0;background:linear-gradient(#08130d44,#08130d88),var(--wall) center/cover}
#menu{width:990px;padding:26px 34px;background:linear-gradient(90deg,#0c180d11,#0b180dd9),url('./assets/art-v2/temple-wall-v2.png') center/cover}
.menu-layout{grid-template-columns:1.2fr 1fr;gap:44px}.menu-art h1{font-size:52px;margin:0}.temple-emblem{height:215px;margin:0 auto;background:var(--wall) center 43%/245% auto;max-width:320px;mask-image:radial-gradient(ellipse at center,#000 47%,transparent 73%)}
#menu-heroes{margin:-32px 0 0}.menu-art .tagline{font-size:14px;color:#e5d7aa}.menu-actions{padding:12px 0}.menu-actions h2{font-size:34px}.menu-actions>button{font-family:Temple,Georgia,serif;font-weight:400;font-size:20px;min-height:56px;border:7px solid transparent;border-image:var(--wall) 32 70 32 70 stretch;padding:8px 14px}
.menu-actions>.primary{border-image:var(--wall) 32 70 32 70 stretch;background:linear-gradient(#827a38c9,#454b23d9),var(--wall) center/cover}
button:disabled{cursor:not-allowed}.rooms-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.rooms-heading h2{margin:0}.rooms-heading button{flex-shrink:0}
#rooms{width:980px;max-width:95vw;text-align:left}#rooms-progress{font-size:14px}#level-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}#level-grid h3{grid-column:1/-1;font:26px Temple,Georgia,serif;color:var(--gold);margin:24px 0 4px}.level{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:7px;min-height:132px;padding:10px 6px}.level strong{font:32px Temple,Georgia,serif}.level span{font-size:12px;line-height:1.25}.level small{font-size:10px;color:#e0d9b6;margin-top:auto}.level.available{border-color:#f0d78b}.level.done{background:linear-gradient(#345339c7,#152919df),var(--wall) center/cover}.level:disabled{opacity:.65}.level:disabled strong{color:#b8b894}
@media(max-width:600px){
  .tools{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:4px}.tools button{font-size:12px;padding:8px}.touch-group{gap:4px}
  header{padding:6px;border-bottom-width:8px;margin-bottom:6px}dialog{border-width:12px}#menu{padding:12px 18px}.menu-layout{display:block}.menu-art h1{font-size:32px}.temple-emblem{height:112px;width:190px;background-size:220%;background-position:center 44%}#menu-heroes{height:86px;margin:-22px auto -4px}.menu-art .tagline{display:none}.menu-actions{padding:6px 0 0}.menu-actions h2{display:none}.menu-actions>p{font-size:12px}.menu-actions>button{font-size:18px;min-height:48px;border-width:5px;margin:8px 0;padding:6px}.instructions{margin:9px 0 0}.demo-note{padding-top:6px}.menu-actions .small{display:none}.rooms-heading h2{font-size:25px}.rooms-heading{gap:8px}#rooms{padding:14px 10px}#level-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}#level-grid h3{font-size:22px}.level{min-height:128px}.ready{max-width:94%;white-space:normal;text-align:center}
}
@media(max-height:500px) and (orientation:landscape){
  header{padding:3px 8px;border-bottom-width:6px;margin-bottom:4px}.arena{max-width:calc((100dvh - 140px)*1.774)}#menu{padding:12px 20px}.menu-layout{display:grid;grid-template-columns:1fr 1fr;gap:24px}.menu-art h1{font-size:30px}.temple-emblem{height:130px;width:220px}#menu-heroes{height:100px;margin:-20px 0 0}.menu-art .tagline{display:none}.menu-actions h2{font-size:24px}.menu-actions>button{font-size:16px;min-height:44px;margin:6px 0;padding:4px 10px;border-width:5px}.menu-actions>p{font-size:11px}.instructions{margin:7px 0}.rooms-heading h2{font-size:28px}
}


.wardrobe-section>h3{font:30px Temple,Georgia,serif;color:var(--gold);margin:26px 0 10px}.wardrobe-section{min-width:0}

/* Mobile uses the actual visible viewport, including changing browser chrome. */
body.mobile-play{overflow:hidden}
.tools .tool-short{display:none}
#game-shell{--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
#game-shell[data-layout]:not([data-layout="desktop"]){position:fixed;left:var(--viewport-left);top:var(--viewport-top);width:var(--viewport-width);height:var(--viewport-height);max-width:none;margin:0;padding:var(--inset-top) var(--inset-right) var(--inset-bottom) var(--inset-left);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:48px minmax(0,1fr) 120px;gap:8px;overflow:hidden}
#game-shell[data-layout]:not([data-layout="desktop"]) header{grid-row:1;display:flex;align-items:flex-start;flex-wrap:nowrap;gap:8px;min-width:0;margin:0;padding:0;border:0;background:none}
#game-shell[data-layout]:not([data-layout="desktop"]) .logo,#game-shell[data-layout]:not([data-layout="desktop"]) .chapter small{display:none}
#game-shell[data-layout]:not([data-layout="desktop"]) .chapter{min-width:0;flex:1}
#game-shell[data-layout]:not([data-layout="desktop"]) .chapter strong{font-size:12px;line-height:14px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#game-shell[data-layout]:not([data-layout="desktop"]) .tools{display:flex;width:auto;gap:4px;margin:0;flex-shrink:0}
#game-shell[data-layout]:not([data-layout="desktop"]) .tools button{width:44px;height:44px;min-height:44px;padding:0;font-size:0}
#game-shell[data-layout]:not([data-layout="desktop"]) .tools .tool-label{display:none}
#game-shell[data-layout]:not([data-layout="desktop"]) .tools .tool-short{display:inline;font:12px system-ui}
#game-shell[data-layout]:not([data-layout="desktop"]) #sound[aria-pressed="true"] .tool-short{text-decoration:line-through}
#game-shell[data-layout]:not([data-layout="desktop"]) .arena{grid-row:2;align-self:center;justify-self:center;width:var(--field-width);height:var(--field-height);max-width:none;margin:0;border:0;border-radius:0;box-shadow:0 0 0 1px #777047}
#game-shell[data-layout]:not([data-layout="desktop"]) #game{width:100%;height:100%;aspect-ratio:1100/620;object-fit:contain}
#game-shell[data-layout]:not([data-layout="desktop"]) footer{display:contents}
#game-shell[data-layout]:not([data-layout="desktop"]) footer>div{display:none}
#game-shell[data-layout]:not([data-layout="desktop"]) #crystal-hud{position:absolute;left:var(--inset-left);top:calc(var(--inset-top) + 30px);margin:0;font-size:11px;line-height:14px;text-align:left}
#game-shell[data-layout]:not([data-layout="desktop"]) .build-note{display:none}
#game-shell[data-layout]:not([data-layout="desktop"]) .touch{grid-row:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:8px;margin:0;padding:0}
#game-shell[data-layout]:not([data-layout="desktop"]) .touch-group{display:grid;grid-template-columns:110px;justify-content:start;align-items:center;gap:6px}
#game-shell[data-layout]:not([data-layout="desktop"]) .touch-group:last-child{justify-content:end}
#game-shell[data-layout]:not([data-layout="desktop"]) .touch-group b{grid-column:auto;font-size:24px;line-height:24px;text-align:center}
#game-shell[data-layout]:not([data-layout="desktop"]) .touch-note{display:none}
#game-shell[data-layout="portrait"][data-layout]{grid-template-rows:48px var(--field-height) 120px 42px;align-content:start}
#game-shell[data-layout="portrait"][data-layout] .touch-group,#game-shell[data-layout="portrait"][data-layout] .touch-group:last-child{grid-template-columns:110px;justify-content:center;gap:6px}
#game-shell[data-layout="portrait"][data-layout] .joystick,#game-shell[data-layout="landscape"][data-layout] .joystick{grid-column:1/-1;justify-self:center}
#game-shell[data-layout="portrait"][data-layout] .touch-group b{grid-column:1/-1}
#game-shell[data-layout="portrait"][data-layout] .touch-note{grid-row:4;display:block;align-self:center;font-size:13px;line-height:18px;margin:0;text-align:center}
#game-shell[data-layout="landscape"][data-layout]{display:block}
#game-shell[data-layout="landscape"][data-layout] header,#game-shell[data-layout="landscape"][data-layout] .tools,#game-shell[data-layout="landscape"][data-layout] .touch{display:contents}
#game-shell[data-layout="landscape"][data-layout] .chapter{position:absolute;left:var(--inset-left);top:var(--inset-top);width:110px;height:42px}
#game-shell[data-layout="landscape"][data-layout] .tools button{position:absolute;width:110px;height:44px;min-height:44px;font-size:12px;padding:4px}
#game-shell[data-layout="landscape"][data-layout] #help{left:var(--inset-left);top:calc(var(--inset-top) + 48px)}
#game-shell[data-layout="landscape"][data-layout] #sound{left:var(--inset-left);top:calc(var(--inset-top) + 98px)}
#game-shell[data-layout="landscape"][data-layout] #pause{right:var(--inset-right);top:var(--inset-top)}
#game-shell[data-layout="landscape"][data-layout] #fullscreen{right:var(--inset-right);top:calc(var(--inset-top) + 50px)}
#game-shell[data-layout="landscape"][data-layout] #crystal-hud{left:auto;right:var(--inset-right);top:calc(var(--inset-top) + 104px);width:110px;text-align:center}
#game-shell[data-layout="landscape"][data-layout] .arena{position:absolute;left:calc(var(--inset-left) + 118px + (var(--viewport-width) - var(--inset-left) - var(--inset-right) - 236px - var(--field-width))/2);top:calc(var(--inset-top) + (var(--viewport-height) - var(--inset-top) - var(--inset-bottom) - var(--field-height))/2)}
#game-shell[data-layout="landscape"][data-layout] .touch-group,#game-shell[data-layout="landscape"][data-layout] .touch-group:last-child{position:absolute;bottom:var(--inset-bottom);width:110px;grid-template-columns:110px;justify-content:center;gap:6px}
#game-shell[data-layout="landscape"][data-layout] .touch-group:first-child{left:var(--inset-left)}
#game-shell[data-layout="landscape"][data-layout] .touch-group:last-child{right:var(--inset-right)}
#game-shell[data-layout="landscape"][data-layout] .touch-group b{grid-column:1/-1;font-size:22px;line-height:22px}
#game-shell[data-layout="landscape"][data-compact="true"] #help,#game-shell[data-layout="landscape"][data-compact="true"] #sound{width:52px;top:calc(var(--inset-top) + 48px)}
#game-shell[data-layout="landscape"][data-compact="true"] #sound{left:calc(var(--inset-left) + 58px)}

.menu-sticks{display:none;margin:12px 0 4px;font:13px/1.5 system-ui;text-align:center}
body.mobile-play #menu .menu-keyboard{display:none}
body.mobile-play #menu .menu-sticks{display:block}
.menu-stick-title{display:flex;align-items:center;justify-content:center;gap:12px}
.menu-stick-title b{font:26px Temple,serif}
.menu-stick-directions{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 16px}
.menu-stick-directions span{white-space:nowrap}
@media(max-height:360px) and (orientation:landscape){
  #paused{padding:10px 14px;border-width:6px;max-height:calc(100dvh - 12px)}
  #paused h2{font-size:26px;line-height:30px;margin:0 0 4px}
  #paused p{display:none}
  #paused button{height:44px;min-height:44px;margin:8px 0 0;padding:6px 12px;font-size:13px}
}
