/* Cannonfall (breaker): iPad and wide windows. Moved out of the prototype page (<style id="wideCss">) on Nov 28, 2026.
   Every rule starts html.tc-wide, so a phone never applies any of it (claude/ipad-duo-layout.md). */
/* ===== iPad and other wide windows. Every rule starts html.tc-wide (this block becomes games/breaker/wide.css when the game is filed).
   The board keeps its 360 x 600 logical size; only its scale changes. bkw-rail = portrait (rails beside the board), bkw-side = landscape (side panels). */
html.tc-wide #app{max-width:none;box-shadow:none;display:grid;grid-template-columns:minmax(0,1fr) var(--bw,360px) minmax(0,1fr)}
html.tc-wide #wbg{display:block;position:absolute;inset:-14px;background:var(--bg) center/cover no-repeat;filter:blur(7px) brightness(.36) saturate(.8);image-rendering:auto;z-index:0}
html.tc-wide #app::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:radial-gradient(ellipse at 50% 55%,transparent 30%,rgba(0,0,0,.55) 100%)}
html.tc-wide #hdr{grid-area:hdr;zoom:var(--z);height:51px;padding:0 12px 7px;z-index:30}
html.tc-wide #hud,html.tc-wide #main,html.tc-wide .side,html.tc-wide #bar{position:relative;z-index:1;min-width:0;min-height:0}
html.tc-wide #main{grid-area:main;display:flex;align-items:center;justify-content:center}
html.tc-wide #stage{overflow:visible;flex:none}
html.tc-wide #stageBg,html.tc-wide #stage::after{display:none}
html.tc-wide #cv{box-shadow:0 0 0 2px var(--line),0 0 0 5px var(--accent2),0 0 0 7px var(--line),0 0 30px 10px rgba(0,0,0,.65)}
html.tc-wide #sideL{grid-area:sl}
html.tc-wide #sideR{grid-area:sr}
html.tc-wide #hud{grid-area:hud;zoom:var(--z)}
html.tc-wide #bar{grid-area:bar;zoom:var(--z)}
html.tc-wide .side{display:flex;flex-direction:column;gap:10px;zoom:var(--zs)}
html.tc-wide .sp{display:flex;flex-direction:column;min-height:0;background:var(--panel);border:3px solid var(--line);border-radius:var(--rad);padding:6px}
html.tc-wide .sph{margin:0 0 6px;display:flex;align-items:center;gap:7px;font-size:17px;line-height:1;color:var(--accent);text-shadow:0 2px 0 var(--line),1px 0 0 var(--line),-1px 0 0 var(--line)}
html.tc-wide .sph img{width:24px;height:24px;object-fit:contain;flex:none}
html.tc-wide .sph img:not([src]){display:none}
html.tc-wide .sph b{margin-left:auto;font:bold 15px "Trebuchet MS",Verdana,sans-serif;color:var(--ink)}
html.tc-wide #ladder .pip{font-size:13px}
html.tc-wide #foes{display:flex;flex-wrap:wrap;gap:4px;justify-content:center}
html.tc-wide #foes canvas{width:46px;height:46px;background:rgba(0,0,0,.4);border:2px solid var(--line);border-radius:var(--rad)}
html.tc-wide #foes canvas.bossc{width:98px;height:70px;border-color:#ff5c5c;box-shadow:0 0 10px rgba(255,60,40,.5)}
html.tc-wide #loList{display:flex;flex-direction:column;gap:5px;overflow:auto;-webkit-overflow-scrolling:touch;min-height:0;flex:1}
html.tc-wide #spLoad{flex:1}
html.tc-wide .ov{top:var(--hdrH,51px)}
html.tc-wide #ovLoad{top:0}
html.tc-wide .ov.in{top:var(--ovTop,51px);left:calc(50% - var(--bw) / 2 - 3px);right:calc(50% - var(--bw) / 2 - 3px);padding:0}
html.tc-wide .ovIn{display:flex;flex-direction:column;align-items:center;zoom:var(--zo);width:100%;max-width:430px;margin:auto;padding:12px 10px 16px;flex:none}
html.tc-wide .ov.in>.ovIn>:first-child,html.tc-wide .ov.in>.ovIn>:last-child{margin-top:0;margin-bottom:0}
html.tc-wide #ovStart{align-items:center;justify-content:center;overflow:auto}
html.tc-wide #stIn{min-height:0;height:100%;max-height:780px;justify-content:space-evenly}
html.tc-wide #stBack{filter:brightness(.42) saturate(.9) blur(2px)}
html.tc-wide #loPanel{max-height:none}
html.tc-wide #hdr::after{height:7px}

/* pillars either side of the board */
html.tc-wide.kit #main::before,html.tc-wide.kit #main::after{content:"";position:absolute;top:50%;width:var(--pw);height:calc(var(--bhp) + var(--pw));transform:translateY(-50%);box-sizing:border-box;border:1px solid transparent;border-image:var(--k-pillar) var(--ks-pillar) fill / calc(var(--pw) * var(--kc-pillar)) calc(var(--pw) / 2) calc(var(--pw) * var(--kcb-pillar)) var(--kr-pillar,stretch);z-index:3;pointer-events:none;filter:drop-shadow(0 0 6px rgba(0,0,0,.7))}
html.tc-wide.kit #main::before{left:calc(var(--pw) * -1 - 5px)}
html.tc-wide.kit #main::after{right:calc(var(--pw) * -1 - 5px)}
html.tc-wide.kit #cv{box-shadow:0 0 0 2px var(--line),0 0 0 4px var(--accent2),0 0 0 6px var(--line),0 0 30px 10px rgba(0,0,0,.65)}

/* kit frames on the side panels */
html.tc-wide.kit .sp{border:16px solid transparent;border-image:var(--k-panel) var(--ks-panel) fill / calc(var(--kw-panel) * .8) var(--kr-panel);background:none;padding:0 2px 2px;filter:drop-shadow(0 5px 0 rgba(0,0,0,.4))}
html.tc-wide.kit #hdr::after{height:11px;bottom:-2px;background:none;border:1px solid transparent;--bh:11px;border-image:var(--k-trim) var(--ks-trim) fill / calc(var(--bh) / 2) calc(var(--bh) * var(--kc-trim)) round;box-shadow:none;box-sizing:border-box}

html.tc-wide.bkw-side.kit .sp{padding:0 2px 8px}
html.tc-wide.bkw-side.kit.skin-outpost .sp{padding:10px 9px 14px 11px}
html.tc-wide.bkw-side.kit.skin-magic .sp{padding:4px 4px 10px}
/* ---------- portrait: rails ---------- */
html.tc-wide.bkw-rail #app{grid-template-areas:"hdr hdr hdr" ". hud ." "sl main sr" ". bar .";grid-template-rows:var(--hdrH) var(--hudH) minmax(0,1fr) auto}
html.tc-wide.bkw-rail #hud{height:40px;font-size:16px;background:none;padding:0 2px}
html.tc-wide.bkw-rail #bar{background:none;box-shadow:none;padding:6px 0 calc(8px + env(safe-area-inset-bottom));min-height:0}
html.tc-wide.bkw-rail #bar::before{display:none}
html.tc-wide.bkw-rail .side{justify-content:center;align-items:center;gap:12px;padding:0}
html.tc-wide.bkw-rail #sideL{padding-right:calc((var(--pw) + 10px) / var(--zs))}
html.tc-wide.bkw-rail #sideR{padding-left:calc((var(--pw) + 10px) / var(--zs))}
html.tc-wide.bkw-rail .sp{flex:none;box-sizing:border-box;width:calc(100% - 8px);max-width:112px}
html.tc-wide.bkw-rail.kit .sp{border-width:9px;border-image:var(--k-slot) var(--ks-slot) fill / var(--kw-slot) stretch;padding:2px 0 2px}
html.tc-wide.bkw-rail .sph{justify-content:center;font-size:13px;gap:4px;margin:2px 0 5px}
html.tc-wide.bkw-rail .sph span{display:none}
html.tc-wide.bkw-rail .sph img{width:18px;height:18px}
html.tc-wide.bkw-rail .sph b{display:none}
/* the wave ladder runs down the left rail, as tall as the board */
html.tc-wide.bkw-rail #spLadder,html.tc-wide.bkw-rail.kit #spLadder{border:0;border-image:none;background:none;padding:0;filter:none;width:auto;max-width:none;height:calc(var(--bhp) / var(--zs));align-items:center}
html.tc-wide.bkw-rail #spLadder .sph{display:none}
html.tc-wide.bkw-rail #ladder{display:flex;flex-direction:column;justify-content:space-between;align-items:center;height:100%;gap:0;position:relative;padding:4px 0}
html.tc-wide.bkw-rail #ladder::before{content:"";position:absolute;left:50%;top:14px;bottom:14px;width:6px;margin-left:-3px;background:rgba(0,0,0,.6);border-radius:3px;box-shadow:0 0 0 2px var(--line),0 0 0 3px rgba(255,255,255,.12)}
html.tc-wide.bkw-rail #ladder .pip{width:auto;height:calc(100% / 15 - 8px);max-height:44px;flex:none;font-size:13px}
html.tc-wide.bkw-rail #foes canvas{width:40px;height:40px}
html.tc-wide.bkw-rail #foes canvas.bossc{width:84px;height:60px}
html.tc-wide.bkw-rail #spLoad{flex:0 1 auto}
html.tc-wide.bkw-rail #loList{flex-direction:column;align-items:stretch;flex:none}
html.tc-wide.bkw-rail #loList .lor{padding:3px 5px;gap:3px;justify-content:space-between}
html.tc-wide.bkw-rail #loList .lor .t,html.tc-wide.bkw-rail #loList .loh{display:none}
html.tc-wide.bkw-rail #loList .lor img,html.tc-wide.bkw-rail #loList .lor .fb{width:26px;height:26px}
html.tc-wide.bkw-rail #loList .lor .c{min-width:0;font-size:14px}
html.tc-wide.bkw-rail.bkw-thin #spFoes,html.tc-wide.bkw-rail.bkw-thin .sph span{display:none}
html.tc-wide.bkw-rail.bkw-thin .sp{width:calc(100% - 4px)}

/* ---------- landscape: side panels ---------- */
html.tc-wide.bkw-side #app{grid-template-areas:"hdr hdr hdr" "hud main sr" "sl main sr" "sl main bar";grid-template-rows:var(--hdrH) auto minmax(0,1fr) auto}
html.tc-wide.bkw-side.tcw-left #app{grid-template-areas:"hdr hdr hdr" "sr main hud" "sr main sl" "bar main sl"}
html.tc-wide.bkw-side #hud,html.tc-wide.bkw-side .side,html.tc-wide.bkw-side #bar{width:min(100%,calc(var(--sw) / var(--z)));box-sizing:border-box}
html.tc-wide.bkw-side #hud,html.tc-wide.bkw-side #sideL{justify-self:end;margin-right:calc((var(--pw) + 16px) / var(--z))}
html.tc-wide.bkw-side .sph b{margin-right:8px}
html.tc-wide.bkw-side #sideR,html.tc-wide.bkw-side #bar{justify-self:start;margin-left:calc((var(--pw) + 16px) / var(--z))}
html.tc-wide.bkw-side.tcw-left #hud,html.tc-wide.bkw-side.tcw-left #sideL{justify-self:start;margin-right:0;margin-left:calc((var(--pw) + 16px) / var(--z))}
html.tc-wide.bkw-side.tcw-left #sideR,html.tc-wide.bkw-side.tcw-left #bar{justify-self:end;margin-left:0;margin-right:calc((var(--pw) + 16px) / var(--z))}
html.tc-wide.bkw-side #hud{flex-direction:column;align-items:stretch;justify-content:flex-start;height:auto;gap:7px;background:none;padding:12px 0 0;font-size:19px}
html.tc-wide.bkw-side #hud .pill{height:42px;--bh:42px;padding:0 22px 0 14px;gap:8px}
html.tc-wide.bkw-side #hud img{width:26px;height:26px}
html.tc-wide.bkw-side #hud .lbl{font-size:12.5px}
html.tc-wide.bkw-side #hud .lblK,html.tc-wide.bkw-side #hud .lblG{display:inline}
html.tc-wide.bkw-side #pKeep{max-width:none;flex:none}
html.tc-wide.bkw-side #hpBar{height:20px}
html.tc-wide.bkw-side #hHp{font-size:13px;line-height:18px}
html.tc-wide.bkw-side #hWave,html.tc-wide.bkw-side #hGold{margin-left:auto}
html.tc-wide.bkw-side .side{padding:10px 0 12px}
html.tc-wide.bkw-side #ladder{grid-template-columns:repeat(5,1fr);gap:7px 4px;padding:2px 4px 4px}
html.tc-wide.bkw-side #bar{background:none;box-shadow:none;padding:0 0 calc(14px + env(safe-area-inset-bottom));min-height:0;gap:8px}
html.tc-wide.bkw-side #bar::before,html.tc-wide.bkw-side #hBalls{display:none}
html.tc-wide.bkw-side #bar .btn{flex:1;width:auto;height:78px;font-size:15px;gap:3px}
html.tc-wide.bkw-side #bar .btn img{width:38px;height:38px}
html.tc-wide.bkw-side #pkLo{display:none}
html.tc-wide.bkw-side.kit #hud .pill{border:1px solid transparent;background:none;box-shadow:none;border-image:var(--k-pill) var(--ks-pill) fill / calc(var(--bh) / 2) calc(var(--bh) * var(--kc-pill)) stretch;filter:drop-shadow(0 3px 0 rgba(0,0,0,.4))}
html.tc-wide.bkw-side.kit #hud #pKeep{border-image-source:var(--k-darkbar);border-image-slice:var(--ks-darkbar) fill;border-image-width:calc(var(--bh) / 2) calc(var(--bh) * var(--kc-darkbar))}
