/* Printer's type case: paper, iron galleys, ivory and brass type. */
:root{--paper:#efe6d2;--ink:#1d2330;--red:#c8402a;--brass:#e0a93c;--brassd:#a8761a;--iron:#2b303b}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Georgia,"Times New Roman",serif;background:var(--paper);color:var(--ink);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
.game-header{display:flex;justify-content:space-between;align-items:center;padding:.6rem 1rem;background:var(--ink);color:#f4ecd8}
.game-header a{color:#f4ecd8;text-decoration:none;font-weight:700;min-height:44px;display:inline-flex;align-items:center}
.game-tag{font-size:.8rem;opacity:.8}
.wss{display:block}
.hud{display:flex;justify-content:space-between;align-items:flex-end;gap:8px;margin-bottom:6px}
.hud h1{font-size:1.15rem;margin:0;line-height:1.1}
.hud .sub{font-size:.8rem;opacity:.75}
.hud .r{text-align:right;font-size:.9rem;font-variant-numeric:tabular-nums}
.stars{display:inline-flex;gap:3px;vertical-align:middle}
.stars i{width:16px;height:16px;background:#c9bda0;clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,81% 100%,50% 76%,19% 100%,30% 60%,0 38%,38% 36%)}
.stars i.on{background:var(--brass)}
.stars.big i{width:34px;height:34px}
.par{font-size:.72rem;margin-left:6px;opacity:.7}
#msg{min-height:2.4em;font-size:.88rem;line-height:1.3;margin:2px 0 6px}
.field{position:relative;height:min(56vh,520px);height:min(56dvh,520px);min-height:340px;border:2px solid var(--ink);border-radius:10px;overflow:hidden;background:var(--paper);touch-action:none;overscroll-behavior:contain;-webkit-user-select:none;user-select:none}
#cv{display:block;touch-action:none;outline:none;-webkit-tap-highlight-color:transparent}
#cv:focus-visible{box-shadow:inset 0 0 0 3px var(--red)}
.bar{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin-top:8px}
.bar .btn{padding:.5rem .2rem;font-size:.82rem}
.words{margin:0;font-size:1.05rem;font-weight:700;letter-spacing:.08em;color:var(--brassd)}
.btn{font:inherit;font-weight:700;min-height:48px;padding:.5rem .7rem;border:2px solid var(--ink);background:#f4ecd8;color:var(--ink);border-radius:8px;cursor:pointer;touch-action:manipulation}
.btn:active{transform:translateY(1px);background:#e6dcc0}
.btn:disabled{opacity:.4;cursor:default}
.btn:focus-visible,.lv:focus-visible{outline:3px solid var(--red);outline-offset:2px}
.btn.pri{background:var(--ink);color:#f4ecd8}
.ov{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(239,230,210,.9);padding:12px;overflow:auto}
.ov[hidden]{display:none}
.card{width:100%;max-width:330px;text-align:center;display:flex;flex-direction:column;gap:9px}
.card.wide{max-width:360px;max-height:100%}
.card h2{margin:0;font-size:1.8rem;line-height:1.05}
.kick{margin:0;font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;color:var(--red);font-weight:700}
.sub{margin:0;font-size:.95rem;line-height:1.35}
.stat{margin:2px 0 0;font-size:.78rem;opacity:.75}
.grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;overflow:auto;max-height:300px;padding:2px}
.lv{font:inherit;font-weight:700;min-height:48px;border:2px solid var(--ink);background:#f4ecd8;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;touch-action:manipulation}
.lv small{font-size:.7rem;color:var(--brassd);min-height:.8em}
/* full screen (immersive and native): the stage is a flex column, the board takes the rest */
html.pip-immersive .game-header,html.pip-immersive .ad-well,html.pip-immersive .game-wrap~*,html.pip-immersive .hud h1,html.pip-immersive .pip-actions,
html.pip-native .game-header,html.pip-native .ad-well,html.pip-native .hud h1,html.pip-native .pip-actions{display:none}
html.pip-immersive .game-wrap,html.pip-native .game-wrap{max-width:none;margin:0;padding:8px 10px;height:100%;display:flex;flex-direction:column;overflow:hidden;background:var(--paper)}
html.pip-immersive .wss,html.pip-native .wss{flex:1;min-height:0;display:flex;flex-direction:column}
html.pip-immersive .field,html.pip-native .field{flex:1;height:auto;min-height:0}
html.pip-immersive #msg,html.pip-native #msg{min-height:0;margin:2px 0 4px;font-size:.8rem}
html.pip-immersive .bar .btn,html.pip-native .bar .btn{min-height:44px}
html.pip-immersive .bar,html.pip-native .bar{padding-bottom:env(safe-area-inset-bottom,0px);margin-top:6px}
@media (orientation:landscape) and (max-height:520px){
html.pip-immersive .wss,html.pip-native .wss{display:grid;grid-template-columns:1fr 112px;grid-template-rows:auto auto 1fr;gap:0 8px}
html.pip-immersive .hud,html.pip-native .hud{grid-column:2;grid-row:1}
html.pip-immersive #msg,html.pip-native #msg{grid-column:2;grid-row:2;overflow:hidden}
html.pip-immersive .field,html.pip-native .field{grid-column:1;grid-row:1/4}
html.pip-immersive .bar,html.pip-native .bar{grid-column:2;grid-row:3;grid-template-columns:1fr;align-content:start;gap:4px;margin:0}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
