:root{--bg:#15171c;--panel:#1f232b;--panel-2:#272c36;--text:#e8eaf0;--muted:#8d94a3;--accent:#e0b84c;--error:#ff7a70;--red:#c4473a;--yellow:#c9a227;--green:#3f9a55;--blue:#3b7bd0;--white:#c8ccd6;--black:#6e5a8a;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);margin:0;font:14px/1.35 system-ui,-apple-system,Segoe UI,sans-serif}button,select{font:inherit;color:inherit}#root{justify-content:center;display:flex}.screen{flex-direction:column;gap:10px;width:100%;max-width:480px;padding:12px 16px 24px;display:flex}.setup label{flex-direction:column;gap:4px;display:flex}.setup select{background:var(--panel);border:1px solid #39404d;border-radius:6px;padding:8px}h1,h2{margin:4px 0}.muted{color:var(--muted)}.small{font-size:12px}.error{color:var(--error)}.curtain{text-align:center;justify-content:center;align-items:center;min-height:80vh}button{background:var(--panel-2);cursor:pointer;border:1px solid #39404d;border-radius:6px;padding:6px 10px}button:disabled{opacity:.4;cursor:default}button.primary{background:var(--accent);color:#1a1a1a;border-color:var(--accent);font-weight:600}button.toggle.on{border-color:var(--accent);color:var(--accent)}.player-bar{background:var(--panel);border-radius:8px;flex-wrap:wrap;align-items:baseline;gap:10px;padding:6px 10px;display:flex}.player-bar .leader{color:var(--muted);flex-basis:100%;font-size:12px}.player-bar .leader strong,.leader-line strong{color:var(--text)}.leader-line{color:var(--muted)}.center{text-align:center}.zone{background:var(--panel);border-radius:8px;padding:8px}.zone-label{text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:6px;font-size:11px}.row{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.battlefields{grid-template-columns:1fr 1fr;gap:8px;display:grid}.battlefield{background:var(--panel);border:2px solid #0000;border-radius:8px;padding:8px}.battlefield.targetable{border-color:var(--accent);cursor:pointer}.line{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;min-height:64px;margin:4px 0;display:grid}.enemy-line{opacity:.85;border-bottom:1px dashed #39404d;padding-bottom:6px}.slot{min-height:60px;color:var(--muted);border:1px dashed #39404d;border-radius:6px;justify-content:center;align-items:center;display:flex}.slotted{flex-direction:column;gap:2px;display:flex}.shift{justify-content:space-between;display:flex}.shift button{padding:0 6px;font-size:11px}.unit{text-align:left;background:var(--panel-2);border:1px solid #39404d;border-left:4px solid var(--muted);border-radius:6px;flex-direction:column;align-items:flex-start;width:100%;min-width:0;max-width:110px;min-height:60px;padding:4px 6px;display:flex;position:relative}.row .unit{width:104px}.unit.selected,.card.selected{outline:2px solid var(--accent)}.unit.dim{opacity:.5}.card.dim{opacity:.4;filter:grayscale(.8)}.unit-name{white-space:nowrap;text-overflow:ellipsis;max-width:100%;font-size:11px;font-weight:600;overflow:hidden}.unit-power{font-size:20px;font-weight:700;line-height:1.1}.unit-type{color:var(--muted);font-size:11px}.unit-kw{color:var(--muted);font-size:10px}.unit-tag{color:var(--accent);font-size:9px;position:absolute;top:2px;right:4px}.hand{gap:6px;padding-bottom:4px;display:flex;overflow-x:auto}.card{text-align:left;background:var(--panel-2);border:1px solid #39404d;border-top:5px solid var(--muted);border-radius:8px;flex-direction:column;flex:0 0 120px;align-items:flex-start;min-height:150px;padding:6px;display:flex;position:relative}.card-cost{background:var(--accent);color:#1a1a1a;border-radius:50%;justify-content:center;align-items:center;width:20px;height:20px;font-size:12px;font-weight:700;display:flex;position:absolute;top:4px;right:6px}.card-name{padding-right:22px;font-size:12px;font-weight:600}.card-power{font-size:22px;font-weight:700}.card-type,.card-text{color:var(--muted);font-size:11px}.c-red{border-left-color:var(--red);border-top-color:var(--red)}.c-yellow{border-left-color:var(--yellow);border-top-color:var(--yellow)}.c-green{border-left-color:var(--green);border-top-color:var(--green)}.c-blue{border-left-color:var(--blue);border-top-color:var(--blue)}.c-white{border-left-color:var(--white);border-top-color:var(--white)}.c-black{border-left-color:var(--black);border-top-color:var(--black)}.controls{background:var(--bg);border-top:1px solid #2c313b;flex-direction:column;gap:6px;padding:6px 0 8px;display:flex;position:sticky;bottom:0}.row.tight{gap:8px}.push{margin-left:auto}.controls .card{flex-basis:108px;min-height:112px}.summary{background:var(--panel);border-radius:8px;flex-direction:column;gap:2px;padding:6px 10px;display:flex}.log{background:var(--panel);border-radius:8px;max-height:40vh;margin:0;padding:8px 8px 8px 28px;font-size:12px;overflow-y:auto}.log li{white-space:pre-wrap;margin:2px 0}.line>.muted{grid-column:1/-1;align-self:center}.bf-col{background:var(--panel);border:2px solid #0000;border-radius:8px;flex-direction:column;gap:4px;min-width:0;padding:6px;display:flex}.bf-col.targetable{border-color:var(--accent);cursor:pointer}.bf-col .slot{min-height:48px;padding:0}.bf-col .slot.enemy{opacity:.9}.bf-col .slot .unit,.bf-col .slotted .unit{width:100%;max-width:none;min-height:46px}.bf-col .slotted{flex-direction:row;align-items:stretch;gap:2px;width:100%}.bf-col .slotted .unit{flex:1;min-width:0}.bf-col .shift{flex-direction:column;justify-content:center;gap:2px}.bf-col .shift button{padding:0 4px;font-size:10px}.slot-label{color:var(--muted);font-size:10px}.front-line{text-align:center;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);border-top:1px solid var(--accent);border-bottom:1px solid var(--accent);margin:2px 0;padding:2px 0;font-size:10px}.unit-head{justify-content:space-between;align-items:flex-start;gap:4px;width:100%;display:flex}.unit-head .unit-power{font-size:18px;line-height:1}.card-head{justify-content:space-between;align-items:center;width:100%;margin-bottom:2px;display:flex}.card-head .card-cost{position:static}.card-cost.reduced{background:#7fd48a}.card-head .card-power{font-size:20px;font-weight:700;line-height:1}.card-name{padding-right:0}.bf-col .slot.enemy.hidden{min-height:22px}.life-bar{background:var(--panel);border-radius:8px;align-items:baseline;gap:8px;padding:6px 10px;transition:background .2s;display:flex}.life-bar.hit{background:#5a2420}.caption{background:var(--panel-2);border-left:4px solid var(--accent);border-radius:6px;min-height:52px;padding:6px 10px}.unit{transition:transform .2s,box-shadow .2s,opacity .3s}.unit.fx-active{box-shadow:0 0 0 2px var(--accent);transform:scale(1.03)}.unit.fx-hit{box-shadow:0 0 0 2px var(--error);animation:.3s shake}.unit.fx-dying{opacity:.25;box-shadow:0 0 0 2px var(--error)}.unit.fx-face{box-shadow:0 0 0 2px var(--error);transform:translateY(-4px)}@keyframes shake{0%,to{translate:0}25%{translate:-3px}75%{translate:3px}}.log{max-height:36vh;padding:4px 0 0;list-style:none;position:relative}.log-group{margin-bottom:6px}.log-phase{text-transform:uppercase;letter-spacing:.04em;color:var(--accent);font-size:11px}.log ul{margin:2px 0 0;padding-left:14px}.log li li{cursor:pointer;border-radius:4px;padding:1px 4px}.log li li.current{background:var(--panel-2);color:var(--text);outline:1px solid var(--accent)}.log li li.future{color:var(--muted);opacity:.6}details>summary{cursor:pointer}.unit.fx-enter{box-shadow:0 0 0 2px var(--green);animation:.4s ease-out enter}@keyframes enter{0%{opacity:0;transform:translateY(8px)scale(.9)}to{opacity:1;transform:none}}.base-row .row{min-height:48px}.base-row .unit{width:96px;min-height:44px}.unit,.card{position:relative}.info-btn{color:var(--muted);cursor:pointer;padding:2px;font-size:13px;line-height:1;position:absolute;bottom:2px;right:3px}.info-btn:hover{color:var(--accent)}.inspect-backdrop{z-index:10;background:#0009;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.inspect{background:var(--panel);border-top:6px solid var(--muted);border-radius:14px 14px 0 0;flex-direction:column;gap:8px;width:100%;max-width:480px;max-height:85vh;padding:14px 16px 16px;display:flex;overflow-y:auto}.inspect-head{align-items:center;gap:10px;display:flex}.inspect-head .card-cost{flex:none;width:28px;height:28px;font-size:15px;position:static}.inspect-title{flex-direction:column;flex:1;min-width:0;display:flex}.inspect-title strong{font-size:17px}.inspect-power{font-size:30px;font-weight:700}.inspect-power.up,.power-table .up{color:var(--green)}.inspect-power.down,.power-table .down{color:var(--error)}.inspect-text{margin:0;font-size:15px}.inspect-section{border-top:1px solid #39404d;padding-top:6px}.power-table{border-collapse:collapse;width:100%;font-size:13px}.power-table td{padding:2px 0}.power-table td:last-child{text-align:right;font-variant-numeric:tabular-nums}.power-table .total td{border-top:1px solid #39404d;padding-top:4px;font-weight:700}.glossary{flex-direction:column;gap:6px;margin:0;font-size:13px;display:flex}.glossary dt{font-weight:600}.glossary dd{color:var(--muted);margin:0}.card-typeline{color:var(--muted);font-size:10px;font-style:italic}.how-to-play>div{flex-direction:column;gap:8px;margin-top:8px;line-height:1.45;display:flex}.how-to-play ol{flex-direction:column;gap:4px;margin:0;padding-left:18px;display:flex}.htp-board{background:var(--panel);border-radius:8px;flex-direction:column;gap:4px;padding:6px;font-size:11px;display:flex}.htp-zone{background:var(--panel-2);border-radius:6px;padding:4px 8px}.htp-zone.enemy{color:var(--error)}.htp-zone.hand{background:0 0;border:1px dashed #39404d}.htp-fields{grid-template-columns:1fr 1fr;gap:6px;display:grid}.htp-field{background:var(--panel-2);border-radius:6px;flex-direction:column;gap:2px;padding:4px;display:flex}.htp-label{text-align:center;color:var(--muted)}.htp-slot{text-align:center;height:13px;color:var(--text);border-radius:3px;font-size:9px;line-height:13px}.htp-slot.enemy{background:color-mix(in srgb, var(--error) 30%, transparent)}.htp-slot.you{background:color-mix(in srgb, var(--accent) 35%, transparent)}.htp-front{text-align:center;color:var(--accent);letter-spacing:.05em;font-size:10px}.htp-note{text-align:center;font-size:10px}.slotted.draggable{touch-action:none;cursor:grab}.slotted.dragging{opacity:.6;cursor:grabbing}.slotted.dragging .unit{outline:2px dashed var(--accent)}.screen.battle{gap:6px;height:100dvh;padding:6px 10px;overflow:hidden}.screen.battle>*{flex:none}.screen.battle>.battlefields{flex:1 1 0;min-height:0}.battle .battlefields>.bf-col{gap:3px;min-height:0}.battle .bf-col .zone-label{margin-bottom:0}.battle .bf-col .slot{flex:1 1 0;align-items:stretch;min-height:0}.battle .bf-col .slot.enemy.hidden{flex:.5 1 0;align-items:center;min-height:0}.battle .bf-col .slot>.slot-label{align-self:center}.battle .bf-col .slot .unit,.battle .bf-col .slotted .unit{height:100%;min-height:0;padding:2px 5px;overflow:hidden}.battle .bf-col .slotted{height:100%}.battle .front-line{margin:0;padding:1px 0}.battle .zone{padding:4px 8px}.battle .zone-label{margin-bottom:3px}.battle .row .unit,.battle .base-row .unit,.battle .base-row .row{min-height:40px}.battle .player-bar,.battle .life-bar{padding:4px 8px}.one-line{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.battle .controls{gap:4px;padding:4px 0 0;position:static}.battle .controls .card{height:100px;min-height:0;overflow:hidden}.battle .hand{padding-bottom:0}.battle .caption{min-height:0;padding:4px 8px}.battle .log-zone[open] .log{overscroll-behavior:contain;max-height:18dvh;overflow-y:auto}.reveal-controls{flex-wrap:nowrap;gap:4px}.reveal-controls button{padding:6px 9px}.battle .zone .row{scrollbar-width:none;flex-wrap:nowrap;overflow-x:auto}.battle .zone .row>.unit{flex:none;width:96px}.battle .bf-col .slot{container-type:size}@container (height<=38px){.unit-kw,.info-btn{display:none}}.bf-col.plan .stack{flex-direction:column;flex:1 1 0;gap:3px;min-height:0;display:flex}.bf-col.plan .stack-item{flex:0 58px;min-height:0;container-type:size}.bf-col.plan .stack-item>.slotted{height:100%}.bf-col.plan .stack-item .unit{height:100%;min-height:0;padding:2px 5px;overflow:hidden}.bf-col.plan .stack-empty{border:1px dashed #39404d;border-radius:6px;flex:1 1 0;justify-content:center;align-items:center;min-height:28px;display:flex}.bf-col.plan.targetable .stack-empty{border-color:var(--accent);color:var(--accent)}.screen.battle>.battlefields.plan-fields{flex:auto;grid-template-rows:minmax(0,1fr)}.bf-col.plan .stack{flex:auto}.bf-col.plan .stack-empty{flex:auto;min-height:28px}.battle .controls .card{height:auto;max-height:150px}.battle .zone .row,.battle .zone .row>.unit{min-height:56px}.battle .zone .row>.unit .unit-tag{inset:auto auto 3px 8px}.you-bar{background:var(--panel);border-radius:8px;flex-direction:column;gap:4px;padding:6px 8px;display:flex}.bf-col.plan .enemy-held{flex-direction:column;flex:0 auto;gap:3px;min-height:0;display:flex}.bf-col.plan .enemy-held .stack-item{opacity:.9}.slotted.holder .unit{box-shadow:inset 0 0 0 1px var(--accent);border-style:solid}.bf-col.plan .enemy-held .unit{width:100%;max-width:none;height:100%;min-height:0;padding:2px 5px;overflow:hidden}.bf-col.plan .stack-item .unit-tag{inset:auto auto 2px 8px}
