/* Slide Glider: survey-sketch look. Paper, ink, vermilion. */
.sg{--paper:#efe6d2;--paper2:#e2d5b6;--ink:#2a2622;--verm:#d8402a;--amber:#e8962c;--teal:#3b5560;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:var(--ink);
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.sg button{font:inherit;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
.sg button:focus-visible{outline:3px solid var(--verm);outline-offset:2px}
.sg-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.sg-lvl{font-weight:800;font-size:.95rem;letter-spacing:.02em}
.sg-btn{min-width:44px;min-height:44px;padding:0 14px;border:2px solid var(--ink);background:var(--paper);border-radius:4px 10px 4px 10px;font-weight:700;font-size:.9rem}
.sg-btn:disabled{opacity:.35;cursor:default}
.sg-stage{position:relative;border:2px solid var(--ink);border-radius:6px 14px 6px 14px;overflow:hidden;background:var(--paper);box-shadow:3px 4px 0 rgba(42,38,34,.25)}
#sg-canvas{display:block;width:100%;touch-action:none;-ms-touch-action:none;cursor:pointer;outline:none}
.sg-pane{position:absolute;left:0;right:0;bottom:0;max-height:100%;overflow:auto;padding:16px 16px calc(16px + env(safe-area-inset-bottom));
  background:rgba(239,230,210,.94);border-top:2px solid var(--ink);display:flex;flex-direction:column;gap:10px;text-align:center}
.sg-pane[hidden]{display:none}
.sg-pane h2{font-size:1.7rem;font-weight:900;letter-spacing:-.01em;line-height:1.1}
.sg-tag{font-size:.9rem;line-height:1.35}
.sg-foot{font-size:.78rem;opacity:.75}
.sg-go{min-height:56px;border:2px solid var(--ink);background:var(--verm);color:#fff8ee;font-weight:900;font-size:1.3rem;border-radius:4px 14px 4px 14px;box-shadow:2px 3px 0 var(--ink);letter-spacing:.04em}
.sg-go:active{transform:translate(2px,3px);box-shadow:none}
.sg-alt{min-height:48px;border:2px solid var(--ink);background:var(--paper2);font-weight:800;font-size:1rem;border-radius:4px 12px 4px 12px}
.sg-step{display:flex;align-items:center;justify-content:center;gap:12px}
.sg-step .sg-btn{min-width:52px;min-height:52px;font-size:1.5rem}
.sg-stepmid{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:140px}
.sg-stepmid b{font-size:1.15rem}
.sg-stepmid span{font-size:.78rem;opacity:.8}
.sg-stars{display:inline-flex;gap:6px;justify-content:center}
.sg-star{width:16px;height:16px;border:2px solid var(--ink);transform:rotate(45deg);background:transparent;display:inline-block}
.sg-star.on{background:var(--amber)}
.sg-gls{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sg-gl{min-height:48px;padding:6px 8px;border:2px solid var(--ink);background:var(--paper);border-radius:4px 10px 4px 10px;display:flex;flex-direction:column;gap:1px;text-align:left}
.sg-gl b{font-size:.85rem}
.sg-gl span{font-size:.72rem;opacity:.8}
.sg-gl.sel{background:var(--teal);color:#f4ecd8}
.sg-gl:disabled{opacity:.45;cursor:default}
.sg-stats{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;text-align:left}
.sg-stats div{border-bottom:1px dashed rgba(42,38,34,.4);padding-bottom:3px}
.sg-stats dt{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;opacity:.7}
.sg-stats dd{font-size:1.05rem;font-weight:800}
.sg-stats em{font-style:normal;font-size:.7rem;color:var(--verm);margin-left:4px}
.sg-unlock{font-weight:800;color:var(--verm)}
.sg-help{margin-top:8px;font-size:.8rem;opacity:.8;text-align:center}
@media (prefers-reduced-motion:reduce){.sg *{animation:none!important;transition:none!important}}
.sg-streak{font-size:.8rem;font-weight:700;color:var(--verm)}

/* Full screen: stage fills the space under the dock; canvas is sized from the stage in main.js */
html.pip-immersive .game-wrap{display:flex;flex-direction:column;padding:0}
html.pip-immersive .sg{flex:1;min-height:0;display:flex;flex-direction:column;padding:6px 8px calc(6px + env(safe-area-inset-bottom))}
html.pip-immersive .sg-bar{margin-bottom:6px}
html.pip-immersive .sg-stage{flex:1;min-height:0}
html.pip-immersive #sg-canvas{position:absolute;left:0;top:0}
html.pip-immersive .sg-help,html.pip-immersive .ad-well,html.pip-immersive .hub-bar,html.pip-immersive .playyard-ad,html.pip-immersive .below-content{display:none}
@media (orientation:landscape) and (max-height:520px){
  html.pip-immersive .sg-pane{left:auto;width:min(380px,60%);top:0;border-left:2px solid var(--ink);border-top:0;padding:10px 14px}
  html.pip-immersive .sg-pane h2{font-size:1.3rem}
}
