/* Suit Weave: loom board, cream cards. Scoped under .sw so the shared site CSS cannot leak in. */
body.sw{background:#121c25;color:#f2e9d4;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;min-height:100vh;
  padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.sw .game-header{background:#0c141b;padding:.6rem 1rem;display:flex;justify-content:space-between;align-items:center;font-size:.85rem}
.sw .game-header a{color:#f0b73a;text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.sw .game-tag{color:#9fb3c4}
.sw .game-wrap{padding-bottom:calc(1rem + env(safe-area-inset-bottom))}
.sw h1{font-size:1.5rem;letter-spacing:.02em;color:#f2e9d4;margin:.25rem 0 .5rem}
.sw .sw-hud{display:flex;flex-wrap:wrap;gap:.35rem .75rem;align-items:center;justify-content:space-between;font-size:.85rem;color:#cfd9e2;margin-bottom:.5rem}
.sw .sw-hud b{color:#f0b73a;font-variant-numeric:tabular-nums}
.sw .sw-bar{display:flex;flex-wrap:wrap;gap:.4rem;margin:.5rem 0}
.sw .sw-bar button{flex:1 1 30%;min-height:44px;border-radius:10px;border:1px solid #2c4458;background:#1d2e3c;color:#f2e9d4;font:600 .85rem system-ui,sans-serif;cursor:pointer}
.sw .sw-bar button:active{background:#2c4458}
.sw .sw-bar button:disabled{opacity:.4;cursor:default}
.sw .sw-bar button[aria-pressed="true"]{border-color:#f0b73a}
.sw #sw-host{position:relative;width:100%;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border-radius:14px;overflow:hidden;line-height:0}
.sw #sw-canvas{display:block;margin:0 auto;touch-action:none;border-radius:14px;outline:none}
.sw #sw-hint{min-height:2.6em;font-size:.85rem;line-height:1.3;color:#cfd9e2;margin:.4rem 0}
.sw #sw-overlay{position:absolute;inset:0;background:rgba(10,16,22,.9);display:flex;align-items:center;justify-content:center;overflow-y:auto;line-height:1.35;padding:.5rem;animation:swfade .25s ease-out}
.sw #sw-overlay[hidden]{display:none}
.sw .ov-card{width:100%;max-width:340px;display:flex;flex-direction:column;gap:.55rem;text-align:center;margin:auto}
.sw .ov-card h2{font-size:1.9rem;color:#f0b73a;letter-spacing:.03em;margin:0}
.sw .lede{font-size:.92rem;color:#e4dcc8;margin:0}
.sw .meta{font-size:.78rem;color:#9fb3c4;margin:0}
.sw .flag{color:#f0b73a;font-weight:700;margin:0}
.sw .btn{display:flex;align-items:center;justify-content:center;min-height:48px;padding:.5rem 1rem;border-radius:12px;border:2px solid #2c4458;background:#1d2e3c;color:#f2e9d4;font:700 1rem system-ui,sans-serif;cursor:pointer;text-decoration:none;width:100%}
.sw .btn:active{transform:translateY(1px);background:#2c4458}
.sw .btn.pri{background:#f0b73a;border-color:#f0b73a;color:#1b2733}
.sw .btn:focus-visible,.sw .lv:focus-visible,.sw .sw-bar button:focus-visible{outline:3px solid #f2e9d4;outline-offset:2px}
.sw .row2{display:flex;gap:.55rem}
.sw .lvgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem}
.sw .lv{min-height:56px;border-radius:10px;border:2px solid #2c4458;background:#1d2e3c;color:#f2e9d4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;font:inherit}
.sw .lv b{font-size:1.05rem}
.sw .lv small{font-size:.65rem;color:#7f93a5}
.sw .lv.lock{opacity:.5;cursor:not-allowed}
.sw .stars{display:inline-flex;gap:4px;justify-content:center}
.sw .st{width:14px;height:14px;background:#33475a;clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%)}
.sw .st.on{background:#f0b73a}
.sw .ov-card>.stars .st{width:28px;height:28px}
.sw .res{display:grid;grid-template-columns:1fr 1fr;gap:.4rem;margin:0}
.sw .res div{background:#1d2e3c;border-radius:10px;padding:.4rem}
.sw .res dt{font-size:.7rem;color:#9fb3c4}
.sw .res dd{margin:0;font-size:1.2rem;font-weight:700;color:#f2e9d4;font-variant-numeric:tabular-nums}
.sw .board{list-style:none;margin:0;padding:0;font-size:.8rem;color:#cfd9e2}
.sw .board li{display:flex;justify-content:space-between;padding:.15rem .5rem}
.sw footer{color:#9fb3c4;font-size:.8rem;text-align:center;padding:1rem}
.sw footer a{color:#f0b73a}
@keyframes swfade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.sw #sw-overlay{animation:none}.sw .btn{transition:none}}

/* Full screen (shell stage = .game-wrap): board fills the stage, no scroll, chrome hidden */
html.pip-immersive .sw .game-header,html.pip-immersive .sw .ad-well,html.pip-immersive .sw h1,html.pip-immersive .sw footer,html.pip-immersive .sw #similar-games{display:none}
html.pip-immersive .sw .game-wrap.pip-stage{display:flex;flex-direction:column;overflow:hidden;max-width:none;padding-left:8px;padding-right:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
html.pip-immersive .sw .sw-hud{margin:0 0 .3rem;flex:none}
html.pip-immersive .sw #sw-host{flex:1 1 0;min-height:0;width:100%}
html.pip-immersive .sw #sw-canvas{position:absolute;top:0;left:0;right:0;margin:0 auto}
html.pip-immersive .sw #sw-hint{flex:none;min-height:0;margin:.3rem 0;font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.pip-immersive .sw .sw-bar{flex:none;flex-wrap:nowrap;margin:0;gap:.3rem}
html.pip-immersive .sw .sw-bar button{flex:1 1 0;min-width:0;padding:0 2px;font-size:.72rem;min-height:44px}
@media (orientation:landscape) and (max-height:480px){
html.pip-immersive .sw .game-wrap.pip-stage{display:grid;grid-template-columns:minmax(0,1fr) 104px;grid-template-rows:auto minmax(0,1fr);column-gap:8px}
html.pip-immersive .sw .sw-hud{grid-column:1;grid-row:1}
html.pip-immersive .sw #sw-host{grid-column:1;grid-row:2}
html.pip-immersive .sw #sw-hint{display:none}
html.pip-immersive .sw .sw-bar{grid-column:2;grid-row:1/3;flex-direction:column;justify-content:center;gap:.4rem}
html.pip-immersive .sw .sw-bar button{flex:0 0 auto;font-size:.8rem}
}
