/* Seven Wells: cistern look. Brass on deep teal stone. */
.sw{--brass:#d9a441;--brassdk:#8a6420;--ink:#0b191c;--stone:#16292b;--txt:#cfe2e4;--mute:#7fa0a4;--rust:#c0603a;color:var(--txt);font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.sw .game-title{text-align:center;margin-bottom:.5rem}
.sw .game-title h1{font-family:Georgia,"Times New Roman",serif;font-size:1.6rem;letter-spacing:.04em;color:var(--brass)}
.sw .game-title p{font-size:.75rem}
.sw-hud{display:flex;align-items:stretch;gap:6px;margin-bottom:8px}
.sw-stat{flex:1 1 0;min-width:0;background:var(--stone);border:1px solid #27505a;border-radius:8px;padding:4px 6px;text-align:center;display:flex;flex-direction:column;justify-content:center}
.sw-stat span{font-size:.62rem;text-transform:uppercase;letter-spacing:.08em;color:var(--mute)}
.sw-stat b{font-family:Georgia,serif;font-size:.95rem;color:var(--txt);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sw-ib{flex:none;width:44px;min-height:44px;border-radius:8px;border:1px solid #27505a;background:var(--stone);color:var(--brass);display:flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation}
.sw-ib.off .sw-w{display:none}
.sw-ib:focus-visible,.sw-btn:focus-visible{outline:3px solid var(--brass);outline-offset:2px}
.sw-stage{position:relative;width:100%;height:520px;border-radius:12px;overflow:hidden;background:#0b191c;border:2px solid #27505a;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.sw-stage canvas{display:block;touch-action:none;width:100%;height:100%}
.sw-ov{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:14px;background:rgba(5,12,14,.78);z-index:2;touch-action:manipulation}
.sw-ov[hidden]{display:none}
.sw-panel{width:100%;max-width:330px;text-align:center;background:#10262a;border:2px solid var(--brassdk);border-radius:14px;padding:18px 16px;box-shadow:0 10px 30px rgba(0,0,0,.5);animation:swin .28s ease-out}
.sw-panel h2{font-family:Georgia,serif;font-size:1.7rem;color:var(--brass);margin-bottom:8px}
.sw-lead{font-size:.92rem;line-height:1.4;margin-bottom:10px}
.sw-score{font-family:Georgia,serif;font-size:1.2rem;color:var(--brass);margin-bottom:4px}
.sw-best{font-size:.78rem;color:var(--mute);margin-bottom:12px;line-height:1.35}
.sw-btn{display:block;width:100%;min-height:48px;margin-top:8px;border-radius:10px;border:2px solid #27505a;background:#16292b;color:var(--txt);font:600 1rem system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.sw-btn[hidden]{display:none}
.sw-btn.sw-main{background:var(--brass);border-color:var(--brassdk);color:#1b2a2c;font-weight:800}
.sw-btn.sw-quiet{font-size:.85rem;min-height:44px;color:var(--mute)}
.sw-btn:active{transform:translateY(1px)}
.sw-coach{min-height:2.6em;margin:8px 2px 4px;font-size:.88rem;line-height:1.3;text-align:center;color:var(--txt)}
.sw-how{font-size:.82rem;color:var(--mute);margin:4px 2px 10px;line-height:1.45}
.sw-how summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:var(--brass)}
@keyframes swin{from{transform:scale(.94);opacity:0}to{transform:none;opacity:1}}
@media (max-width:380px){.sw-stat b{font-size:.82rem}.sw-stat span{font-size:.55rem}}
@media (prefers-reduced-motion:reduce){.sw-panel{animation:none}.sw-btn:active{transform:none}}
@supports (padding:max(0px)){.sw-ov{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}.sw{padding-bottom:max(1rem,env(safe-area-inset-bottom))}}
.sw-bar{display:flex;align-items:center;gap:8px;margin:8px 0 4px}
.sw-bar .sw-coach{flex:1 1 auto;margin:0;min-width:0}
.sw-undo{flex:none;width:64px;flex-direction:column;font:700 .8rem system-ui,sans-serif;line-height:1.1;gap:1px}
.sw-undo small{font-size:.7rem;color:var(--mute)}
.sw-undo:disabled{opacity:.4;cursor:default}
.sw-stars{font-family:Georgia,serif;font-size:1.6rem;letter-spacing:.2em;color:var(--brass);margin-bottom:6px}
.sw-stars .dim{color:#27505a}
.sw-stars[hidden]{display:none}
/* Full screen (native and immersive): fill the stage, no page chrome */
html.pip-immersive .game-wrap.sw{display:flex;flex-direction:column;max-width:none;padding:6px 8px max(6px,env(safe-area-inset-bottom));overflow:hidden}
html.pip-immersive .sw .sw-how,html.pip-immersive .sw .game-title{display:none}
html.pip-immersive .sw-hud{flex:none;margin-bottom:6px}
html.pip-immersive .sw-stage{flex:1 1 0;min-height:0;height:auto!important;border-radius:10px}
html.pip-immersive .sw-bar{flex:none;margin:6px 0 0}
html.pip-immersive .sw-coach{min-height:0;font-size:.82rem}
@media (orientation:landscape) and (max-height:520px){
html.pip-immersive .game-wrap.sw{display:grid;grid-template-columns:minmax(0,1fr) 190px;grid-template-rows:auto 1fr;gap:6px 8px}
html.pip-immersive .sw-stage{grid-column:1;grid-row:1/3}
html.pip-immersive .sw-hud{grid-column:2;grid-row:1;flex-wrap:wrap;margin:0}
html.pip-immersive .sw-stat{flex:1 1 40%}
html.pip-immersive .sw-bar{grid-column:2;grid-row:2;margin:0;flex-direction:column;align-items:stretch;align-self:end}
html.pip-immersive .sw-undo{width:100%;min-height:48px;flex-direction:row;gap:8px}
}
