/* Row Spin: printer's card tray. Own class names, no shared .btn. */
.rs{--rs-felt:#123a31;--rs-felt2:#0c2a23;--rs-wood:#3a2416;--rs-brass:#e0a93f;--rs-card:#f2e9d0;--rs-ink:#22304a;color:#f2e9d0;font-family:Georgia,"Times New Roman",serif;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.rs-hud{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;padding:.2rem .25rem .4rem;font-size:1rem}
.rs-hud b{font-weight:700;letter-spacing:.02em}
.rs-hud span{font-variant-numeric:tabular-nums}
.rs-goal{font-size:.82rem;opacity:.75;padding:0 .25rem .3rem}
.rs-tip{min-height:2.6em;padding:0 .25rem .5rem;font-size:.95rem;line-height:1.35;color:#e9dfc2}
.rs-stage{position:relative;min-height:340px;display:flex;align-items:flex-start;justify-content:center;border-radius:16px}
.rs-stage canvas{display:block;margin:0 auto;touch-action:none;max-width:100%;cursor:grab;outline:none}
.rs-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(10,32,27,.93);border-radius:16px;overflow:auto;touch-action:pan-y;padding:.75rem;animation:rs-in .22s ease-out}
.rs-overlay[hidden]{display:none}
.rs-card{width:100%;max-width:320px;text-align:center;display:flex;flex-direction:column;gap:.7rem;align-items:stretch}
.rs-wide{max-width:360px}
.rs-logo{font-size:2.6rem;line-height:1;letter-spacing:.03em;color:var(--rs-brass);margin:0}
.rs-h{font-size:1.7rem;margin:0;color:var(--rs-brass)}
.rs-sub{font-size:.98rem;line-height:1.4;margin:0;color:#e9dfc2}
.rs-meta{font-size:.85rem;margin:0;opacity:.75}
.rs-row{display:flex;gap:.6rem}
.rs-row .rs-btn{flex:1}
.rs-btn{min-height:48px;padding:.6rem 1rem;border-radius:12px;border:2px solid #6b5a2a;background:#2a3d34;color:#f2e9d0;font:700 1rem Georgia,"Times New Roman",serif;cursor:pointer;touch-action:manipulation}
.rs-btn:active{transform:translateY(1px)}
.rs-btn:focus-visible,.rs-lv:focus-visible{outline:3px solid #fff;outline-offset:2px}
.rs-btn[disabled]{opacity:.4;cursor:default}
.rs-primary{background:var(--rs-brass);color:#2a1a0c;border-color:#f5cf7f;font-size:1.15rem;min-height:54px}
.rs-lvgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem}
.rs-lv{min-height:56px;border-radius:10px;border:2px solid #6b5a2a;background:#2a3d34;color:#f2e9d0;font:700 1.05rem Georgia,serif;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;touch-action:manipulation}
.rs-lv[disabled]{opacity:.35;cursor:default}
.rs-stars{display:inline-flex;gap:4px;justify-content:center;min-height:14px}
.rs-stars i{width:14px;height:14px;background:#4a5a50;clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%)}
.rs-stars i.on{background:var(--rs-brass)}
.rs-card>.rs-stars{align-self:center}
.rs-card>.rs-stars i{width:34px;height:34px}
.rs-bar{display:grid;grid-template-columns:repeat(5,1fr);gap:.4rem;margin-top:.6rem}
.rs-bar .rs-btn{padding:.4rem .1rem;font-size:.85rem;min-width:0}
.rs-sw{display:flex;gap:.5rem;justify-content:center}
.rs-swb{width:48px;height:48px;border-radius:12px;border:3px solid #6b5a2a;cursor:pointer;touch-action:manipulation}
.rs-swb[aria-pressed="true"]{border-color:#fff}
.rs-swb[disabled]{opacity:.35;cursor:default}
.rs-pb{font-size:.85rem;margin:0;color:var(--rs-brass)}
.rs-keys{display:none;font-size:.8rem;opacity:.7;margin-top:.5rem;text-align:center}
@media (hover:hover) and (pointer:fine){.rs-keys{display:block}}
@keyframes rs-in{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.rs-overlay{animation:none}.rs-btn:active{transform:none}}

/* Full screen (native and immersive): fill the stage, board flexes, no scroll */
html.pip-immersive .game-wrap,html.pip-native .game-wrap{display:flex;flex-direction:column;overflow:hidden;padding-left:max(10px,env(safe-area-inset-left,0px));padding-right:max(10px,env(safe-area-inset-right,0px));padding-bottom:max(8px,env(safe-area-inset-bottom,0px));box-sizing:border-box}
html.pip-immersive .rs,html.pip-native .rs{flex:1 1 0;min-height:0;display:flex;flex-direction:column}
html.pip-immersive .rs-stage,html.pip-native .rs-stage{flex:1 1 0;min-height:0;overflow:hidden;align-items:center}
html.pip-immersive .rs-keys,html.pip-native .rs-keys,html.pip-immersive .rs-goal,html.pip-native .rs-goal{display:none}
html.pip-immersive .rs-tip,html.pip-native .rs-tip{min-height:0;padding-bottom:.3rem;font-size:.88rem}
html.pip-immersive .rs-bar,html.pip-native .rs-bar{flex:none}
html.pip-immersive .rs-bar .rs-btn,html.pip-native .rs-bar .rs-btn{min-height:46px}
@media (orientation:landscape) and (max-height:520px){
html.pip-immersive .rs,html.pip-native .rs{display:grid;grid-template-columns:minmax(0,1fr) 230px;grid-template-rows:auto auto 1fr auto;column-gap:.75rem}
html.pip-immersive .rs-stage,html.pip-native .rs-stage{grid-column:1;grid-row:1/5}
html.pip-immersive .rs-hud,html.pip-native .rs-hud,html.pip-immersive .rs-tip,html.pip-native .rs-tip,html.pip-immersive .rs-bar,html.pip-native .rs-bar{grid-column:2}
html.pip-immersive .rs-hud,html.pip-native .rs-hud{grid-row:1}
html.pip-immersive .rs-tip,html.pip-native .rs-tip{grid-row:2;align-self:start}
html.pip-immersive .rs-bar,html.pip-native .rs-bar{grid-row:4;grid-template-columns:repeat(2,1fr);margin-top:0}
}
.rs-overlay{backdrop-filter:blur(2px)}
.rs-stage{box-shadow:inset 0 0 40px rgba(0,0,0,.25)}
