:root{--bg: #12161d;--panel: #1c232d;--panel-2: #262f3b;--ink: #e8ebf0;--muted: #98a3b3;--accent: #e0a93b;--play: #4ec97f;--attack: #e5533d;--target: #e86a3a;--queued: #e5533d;--card-w: 92px;--card-h: 128px}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--ink);font:14px/1.4 system-ui,sans-serif;overflow:hidden;-webkit-user-select:none;user-select:none}button{font:inherit;color:var(--ink);background:var(--panel-2);border:1px solid #3a4655;border-radius:6px;padding:6px 12px;cursor:pointer}button:hover{border-color:var(--accent)}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--accent);color:#1b1408;border-color:var(--accent);font-weight:600}.board{display:grid;grid-template-columns:180px 1fr 240px;height:100vh}.side,.right{background:var(--panel);padding:8px;display:flex;flex-direction:column;gap:8px;min-height:0}.side{justify-content:center}.table{position:relative;display:grid;grid-template-rows:64px 1fr 1fr 150px;gap:4px;padding:4px 8px;min-width:0;min-height:0;perspective:1400px}.their-hand{display:flex;justify-content:center;align-items:flex-start;position:relative}.hand-back{width:42px;height:60px;margin:0 -4px;border-radius:4px;background:repeating-linear-gradient(45deg,#2c3950,#2c3950 5px,#24304a 5px,#24304a 10px);border:2px solid #55657f;box-shadow:0 2px 4px #0006}.their-hand .card{--card-w: 42px;--card-h: 60px;margin:0 -4px}.hand-count{align-self:center;margin-left:14px;min-width:22px;padding:1px 6px;border-radius:10px;background:var(--panel-2);color:var(--muted);font-size:12px;text-align:center}.hand>.hand-count{align-self:flex-end;margin-bottom:8px}.field-row{display:grid;grid-template-columns:1fr 74px;gap:6px;min-height:0}.piles{display:flex;flex-direction:column;justify-content:center;gap:6px}.piles.theirs{flex-direction:column-reverse}.pile{position:relative;width:62px;height:86px;padding:0;border-radius:5px;border:1px solid #3a4655;background:#ffffff08;display:flex;align-items:center;justify-content:center}.pile img{width:100%;height:100%;object-fit:cover;border-radius:5px}.pile.empty{border-style:dashed}.pile-name{font-size:10px;color:var(--muted)}.pile-back{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:5px;background:repeating-linear-gradient(45deg,#2c3950,#2c3950 5px,#24304a 5px,#24304a 10px);border:2px solid #55657f}.pile-count{position:absolute;right:-6px;bottom:-6px;min-width:20px;padding:0 5px;border-radius:9px;background:#0d1117;border:1px solid #3a4655;font-size:11px;color:var(--ink);z-index:2}.stack-table{position:absolute;right:96px;top:50%;transform:translateY(-50%);z-index:15;pointer-events:none;display:grid}.stack-table.empty{width:1px;height:1px}.stack-entry{grid-area:1 / 1;display:flex;flex-direction:column;align-items:center;pointer-events:auto}.stack-entry .card{--card-w: 110px;--card-h: 154px}.stack-entry .card-stance{box-shadow:0 6px 18px #0000008c}.stack-ability{position:relative}.ability-badge{position:absolute;left:4px;top:4px;padding:1px 5px;border-radius:4px;background:#5b3fa0;font-size:10px}.stack-text{max-width:180px;margin:6px 0 0;padding:4px 6px;border-radius:6px;background:#0d1117e6;font-size:11px;text-align:center}.battlefield{display:grid;grid-template-rows:1fr 1fr;gap:4px;min-height:0;border-radius:10px;background:#ffffff08;padding:4px}.lane{display:flex;gap:8px;justify-content:center;align-items:center;min-width:0;min-height:0}.lane .card{--card-w: 74px;--card-h: 103px}.lane-main .card{--card-w: 86px;--card-h: 120px}.card{position:relative;flex:0 1 var(--card-w);width:var(--card-w);height:var(--card-h);min-width:0;border-radius:6px;transition:transform .1s ease;cursor:default;will-change:transform}.card-stance{position:relative;width:100%;height:100%;border-radius:6px;background:#20262f;transition:rotate .15s ease,scale .15s ease,translate .3s ease,box-shadow .1s ease}.card img{display:block;width:var(--card-w);height:var(--card-h);border-radius:6px;object-fit:cover;transition:filter .4s ease}.card:hover{z-index:5;transform:translateY(-4px) scale(1.03)}.card.flipping{transition:none}.card.arriving-back img,.card.arriving-back .card-text{visibility:hidden}.card.arriving-back:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:6px;background:repeating-linear-gradient(45deg,#2c3950,#2c3950 6px,#24304a 6px,#24304a 12px);border:2px solid #55657f}.card.tapped .card-stance{rotate:90deg;scale:.85}.card.tapped:hover{transform:scale(1.05)}.card.sick img{filter:brightness(.7) saturate(.55)}.sick-badge{position:absolute;left:50%;top:6px;translate:-50% 0;padding:1px 6px;border-radius:8px;background:#0d1117d9;border:1px solid #55657f;color:#b9c6dc;font-size:11px;font-weight:600;letter-spacing:1px;opacity:0;transition:opacity .4s ease;pointer-events:none}.card.sick .sick-badge{opacity:1}.mine .card.attacking .card-stance,.mine .card.blocking .card-stance{translate:0 -26px}.theirs .card.attacking .card-stance,.theirs .card.blocking .card-stance{translate:0 26px}.card.tapped .badge{transform:rotate(-90deg)}.glow-playable,.glow-option,.glow-attacker{cursor:pointer}.glow-playable>.card-stance{box-shadow:0 0 0 2px var(--play),0 0 10px var(--play)}.glow-option>.card-stance{box-shadow:0 0 0 2px var(--accent),0 0 10px var(--accent)}.glow-attacker>.card-stance{box-shadow:0 0 0 2px var(--accent)}.glow-selected{transform:translateY(-10px);cursor:pointer}.glow-selected>.card-stance{box-shadow:0 0 0 3px #fff,0 0 14px #fff}.glow-queued{transform:translateY(-14px);cursor:pointer}.glow-queued>.card-stance{box-shadow:0 0 0 3px var(--queued),0 0 12px var(--queued)}.glow-target{cursor:pointer}.glow-target>.card-stance{box-shadow:0 0 0 3px var(--target),0 0 14px var(--target)}.card-back{width:100%;height:100%;border-radius:6px;background:repeating-linear-gradient(45deg,#2c3950,#2c3950 6px,#24304a 6px,#24304a 12px);border:2px solid #55657f}.card-text{width:var(--card-w);height:var(--card-h);overflow:hidden;background:#f0e9db;color:#222;padding:4px;border-radius:6px;font-size:9px;display:flex;flex-direction:column;gap:2px}.card-text p{margin:0}.badge{position:absolute;font-size:11px;font-weight:700;padding:0 4px;border-radius:4px;background:#000c}.badge.stats{right:2px;bottom:2px}.badge.loyalty{right:2px;bottom:2px;background:#2d4b7d}.badge.damage{left:2px;bottom:2px;background:var(--attack)}.badge.counters{left:2px;top:2px;max-width:94%;font-size:9px}.hand{display:flex;justify-content:center;align-items:flex-end;min-width:0;padding-bottom:4px}.hand .card{--card-w: 104px;--card-h: 145px;margin:0 -6px}.hand .card:hover{transform:translateY(-14px) scale(1.06);z-index:6}.player{background:var(--panel-2);border-radius:10px;padding:8px;border:2px solid transparent}.player.active{border-color:#4a5a70}.player.target{border-color:var(--target);box-shadow:0 0 12px var(--target);cursor:pointer}.player-name{font-weight:600}.life{font-size:34px;font-weight:700;line-height:1.1}.turn{display:flex;flex-direction:column;text-align:center;color:var(--muted)}.turn strong{color:var(--ink)}.concede{text-align:center;display:flex;flex-direction:column;gap:4px}.log{flex:1;min-height:0;overflow:auto;font-size:12px;color:var(--muted);-webkit-user-select:text;user-select:text}.log p{margin:0 0 4px}.action-bar{position:fixed;right:12px;bottom:26px;width:216px;background:var(--panel-2);border:1px solid #3a4655;border-radius:10px;padding:10px;z-index:20}.message{margin:0 0 8px;font-size:13px;max-height:110px;overflow:auto;white-space:pre-line}.buttons{display:flex;flex-direction:column;gap:6px}.notice{background:#5b2a22;border-radius:6px;padding:4px 8px;margin-bottom:8px;font-size:12px}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#05080cb8;display:flex;align-items:center;justify-content:center;z-index:40}.side-choices{position:fixed;left:196px;bottom:170px;z-index:30;max-width:50vw}.choice-panel,.zone-viewer{background:var(--panel);border-radius:12px;padding:16px;max-width:80vw;max-height:86vh;overflow:auto;text-align:center}.side-choices .choice-panel{padding:8px}.side-choices h2,.choice-panel h2{font-size:15px;font-weight:600;margin:0 0 10px;white-space:pre-line}.choices{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:10px}.choice{display:flex;flex-direction:column;align-items:center;gap:4px;max-width:180px}.choice img{width:150px;border-radius:8px}.choice.chosen{border-color:var(--accent);box-shadow:0 0 8px var(--accent)}.card-grid{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:12px}.option-menu{position:fixed;z-index:35;display:flex;flex-direction:column;gap:4px;background:var(--panel);padding:6px;border-radius:8px;max-width:320px;transform:translateY(-100%)}.hover-preview{position:fixed;left:188px;top:12px;z-index:30;display:flex;gap:6px;pointer-events:none}.hover-preview.right{left:auto;right:16px;top:60px}.hover-preview img{width:300px;border-radius:14px;box-shadow:0 6px 24px #0009}.hover-text{width:300px;background:#f0e9db;color:#222;padding:12px;border-radius:14px}.artist{position:absolute;left:0;top:100%;margin-top:4px;font-size:11px;color:var(--muted);background:var(--bg);padding:0 6px;border-radius:4px}.arrows{position:fixed;top:0;right:0;bottom:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:25}.arrow{fill:none;stroke-width:5;stroke-linecap:round;marker-end:url(#arrowhead)}.arrow.pending{stroke:#fff;stroke-dasharray:10 8}.arrow.queued{stroke:var(--queued)}.arrow.attack{stroke:var(--attack);stroke-width:4;opacity:.7}.arrow.block{stroke:#4f8fe0;stroke-width:4;opacity:.75;marker-end:none;stroke-dasharray:2 7}.connecting{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted)}.reconnecting{position:fixed;top:8px;left:50%;transform:translate(-50%);background:#5b2a22;padding:4px 12px;border-radius:6px;z-index:50}.legal{position:fixed;left:188px;right:248px;bottom:0;text-align:center;font-size:9px;color:#6c7686;pointer-events:none}.damage-panel{position:fixed;left:50%;bottom:12px;transform:translate(-50%);z-index:30;background:var(--panel);border:1px solid #3a4655;border-radius:12px;padding:12px;max-width:70vw;box-shadow:0 8px 30px #00000080}.damage-head{display:flex;gap:12px;align-items:center;margin-bottom:10px}.damage-head h2{font-size:15px;font-weight:600;margin:0}.damage-source{width:70px;border-radius:6px}.damage-left{margin:4px 0 0;color:var(--muted)}.damage-refused{margin:4px 0 0;color:var(--attack)}.damage-targets{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.damage-target{display:flex;flex-direction:column;align-items:center;gap:4px;width:132px}.damage-target img{width:120px;border-radius:8px}.damage-player{width:120px;height:167px;display:flex;align-items:center;justify-content:center;background:var(--panel-2);border-radius:8px;font-weight:600}.damage-amount{font-size:24px;font-weight:700;min-width:2ch;text-align:center}.damage-lethal{font-size:11px;color:var(--muted)}.damage-controls{display:flex;gap:4px}.damage-controls button{padding:2px 8px}.damage-buttons{display:flex;gap:8px;justify-content:flex-end;margin-top:10px}.muted{color:var(--muted)}.format-list{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.format-list h1{margin:0;font-size:40px}.lobby-account{position:fixed;top:12px;right:16px}.account{display:flex;align-items:center;gap:8px;font-size:13px}.login{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;padding:0 16px}.login h1{margin:0;font-size:40px}.login .notice{max-width:420px;font-size:14px}a.button{display:inline-block;text-decoration:none;padding:10px 18px;border-radius:6px;border:1px solid #3a4655}a.button.primary{background:var(--accent);color:#1b1408;border-color:var(--accent);font-weight:600}.small{font-size:12px}.formats{display:flex;gap:16px;margin-top:16px;flex-wrap:wrap;justify-content:center}.format{width:240px;background:var(--panel);border:1px solid #3a4655;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:6px}.format h2{margin:0;font-size:20px}.format p{margin:0 0 8px}.format-kind{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--accent)}.run-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;background:var(--panel);min-height:48px}.header-actions,.filters{display:flex;gap:8px;align-items:center}.filter{padding:3px 10px}.filter.on{border-color:var(--accent);background:#3a3220}.pool-card{--w: 100px;position:relative;width:var(--w);aspect-ratio:63 / 88;flex:none;border-radius:6px;cursor:pointer;transition:transform .08s ease,box-shadow .08s ease;will-change:transform}.pool-card img,.pool-card .card-text{width:100%;height:100%;border-radius:6px;display:block;object-fit:cover}.pool-card:hover{transform:translateY(-4px);z-index:5}.pool-card.selected{transform:translateY(-10px);box-shadow:0 0 0 3px var(--accent),0 0 18px var(--accent)}.draft-screen{height:100vh;display:grid;grid-template-rows:auto 1fr auto}.pack{display:grid;grid-template-columns:repeat(auto-fill,168px);gap:12px;justify-content:center;align-content:start;padding:20px 16px;overflow:auto}.pack .pool-card{--w: 168px}.pack.waiting{opacity:.6;pointer-events:none}.picks{background:var(--panel);padding:6px 16px 18px;height:220px;overflow:hidden}.picks-title{font-size:12px;margin-bottom:4px}.columns{display:grid;grid-template-columns:repeat(9,104px);gap:8px;justify-content:center;align-items:start}.column{display:flex;flex-direction:column;align-items:center;min-height:40px}.column-label{font-size:11px;height:16px}.column .pool-card+.pool-card{margin-top:-116px}.column .pool-card:hover{transform:translateY(-6px)}.deck-builder{height:100vh;display:grid;grid-template-rows:auto 1fr}.deck-body{display:grid;grid-template-columns:1fr 230px;min-height:0}.deck-areas{display:grid;grid-template-rows:1fr 1fr;min-height:0}.pool-area,.main-area{overflow:auto;padding:6px 12px 12px}.main-area{background:#ffffff08;border-top:1px solid #2c3541}.area-title{font-size:12px;margin-bottom:4px}.deck-side{background:var(--panel);padding:12px 12px 24px;display:flex;flex-direction:column;gap:12px}.deck-count{text-align:center}.deck-count .big{font-size:40px;font-weight:700;line-height:1}.basics{display:flex;flex-direction:column;gap:6px}.basic{display:grid;grid-template-columns:1fr auto 2.5ch auto;gap:6px;align-items:center}.basic img{width:100%;height:34px;object-fit:cover;object-position:center 22%;border-radius:4px}.basic button{padding:2px 8px}.basic-count{text-align:center;font-weight:700}.deck-problem{color:var(--attack);font-size:12px;margin:0}.done{margin-top:auto;padding:10px;font-size:15px}.game-over-actions{display:flex;gap:8px;justify-content:center}.input-panel{min-width:320px}.input-row{display:flex;gap:8px;justify-content:center;align-items:center;margin-bottom:8px}.input-row input{font:inherit;font-size:24px;width:6ch;text-align:center;background:var(--panel-2);color:var(--ink);border:1px solid #3a4655;border-radius:6px;padding:4px}.mana-pool{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}.mana{padding:1px 8px;border-radius:10px;font-weight:700;font-size:12px;color:#111;border:1px solid transparent}.mana:disabled{opacity:1;cursor:default}.mana-W{background:#f3ecd3}.mana-U{background:#9ccbea}.mana-B{background:#b9aeb0}.mana-R{background:#ef9a7a}.mana-G{background:#9fcf9a}.mana-C{background:#cfc9c2}.mana.spendable{box-shadow:0 0 0 2px var(--accent),0 0 10px var(--accent);cursor:pointer}.friends ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.friend{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:8px;background:var(--panel-2);border-radius:6px;padding:4px 8px;min-height:30px}.friend-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.friend-record,.friend-status{font-size:12px}.friend-challenge{padding:2px 8px;font-size:12px}.friends-empty{font-size:12px;margin:0}.challenge-sent{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--panel-2);border:1px solid var(--accent);border-radius:6px;padding:6px 8px;margin-bottom:6px;font-size:13px}.challenge-banner{position:fixed;top:16px;left:50%;transform:translate(-50%);z-index:50;display:flex;align-items:center;gap:12px;background:var(--panel);border:1px solid var(--accent);border-radius:10px;padding:12px 16px;box-shadow:0 8px 30px #00000080;max-width:calc(100vw - 32px)}.seat-clock{display:flex;align-items:center;gap:8px;margin:2px 0 4px;font-variant-numeric:tabular-nums;font-size:13px;color:var(--muted);flex-wrap:wrap}.seat-clock.running .clock-decision{color:var(--ink);font-weight:600}.seat-clock.on-bank .clock-bank{color:var(--attack);font-weight:600}.clock-bank:before{content:"Bank ";color:var(--muted);font-weight:400}.clock-timeouts{display:inline-flex;gap:3px}.clock-timeouts i{width:7px;height:7px;border-radius:50%;border:1px solid var(--muted)}.clock-timeouts i.spent{background:var(--attack);border-color:var(--attack)}.clock-disconnected{color:var(--attack);font-weight:600}.format-list{overflow-y:auto;padding:24px 16px 56px;justify-content:flex-start}.format-list>h1{margin-top:8vh}.pod-list{width:min(760px,100%);margin-top:24px;background:var(--panel);border:1px solid #3a4655;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:10px}.pod-list h2{margin:0}.open-pods{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.open-pods li{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--panel-2);border-radius:8px;padding:8px 12px}.pod-members{font-size:12px}.create-pod{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.create-pod select{font:inherit;color:var(--ink);background:var(--panel-2);border:1px solid #3a4655;border-radius:6px;padding:6px 8px}.segmented{display:inline-flex}.segmented button{border-radius:0}.segmented button:first-child{border-radius:6px 0 0 6px}.segmented button:last-child{border-radius:0 6px 6px 0}.segmented button.on{border-color:var(--accent);color:var(--accent)}.pod-screen{height:100vh;display:flex;flex-direction:column}.pod-body{flex:1;overflow-y:auto;padding:24px 16px 56px;display:flex;flex-direction:column;align-items:center;gap:12px}.pod-members-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.pod-members-list li{background:var(--panel-2);border-radius:999px;padding:4px 12px}.pod-members-list.compact li{font-size:12px}.pod-actions{display:flex;gap:8px;align-items:center}.standings{border-collapse:collapse;min-width:min(560px,100%)}.standings th,.standings td{padding:6px 10px;text-align:left;border-bottom:1px solid #2c3644}.standings th{color:var(--muted);font-weight:500;font-size:12px}.standings tr.bot td{color:var(--muted)}.pod-bar{display:flex;flex-direction:column;gap:6px;padding:10px;background:var(--panel-2);border-radius:8px}.pod-bar-links{display:flex;gap:6px}.pick-timer{font-variant-numeric:tabular-nums;font-weight:600;padding:2px 10px;border-radius:999px;background:var(--panel-2)}.pick-timer.low{color:var(--attack)}.pack-waiting{text-align:center;padding:24px}#ghost-layer{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:18}#ghost-layer .card{transition:none}#ghost-layer .card-stance{box-shadow:0 6px 18px #00000080}.damage-pop{position:fixed;translate:-50% -50%;padding:2px 9px;border-radius:10px;background:#c8372a;color:#fff;font-weight:800;font-size:20px;text-shadow:0 1px 2px rgba(0,0,0,.6);box-shadow:0 2px 10px #00000080;pointer-events:none}.life{transition:color .2s ease,text-shadow .2s ease}.life.life-down{color:#ff6b5b;text-shadow:0 0 14px rgba(255,80,60,.8)}.life.life-up{color:#6be38f;text-shadow:0 0 14px rgba(80,220,120,.8)}@media(prefers-reduced-motion:reduce){.card-stance{transition:rotate .15s ease,scale .15s ease,box-shadow .1s ease}}.practice{max-width:760px;margin:0 auto;padding:32px 16px 80px;display:flex;flex-direction:column;gap:14px;position:relative}.practice h2{margin:10px 0 0;font-size:16px}.practice .back{align-self:flex-start}.practice-formats{display:flex;gap:8px}.practice-formats button.selected{border-color:#8fb3ff;background:#1d2a44}.practice-decks{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}.practice-deck{display:flex;align-items:center;gap:10px;padding:12px;text-align:left}.practice-deck.selected{border-color:#8fb3ff;background:#1d2a44}.practice-deck-name{flex:1;font-weight:600}.practice-opponent select{margin-left:4px}.practice>.primary{align-self:flex-start;min-width:140px}.pips{display:inline-flex;gap:3px}.pip{width:12px;height:12px;border-radius:50%;border:1px solid rgba(0,0,0,.5)}.pip-W{background:#f4ecd2}.pip-U{background:#3f7fd0}.pip-B{background:#4b3f4f}.pip-R{background:#d6493a}.pip-G{background:#3e9a52}.pip-C{background:#a9a9a9}.practice-mine{display:flex;gap:6px}.practice-mine .practice-deck{flex:1}.practice-delete{padding:0 10px}.practice-import-open{justify-content:center;color:#9fb4d8;border-style:dashed}.practice-import{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid #2c3647;border-radius:8px;background:#141a23}.practice-import label{display:flex;flex-direction:column;gap:4px;font-size:13px}.practice-import textarea{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;resize:vertical}.practice-problems{margin:0;padding-left:18px;color:#ffb4a8;font-size:13px;display:flex;flex-direction:column;gap:3px}.practice-problems code{color:#e6e6e6}.practice-import-actions{display:flex;gap:8px;justify-content:flex-end}
