/* Overtone Stack - engraver's paper: cream sheet, ink outlines, one teal and one vermilion. */
.ot{--ink:#1d2433;--paper:#efe6d2;--teal:#1f7a72;--verm:#c93a2a;--ochre:#c8962e;color:var(--ink);font-family:Georgia,'Times New Roman',serif;
  padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
.ot *{box-sizing:border-box}
.ot-hud{display:grid;grid-template-columns:1fr 1fr;gap:.35rem .75rem;align-items:center;padding:.5rem .7rem;background:var(--ink);color:var(--paper);border-radius:10px 10px 0 0;font-size:.95rem;font-weight:700}
.ot-hud span{white-space:nowrap}
.ot-wob{grid-column:1/3;display:flex;align-items:center;gap:.6rem;font-size:.8rem;letter-spacing:.06em;text-transform:uppercase}
.ot-meter{flex:1;height:12px;border:2px solid var(--paper);border-radius:7px;overflow:hidden;background:rgba(239,230,210,.15)}
.ot-fill{height:100%;width:0;background:var(--teal);transition:width .25s ease,background .25s ease}
.ot-rule{margin:0;padding:.45rem .7rem;background:#e2d6b8;border-left:3px solid var(--ink);border-right:3px solid var(--ink);font-size:.82rem;font-style:italic;min-height:2.2rem}
.ot-stage{position:relative;border:3px solid var(--ink);border-top:0;background:var(--paper);overflow:hidden;line-height:0}
#ot-canvas{display:block;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab;max-width:100%}
.ot-coach{margin:0;padding:.45rem .7rem;line-height:1.3;font-size:.88rem;background:var(--paper);border:3px solid var(--ink);border-top:2px solid var(--ink);min-height:2.9rem}
.ot-bar{display:flex;flex-wrap:wrap;gap:.5rem;padding:.6rem 0}
.ot button{font:inherit;font-weight:700;min-height:44px;min-width:44px;padding:.4rem .9rem;border:2px solid var(--ink);border-radius:8px;background:var(--paper);color:var(--ink);cursor:pointer;touch-action:manipulation}
.ot button:focus-visible{outline:3px solid var(--ochre);outline-offset:2px}
.ot button:active:not(:disabled){transform:translateY(2px)}
.ot button:disabled{opacity:.45;cursor:default}
.ot button.ot-main{background:var(--ink);color:var(--paper);font-size:1.1rem;min-height:52px;width:100%}
.ot-panel{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;gap:.55rem;justify-content:center;padding:.9rem;background:rgba(239,230,210,.94);line-height:1.35;overflow-y:auto;touch-action:pan-y}
.ot-panel[hidden]{display:none}
.ot-panel h2{margin:0;font-size:1.7rem;letter-spacing:.02em}
.ot-panel p{margin:0;font-size:.92rem}
.ot-sub{font-size:.8rem;opacity:.8}
.ot-levels{display:grid;grid-template-columns:repeat(6,1fr);gap:.35rem}
.ot-lv{position:relative;padding:.2rem!important;font-size:1rem}
.ot-lv i{display:block;font-style:normal;font-size:.62rem;color:var(--teal);line-height:1}
.ot-sec{font-size:.72rem;text-transform:uppercase;letter-spacing:.1em;margin-top:.2rem}
.ot-how{margin:1rem 0 0;font-size:.9rem;line-height:1.5}
.ot-stars{font-size:2.4rem!important;letter-spacing:.2em;line-height:1;color:rgba(29,36,51,.35)}
.ot-stars[hidden]{display:none}
.ot-stars b{display:inline-block;font-weight:400}
.ot-stars b.on{color:var(--ochre);text-shadow:1px 1px 0 var(--ink);animation:ot-pop .45s cubic-bezier(.2,1.6,.4,1) both}
@keyframes ot-pop{from{transform:scale(.2) rotate(-40deg);opacity:0}to{transform:none;opacity:1}}
.ot-lv.cur{background:var(--ink);color:var(--paper)}
.ot-lv.cur i{color:var(--ochre)}
.ot-panel h2{text-shadow:2px 2px 0 rgba(200,150,46,.45)}
.ot-coach{background:linear-gradient(var(--paper),#e8dec6)}
@media (max-width:360px){.ot-levels{grid-template-columns:repeat(4,1fr)}}
@media (prefers-reduced-motion:reduce){.ot *{animation:none!important;transition:none!important}}

/* Full screen (native and immersive): playfield fills the stage, extras hidden, canvas centred. */
html.pip-immersive .game-header,html.pip-immersive .ad-well,html.pip-immersive .ot-how,html.pip-immersive footer,html.pip-immersive #similar-games{display:none!important}
html.pip-immersive .game-wrap.pip-stage{max-width:none;margin:0;padding:6px 8px;display:flex;flex-direction:column;overflow:hidden}
html.pip-immersive .ot{flex:1;min-height:0;display:flex;flex-direction:column;padding:0}
html.pip-immersive .ot-hud{padding:.3rem .6rem;gap:.15rem .6rem;font-size:.85rem}
html.pip-immersive .ot-meter{height:10px}
html.pip-immersive .ot-rule{min-height:0;padding:.25rem .6rem;font-size:.76rem}
html.pip-immersive .ot-stage{flex:1;min-height:0}
html.pip-immersive #ot-canvas{position:absolute;inset:0;margin:auto;max-width:100%;max-height:100%}
html.pip-immersive .ot-coach{min-height:0;padding:.25rem .6rem;font-size:.8rem}
html.pip-immersive .ot-bar{flex-wrap:nowrap;gap:.4rem;padding:.4rem 0 calc(.4rem + env(safe-area-inset-bottom))}
html.pip-immersive .ot-bar button{flex:1;padding:.3rem .4rem;font-size:.82rem}
@media (orientation:landscape) and (max-height:520px){
  html.pip-immersive .ot{display:grid;grid-template-columns:minmax(170px,32%) 1fr;grid-template-rows:auto auto 1fr auto;column-gap:8px}
  html.pip-immersive .ot-hud{grid-column:1;grid-row:1;border-radius:10px}
  html.pip-immersive .ot-rule{grid-column:1;grid-row:2}
  html.pip-immersive .ot-coach{grid-column:1;grid-row:3;overflow:auto}
  html.pip-immersive .ot-bar{grid-column:1;grid-row:4;flex-wrap:wrap}
  html.pip-immersive .ot-bar button{flex:1 1 44%}
  html.pip-immersive .ot-stage{grid-column:2;grid-row:1/5;border-top:3px solid var(--ink)}
}
