/* v3 keeps the approved illustrated workshop and replaces every exposed repeat
   with one nonrepeating quiet plate. Rules and old .oo-workshop remain frozen. */
.oo-game.oo3-game{background:#082b32 url('game-art/optical-order-v3/quiet-field-v1.webp') center/100% 100% no-repeat}
.oo3-game .oo-primary,.oo3-game .oo-secondary,.oo3-game .oo-help>div{background:#0c3037;background-image:none}
.oo3-game .oo-main{justify-content:flex-start;gap:6px;padding:4px 0;overflow:hidden}
.oo3-game .oo-prompt{flex:0 0 76px;min-height:76px;max-height:76px;height:76px;padding:9px 10%;font-size:clamp(14px,4cqw,17px);line-height:1.15}
.oo3-game .oo3-reading{flex:0 0 17px;text-align:center;font-size:11px;color:#e4d7ba;line-height:17px}
.oo3-game .oo3-board{position:relative;flex:1 1 auto;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));align-content:stretch;min-height:200px;padding:0 5.6%;gap:8px 6px;overflow:visible;touch-action:none}
.oo3-game .oo3-board.oo3-nine{grid-template-rows:repeat(3,minmax(0,1fr));min-height:288px}
.oo3-game .oo3-card{position:relative;display:grid;grid-template-rows:minmax(0,1fr) 40px;align-content:stretch;justify-items:center;min-width:0;height:100%;max-height:none;min-height:94px;padding:11px 8px 9px;touch-action:none;user-select:none;-webkit-user-select:none;overflow:visible;transition:transform .1s,filter .1s}
.oo3-game .oo3-subject{display:block;width:100%;height:100%;min-height:0;max-width:100%;object-fit:contain;pointer-events:none;margin:0;filter:none}
.oo3-game .oo3-caption{display:flex;align-items:center;justify-content:center;align-self:stretch;width:100%;min-width:0;margin:0;padding:2px 1px 0;text-align:center;font-family:Georgia,serif;font-size:clamp(11px,3.1cqw,13px);font-weight:700;line-height:1.13;white-space:normal;overflow-wrap:normal;color:#25382e;pointer-events:none}
.oo3-game .oo3-card .oo-position{z-index:2;left:1px;top:1px;width:23px;height:23px;font-size:14px;pointer-events:none}
.oo3-game .oo3-card.is-selected{outline:3px solid #f5d483;outline-offset:1px;box-shadow:none;filter:brightness(1.06)}
.oo3-game .oo3-card.oo3-lifted{opacity:.2}
.oo3-game .oo3-card.oo3-insert-target:after{content:'';position:absolute;inset:0;border:3px dashed #c4ffff;background:#69d8d030;z-index:3;pointer-events:none}
.oo3-game .oo3-ghost{position:fixed!important;z-index:30;transform:translate(-50%,-50%) rotate(-3deg)!important;pointer-events:none!important;opacity:.95;filter:drop-shadow(0 8px 9px #0009);transition:none!important}
.oo3-game .oo3-controls{flex:0 0 100px;padding:0 5%;display:flex;flex-direction:column;gap:5px;min-height:100px}
.oo3-game .oo3-move-strip{display:grid;grid-template-columns:84px 1fr 84px;gap:5px;align-items:center}
.oo3-game .oo3-move-strip span{font-size:11px;text-align:center;color:#edddbd;line-height:1.2}
.oo3-game .oo3-controls button,.oo3-game .oo3-review-list button{min-height:44px;min-width:44px;padding:4px;border:1px solid #b99c64;border-radius:5px;color:#efddbd;background:#0b3038;font:600 13px var(--font-body,system-ui,sans-serif)}
.oo3-game .oo3-controls button:disabled{opacity:.4}
.oo3-game .oo3-positions{display:flex;flex-wrap:nowrap;gap:3px;justify-content:center}
.oo3-game .oo3-positions button{flex:1;min-width:0;max-width:48px;font-size:15px}
/* Nine positions use two rows, retaining 44px minimum targets at 360px. */
.oo3-game:has(.oo3-nine) .oo3-controls{flex-basis:149px;min-height:149px}
.oo3-game:has(.oo3-nine) .oo3-positions{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:3px}
.oo3-game:has(.oo3-nine) .oo3-positions button{width:100%;max-width:none}
.oo3-game .oo3-success{display:grid;place-items:center;flex:0 0 100px;min-height:100px;font:700 21px Georgia,serif;color:#e9eac1}
.oo3-game .oo3-frame-foot,.oo3-game .oo-frame-foot{flex:0 0 48px;min-height:48px;height:48px}
.oo3-game .oo3-entry{margin:auto 7%;padding:18px;text-align:center;color:#ead8b9;background:#06242ce8;border:1px solid #94794c;border-radius:8px}
.oo3-game .oo3-entry h2{font:700 23px Georgia,serif;margin:0 0 16px}.oo3-game .oo3-entry p{font-size:14px;line-height:1.45}
.oo3-game .oo3-concealed{margin:0 5%;background:#06262c;align-items:center;text-align:center}.oo3-game .oo3-concealed p{font-size:14px;margin:0;color:#e0d0b3}
.oo3-game .oo3-concealed>.oo-primary,.oo3-game .oo3-concealed>.oo-secondary{width:90%;max-width:320px;height:auto;min-height:48px;font-size:15px;padding:10px 12px;background:#0c3037;border:1px solid #b89a61;border-radius:5px}
.oo3-game .oo3-results{padding:12px 7%;overflow-y:auto;overscroll-behavior:contain;justify-content:flex-start;gap:10px;text-align:center}
.oo3-game .oo3-results .oo-result-heading h2{font-size:42px;white-space:nowrap}.oo3-game .oo3-results .oo-result-heading p{font-size:14px}
.oo3-game .oo3-comparison{margin:0;font-size:12px;line-height:1.4;color:#e2d9c4}
.oo3-game .oo3-review-list{display:grid;grid-template-columns:1fr;gap:5px;width:100%}.oo3-game .oo3-review-list button{text-align:left;font-size:13px;padding:7px 10px}
.oo3-game .oo3-values{width:100%;flex:none;text-align:left}.oo3-game .oo3-values h2{font:700 21px Georgia,serif;margin:4px 0 10px;color:#f0dbac}
.oo3-game .oo3-values p{font-size:12px;line-height:1.4;margin:5px 0 10px;color:#e5ddc7}.oo3-game .oo3-values .oo3-criterion{font-weight:700;font-size:14px}
.oo3-game .oo3-values ol{margin:10px 0;padding-left:28px}.oo3-game .oo3-values li{min-height:68px;padding:5px 0;border-bottom:1px solid #a990613d;font-size:13px;color:#ecdbb9}
.oo3-game .oo3-values li img{width:62px;height:58px;object-fit:contain;float:left;margin-right:8px}.oo3-game .oo3-values li span{display:flex;min-height:58px;flex-direction:column;justify-content:center;gap:4px}.oo3-game .oo3-values li small{font-size:12px;line-height:1.3;color:#d9e6df}
.oo3-game .oo3-end-title{font:700 20px Georgia,serif;margin:3px 0;color:#f0dbac}.oo3-game .oo3-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.oo3-game .oo-help>div{max-height:100%;overflow-y:auto}.oo3-game .oo-help p{font-size:13px;line-height:1.4}
@container(max-height:740px){.oo3-game .oo-prompt{height:66px;min-height:66px;max-height:66px;flex-basis:66px}.oo3-game .oo-main{gap:4px}.oo3-game .oo3-board.oo3-nine{min-height:270px}.oo3-game .oo3-card{min-height:88px;padding-top:9px;padding-bottom:8px;grid-template-rows:minmax(0,1fr) 36px}.oo3-game .oo3-caption{font-size:11px}.oo3-game .oo3-reading{font-size:10px;flex-basis:14px;line-height:14px}.oo3-game .oo3-controls{min-height:94px;flex-basis:94px}.oo3-game:has(.oo3-nine) .oo3-controls{min-height:141px;flex-basis:141px}}
@container(max-height:630px){.oo3-game .oo-main{overflow-y:auto}.oo3-game .oo3-board{flex:none;height:230px}.oo3-game .oo3-board.oo3-nine{height:290px}.oo3-game .oo-prompt{min-height:66px;flex-basis:66px}.oo3-game .oo3-entry{margin-block:12px}}
@media(prefers-reduced-motion:reduce){.oo3-game .oo3-card{transition:none}}
.oo3-game .oo3-insertion-marker{position:fixed;z-index:20;pointer-events:none;border:3px dashed #c4ffff;border-radius:5px;background:#69d8d026;box-shadow:inset 5px 0 #f9e1a9}
.oo3-game .oo3-insertion-marker[hidden]{display:none}.oo3-game .oo-prompt small{display:block;font:500 10px/1.15 var(--font-body,system-ui,sans-serif);margin-top:3px;max-width:100%}
@container(max-height:740px){.oo3-game .oo-main{overflow-y:auto;overscroll-behavior:contain}.oo3-game .oo3-board.oo3-nine{flex-shrink:0}}
.oo3-game .oo3-entry>.oo-secondary{display:block;width:100%;margin-top:12px}
.oo3-game .oo3-example{justify-content:center;gap:12px}.oo3-game .oo3-example-help{margin:0 8%;color:#eddfc4;text-align:center;font-size:14px;line-height:1.4}.oo3-game .oo3-sample-board{flex:0 0 170px;min-height:150px;grid-template-rows:1fr}
.oo3-game .oo3-sample-mark{display:grid;place-items:center;align-self:center;width:58px;height:58px;border-radius:50%;background:#285a5b;border:2px solid #bb9b5c;color:#f0dfba;font:700 33px Georgia,serif;pointer-events:none}
.oo3-game .oo3-sample-return{flex:none;align-self:center;width:86%;margin-bottom:12px}
/* Short portrait phones: allocate the board the measured remaining height.
   Zero basis/minimum prevents intrinsic image dimensions from inflating rows.
   At 360x640 the three rows retain about 82px each plus gaps; all controls stay
   in the viewport. The ordinary 844px layout above retains its larger artwork. */
@container(max-height:700px){
  .oo3-game .oo-main{overflow:hidden;gap:4px;padding-block:4px}
  .oo3-game .oo-prompt{flex:0 0 54px;min-height:54px;max-height:54px;height:54px;padding:6px 10%;font-size:14px}
  .oo3-game .oo-prompt small{font-size:10px;line-height:1.1;margin-top:2px}
  .oo3-game .oo3-reading{flex:0 0 14px;line-height:14px}
  .oo3-game .oo3-board,.oo3-game .oo3-board.oo3-nine{flex:1 1 0;min-height:0;height:0;gap:6px}
  .oo3-game .oo3-card{min-height:0;height:100%;padding:6px 7px;grid-template-rows:minmax(0,1fr) 28px}
  .oo3-game .oo3-caption{font-size:11px;line-height:1.1;padding-top:1px}
  .oo3-game .oo3-subject{min-height:0;max-height:100%;object-fit:contain}
  .oo3-game .oo3-controls{flex:0 0 94px;min-height:94px}
  .oo3-game:has(.oo3-nine) .oo3-controls{flex:0 0 141px;min-height:141px}
  .oo3-game .oo3-results{overflow-y:auto}
  .oo3-game .oo3-example .oo3-sample-board{flex:0 0 150px;height:150px;min-height:150px}
}
/* Text belongs to the painted parchment aperture, below the upper frame lip.
   Its usable vertical band is roughly 23–86% of the source artwork. */
.oo3-game .oo-prompt{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;flex:0 0 84px;height:84px;min-height:84px;max-height:84px;padding:22px 10% 12px;font-size:15.6px;line-height:16.8px}
.oo3-game .oo-prompt>span{display:block;flex:none;width:100%;margin:0;line-height:inherit}
.oo3-game .oo-prompt small{display:block;flex:none;width:100%;max-width:100%;margin:0;font-size:10px;line-height:11px}
@container(max-height:700px){
  .oo3-game .oo-prompt{gap:1px;flex:0 0 64px;height:64px;min-height:64px;max-height:64px;padding:16px 10% 9px;font-size:12.5px;line-height:14px}
  .oo3-game .oo-prompt small{margin:0;font-size:9px;line-height:10px}
}
