/* v49+ battle layer (combat screen only: #app.bt). Presentation only. */
/* 1: the selected-card panel sits in the tray, never over the sea */
html body #app.bt>.scr>.tray>#detail{position:static!important;inset:auto!important;margin:0!important;z-index:auto;max-height:none}
/* 2: tray has one fixed height whether it shows the peek row or the staged card, so the battle strip never jumps */
html body:not(.desk) #app.bt>.scr>.tray{--trh:clamp(126px,19vh,160px);height:var(--trh)!important;min-height:var(--trh);flex:none;display:flex;flex-direction:column;justify-content:flex-end;padding:4px 4px 5px!important;overflow:hidden;box-sizing:border-box}
/* idle: the turn note shrinks to one line above the row */
html body:not(.desk) #app.bt>.scr>.tray>#detail.empty{display:flex!important;align-items:baseline;gap:6px;min-height:0!important;height:auto!important;padding:0 4px 4px!important;background:none!important;border:0!important;outline:0!important;box-shadow:none!important;color:#e9dab2;font:12.5px/1.25 'IM Fell English',Georgia,serif;white-space:nowrap;overflow:hidden;flex:none}
html body:not(.desk) #app.bt>.scr>.tray>#detail.empty .tl{display:flex;gap:5px;flex:none;margin:0;font:13px 'IM Fell English SC',serif;color:#e8c76a}
html body:not(.desk) #app.bt>.scr>.tray>#detail.empty .tl .tp{color:#d9c79b}
html body:not(.desk) #app.bt>.scr>.tray>#detail.empty .lg1{margin:0!important;overflow:hidden;text-overflow:ellipsis;min-width:0;font-size:12.5px;color:#e9dab2}
html body:not(.desk) #app.bt>.scr>.tray>#detail.empty .hint{display:none!important}
/* peek row: every card visible, no overlap, cost + icon + name */
html body #app.bt #hand.peek{flex:1 1 auto;display:flex!important;flex-wrap:nowrap;justify-content:center;align-items:stretch;gap:4px;height:auto!important;min-height:0;padding:0!important;margin:0;overflow:visible;transform:none!important}
html body:not(.desk) #app.bt #hand.peek>.card{flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:78px!important;height:auto!important;min-height:76px!important;max-height:104px!important;margin:0!important;transform:none!important;rotate:none!important;padding:3px 3px 4px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:flex-start;box-sizing:border-box;position:relative;overflow:hidden;animation:none}
html body:not(.desk) #app.bt #hand.peek>.card .chead{position:absolute;top:2px;left:2px;margin:0;padding:0;height:auto;background:none;border:0}
html body:not(.desk) #app.bt #hand.peek>.card .chead .ctype,html body:not(.desk) #app.bt #hand.peek>.card .chead .ctag{display:none}
html body:not(.desk) #app.bt #hand.peek>.card .cost{position:static;width:20px;height:20px;font-size:13px;line-height:20px;margin:0}
html body:not(.desk) #app.bt #hand.peek>.card .vig{order:1;flex:1 1 auto;display:flex;align-items:center;justify-content:center;margin:2px 0 0;height:auto;min-height:0;width:100%;background:none;border:0}
html body:not(.desk) #app.bt #hand.peek>.card .vig .ic{width:min(30px,7.5vw);height:min(30px,7.5vw)}
html body:not(.desk) #app.bt #hand.peek>.card .nm{order:2;font-size:clamp(10.5px,2.9vw,12.5px)!important;line-height:1.05!important;text-align:center;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;padding:0;min-height:2.1em;max-width:100%;overflow-wrap:normal;word-break:normal}
html body:not(.desk) #app.bt #hand.peek>.card .rule,html body:not(.desk) #app.bt #hand.peek>.card .ds,html body:not(.desk) #app.bt #hand.peek>.card .cfoot{display:none!important}
html body:not(.desk) #app.bt #hand.peek>.card.sel{outline:2px solid #e8c76a;outline-offset:-2px}
/* staged: the big card replaces the row */
html body:not(.desk) #app.bt>.scr>.tray.staged>#hand{display:none!important}
html body:not(.desk) #app.bt>.scr>.tray.staged>#detail.stage{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:stretch;height:100%;padding:6px!important;box-sizing:border-box}
html body #app.bt #detail.stage>.stc{display:flex;align-items:stretch;min-height:0}
html body #app.bt #detail.stage>.stc>.card{width:calc((var(--trh) - 22px)*.74)!important;height:calc(var(--trh) - 22px)!important;max-width:none!important;min-height:0!important;margin:0!important;transform:none!important;rotate:none!important;flex:none;cursor:pointer;animation:none;font-size:11px}
html body #app.bt #detail.stage>.stc>.card .nm{font-size:13.5px!important;line-height:1.05!important}
html body #app.bt #detail.stage>.stc>.card .ds{font-size:10.5px!important}
html body #app.bt #detail.stage>.dmain{min-width:0;overflow:auto;align-self:center}
html body #app.bt #detail.stage>.dside{display:flex;flex-direction:column;justify-content:space-between;gap:6px;align-items:stretch}
html body #app.bt #detail.stage .dside .dgo{flex:1 1 auto;min-height:48px;min-width:84px;font-size:17px}
html body #app.bt #detail.stage .dside .dx.btback{position:relative!important;inset:auto!important;width:auto!important;height:auto!important;min-height:44px!important;min-width:84px;border-radius:3px!important;background:linear-gradient(#efe1bb,#cdb98a)!important;border:1px solid #3a2208!important;color:#2a1608!important;text-shadow:none!important;filter:none!important;font:15px 'IM Fell English SC',serif!important;display:flex;align-items:center;justify-content:center;align-self:stretch;margin:0}
html body #app.bt #detail.stage .dside .dx.btback::before{inset:0}
/* hit preview ghost on enemy bars */
html body .gb>.ghost{position:absolute;top:0;bottom:0;background:repeating-linear-gradient(135deg,rgba(255,236,190,.95) 0 3px,rgba(200,40,20,.85) 3px 6px);pointer-events:none;z-index:1;animation:btghost 1s ease-in-out infinite alternate;box-shadow:inset 0 0 0 1px rgba(60,10,5,.6)}
html body .gb{position:relative}
html body .gb>span{position:relative;z-index:2}
@keyframes btghost{from{opacity:.65}to{opacity:1}}
@media (prefers-reduced-motion:reduce){html body .gb>.ghost{animation:none}}
/* 3: battle strip = topline / enemy nameplate / scene (both ships) / our plate */
html body #app.bt>.scr>.sea{display:flex!important;flex-direction:column;align-items:stretch;padding:0!important}
html body #app.bt>.scr>.sea>.topline{position:relative!important;inset:auto!important;flex:none;z-index:4}
html body #app.bt>.scr>.sea>#intent,html body #app.bt>.scr>.sea>.rail{display:none!important}
html body #app.bt>.scr>.sea>svg{display:none}
html body #app.bt .bt-foe,html body #app.bt .bt-me{position:relative;z-index:3;flex:none;margin:3px 6px 0;padding:4px 8px 5px;background:var(--paper) center/220px,#e9dcb8;color:#231a12;border:1px solid #2a180a;outline:1px solid rgba(35,26,18,.4);outline-offset:-4px;box-shadow:0 3px 8px rgba(0,0,0,.35);border-radius:2px}
html body #app.bt .bt-foe>.eplate{position:static!important;inset:auto!important;transform:none!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;background:none!important;border:0!important;outline:0!important;box-shadow:none!important;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px;row-gap:2px;text-align:left}
html body #app.bt .bt-foe>.eplate .ename{grid-column:1/-1;font:17px/1.1 'IM Fell English SC',serif!important;color:#231a12;margin:0;padding:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #app.bt .bt-foe>.eplate .estats{grid-column:1/-1;display:flex;align-items:center;gap:5px;margin:0;flex-wrap:nowrap}
html body #app.bt .bt-foe>.eplate .estats>.gauge{flex:1 1 auto;min-width:0}
html body #app.bt .bt-foe>.eplate .traits{grid-column:1/-1;margin:2px 0 0;justify-content:flex-start}
html body #app.bt .bt-int{display:flex;align-items:center;gap:4px;margin-top:4px;flex-wrap:nowrap;overflow:hidden}
html body #app.bt .bt-int>small{font:11px 'IM Fell English SC',serif;color:#5a4630;flex:none}
html body #app.bt .ichip{display:inline-flex;align-items:center;gap:3px;flex:none;padding:2px 7px 2px 5px;min-height:28px;box-sizing:border-box;border:1px solid #3a2208;border-radius:2px;background:#f3e7c6;color:#231a12;font:13px 'IM Fell English',Georgia,serif;cursor:pointer;white-space:nowrap}
html body #app.bt .ichip .ic{width:17px;height:17px}
html body #app.bt .ichip b{font:700 16px Georgia,serif;color:#8b2a1c}
html body #app.bt .ichip em{font-style:normal;font-family:'IM Fell English SC',serif;font-size:13px}
html body #app.bt .ichip .tgt{display:inline-flex;opacity:.8}.ichip .tgt .ic{width:14px!important;height:14px!important}
html body #app.bt .ichip.now{background:#8b2a1c;color:#f6ead0;border-color:#3a0904}
html body #app.bt .ichip.now b{color:#fff3d6}
html body #app.bt .ichip.now.t0{background:#3f5a6a;border-color:#1c2a33}
html body #app.bt .ichip.nx{opacity:.8;min-height:24px;padding:1px 5px;font-size:12px}
html body #app.bt .ichip.nx b{font-size:13px}
html body #app.bt .ichip.nx em{display:none}
html body #app.bt .bscene{position:relative;flex:1 1 auto;min-height:0}
html body #app.bt .bscene>#foe{position:absolute!important;inset:auto!important;right:3%!important;top:4%!important;bottom:4%!important;width:58%!important;max-width:none!important;margin:0!important;transform:none!important;display:flex;align-items:center;justify-content:center}
html body #app.bt .bscene>#foe>.eart{width:100%!important;height:100%!important;max-height:none!important;position:relative!important;inset:auto!important;margin:0!important}
html body #app.bt .bscene>#foe .painted,html body #app.bt .bscene>#foe .painted img{width:100%;height:100%;object-fit:contain}
html body #app.bt .bscene>.myship{position:absolute!important;inset:auto!important;left:2%!important;bottom:4%!important;width:40%!important;max-width:220px!important;margin:0!important}
html body #app.bt .bt-me{display:flex;align-items:center;gap:6px;margin:0 6px 4px;flex-wrap:nowrap}
html body #app.bt .bt-me .pn{font:14px 'IM Fell English SC',serif;white-space:nowrap;flex:none;max-width:34%;overflow:hidden;text-overflow:ellipsis}
html body #app.bt .bt-me .pbar{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:4px}
html body #app.bt .bt-me .pbar>.gauge{flex:1 1 auto;min-width:0}
html body #app.bt .bt-me .ptags{display:flex;gap:4px;flex:none}
html body #app.bt .bt-me .tag{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}
html body #app.bt em.fc{font:700 14px Georgia,serif;font-style:normal;color:#fff;background:#a3201a;border:1px solid #4a0a06;border-radius:2px;padding:0 4px;margin-left:3px;line-height:18px;white-space:nowrap}
html body #app.bt .bt-me .tag em.fc{font-size:12px;line-height:15px;padding:0 3px}
/* ship-state chip on the End Turn row */
html body #app.bt~.actions,html body .actions{position:relative}
html body .actions>.bt-state{position:absolute;left:50%;top:-11px;transform:translateX(-50%);display:flex;gap:4px;z-index:5;pointer-events:auto}
html body .actions>.bt-state>*{display:inline-flex;align-items:center;gap:3px;font:12px/1 'IM Fell English',Georgia,serif;padding:3px 7px;min-height:22px;box-sizing:border-box;background:#efe1bb;color:#231a12;border:1px solid #3a2208;border-radius:11px;white-space:nowrap;box-shadow:0 2px 4px rgba(0,0,0,.4)}
html body .actions>.bt-state .ic{width:13px;height:13px}
html body .gb>.ghost.in{background:repeating-linear-gradient(135deg,rgba(163,32,26,.95) 0 3px,rgba(70,8,4,.9) 3px 6px)}
html body #app.bt #detail.stage .dhead .dn{white-space:normal;overflow:visible;text-overflow:clip;max-width:none}
html body #app.bt #detail.stage .dhead{flex-wrap:wrap}
/* 4: shared engraved ship renderer (shipink.js). One line weight at every size: non-scaling strokes. */
.ink2{display:block;overflow:visible}
.ink2 *{vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.ink2 .o{fill:none;stroke:#231a12;stroke-width:1.5}
.ink2 .d{fill:none;stroke:#231a12;stroke-width:1}
.ink2 .r{fill:none;stroke:#231a12;stroke-width:.6;opacity:.85}
.ink2 .h{fill:none;stroke:#231a12;stroke-width:.55;opacity:.55}
.ink2 .rf{fill:none;stroke:#231a12;stroke-width:.9;stroke-dasharray:.1 2.2;opacity:.8}
.ink2 .hf{fill:#e9dcb8;stroke:#231a12;stroke-width:1.4}
.ink2 .hf.o{fill:#e8c76a}
.ink2 .sl{fill:#f4ead0;stroke:#231a12;stroke-width:1}
.ink2 .gp{fill:#231a12;stroke:none}
.ink2 .pn{fill:#231a12;stroke:#231a12;stroke-width:.5}
.ink2 .en{stroke:#231a12;stroke-width:.9}
.ink2 .sx{fill:none;stroke:#9a2a1c;stroke-width:1.2}
.ink2 .o2{stroke:#231a12;stroke-width:.5}
.ink2 .hole{fill:#1a120c;stroke:#231a12;stroke-width:.7;stroke-dasharray:1 .8}
.ink2 .spl{fill:none;stroke:#1a120c;stroke-width:1.3}
.ink2 .bk{fill:none;stroke:#231a12;stroke-width:1.5}
.ink2 .tear{fill:#c9b78f;stroke:#231a12;stroke-width:.8}
.ink2 .smk{fill:none;stroke:#3b3027;stroke-width:2.4;opacity:.45}
.ink2 .fire{fill:#c0461e;stroke:#5a1408;stroke-width:.8}
html body #app.bt .bscene>.bsea{position:absolute;left:0;right:0;bottom:0;z-index:0;background:repeating-linear-gradient(to bottom,rgba(35,26,18,.75) 0 1px,transparent 1px 3.5px);opacity:.6;-webkit-mask:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);mask:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
html body #app.bt .bscene>.myship,html body #app.bt .bscene>#foe{position:absolute!important;top:auto!important;max-width:none!important;max-height:none!important;z-index:1;transform:none!important;margin:0!important}
html body #app.bt .bscene>#foe>.eart{width:100%!important;height:100%!important;animation:none}
html body #app.bt .bscene>.myship>svg,html body #app.bt .bscene>#foe>.eart>svg.ink2{width:100%;height:100%}
html body #app.bt .bscene>.myship .mycap{display:none}
html body #app.bt .bscene>.grap{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}
html body #app.bt .bscene>.grap path{fill:none;stroke:#231a12;stroke-width:1;stroke-dasharray:3 2;opacity:.8}
html body #app.bt .bscene.noship>#foe .duelport{width:auto!important;height:100%!important;max-height:100%;aspect-ratio:1;object-fit:cover;margin:0 auto;display:block}
html body #app.bt .bscene.noship>#foe>.eart{display:flex;align-items:center;justify-content:center}
html body #app.bt .bscene>#foe .painted{display:none}
html body #app.bt .bscene>.boardrow{position:absolute!important;left:50%!important;right:auto!important;top:6px!important;bottom:auto!important;transform:translateX(-50%)!important;z-index:4;display:flex;flex-direction:column;align-items:center;gap:2px;width:max-content;max-width:94%;margin:0!important}
html body #app.bt .bscene>.boardrow .small{background:rgba(233,220,184,.92);padding:1px 6px;border-radius:3px;color:#3a2a18}
html body #app.bt .bscene>.boardrow{left:6px!important;transform:none!important;align-items:flex-start;max-width:46%}
html body #app.bt .bscene>.boardrow #board{font-size:15px;padding:5px 12px;min-height:44px}
html body #app.bt .bscene>.boardrow .small{font-size:11px;white-space:normal}
/* ===== 5: wide layout (landscape below the desk breakpoint, from about 600x300: phones on their side, portal boxes, short windows).
   Our plate left, the battle strip centre, the enemy plate and the selected card right, the hand along the bottom, End Turn bottom right. ===== */
html body.wide #app.bt{--hr:clamp(92px,28vh,150px);display:grid!important;position:relative;width:100%!important;max-width:none!important;height:100vh;height:100dvh;margin:0!important;padding:4px max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important;box-sizing:border-box;overflow:hidden;gap:4px 6px;
 grid-template-columns:minmax(170px,22%) minmax(0,1fr) minmax(196px,26%);grid-template-rows:auto auto auto auto minmax(0,1fr) var(--hr);
 grid-template-areas:"hud hud hud" "tl scene foe" "me scene foe" "mine scene det" ". scene det" "hand hand act"}
html body.wide #app.bt>.scr,html body.wide #app.bt>.scr>.sea,html body.wide #app.bt>.scr>.tray{display:contents!important}
html body.wide #app.bt>.hud{grid-area:hud;margin:0!important;padding-right:52px!important;min-width:0}
html body.wide #app.bt>#menu{position:absolute!important;top:4px!important;right:max(6px,env(safe-area-inset-right))!important;left:auto!important;height:44px;z-index:6}
html body.wide #app.bt .topline{grid-area:tl;margin:0!important;padding:0!important;min-width:0;position:static!important;background:none!important}
html body.wide #app.bt .bt-me{grid-area:me;margin:0!important;flex-wrap:wrap;row-gap:3px;align-self:start}
html body.wide #app.bt .bt-me .pbar{flex:1 1 100%;order:3}
html body.wide #app.bt>.scr>.mine{grid-area:mine;margin:0!important;padding:0!important;flex-wrap:wrap;gap:4px;align-self:start;min-width:0}
html body.wide #app.bt>.scr>.mine .mflex{display:none}
html body.wide #app.bt .bt-foe{grid-area:foe;margin:0!important;align-self:start;min-width:0}
html body.wide #app.bt .bt-int{flex-wrap:wrap;row-gap:3px}
html body.wide #app.bt .bscene{grid-area:scene;position:relative!important;height:auto!important;min-height:0!important;margin:0!important;background:url(img/chart/chart.webp) center/cover,#d6b97c;border:1px solid #2a180a;box-shadow:inset 0 0 18px rgba(60,30,8,.35);border-radius:3px;overflow:hidden}
html body.wide #app.bt>.scr>.tray>#detail{grid-area:det;min-height:0!important;max-height:none!important;height:auto!important;overflow:auto;align-self:stretch;margin:0!important;box-sizing:border-box}
html body.wide #app.bt>.scr>.tray>#detail.empty{display:block!important;padding:4px 6px!important;font-size:12px;line-height:1.3;overflow:hidden}
html body.wide #app.bt>.scr>.tray>#detail.empty .lg1{white-space:normal!important;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical}
html body.wide #app.bt #detail .stc{display:none!important}
html body.wide #app.bt #hand{grid-area:hand;height:var(--hr)!important;min-height:0;align-items:stretch!important;justify-content:center;gap:6px!important;padding:0!important}
html body.wide #app.bt #hand.peek>.card{max-width:min(104px,12vw)!important;max-height:none!important;min-height:0!important;height:100%!important}
html body.wide #app.bt #hand.peek>.card .vig .ic{width:min(36px,5vh + 12px);height:min(36px,5vh + 12px)}
html body.wide #app.bt #hand.peek>.card .nm{font-size:clamp(11px,1.6vw,13.5px)!important}
html body.wide #app.bt>.actions{grid-area:act;position:relative!important;inset:auto!important;width:auto!important;margin:0!important;padding:0!important;display:grid!important;grid-template-columns:1fr auto 1fr;grid-template-rows:minmax(0,1fr) auto;gap:4px;align-items:stretch;background:none!important;border:0!important;box-shadow:none!important}
html body.wide #app.bt>.actions>#endturn{grid-column:1/-1;grid-row:1;width:100%!important;min-height:44px;height:auto!important;margin:0!important}
html body.wide #app.bt>.actions>.pile{grid-row:2;width:auto!important;height:auto!important;min-height:44px;margin:0!important}
html body.wide #app.bt>.actions>.pile.draw{grid-column:1}html body.wide #app.bt>.actions>.pile.disc{grid-column:3}
html body.wide #app.bt>.actions>#undo{grid-row:2;grid-column:2;margin:0!important;min-height:44px;min-width:44px}
html body.wide #app.bt>.actions>.bt-state{top:-12px}
html body.wide #rotnote{display:none!important}
html body.wide #app.bt{--hr:clamp(90px,26vh,150px)}
html body.wide #app.bt>.hud{display:flex!important;align-items:center;gap:8px;height:auto!important;min-height:0;padding-top:2px!important;padding-bottom:2px!important}
html body.wide #app.bt>.hud .medal{width:34px!important;height:34px!important;flex:none}html body.wide #app.bt>.hud .medal img{width:32px!important;height:32px!important}
html body.wide #app.bt>.hud .gauges{flex:1 1 auto;min-width:0;margin:0!important}
html body.wide #app.bt>.hud .strip{flex:none;margin:0!important;width:auto!important}
html body.wide #app.bt>#menu{height:40px!important;top:2px!important}
html body.wide #app.bt>.scr>.tray>#detail:not(.empty){display:flex!important;flex-direction:column;gap:3px;padding:5px 7px!important}
html body.wide #app.bt #detail:not(.empty) .dmain{flex:1 1 auto;min-height:0;overflow:auto;margin:0!important;padding:0!important}
html body.wide #app.bt #detail:not(.empty) .dhead{display:flex!important;align-items:center;gap:5px;margin:0 0 2px!important}
html body.wide #app.bt #detail:not(.empty) .dhead .dn{display:inline!important;font:15px/1.1 'IM Fell English SC',serif}
html body.wide #app.bt #detail:not(.empty) .dhead .dtype{font-size:11px;opacity:.8;margin-left:auto}
html body.wide #app.bt #detail:not(.empty) .dtxt,html body.wide #app.bt #detail:not(.empty) .dnow{font-size:12.5px!important;line-height:1.25!important;margin:0!important}
html body.wide #app.bt #detail:not(.empty) .dside{display:flex!important;flex-direction:row!important;gap:6px;flex:none;position:static!important;margin:0!important}
html body.wide #app.bt #detail:not(.empty) .dside>button{position:static!important;flex:1 1 0;min-height:40px;height:auto!important;width:auto!important;margin:0!important;inset:auto!important;transform:none!important}
html body.wide #app.bt>#menu{width:38px!important;height:38px!important;min-height:0!important;padding:0!important;top:3px!important}
html body.wide #app.bt>#menu svg,html body.wide #app.bt>#menu img{max-width:26px;max-height:26px}
html body.wide #app.bt>.hud{padding-right:46px!important}
html body.wide #app.bt .bt-me .pn{flex:1 1 100%;order:1;max-width:none!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.wide #app.bt .bt-me .ptags{order:2}
html body #app.bt .bscene.noship>#foe>.eart>*{max-width:100%!important;max-height:100%!important}
html body #app.bt .bscene.noship>#foe .duelport{width:auto!important;height:100%!important;max-height:100%!important;object-fit:cover}
html body #app.bt .bscene.noship>#foe svg.shipsvg{width:100%!important;height:100%!important}
html body.wide #app.bt>#menu{width:44px!important;height:44px!important;top:1px!important}
html body.wide #app.bt>.hud{padding-right:52px!important;min-height:44px}
/* tap targets: anything tappable at least 26px tall (WCAG 2.2 AA is 24px), main controls 44px (Apple HIG) */
html body #app.bt .bt-int .ichip{min-height:28px}
html body #app.bt .mine .tag.dkt,html body .actions>.bt-state>*{min-height:26px}
html body #app.bt #logbtn{min-width:44px}
/* ===== 6: run prologue (prologue.js) ===== */
body.prolog .cine:not(.prol){display:none!important}
.prol{position:fixed;inset:0;z-index:90;display:flex;flex-direction:column;background:rgba(14,8,3,.96);color:#e8d6a8;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));box-sizing:border-box;animation:cin .35s ease-out;cursor:pointer}
.prol.out{opacity:0;transition:opacity .25s}
.prol .pwrap{flex:1 1 auto;min-height:0;position:relative}
.prol .pp{position:absolute;inset:0;display:flex;flex-direction:column;gap:10px;opacity:0;pointer-events:none;transition:opacity .35s}
.prol .pwrap[data-p="1"] .p1,.prol .pwrap[data-p="2"] .p2{opacity:1;pointer-events:auto}
.prol figure{margin:0;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
.prol figure img{flex:none;width:auto;height:auto;max-height:44vh;max-width:100%;object-fit:contain;border:3px solid #c9a24a;box-shadow:0 6px 18px rgba(0,0,0,.6);background:#e6d7b1}

.prol figcaption{font:italic 12px/1.3 'IM Fell English',Georgia,serif;color:#b9a47a;text-align:center;max-width:46ch}
.prol .pt{flex:none;max-width:60ch;margin:0 auto;text-align:center}
.prol .pt>i{display:block;font:13px 'IM Fell English SC',serif;letter-spacing:3px;color:#c9a24a;font-style:normal}
.prol .pt b{display:block;font:26px/1.1 'IM Fell English SC',Georgia,serif;margin:2px 0 6px;text-shadow:0 1px 0 #000}
.prol .pt p{margin:0 0 6px;font:15px/1.4 'IM Fell English',Georgia,serif}
.prol .pw{color:#e8c76a;font:14px 'IM Fell English',Georgia,serif;text-decoration:underline;display:inline-block;min-height:32px;line-height:32px}
.prol .pnav{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px;max-width:520px;width:100%;margin:0 auto}
.prol .pnav button{min-height:44px;min-width:96px;font:16px 'IM Fell English SC',serif}
.prol .pskip{background:none;border:1px solid #6b5332;color:#d9c79b}
.prol .pdots{display:flex;gap:6px}.prol .pdots b{width:8px;height:8px;border-radius:50%;background:#6b5332}
.prol .pwrap[data-p="1"]~.pnav .pdots b:first-child,.prol .pwrap[data-p="2"]~.pnav .pdots b:last-child{background:#e8c76a}
@media (orientation:landscape) and (max-height:620px){
 .prol .pp{flex-direction:row;align-items:center;gap:18px}
 .prol figure{flex:0 1 46%;height:100%}.prol figure img{max-height:calc(100vh - 110px)}
 .prol .pt{flex:1 1 0;text-align:left;margin:0}
 .prol .pt b{font-size:22px}.prol .pt p{font-size:13.5px}}
@media (prefers-reduced-motion:reduce){.prol,.prol .pp{animation:none;transition:none}}
/* v58: the detail Close/Back button kept its tap-target ::before but lost position:relative in the phone and wide layouts, so its invisible hit area covered the whole screen: after selecting a card every tap (Play, cards, End turn) just closed the panel again. Keep the hit area on the button. */
html body #app #detail .dx,html body:not(.desk) #app.bt #detail:not(.empty) .dside>button.dx{position:relative!important}
html body #app #detail .dgo{position:relative;z-index:1}
