/* Lock Orbit: night vault, brass and verdigris. */
.lo{--ink:#0f1a1c;--ink2:#162326;--line:rgba(160,200,190,.22);--brass:#e3c071;--teal:#3fd0b0;--txt:#e8f0ee;--mut:#98b0aa;
  position:relative;background:var(--ink);color:var(--txt);border-radius:18px;padding:12px 12px 14px;overflow:hidden;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;box-shadow:0 10px 30px rgba(8,16,18,.35);
  padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
.lo *{box-sizing:border-box}
.lo button{font:inherit;color:inherit;cursor:pointer;min-height:44px;min-width:44px;border:1px solid var(--line);
  background:var(--ink2);border-radius:12px;padding:0 14px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.lo button:focus-visible{outline:3px solid var(--teal);outline-offset:2px}
.lo button:disabled{opacity:.38;cursor:default}
.lo .primary{background:linear-gradient(#e3c071,#b8892f);color:#241903;border-color:#6b4c14;font-weight:700}
.lo-hud{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.lo-hud .lbl{flex:1;min-width:0}
.lo-hud h2{font-size:1.05rem;margin:0;color:var(--brass);letter-spacing:.02em}
.lo-stats{display:flex;gap:10px;flex-wrap:wrap;font-size:.82rem;color:var(--mut);font-variant-numeric:tabular-nums}
.lo-stats .warn{color:#ff8f78;font-weight:700}
.lo-ibtn{width:44px;padding:0!important;display:inline-flex;align-items:center;justify-content:center}
.lo-ibtn svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lo-ibtn.off{color:#ff8f78}
#lo-stage{width:100%;touch-action:none;user-select:none;-webkit-user-select:none;display:flex;justify-content:center}
#lo-canvas{display:block;touch-action:none;border-radius:14px;max-width:100%;cursor:grab;-webkit-touch-callout:none}
#lo-canvas:active{cursor:grabbing}
.lo-hint{min-height:2.6em;margin:8px 2px 0;font-size:.9rem;color:var(--mut);text-align:center;line-height:1.35}
.lo-ov{position:absolute;inset:0;background:rgba(10,18,20,.93);display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:10px;padding:18px;text-align:center;overflow:auto;z-index:2;animation:lo-in .25s ease-out}
.lo-ov[hidden]{display:none}
.lo-ov h2{font-size:2rem;margin:0;color:var(--brass);letter-spacing:.04em}
.lo-ov h3{font-size:1.5rem;margin:0;color:var(--brass)}
.lo-ov p{margin:0;color:var(--mut);font-size:.92rem;line-height:1.4;max-width:30ch}
.lo-ov .col{display:flex;flex-direction:column;gap:10px;width:min(280px,100%)}
.lo-ov .col button{min-height:50px}
.lo-ov .row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.lo-logo{width:96px;height:96px}
.lo-stars{display:flex;gap:6px;justify-content:center;min-height:30px}
.lo-stars .on{fill:#e3c071;stroke:#6b4c14;stroke-width:1}
.lo-stars .off{fill:#243336;stroke:#3a4f52;stroke-width:1}
.lo-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;width:100%;max-width:340px}
.lo-grid .cell{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;padding:0}
.lo-grid .cell b{font-size:1rem}
.lo-grid .cell.done{border-color:#6b4c14;background:#1d2b26}
.pips{display:block;width:28px;height:6px;background:linear-gradient(90deg,#3a4f52 0 28%,transparent 28% 36%,#3a4f52 36% 64%,transparent 64% 72%,#3a4f52 72%)}
.pips.p1{background:linear-gradient(90deg,#e3c071 0 28%,transparent 28% 36%,#3a4f52 36% 64%,transparent 64% 72%,#3a4f52 72%)}
.pips.p2{background:linear-gradient(90deg,#e3c071 0 28%,transparent 28% 36%,#e3c071 36% 64%,transparent 64% 72%,#3a4f52 72%)}
.pips.p3{background:linear-gradient(90deg,#e3c071 0 28%,transparent 28% 36%,#e3c071 36% 64%,transparent 64% 72%,#e3c071 72%)}
.lo-note{font-size:.8rem;color:var(--mut)}
.lo-how{max-width:420px;margin:14px auto 0;color:#334155;font-size:.95rem;line-height:1.5}
@keyframes lo-in{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.lo *{animation:none!important;transition:none!important}}
@media (max-height:640px){.lo-logo{display:none}}
.lo-bar{display:flex;gap:8px;justify-content:center;margin-top:8px}
.lo-bar button{flex:1;max-width:160px;font-weight:600;letter-spacing:.02em}
.lo-bar button.on{border-color:var(--teal);color:var(--teal)}
#lo-r-undo[hidden],#lo-r-next[hidden]{display:none}
.lo-ov{padding-bottom:max(18px,env(safe-area-inset-bottom))}
#lo[data-mode="title"] #lo-title{background:linear-gradient(rgba(10,18,20,.25),rgba(10,18,20,.9) 38%,rgba(10,18,20,.96));justify-content:flex-end}
#lo[data-mode="title"] .lo-logo{display:none}
#lo-title h2{text-shadow:0 2px 12px rgba(0,0,0,.7)}
.lo-prog{height:6px;border-radius:3px;background:#243336;width:min(220px,80%);overflow:hidden}
.lo-prog i{display:block;height:100%;background:linear-gradient(90deg,#b8892f,#e3c071)}
.lo-stars svg{animation:lo-pop .45s cubic-bezier(.2,1.6,.4,1) both}
.lo-stars svg:nth-child(2){animation-delay:.12s}.lo-stars svg:nth-child(3){animation-delay:.24s}
@keyframes lo-pop{from{opacity:0;transform:scale(.3) rotate(-30deg)}to{opacity:1;transform:none}}

/* full screen: playfield fills the stage, copy and chrome hidden */
html.pip-immersive .game-wrap.pip-stage,.game-wrap:fullscreen,.game-wrap:-webkit-full-screen{display:flex;flex-direction:column;max-width:none;width:100%;height:100%;padding:6px max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-right));overflow:hidden}
html.pip-immersive .lo-how,html.pip-immersive .pip-actions,html.pip-immersive .game-title,html.pip-immersive .facts,.game-wrap:fullscreen .lo-how,.game-wrap:fullscreen .pip-actions{display:none!important}
html.pip-immersive .lo,.game-wrap:fullscreen .lo{flex:1;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;grid-template-columns:minmax(0,1fr);grid-template-areas:"hud" "stage" "bar" "hint";gap:6px;padding-top:8px;padding-bottom:8px}
html.pip-immersive .lo-hud,.game-wrap:fullscreen .lo-hud{grid-area:hud;margin:0}
html.pip-immersive #lo-stage,.game-wrap:fullscreen #lo-stage{grid-area:stage;min-height:0;min-width:0;overflow:hidden;align-items:center}
html.pip-immersive .lo-bar,.game-wrap:fullscreen .lo-bar{grid-area:bar;margin:0}
html.pip-immersive .lo-hint,.game-wrap:fullscreen .lo-hint{grid-area:hint;margin:0;min-height:0}
@media (orientation:landscape) and (max-height:600px){
html.pip-immersive .lo,.game-wrap:fullscreen .lo{grid-template-rows:auto auto 1fr auto;grid-template-columns:minmax(0,1fr) minmax(210px,34%);grid-template-areas:"stage hud" "stage bar" "stage hint" "stage ."}
html.pip-immersive .lo-hud,.game-wrap:fullscreen .lo-hud{align-self:start}
html.pip-immersive .lo-bar,.game-wrap:fullscreen .lo-bar{align-self:start}
}
