/* Gingy's Tower Rock — members game. Loaded only on /games/tower-rock/. */
.tr{position:relative;min-height:320px;background:radial-gradient(ellipse at 50% 120%,rgba(151,182,44,.28),transparent 55%),linear-gradient(#2a2c31,#1a1b1d);overflow:hidden;touch-action:manipulation}
.tr-hud{position:absolute;left:8px;right:8px;top:8px;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;gap:8px;pointer-events:none}
.tr-level{background:var(--black);color:var(--lime);border:3px solid var(--lime);border-radius:999px;padding:4px 12px;font:700 .9rem var(--head);white-space:nowrap}
.tr-goal{background:rgba(255,255,255,.92);color:var(--black);border:3px solid var(--black);border-radius:14px;padding:4px 10px;font:700 .9rem var(--head);max-width:58%;text-align:right}
.tr-grid{display:grid;grid-template-columns:72px 1fr;align-items:end;height:380px}
.tr-apollo{width:68px;height:auto;align-self:end;margin:0 0 18px 6px;z-index:2}
.tr-apollo .oa-howl-idle,.tr-apollo.oa-howl-rig{width:100%;height:auto;display:block}
.tr-stage{position:relative;height:100%;min-width:0}
.tr-stage canvas{display:block;width:100%;height:100%;touch-action:manipulation}
.tr-zones{position:absolute;inset:0 0 18px 0;display:grid;grid-template-columns:1fr 1fr 1fr;pointer-events:none;z-index:1}
.tr-zones span{border-left:2px dashed rgba(151,182,44,.18);display:flex;align-items:flex-end;justify-content:center;padding-bottom:8px;font:700 .75rem var(--head);color:rgba(255,255,255,.28)}
.tr-zones span:first-child{border-left:0}
.tr-notice{position:absolute;left:6px;bottom:86px;z-index:4;max-width:min(220px,70%);background:#fff;color:var(--black);border:3px solid var(--black);border-radius:16px;padding:8px 10px;font:700 .95rem/1.25 var(--head);box-shadow:3px 3px 0 #000;opacity:0;transform:translateY(8px);pointer-events:none}
.tr-notice.show{opacity:1;transform:none;transition:opacity .2s,transform .2s}
.tr-notice::after{content:"";position:absolute;left:22px;bottom:-11px;border:8px solid transparent;border-top-color:var(--black)}
.tr.shaking .tr-stage{animation:trShake 2.2s ease}
@keyframes trShake{0%,100%{transform:translateX(0)}12%{transform:translateX(-10px)}24%{transform:translateX(12px)}36%{transform:translateX(-9px)}48%{transform:translateX(10px)}60%{transform:translateX(-7px)}72%{transform:translateX(6px)}84%{transform:translateX(-3px)}}
.tr-banner{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%) scale(.8);z-index:5;background:var(--black);color:var(--lime);border:4px solid var(--lime);border-radius:20px;padding:8px 16px;font:400 clamp(1.3rem,6vw,2rem)/1 var(--display);letter-spacing:.04em;opacity:0;pointer-events:none;white-space:nowrap}
.tr.shaking .tr-banner{animation:trBanner 2.2s ease}
@keyframes trBanner{0%,12%{opacity:0;transform:translate(-50%,-50%) scale(.7)}20%,70%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0}}

/* piece tray */
.tr-tray{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;width:100%}
.tr-piece{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:88px;min-height:88px;padding:8px 10px;font:700 .95rem var(--head)}
.tr-piece .ico{display:block;width:52px;height:28px}
.tr-piece[aria-pressed=true],.tr-piece.picked{outline:5px solid var(--lime-dk);background:var(--lime)}
.tr-piece:disabled{opacity:.45;cursor:default}
.tr-piece .left{font:700 .8rem var(--head);color:#333}
.tr-place{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;width:100%;margin-top:4px}
.tr-place .btn{min-width:88px;min-height:88px;font-size:1.15rem}
.tr-opts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;width:100%;margin-top:2px}
.tr-opts .btn{min-height:52px}

/* parent learning strip on the game page */
.tr-learn{margin-top:18px;background:var(--white);border:var(--border);border-radius:var(--r);padding:16px 18px;box-shadow:var(--pop)}
.tr-learn h2{font-size:1.35rem;margin:0 0 8px}
.tr-skills{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px;padding:0;list-style:none}
.tr-skills li{background:#eaf4cf;border:3px solid var(--black);border-radius:999px;padding:6px 12px;font:700 .95rem var(--head)}
.tr-learn .stds{margin:0;font-size:1rem}

@media (min-width:700px){
  .tr-grid{grid-template-columns:110px 1fr;height:440px}
  .tr-apollo{width:100px;margin-left:10px}
  .tr-notice{left:14px;max-width:240px}
}
@media (max-width:640px){
  .tr-grid{height:340px;grid-template-columns:58px 1fr}
  .tr-apollo{width:54px;margin:0 0 16px 2px}
  .tr-level,.tr-goal{font-size:.8rem;padding:3px 8px}
  .tr-notice{max-width:min(200px,66%);font-size:.85rem;bottom:70px}
  .game-controls .tr-piece,.game-controls .tr-place .btn{min-width:80px;min-height:80px;font-size:1.05rem}
}
@media (prefers-reduced-motion:reduce){
  .tr.shaking .tr-stage,.tr.shaking .tr-banner{animation:none}
  .tr.shaking .tr-banner{opacity:1}
}

/* ---- set list, meters, design-loop chrome ---- */
.tr-set{position:absolute;left:8px;right:8px;top:36px;z-index:3;display:flex;flex-wrap:wrap;gap:4px;justify-content:center;pointer-events:none}
.tr-dot{width:12px;height:12px;border-radius:50%;border:2px solid #97B62C;background:transparent;padding:0;pointer-events:auto;min-width:12px;min-height:12px}
.tr-dot.got{background:#97B62C}
.tr-dot.now{box-shadow:0 0 0 3px rgba(151,182,44,.45);transform:scale(1.2)}
.tr-dot.lock{border-color:#555;background:#2a2a2c;pointer-events:none}
.tr-dot:focus-visible{outline:2px solid #B3D640;outline-offset:2px}
.tr-meters{position:absolute;left:8px;right:8px;bottom:22px;z-index:3;display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;pointer-events:none}
.tr-chip{background:rgba(17,17,17,.86);color:#fff;border:2px solid #97B62C;border-radius:999px;padding:2px 8px;font:700 .72rem var(--head);white-space:nowrap}
.tr-chip strong{color:#B3D640}
.tr-budget{position:absolute;right:8px;top:8px;z-index:4;background:#111;color:#97B62C;border:3px solid #97B62C;border-radius:999px;padding:4px 10px;font:700 .85rem var(--head);pointer-events:none}

/* Ask / plan / reflect cards sit on the stage */
.tr-card{position:absolute;inset:12px 8px 20px 8px;z-index:6;background:rgba(17,17,17,.94);color:#fff;border:4px solid #97B62C;border-radius:20px;padding:12px 14px 14px;overflow:auto;box-shadow:0 0 0 4px #111}
.tr-card h3{font:400 1.35rem/1.15 var(--display);color:#97B62C;margin:0 0 6px;text-transform:uppercase}
.tr-card .kicker{color:#B3D640;margin:0 0 6px}
.tr-card p{margin:0 0 8px;font:700 1.05rem/1.35 var(--head);color:#f5f6f1}
.tr-card .tr-constraints{margin:0 0 10px;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:6px}
.tr-card .tr-constraints li{background:#28282A;border:2px solid #455262;border-radius:999px;padding:4px 10px;font:700 .8rem var(--head)}
.tr-acts{display:flex;flex-direction:column;gap:6px;margin:8px 0 12px}
.tr-act{display:flex;align-items:center;gap:8px;font:700 .85rem var(--head);color:#dfe3e8}
.tr-act .dots{display:flex;gap:3px;flex-wrap:wrap}
.tr-guide{background:#1f2a0c;border-left:6px solid #97B62C;border-radius:8px;padding:8px 10px;margin:0 0 10px;font:700 1rem/1.3 var(--head);color:#eaf4cf}

/* reflection picture choices */
.tr-pics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.tr-pic{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:88px;padding:8px;font:700 .95rem var(--head);text-align:center}
.tr-pic .pic{font-size:2rem;line-height:1}
.tr-pic.right{background:#97B62C;outline:4px solid #6E8A12}
.tr-pic.soft{opacity:.7}

/* trial table (tier 3) */
.tr-trials{width:100%;border-collapse:collapse;font:700 .8rem var(--head);margin:8px 0;color:#fff}
.tr-trials th,.tr-trials td{border:2px solid #455262;padding:4px 6px;text-align:center}
.tr-trials th{background:#111;color:#97B62C}
.tr-trials tr.win td{background:#1f2a0c}
.tr-chart{display:flex;align-items:flex-end;gap:6px;height:56px;margin:8px 0 4px}
.tr-bar{flex:1;min-width:10px;background:#97B62C;border:2px solid #111;border-radius:4px 4px 0 0;min-height:4px}
.tr-bar.fail{background:#455262}

/* skill toast */
.tr-toast{position:absolute;left:50%;top:18%;transform:translate(-50%,-20px);z-index:7;background:#97B62C;color:#111;border:4px solid #111;border-radius:18px;padding:10px 16px;font:700 1.05rem var(--head);box-shadow:6px 6px 0 #000;opacity:0;pointer-events:none;white-space:nowrap;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis}
.tr-toast.show{opacity:1;transform:translate(-50%,0);transition:opacity .25s,transform .25s}

/* live parent summary */
.tr-live{margin-top:14px;background:#111;color:#fff;border:4px solid #97B62C;border-radius:20px;padding:16px 18px}
.tr-live h2{color:#97B62C;font-size:1.3rem;margin:0 0 8px}
.tr-live .tr-skills-got{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px;padding:0;list-style:none}
.tr-live .tr-skills-got li{background:#28282A;border:2px solid #97B62C;border-radius:999px;padding:4px 10px;font:700 .85rem var(--head)}
.tr-live .tr-skills-got li.off{border-color:#444;color:#888}
.tr-live table{width:100%;border-collapse:collapse;font-size:.95rem}
.tr-live th,.tr-live td{border:2px solid #333;padding:6px 8px;text-align:left}
.tr-live th{color:#97B62C}

/* juice */
.tr-pop{position:absolute;z-index:5;font:700 1.1rem var(--display);color:#B3D640;text-shadow:2px 2px 0 #111;pointer-events:none;animation:trPop 700ms ease forwards}
@keyframes trPop{0%{opacity:0;transform:translate(-50%,0) scale(.6)}25%{opacity:1;transform:translate(-50%,-10px) scale(1.1)}100%{opacity:0;transform:translate(-50%,-36px) scale(1)}}
.tr-flash{position:absolute;inset:0;z-index:5;background:rgba(151,182,44,.28);pointer-events:none;opacity:0}
.tr-flash.go{animation:trFlash .45s ease}
@keyframes trFlash{0%{opacity:.8}100%{opacity:0}}

.tr-shake-pick{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;width:100%}
.tr-shake-pick .btn{min-width:88px;min-height:80px;flex-direction:column}

@media (max-width:640px){
  .tr-card{padding:10px 10px 12px;inset:8px 4px 16px 4px}
  .tr-card h3{font-size:1.15rem}
  .tr-card p{font-size:.98rem}
  .tr-pics{grid-template-columns:1fr 1fr}
  .tr-meters{bottom:16px}
  .tr-set{top:34px}
}
@media (prefers-reduced-motion:reduce){
  .tr-toast.show,.tr-pop,.tr-flash.go{animation:none;opacity:1;transform:none}
}


/* graphs, diagrams, crate, records, lab card */
.tr-graphs{padding:8px 10px 10px;background:rgba(17,17,17,.9);color:#fff;border-top:3px solid #97B62C}
.tr-graph-block{margin:0 0 10px}
.tr-graph-block h4{margin:0 0 4px;font:700 .9rem var(--head);color:#97B62C}
.tr-graph-cap{margin:4px 0 0;font:700 .8rem var(--head);color:#dfe3e8}
.tr-graph-block canvas{display:block;width:100%;height:auto;background:#111;border:2px solid #455262;border-radius:8px}
.tr-live-wrap{position:absolute;left:8px;top:8px;z-index:4;pointer-events:none}
.tr-live-wrap canvas{display:block;width:120px;height:34px;border:2px solid #97B62C;border-radius:6px;background:rgba(17,17,17,.72)}
.tr-improve{position:relative;z-index:5;background:rgba(17,17,17,.94);color:#fff;border-top:3px solid #97B62C;padding:10px 12px}
.tr-improve .tr-ok{color:#B3D640;font:700 1.05rem var(--head)}
.tr-improve .tr-fail,.tr-improve .tr-fair{color:#f3eee4;font:700 1.05rem var(--head)}
.game-controls.is-off{display:none}
.tr-diag-svg{display:block;width:100%;height:auto;background:#111;border:3px solid #28282A;border-radius:12px;margin:0 0 10px}
.tr-force-path{stroke-dasharray:8 6;animation:trForce 1.2s linear infinite}
.tr-force-flop{stroke-dasharray:4 10;animation:trFlop 0.8s ease-in-out infinite}
.tr-reso-wobble{transform-origin:80px 90px;animation:trWobble 0.7s ease-in-out infinite}
@keyframes trForce{to{stroke-dashoffset:-28}}
@keyframes trFlop{50%{d:path("M190 44 L200 80 L180 104")}}
@keyframes trWobble{50%{transform:rotate(10deg) translateX(6px)}}
.tr-lab-card{margin-top:14px;background:#fff;color:var(--black);border:4px solid #97B62C;border-radius:20px;padding:16px 18px;box-shadow:var(--pop)}
.tr-lab-card h2{color:#111;font-size:1.3rem;margin:0 0 8px}
.tr-lab-card .tr-real{display:flex;align-items:center;gap:10px;min-height:48px;font:700 1.05rem var(--head);margin:8px 0}
.tr-lab-card .tr-real input{width:28px;height:28px}
.tr-crate{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 10px 12px;background:rgba(17,17,17,.92);border-top:3px solid #288193}
.tr-crate-lab{width:100%;margin:0;font:700 .9rem var(--head);color:#97B62C}
.tr-crate-lab span{color:#aaa;font-weight:700}
.tr-sleeve{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:88px;min-height:88px;padding:8px;background:#111;color:#fff;border:3px solid #97B62C;border-radius:12px;font:700 .8rem var(--head);text-align:center}
.tr-sleeve i{display:block;width:36px;height:36px;border-radius:50%;background:conic-gradient(#111 0 20%,#97B62C 0 55%,#288193 0 80%,#111 0);border:3px solid #B3D640;box-shadow:inset 0 0 0 8px #111}
.tr-sleeve.is-live{border-color:#B3D640;box-shadow:0 0 0 3px rgba(179,214,64,.45)}
.tr-record{text-align:center}
.tr-disc{position:relative;width:160px;height:160px;margin:8px auto 12px;border-radius:50%;background:conic-gradient(#1a1a1a 0 12%,#288193 0 18%,#1a1a1a 0 40%,#97B62C 0 48%,#1a1a1a 0 75%,#455262 0 82%,#1a1a1a 0);border:6px solid #111;box-shadow:0 0 0 4px #97B62C;display:flex;align-items:center;justify-content:center;color:#fff}
.tr-disc i{position:absolute;width:36px;height:36px;border-radius:50%;background:#111;border:4px solid #B3D640}
.tr-disc span{position:relative;z-index:1;max-width:78%;font:400 1rem/1.1 var(--display);color:#B3D640;text-transform:uppercase}
.tr-disc em{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);background:#97B62C;color:#111;font:700 .7rem var(--head);padding:2px 6px;border-radius:6px;font-style:normal}
.tr-disc.spin{animation:trSpin 2.4s ease-out}
@keyframes trSpin{from{transform:rotate(0)}to{transform:rotate(720deg)}}
.tr-b-side{display:none;text-align:left;background:#111;border:3px solid #288193;border-radius:12px;padding:10px;margin:0 0 10px}
.tr-record.is-flip .tr-disc{display:none}
.tr-record.is-flip .tr-b-side{display:block}
.tr-saves{display:flex;flex-wrap:wrap;gap:8px;padding:8px;background:rgba(17,17,17,.9)}
.tr-save-note{color:#dfe3e8;font:700 .85rem var(--head);margin:0}
@media (prefers-reduced-motion:reduce){
  .tr-force-path,.tr-force-flop,.tr-reso-wobble,.tr-disc.spin{animation:none}
}

.tr-choice,.tr-acts button,.tr-card .btn{min-height:88px;min-width:88px;font:700 1.05rem var(--head);}

/* ---- integration polish (site pass) ---- */
/* Stat chips sit in normal flow under the stage and wrap cleanly: they never cover the graph caption or panel text. */
.tr-meters{position:static;left:auto;right:auto;bottom:auto;display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:0;padding:8px 8px 4px;background:#17181a;pointer-events:none}
.tr-meters[hidden]{display:none}
.tr-chip{white-space:normal;line-height:1.3;text-align:center}
@media (max-width:640px){.tr-meters{bottom:auto}}
/* Apollo stays fully inside the stage while he howls: room on the left, a gentler head-tip in this small column. */
.tr-grid .oa-howl-rig.tr-apollo{margin:0 0 18px 12px;width:calc(100% - 16px);transform-origin:40% 100%}
.tr-grid .oa-howl-rig.tr-apollo img.tr-apollo{margin:0;width:100%}
.tr-grid .oa-howl-rig.tr-apollo.is-howling,.tr-grid .oa-howl-rig.tr-apollo.is-howling-loop{animation-name:oaTipTr}
@keyframes oaTipTr{0%,100%{transform:rotate(0) translate(0,0)}6%{transform:rotate(-3deg) translate(2px,1px)}30%{transform:rotate(-5deg) translate(5px,-2px)}53%,73%{transform:rotate(-7deg) translate(7px,-4px)}92%{transform:rotate(-2deg) translate(2px,0)}}
@media (max-width:420px){.tr-grid .oa-howl-rig.tr-apollo{margin:0 0 16px 8px;width:calc(100% - 10px)}}

/* ===== Tower Rock layout v3: status bar -> stage -> (dock = .game-controls); panels open as a bottom sheet ===== */
.tr{display:flex;flex-direction:column}
.tr-hud{position:relative;left:auto;right:auto;top:auto;flex:none;display:flex;align-items:center;gap:8px;padding:4px 8px;pointer-events:auto;background:#141517;border-bottom:2px solid #2c2e33;z-index:8}
.tr-hud .tr-apollo,.tr-hud .oa-howl-rig.tr-apollo{width:40px;height:auto;margin:0;flex:none;align-self:flex-end}
.tr-hud .oa-howl-rig.tr-apollo .oa-howl-idle{width:100%;height:auto}
.tr-hud-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px}
.tr-hud-row{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0}
.tr-hud .tr-level,.tr-hud .tr-goal{font-size:.8rem;padding:2px 8px;border-width:2px;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tr-hud .tr-set{position:static;justify-content:flex-start;gap:3px;pointer-events:auto}
.tr-hud .tr-dot{width:10px;height:10px;min-width:10px;min-height:10px}
.tr-hud .tr-budget{position:static;flex:none;font-size:.78rem;padding:2px 8px;border-width:2px}
.tr-menu-btn{flex:none;min-height:44px;padding:4px 10px;border-radius:12px;border:2px solid #97B62C;background:#111;color:#B3D640;font:700 .85rem var(--head);cursor:pointer}
.tr-menu{position:absolute;right:6px;top:calc(100% + 4px);z-index:40;width:min(300px,calc(100vw - 24px));max-height:60vh;overflow-y:auto;background:#111;border:3px solid #97B62C;border-radius:16px;padding:10px;box-shadow:0 10px 24px rgba(0,0,0,.55)}
.tr-menu .tr-saves{position:static;display:flex;flex-direction:column;gap:8px}
.tr-menu .tr-saves .btn{min-height:48px}
.tr-menu .tr-save-note{color:#dfe3e8;font:600 .85rem/1.3 var(--body,inherit);margin:0}
.tr-menu .tr-crate{margin-top:8px}
.tr-meterbar{flex:none;padding:4px 6px;background:#17181a}
.tr-meterbar:not(:has(> :not([hidden]))){display:none}
.tr-meterbar .tr-meters{padding:0;background:none}
.tr-grid{display:block;grid-template-columns:none}
.tr-sheet-body>.tr-meters{margin-bottom:8px}

/* full-screen play */
html.oa-play .game-stage{position:static}
html.oa-play .tr{position:static;height:100%;min-height:0;overflow:visible}
html.oa-play .tr-grid{flex:1 1 auto;min-height:0;height:auto;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;position:relative}
html.oa-play .tr-stage{flex:none;height:100%;width:100%;max-width:100%}
html.oa-play .tr-notice{left:6px;right:6px;top:6px;bottom:auto;max-width:none;padding:5px 10px;font-size:.9rem;text-align:center;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html.oa-play .tr-notice::after{display:none}
html.oa-play .tr-toast{top:12%;max-width:90%;text-align:center}
html.oa-play .tr-sheet{display:none;position:absolute;left:0;right:0;bottom:0;z-index:35;max-height:calc(100% - 96px);flex-direction:column;
  background:#111;color:#fff;border-top:4px solid #97B62C;border-radius:20px 20px 0 0;box-shadow:0 -10px 28px rgba(0,0,0,.55);padding-bottom:env(safe-area-inset-bottom)}
html.oa-play .tr-sheet:has(> .tr-sheet-body > :not([hidden]), > .tr-sheet-foot > :not([hidden])){display:flex}
html.oa-play .tr-sheet-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 12px 6px}
html.oa-play .tr-sheet-body:not(:has(> :not([hidden]))){display:none}
html.oa-play .tr-sheet-foot{flex:none;max-height:55%;overflow-y:auto;overscroll-behavior:contain;padding:8px 12px 10px;border-top:2px solid #2c2e33;background:#151618}
html.oa-play .tr-sheet-foot:not(:has(> :not([hidden]))){display:none}
html.oa-play .tr-sheet-body:not(:has(> :not([hidden]))) + .tr-sheet-foot{border-top:0;max-height:none}
html.oa-play .tr-sheet .tr-card{position:static;inset:auto;margin:0 0 10px;border-width:3px;box-shadow:none;overflow:visible;padding:10px 12px}
html.oa-play .tr-sheet .tr-card:last-child{margin-bottom:0}
html.oa-play .tr-sheet .tr-meters{position:static}
html.oa-play .tr-improve{margin:0;padding:0;background:none;border:0}
html.oa-play .tr-improve p{margin:0 0 6px;font-size:1rem;line-height:1.3}
html.oa-play .tr-improve .tr-opts .btn{min-height:52px;flex:1 1 150px}
html.oa-play .tr-graphs{margin:0}
/* the dock: big touch targets, compact */
html.oa-play .game-controls{gap:6px;padding:6px 8px 8px}
html.oa-play .game-controls .tr-tray{gap:6px}
html.oa-play .game-controls .tr-piece{min-width:0;flex:1 1 64px;max-width:120px;min-height:52px;padding:4px 6px;gap:2px;font-size:.8rem;flex-direction:column}
html.oa-play .game-controls .tr-piece .ico{width:40px;height:16px}
html.oa-play .game-controls .tr-piece .left{font-size:.7rem}
html.oa-play .game-controls .tr-place{gap:6px;margin:0}
html.oa-play .game-controls .tr-place .btn{flex:1 1 0;min-width:0;min-height:52px;font-size:1.05rem;padding:4px 6px}
html.oa-play .game-controls .tr-opts{gap:6px;margin:0}
html.oa-play .game-controls .tr-opts:empty{display:none}
html.oa-play .game-controls .tr-opts .btn{flex:1 1 120px;min-height:50px;font-size:1rem;padding:4px 10px}
@media (min-aspect-ratio:5/4) and (min-width:700px){
  html.oa-play .tr-sheet{left:auto;right:0;top:44px;width:clamp(260px,34vw,420px);max-height:none;border-radius:0;border-top:0;border-left:4px solid #97B62C}
  html.oa-play .tr-sheet-foot{max-height:60%}
}
@media (max-height:500px) and (orientation:landscape){
  html.oa-play .tr-sheet{top:38px}
  html.oa-play .tr-hud{padding:2px 8px}
  html.oa-play .tr-hud .tr-apollo,html.oa-play .tr-hud .oa-howl-rig.tr-apollo{width:30px}
  html.oa-play .game-controls .tr-piece{min-height:46px}
  html.oa-play .game-controls .tr-place .btn,html.oa-play .game-controls .tr-opts .btn{min-height:46px}
}
.tr-hud{padding-left:12px}
.tr-hud .oa-howl-rig.tr-apollo{transform-origin:50% 100%}
.tr-hud .oa-howl-rig.tr-apollo.is-howling,.tr-hud .oa-howl-rig.tr-apollo.is-howling-loop{animation-name:oaTipHud}
@keyframes oaTipHud{0%,100%{transform:rotate(0)}6%{transform:rotate(-3deg)}53%,73%{transform:rotate(-6deg) translateY(-2px)}92%{transform:rotate(-1deg)}}
.tr-hud .oa-howl-fx{display:none}
@media (max-height:500px) and (orientation:landscape){
  html.oa-play .tr-improve p{font-size:.88rem;margin-bottom:4px}
  html.oa-play .tr-improve .tr-opts .btn{flex:1 1 110px;min-height:44px;font-size:.88rem;padding:4px 8px}
  html.oa-play .tr-sheet .tr-card{padding:8px 10px}
  html.oa-play .tr-sheet .tr-card h3{font-size:1.1rem}
}
/* ===== layout v4: compact dock (Matt's phone: 412x~780 usable) — stage gets the room ===== */
.tr-zones{display:none}
.tr-piece .left .lw{display:inline}
html.oa-play .game-controls{gap:5px;padding:5px 6px calc(6px + env(safe-area-inset-bottom))}
html.oa-play .game-controls .tr-tray{display:flex;flex-wrap:nowrap;gap:4px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;margin:0}
html.oa-play .game-controls .tr-tray::-webkit-scrollbar{display:none}
html.oa-play .game-controls .tr-piece{flex:1 1 0;min-width:46px;max-width:110px;min-height:44px;height:44px;padding:2px 3px;gap:0;border-radius:12px;border-width:2px;
  display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;justify-content:center;align-content:center;column-gap:3px;row-gap:1px;font-size:.72rem;line-height:1.05}
html.oa-play .game-controls .tr-piece .ico{grid-column:1;grid-row:1;width:22px;height:11px;align-self:center}
html.oa-play .game-controls .tr-piece .left{grid-column:2;grid-row:1;font-size:.7rem;font-weight:800;align-self:center}
html.oa-play .game-controls .tr-piece .left .lw{display:none}
html.oa-play .game-controls .tr-piece .nm{grid-column:1 / span 2;grid-row:2;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
html.oa-play .game-controls .tr-piece.picked{box-shadow:0 0 0 3px #97B62C inset}
/* Left / Center / Right: one segmented control */
html.oa-play .game-controls .tr-place{display:flex;gap:0;margin:0;border:2px solid #111;border-radius:12px;overflow:hidden}
html.oa-play .game-controls .tr-place .btn{flex:1 1 0;min-width:0;min-height:44px;height:44px;padding:0 6px;font-size:.95rem;border:0;border-radius:0;box-shadow:none;transform:none}
html.oa-play .game-controls .tr-place .btn + .btn{border-left:2px solid #111}
/* actions: one row; Build again is an icon */
html.oa-play .game-controls .tr-dock-acts{display:flex;flex-wrap:nowrap;gap:5px;margin:0}
html.oa-play .game-controls .tr-dock-acts .btn{flex:1 1 auto;min-width:0;min-height:44px;height:44px;padding:0 8px;font-size:.95rem;white-space:nowrap;border-width:2px}
html.oa-play .game-controls .tr-dock-acts .tr-rock{flex:2 1 auto}
html.oa-play .game-controls .tr-dock-acts .tr-again,html.oa-play .game-controls .tr-dock-acts .tr-diag{flex:0 0 46px;width:46px;padding:0;font-size:1.2rem}
html.oa-play .game-controls .tr-dock-acts .tr-again-lbl{display:none}
html.oa-play .game-controls .tr-dock-acts .tr-flip{flex:0 1 auto;font-size:.85rem}
/* chrome: 1-line message, tighter hud */
html.oa-play .game-msg{padding:3px 10px;font-size:.9rem;-webkit-line-clamp:2}
html.oa-play .tr-hud{padding-top:2px;padding-bottom:2px;gap:6px}
html.oa-play .tr-hud .tr-apollo,html.oa-play .tr-hud .oa-howl-rig.tr-apollo{width:34px}
html.oa-play .tr-hud-main{gap:2px}
html.oa-play .tr-menu-btn{min-height:44px}
html.oa-play .tr-grid{align-items:stretch}
@media (min-aspect-ratio:5/4) and (min-width:700px){
  html.oa-play .game-controls .tr-tray{flex-wrap:wrap;overflow:visible}
  html.oa-play .game-controls .tr-piece{flex:1 1 60px}
  html.oa-play .game-msg{-webkit-line-clamp:5}
}
html.oa-play .tr-hud{padding-bottom:5px}
/* hud howl: a smaller tip (no lift) so Apollo never pokes 1-2 px out of the top of the stage */
@keyframes oaTipHud{0%,100%{transform:rotate(0)}6%{transform:rotate(-1.5deg)}53%,73%{transform:rotate(-3deg)}92%{transform:rotate(-.5deg)}}
/* short landscape phones: the "Tonight's lab" card fits without scrolling (all four starts visible) */
@media (max-height:500px) and (orientation:landscape){
  html.oa-play .tr-card[data-card=place] h3{margin:0 0 4px;font-size:1rem}
  html.oa-play .tr-card[data-card=place] p:not(.kicker){display:none}
  html.oa-play .tr-card[data-card=place] .tr-opts{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  html.oa-play .tr-card[data-card=place] .tr-opts .btn{min-height:44px;padding:4px 8px;font-size:.85rem;line-height:1.1}
}
