/* © 2026 Oktalforge LLC. All rights reserved. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #9a9fa5; font-family: Georgia, 'Times New Roman', serif; color: #f3f4f6; user-select: none; }
[hidden] { display: none !important; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
h1 { font-size: clamp(32px, 7vw, 80px); letter-spacing: .08em; font-weight: normal; margin: 0 0 .3em; text-shadow: 0 2px 20px #000a; }
h2 { font-weight: normal; letter-spacing: .1em; }
.dim { opacity: .75; font-size: 14px; }
#introTitle { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; animation: fadein 3s 3.5s both; }
#introTitle p { opacity: .6; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #0a0b0d66; padding: 20px; }
.modal { background: #0a0b0dcc; }
.card { background: #14161a; border: 1px solid #556; padding: 24px 32px; max-width: 560px; border-radius: 6px; }
button { font: inherit; font-size: 18px; margin: 8px; padding: 10px 28px; background: #0c0d10; color: #f3f4f6; border: 1px solid #cfd3da; border-radius: 3px; cursor: pointer; letter-spacing: .1em; }
button:hover { background: #cfd3da; color: #0c0d10; }
table { margin: 0 auto 12px; text-align: left; border-collapse: collapse; }
td { padding: 4px 12px; border-bottom: 1px solid #333; }
td:first-child { font-weight: bold; white-space: nowrap; }
#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 1px 6px #000c; }
#top { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 20px; }
#score { font-size: 44px; line-height: 1; }
#wp { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); }
#spd { text-align: right; } #barbox { width: 180px; height: 8px; background: #0006; margin: 4px 0; }
#bar { height: 100%; width: 0; background: #f3f4f6; } #bar.boost { background: #ffc48a; }
#power { text-align: center; font-size: 18px; color: #fff; min-height: 24px; }
#banner { position: fixed; top: 22%; width: 100%; text-align: center; font-size: clamp(24px, 4vw, 48px); letter-spacing: .15em; text-shadow: 0 2px 16px #000; animation: pulse 1s infinite; }
#tutor { position: fixed; bottom: 9%; left: 50%; transform: translateX(-50%); max-width: 80%; padding: 8px 18px; text-align: center; font-size: clamp(15px, 1.7vw, 21px); letter-spacing: .04em; background: #0a0b0d88; border-radius: 4px; text-shadow: 0 1px 6px #000; pointer-events: none; animation: fadein .4s ease-out; }
#popup { position: fixed; top: 38%; width: 100%; text-align: center; font-size: 36px; animation: rise 1.1s ease-out forwards; pointer-events: none; }
#flash { position: fixed; inset: 0; background: radial-gradient(#0000 30%, #8a0a1ccc); opacity: 0; pointer-events: none; }
#paused { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 56px; letter-spacing: .3em; background: #0a0b0d55; }
#paused p { font-size: 16px; letter-spacing: normal; opacity: .7; }
#flyTitle { position: fixed; top: 14%; width: 100%; text-align: center; font-size: clamp(24px, 4vw, 48px); letter-spacing: .2em; text-shadow: 0 2px 16px #000; pointer-events: none; opacity: 0; }
@keyframes ftitle { 0% { opacity: 0; } 25%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 50% { opacity: .6; } }
@keyframes rise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-50px); } }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
#perf { position: fixed; left: 8px; bottom: 6px; font: 12px/1.2 ui-monospace, Menlo, monospace; color: #fff; text-shadow: 0 1px 4px #000; opacity: .85; pointer-events: none; }
#slots { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 16px; font-size: clamp(18px, 2.2vw, 26px); letter-spacing: .1em; white-space: nowrap; }
.slot { color: #cfd3da; opacity: .5; transition: color .4s, opacity .4s, text-shadow .4s; }
.slot.pend { text-align: left; }
.slot.fill { color: transparent; }
.slot.got { color: #f1dfa2; opacity: 1; text-shadow: 0 0 12px #ffe9a8aa, 0 1px 6px #000c; }
#flyers { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.flyer { position: fixed; left: 0; top: 0; will-change: transform; }
.flyer span { position: absolute; left: 0; top: 0; white-space: nowrap; color: #f1dfa2; text-shadow: 0 0 12px #ffe9a8aa, 0 1px 6px #000c; transform: translate(-50%, -50%); }
.flyer .fg { transform-origin: 50% 100%; font-weight: bold; color: #ffe9a8; text-shadow: 0 0 2px #1a1408, 0 0 3px #1a1408, 0 0 10px #fff3c4, 0 0 22px #ffd66e, 0 0 22px #ffd66e; }
#gloss { position: absolute; top: 118px; left: 50%; transform: translateX(-50%); font-size: clamp(16px, 1.8vw, 22px); font-style: italic; color: #f1dfa2; letter-spacing: .06em; white-space: nowrap; opacity: 0; }
@keyframes gloss { 0% { opacity: 0; } 12%, 75% { opacity: 1; } 100% { opacity: 0; } }
.rv { animation: rvin 1.1s var(--d, 0s) ease-out both; }
@keyframes rvin { from { opacity: 0; } }
#inter.skip .rv { animation: none; }
#inter { background: #0a0b0d99; }
#interBody { max-width: 760px; }
#interBody .mr { font-size: clamp(22px, 3.3vw, 40px); letter-spacing: .12em; color: #f1dfa2; text-shadow: 0 0 18px #ffe9a888; margin: .2em 0 .1em; }
#interBody .mn { font-size: clamp(20px, 2.6vw, 30px); font-style: italic; letter-spacing: .06em; }
#interBody .me { opacity: .8; margin-bottom: 1.2em; }
#interBody .ma { font-style: italic; opacity: .9; margin: .5em 0; }
#interBody .mo { color: #f1dfa2; margin: .5em 0 1.2em; }
#interBody .sc { margin-top: 1em; }
#endLine { position: fixed; bottom: 12%; width: 100%; padding: 0 8%; text-align: center; font-size: clamp(20px, 2.8vw, 34px); font-style: italic; letter-spacing: .05em; color: #f1dfa2; text-shadow: 0 2px 16px #000, 0 0 30px #000a; pointer-events: none; animation: fadein 1.4s ease-out; }
#endCard { background: #0a0b0dcc; animation: fadein 2.5s ease-out; }
#endCard #endFree { font-size: clamp(22px, 3vw, 36px); letter-spacing: .25em; margin: .2em 0 1em; }
#goal { margin: 0 0 14px; font-size: 20px; letter-spacing: .04em; color: #f1dfa2; }
#fadeBody { font-size: 22px; margin-bottom: 0; }
#interBody .mt { margin-top: .4em; font-size: 20px; color: #f1dfa2; }
#endScores { margin: 0 0 .6em; font-style: italic; }
/* high scores (games-019): the list, the start-screen panel, the board overlay with the 3-character entry */
.board { list-style: none; margin: 0; padding: 0; text-align: left; font-variant-numeric: tabular-nums; }
.board li { display: grid; grid-template-columns: 2em 4em 1fr; gap: 0 .5em; padding: 1px 8px; letter-spacing: .08em; border-radius: 2px; }
.board li i { font-style: normal; opacity: .55; text-align: right; }
.board li b { font-weight: normal; letter-spacing: .3em; }
.board li span { text-align: right; }
.board li.me { background: #f1dfa2; color: #14161a; }
.board li.msg { display: block; text-align: center; opacity: .6; font-style: italic; letter-spacing: .04em; }
#copy { position: absolute; left: 24px; bottom: 20px; margin: 0; font-size: 12px; opacity: .55; }
body.sm #copy { left: 8px; bottom: 6px; font-size: 11px; }
#startBoard { position: absolute; right: 24px; bottom: 24px; width: 210px; padding: 10px 12px; background: #0a0b0d88; border: 1px solid #5566; border-radius: 6px; font-size: 14px; }
#startBoard h3 { margin: 0 0 6px; font-weight: normal; letter-spacing: .14em; text-align: center; color: #f1dfa2; font-size: 15px; }
@media (max-width: 900px) { #startBoard { position: static; margin-top: 12px; } }
#board .card { min-width: 300px; max-height: 96vh; overflow: auto; }
#board h2 { margin: 0 0 .4em; color: #f1dfa2; }
#board p { margin: .4em 0; }
#board .err { min-height: 1.3em; color: #ffb4a0; font-style: italic; }
#board .board { margin: .4em 0 .6em; font-size: 17px; }
.boxes { display: flex; gap: 10px; justify-content: center; margin: 12px 0 2px; }
.boxes span { width: 1.7em; height: 2.1em; line-height: 2.1em; font-size: 30px; text-align: center; letter-spacing: 0; border: 1px solid #556; border-bottom: 3px solid #cfd3da; border-radius: 3px; background: #0c0d10; }
.boxes span.empty { opacity: .45; }
.boxes span.cur { border-bottom-color: #f1dfa2; box-shadow: 0 0 12px #f1dfa255; }
/* creature garage (games-023): the panel over the 3D view, in the game's card look */
.gar { position: fixed; z-index: 20; top: 12px; left: 12px; width: 310px; max-height: calc(100vh - 24px); overflow: auto; padding: 14px 16px; text-align: left; background: #14161af0; border: 1px solid #556; border-radius: 6px; font-size: 15px; line-height: 1.35; }
.gar h2 { margin: 0 0 .3em; font-size: 22px; color: #f1dfa2; }
.gar .st { min-height: 3.2em; white-space: pre; font-style: italic; opacity: .85; font-size: 14px; }
.gar .sec { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .16em; color: #f1dfa2; opacity: .8; }
.gar .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.gar button { margin: 0; padding: 5px 11px; font-size: 14px; letter-spacing: .04em; }
.gar button.on { background: #f1dfa2; color: #14161a; border-color: #f1dfa2; }
.gar label { cursor: pointer; margin-right: 6px; }
.gar input[type=range] { width: 140px; accent-color: #f1dfa2; }
.gar .hint { margin-top: 10px; font-size: 12px; opacity: .6; white-space: pre-wrap; }
@media (max-width: 700px) { .gar { width: min(310px, calc(100vw - 24px)); max-height: 46vh; } }
/* touch controls (games-020): no browser gestures, touch wording, the corner pause button, the zone overlay, the rotate overlay, small screens. Sizes come from CFG.touch as CSS variables (set in main.js). */
html, body { touch-action: none; overscroll-behavior: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body { position: fixed; inset: 0; width: 100%; }
#c { touch-action: none; }
.tc { display: none; }
body.touch .tc { display: revert; }
body.touch .kb { display: none; }
@media (hover: none) { button:hover { background: #0c0d10; color: #f3f4f6; } .gar button.on:hover { background: #f1dfa2; color: #14161a; } }
button { touch-action: manipulation; }
#msgbox { display: contents; }
#btnPause { display: none; position: absolute; top: max(var(--pm, 10px), env(safe-area-inset-top)); right: max(var(--pm, 10px), env(safe-area-inset-right)); width: var(--ps, 48px); height: var(--ps, 48px); margin: 0; padding: 0; border-radius: 50%; background: #0a0b0d88; border-color: #cfd3dacc; pointer-events: auto; align-items: center; justify-content: center; gap: 6px; }
body.touch #btnPause { display: flex; }
#btnPause i { width: 5px; height: 38%; background: #f3f4f6; border-radius: 1px; }
body.touch #top { padding-right: calc(var(--ps, 48px) + var(--pm, 10px) * 2 + env(safe-area-inset-right)); }
#top { padding-left: max(20px, env(safe-area-inset-left)); }
#paused .tc button { font-size: 22px; min-height: 52px; min-width: 130px; letter-spacing: .12em; }
#zones { position: fixed; inset: 0; pointer-events: none; opacity: 0; animation: zones var(--zt, 7s) ease-in-out forwards; }
@keyframes zones { 0% { opacity: 0; } 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
#zones::before { content: ''; position: absolute; left: 0; right: 0; top: calc(var(--split, .5) * 100%); border-top: 2px dashed #f3f4f666; }
#zones::after { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--side, .4) * 100%); right: calc(var(--side, .4) * 100%); border-left: 2px dashed #f3f4f666; border-right: 2px dashed #f3f4f666; }
#zones .z { position: absolute; padding: 6px 12px; font-size: 18px; letter-spacing: .06em; background: #0a0b0d66; border-radius: 4px; text-shadow: 0 1px 6px #000; color: #f3f4f6; opacity: .85; text-align: center; }
#zones .zu { top: 14%; left: 50%; transform: translateX(-50%); }
#zones .zd { bottom: 27%; left: 50%; transform: translateX(-50%); }
#zones .zl { top: 50%; left: calc(var(--side, .4) * 50%); transform: translate(-50%, -50%); }
#zones .zr { top: 50%; right: calc(var(--side, .4) * 50%); transform: translate(50%, -50%); }
#zones .zs { top: 50%; left: 50%; transform: translate(-50%, -50%); color: #f1dfa2; }
#rotate { position: fixed; inset: 0; z-index: 100; background: #0a0b0d; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; touch-action: none; }
#rotate p { font-size: 22px; letter-spacing: .06em; margin: 22px 0 0; }
#rotate .ph { width: 54px; height: 92px; border: 3px solid #cfd3da; border-radius: 10px; position: relative; animation: turn 2.4s ease-in-out infinite; }
#rotate .ph::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 14px; height: 3px; margin-left: -7px; background: #cfd3da; border-radius: 2px; }
@keyframes turn { 0%, 20% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
#bdPad { display: grid; grid-template-columns: repeat(12, minmax(0, var(--pad, 38px))); gap: 4px; justify-content: center; margin: 8px 0; }
#bdPad button { margin: 0; padding: 0; height: var(--pad, 38px); font-size: 18px; letter-spacing: 0; }
#bdPad button.w5 { grid-column: span 5; font-size: 16px; letter-spacing: .06em; } #bdPad button.w7 { grid-column: span 7; font-size: 16px; letter-spacing: .06em; }
body.touch #board.entry #bdPad { display: grid; }
body.sm { font-size: 16px; }
body.sm .dim { font-size: 16px; }
body.sm h1 { font-size: 34px; margin-bottom: .15em; }
body.sm h2 { margin: .2em 0; }
body.sm .screen { padding: 8px 12px; overflow: auto; }
body.sm button { padding: 8px 20px; margin: 4px; min-height: 44px; }
body.sm .card { padding: 14px 18px; }
body.sm #top { padding-top: 8px; }
body.sm #score { font-size: 40px; }
body.sm #wp { top: 10px; font-size: 16px; }
body.sm #barbox { width: 130px; }
body.sm #msgbox { display: flex; flex-direction: column; align-items: center; position: absolute; top: 62px; left: 0; right: 0; padding: 0 var(--ps, 48px); pointer-events: none; }
body.sm #slots, body.sm #gloss { position: static; transform: none; }
body.sm #slots { flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 22px; max-width: 100%; }
body.sm #gloss { margin-top: 4px; font-size: 18px; white-space: normal; text-align: center; }
body.sm #power { position: absolute; left: max(20px, env(safe-area-inset-left)); top: 74px; text-align: left; font-size: 17px; }
body.sm #tutor { font-size: 18px; bottom: 6%; max-width: 86%; }
body.sm #banner { top: 26%; font-size: 26px; }
body.sm #popup { font-size: 30px; }
body.sm #interBody .mr { font-size: 24px; } body.sm #interBody .mn { font-size: 19px; } body.sm #interBody .me, body.sm #interBody .ma, body.sm #interBody .mo { font-size: 16px; margin: .3em 0; }
body.sm #interBody .sc, body.sm #interBody .mt { margin-top: .4em; font-size: 17px; }
body.sm #endLine { font-size: 21px; bottom: 8%; }
body.sm #fadeBody { font-size: 19px; }
body.sm #paused { font-size: 40px; }
body.sm #startBoard { position: static; margin: 6px auto 0; width: min(100%, 300px); font-size: 14px; padding: 6px 10px; }
body.sm #startBoard h3 { margin-bottom: 2px; }
body.sm:not(.portrait) #start { padding-inline: 196px; }
body.sm:not(.portrait) #startBoard { position: absolute; right: 8px; top: 8px; bottom: 8px; width: 180px; margin: 0; overflow: auto; }
body.sm #startBoard li { font-size: 13px; padding: 0 6px; }
body.touch.sm #board .card { max-height: 100vh; padding: 8px 14px; width: min(100%, 560px); }
body.touch.sm #board h2 { margin: 0 0 .1em; font-size: 20px; }
body.touch.sm #board p { margin: .15em 0; font-size: 15px; }
body.touch.sm #board .boxes { margin: 6px 0 0; } body.touch.sm .boxes span { font-size: 24px; }
body.touch.sm #board.entry #bdList, body.touch.sm #board.entry #bdNote { display: none; }
body.touch.sm #board .board { font-size: 15px; margin: .2em 0; }
body.touch.sm #board button#btnBoard { margin: 2px; min-height: 40px; }
@media (max-height: 460px) { body.sm #start h1 { font-size: 28px; } body.sm #start .dim { margin: .2em 0; } }
.screen { justify-content: safe center; touch-action: pan-y; }
body.sm #controls .card { max-width: 96%; padding: 8px 14px; }
body.sm #controls h2 { margin: 0 0 .1em; font-size: 20px; }
body.sm #controls #goal { margin: 0 0 4px; font-size: 16px; }
body.sm #controls table { margin-bottom: 4px; font-size: 15px; }
body.sm #controls td { padding: 2px 10px; }
body.sm #controls p.dim { font-size: 13px; margin: 2px 0; line-height: 1.25; }
body.sm:not(.portrait) #startBoard { bottom: auto; max-height: calc(100% - 16px); }
body.touch #quit { z-index: 5; }
