:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--bg:#f6f1e7;--fg:#2b2118;--muted:#7a6a58;--panel:#fff;--line:#d9cbb5;--accent:#9a4a12;--ok:#1f7a3a;--bad:#c0201f;--advice:#9a6a1f;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.35}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#1b1612;--fg:#efe6d8;--muted:#a8977f;--panel:#262019;--line:#4a3d2e;--accent:#e08a43;--ok:#5cc27a;--bad:#ff6b5e;--advice:#f3e8cf}}*,:before,:after{box-sizing:border-box}html,body{background:var(--bg);color:var(--fg);margin:0;overflow-x:hidden}body{overflow-x:clip}.app{max-width:480px;min-height:100dvh;padding:8px max(8px, env(safe-area-inset-right,0)) env(safe-area-inset-bottom,0) max(8px, env(safe-area-inset-left,0));flex-direction:column;margin:0 auto;display:flex}.app-header{align-items:baseline;gap:8px;display:flex}.app-header h1{margin:0 0 8px;font-size:1.25rem}main{flex:1;min-width:0}.menu,.match,.handoff,.tutorial,.tutorial-outcome{flex-direction:column;gap:10px;display:flex}.field{border:1px solid var(--line);border-radius:8px;flex-direction:column;gap:4px;min-width:0;margin:0;padding:8px 10px;display:flex}.row{gap:8px;display:flex}.row input{flex:1;min-width:0}.radio{align-items:center;gap:8px;min-height:44px;display:flex}.radio input{width:22px;height:22px;margin:0}button,select,input{font:inherit;color:inherit}select,input:not([type=radio],[type=checkbox]){background:var(--panel);border:1px solid var(--line);border-radius:6px;max-width:100%;min-height:44px;padding:6px 8px}button{border:1px solid var(--line);background:var(--panel);text-align:left;overflow-wrap:anywhere;border-radius:8px;min-height:44px;padding:8px 12px}button.primary{background:var(--accent);border-color:var(--accent);color:#fff;text-align:center}button.danger{color:var(--bad)}.actions h3{margin:4px 0;font-size:1rem}.actions{flex-direction:column;gap:6px;display:flex}.match-header{font-weight:600}.muted,.thinking{color:var(--muted)}.error{color:var(--bad);overflow-wrap:anywhere}.result{font-weight:600}.debug{border:1px dashed var(--line);border-radius:8px;padding:6px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.8rem}.debug summary{cursor:pointer;align-items:center;min-height:44px;display:flex}.debug dl{grid-template-columns:auto 1fr;gap:2px 10px;margin:6px 0 0;display:grid}.debug dd{overflow-wrap:anywhere;margin:0}.footer{color:var(--muted);border-top:1px solid var(--line);overflow-wrap:anywhere;margin-top:16px;padding:8px 0;font-size:.75rem}.selftest-ok{color:var(--ok);white-space:nowrap;font-weight:600}.selftest-bad{color:var(--bad);white-space:nowrap;font-weight:700}.concede{border-top:1px dashed var(--line);flex-direction:column;gap:6px;margin-top:24px;padding-top:12px;display:flex}.concede p{margin:0}.table{flex-direction:column;gap:6px;min-width:0;display:flex}.side{background:var(--panel);border:1px solid var(--line);border-left:4px solid var(--faction,var(--line));border-radius:8px;flex-direction:column;gap:4px;min-width:0;padding:6px;display:flex}[data-faction=nomads]{--faction:#b5651d}[data-faction=oasis]{--faction:#1f8a8a}[data-faction=spirits]{--faction:#6b4fbf}[data-faction=underworld]{--faction:#8b1e3f}.side-strip,.side-counts,.oboz{overflow-wrap:anywhere;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-width:0;font-size:.85rem;display:flex}.side-counts,.oboz,.who{color:var(--muted)}.leader{font-weight:600}.leader-hp{color:var(--bad)}.chip{border:1px solid var(--line);border-radius:999px;padding:0 6px}.chip.toll{color:var(--accent);border-color:var(--accent)}.chip.warn{color:var(--bad);border-color:var(--bad)}.table-center{flex-direction:column;gap:2px;min-width:0;font-size:.9rem;display:flex}.table-center p{margin:0}.board,.hand{grid-template-columns:repeat(var(--slots,5), minmax(0, 1fr));gap:4px;margin:0;padding:0;list-style:none;display:grid}.hand{grid-template-columns:repeat(var(--hand-cols,4), minmax(0, 1fr))}.slot,.card,.full-card{aspect-ratio:63/88;border-radius:5.55556%/3.97727%;min-width:0}.slot>.unit,.slot>.place{border-radius:inherit}.slot.empty{border:1px dashed var(--line);position:relative}.unit,.card,.full-card{background:var(--bg);border:1px solid var(--line);flex-direction:column;gap:1px;min-width:0;padding:3px 4px;font-size:.68rem;line-height:1.15;display:flex;overflow:hidden}.unit{height:100%}.unit.exhausted{opacity:.55}.name,.cost,.stats,.card .type{flex-shrink:0}.name{overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto;-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.tags{flex-wrap:wrap;gap:1px 2px;min-width:0;min-height:0;display:flex;overflow:hidden}.tags span{background:var(--line);border-radius:3px;padding:0 2px;font-size:.6rem}.stats{justify-content:space-between;margin-top:auto;display:flex}.atk,.hp,.cost{font-size:.85rem;font-weight:700}.hp.damaged{color:var(--bad)}.cost{color:var(--accent)}.stat-icon{flex:none;width:18px;height:18px}.cost,.atk,.hp{font-variant-numeric:tabular-nums;border:1px solid;border-radius:7px;justify-content:center;align-items:center;gap:3px;padding:3px 5px;line-height:1;display:inline-flex}.cost{color:#fff;background:#165d88;border-radius:8px 8px 12px;align-self:flex-start;min-height:30px;font-size:1.2rem}.atk{color:#80501a;background:#fff0ce}.hp{color:#972544;background:#ffe7ee}.hp.damaged{border-width:2px}.card .stats{gap:4px;width:100%;font-size:1.05rem}.unit .stat-icon{width:12px;height:14px}.unit .atk,.unit .hp{flex-direction:column;gap:1px;padding:3px 2px;font-size:.85rem}.card{gap:5px;padding:6px;font-size:.78rem;line-height:1.22}.card .name{font-weight:650}.empty-place{height:100%;color:var(--muted);place-items:center;font-size:1.25rem;display:grid}.place span:last-child{text-align:center;font-size:.6rem}.leader-hp{white-space:nowrap;align-items:center;gap:3px;font-size:1rem;display:inline-flex}.stat-legend,.stat-legend>span,.zone-heading,.zone-title,.resource-income,.influence-heading,.resource-card-value{align-items:center;gap:5px;display:flex}.stat-legend{border:1px solid var(--line);border-radius:8px;flex-wrap:wrap;justify-content:space-between;padding:2px 6px;font-size:.75rem}.stat-legend>span:first-child .stat-icon,.influence-heading>.stat-icon,.resource-income .stat-icon{color:#2979aa}.stat-legend .help-trigger{align-items:center;gap:4px;margin:0;padding:0 3px;font-size:.75rem;display:flex}.stat-legend .help-glyph{width:18px;height:18px}.stat-legend>span:nth-child(2) .stat-icon{color:#b4751f}.stat-legend>span:nth-child(3) .stat-icon{color:#ce4666}.zone-heading{flex-wrap:wrap;gap:4px}.zone-heading>span:last-child{margin-left:auto;font-size:.75rem}.zone-title{margin:0;font-size:.85rem;font-weight:700}.zone-hint{color:var(--muted);margin:0 0 4px;font-size:.75rem;line-height:1.35}.influence-meter{color:#154a70;background:#edf7fe;border:1px solid #80b7d5;border-radius:9px;grid-template-columns:auto minmax(0,1fr);gap:4px 8px;padding:7px 10px;display:grid}.influence-heading{flex-wrap:wrap;grid-column:1/-1;font-size:.9rem;font-weight:600}.influence-total{font-variant-numeric:tabular-nums;margin-left:auto;font-size:1.8rem;line-height:1}.influence-pips{flex-wrap:wrap;align-items:center;gap:4px;max-width:140px;display:flex}.influence-pip{color:#167aab;display:inline-flex}.influence-pip[data-pip=temporary]{color:#a67113}.influence-pip[data-pip=spent]{color:#c9d4da;--stat-ink:#65777d}.resource-breakdown{text-align:right;align-self:center;font-size:.72rem;line-height:1.35}.opponent-meter{padding:3px 8px}.opponent-meter .influence-total{font-size:1.2rem}.opponent-meter .influence-heading{min-height:22px;font-size:.8rem}.opponent-meter .influence-pips,.opponent-meter .resource-breakdown{display:none}.resource-zone.oboz{color:#174e3a;background:#eaf6ef;border:2px solid #4b896e;border-radius:10px;flex-direction:column;align-items:stretch;gap:6px;margin-top:8px;padding:10px;display:flex}.resource-income{margin:0;font-size:.8rem;font-weight:700}.resource-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0;padding:0;list-style:none;display:grid}.resource-card{background:#fffdf5;border:1px solid #74a88d;border-top:4px solid #4b896e;border-radius:7px;flex-direction:column;gap:5px;min-width:0;padding:7px;font-size:.78rem;display:flex}.resource-card small{font-size:.65rem;line-height:1.3}.oboz-empty{border:1px dashed;border-radius:6px;margin:0;padding:10px;font-size:.8rem}.selected-card-name,.resource-warning,.oboz-preview{border-radius:7px;margin:0;padding:8px 10px;font-size:.85rem;line-height:1.4}.selected-card-name{background:var(--panel);border-left:4px solid var(--accent)}.resource-warning,.cost-shortfall{color:#79450e;background:#fff0dc}.cost-shortfall{border-radius:4px;padding:2px;font-size:.65rem;display:block}.oboz-preview{border:1px solid #4b896e}.context-help{vertical-align:middle;display:inline-flex}.help-trigger{min-width:44px;min-height:44px;color:inherit;cursor:help;background:0 0;border:0;border-radius:999px;place-items:center;margin:-4px 0;padding:0;font-size:.85rem;font-weight:750;display:grid}.help-glyph{border:1px solid;border-radius:50%;place-items:center;width:22px;height:22px;display:grid}.help-trigger:hover,.help-trigger:focus-visible,.help-trigger[aria-expanded=true]{background:var(--line);outline-offset:-5px;outline:2px solid}.help-note{z-index:80;background:var(--panel);max-width:456px;max-height:55dvh;color:var(--fg);border:2px solid var(--accent);white-space:normal;border-radius:12px;flex-direction:column;gap:8px;margin:0 auto;padding:16px;font-size:.95rem;font-weight:400;line-height:1.5;display:flex;position:fixed;inset:auto 12px 12px;overflow:auto;box-shadow:0 8px 40px #0007}.help-note>strong{font-size:1.1rem}.help-close{text-align:center;align-self:stretch}.glossary{border:1px solid var(--line);background:var(--panel);border-radius:9px;margin-bottom:10px;padding:0 10px}.glossary>summary{cursor:pointer;min-height:44px;padding:10px 0;font-size:.85rem;font-weight:650}.glossary-content{max-height:65dvh;padding-bottom:10px;font-size:.85rem;line-height:1.5;overflow:auto}.glossary-search{flex-direction:column;gap:4px;display:flex}.glossary dt{font-weight:750}.glossary dd{margin:3px 0 12px}.first-turn{padding-left:20px}.first-turn li{margin-bottom:8px}@media (width<=420px){.hand{grid-template-columns:repeat(3,minmax(0,1fr))}.card .stat-icon{width:15px;height:15px}}@media (prefers-color-scheme:dark){.influence-meter{color:#b3dffc;background:#132d3c;border-color:#3b7395}.influence-pip{color:#6bc5f2}.influence-pip[data-pip=temporary]{color:#f6cc70}.influence-pip[data-pip=spent]{color:#344b58;--stat-ink:#9aafba}.resource-zone.oboz{color:#c2ecda;background:#152f27;border-color:#548f75}.resource-card{background:#203e32;border-color:#548f75}.resource-zone .zone-hint{color:#a8c9b8}.resource-warning,.cost-shortfall{color:#f7cd92;background:#3f2e19}}.card .type{color:var(--muted);margin-top:auto}.sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.tap{width:100%;min-width:0;min-height:0;font:inherit;line-height:inherit;text-align:left;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;background:0 0;border:0;border-radius:0;flex-direction:column;flex:auto;gap:1px;margin:0;padding:0;display:flex;overflow:hidden}.tap:focus-visible{outline:2px solid var(--accent);outline-offset:1px}[data-tap=can]{border-color:var(--accent)}[data-tap=selected],[data-tap=marked]{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}[data-tap=marked]{border-style:dashed}[data-tap=target]{border-color:var(--bad);box-shadow:0 0 0 2px var(--bad)}[data-tap=trade]{border-style:dashed;border-color:var(--accent)}[data-tap=place]{border-left-color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}.slot .place{border:2px dashed var(--accent);background:0 0;border-radius:6px;width:100%;height:100%;min-height:0;padding:0}.slot[data-place=selected]{outline:2px solid var(--accent);outline-offset:1px;border-radius:6px}button.leader{background:var(--panel);border-radius:6px;min-height:44px;padding:0 8px}.actions .hint{color:var(--muted);margin:0}[data-tap=unavailable]{border-style:dashed}.action-problems:empty{display:none}.action-problem{border:1px solid var(--accent);overflow-wrap:anywhere;border-radius:7px;flex-direction:column;gap:4px;margin:0 0 6px;padding:10px;font-size:.85rem;display:flex}.action-problem small{color:var(--muted)}.bot-playback{z-index:4;background:var(--bg);border:2px solid #278baa;border-radius:9px;margin:4px 0 8px;padding:10px;scroll-margin-top:6px;position:sticky;top:6px;box-shadow:0 3px 12px #0003}.bot-playback header,.playback-controls{flex-wrap:wrap;justify-content:space-between;gap:6px;display:flex}.bot-playback small{color:var(--muted)}.playback-caption{overflow-wrap:anywhere;min-height:2.6em;margin:7px 0;font-weight:600}.playback-card{overflow-wrap:anywhere;border-left:4px solid #278baa;margin:5px 0;padding:5px 8px}.playback-legend{margin-bottom:6px;display:block}.playback-legend span:first-child{border-bottom:3px solid #278baa}.playback-legend span:last-child{border-bottom:3px solid var(--bad)}.playback-controls{flex-wrap:wrap}.playback-controls button{flex:120px;min-height:44px;padding:8px}.playback-controls button[aria-pressed=true]{border-color:#278baa;box-shadow:inset 0 0 0 1px #278baa}.playback-note{margin-top:5px;display:block}[data-event-highlight=source]{outline-offset:2px;outline:3px solid #278baa}[data-event-highlight=target]{outline:3px solid var(--bad);outline-offset:2px}.unit,.card,.leader{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:manipulation}.icon-wrap{background:var(--line);border-radius:3px;align-items:center;gap:1px;padding:0 1px;display:inline-flex}.icon{flex-shrink:0;width:13px;height:13px}.icon .fill{fill:currentColor}.icon .line{fill:none;stroke:currentColor;stroke-width:2.2px;stroke-linecap:round;stroke-linejoin:round}.icon .hole{fill:var(--line)}.icon .hole-line{fill:none;stroke:var(--line);stroke-width:1.6px}.icon-x{font-size:.62rem;font-weight:700}.inspector-backdrop{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;z-index:30;padding:12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));background:#00000073;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.inspector{border:1px solid var(--line);background:var(--panel);overflow-wrap:anywhere;border-radius:12px;flex-direction:column;gap:6px;width:100%;max-width:480px;max-height:85vh;padding:14px 16px;display:flex;overflow-y:auto}.inspector h3,.inspector h4,.inspector p{margin:0}.inspect-kind,.inspect-marks,.inspect-lore{color:var(--muted)}.inspect-stats{font-weight:700}.inspect-words{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}.inspect-words .icon{vertical-align:-3px;width:18px;height:18px}.inspect-words .icon .hole,.inspect-words .icon .hole-line{fill:var(--panel);stroke:var(--panel)}.inspect-lore{font-style:italic}.battle-journal,.replay-export{border:1px solid var(--line,#55452e);border-radius:10px;min-width:0;margin:12px 0;padding:12px}.battle-journal summary{cursor:pointer;font-weight:700}.battle-journal>ol{overscroll-behavior:contain;max-height:22rem;padding-left:24px;overflow-y:auto}.battle-journal li{overflow-wrap:anywhere;margin:5px 0}.battle-journal ul{padding-left:18px}.unit,.card,.full-card{isolation:isolate;position:relative}.art{z-index:-1;border-radius:inherit;color:var(--muted);place-items:center;display:grid;position:absolute;inset:0;overflow:hidden}.art svg{opacity:.3;width:78%}.face-top{flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:3px;display:flex}.face-top .tags{justify-content:flex-end}.tags .more{font-weight:700}.slot .unit .tags{flex-wrap:nowrap}.slot .unit{padding:3px;font-size:.62rem;line-height:1.12}.slot .unit .stat-icon{width:9px;height:11px}.slot .unit .atk,.slot .unit .hp{flex-direction:row;gap:1px;padding:2px 1px;font-size:.75rem}.full-card{flex-shrink:0;align-self:center;width:190px;padding:10px;font-size:1rem;line-height:1.2}.full-card .name{font-weight:650}.full-card .stats{font-size:1.2rem}.full-card .type{color:var(--muted);margin-top:auto}.full-card .face-top .icon{width:20px;height:20px}.atk b,.hp b,.cost b{white-space:nowrap}.slot .unit .tags{gap:1px}.slot .unit .tags .icon-wrap{padding:0}.slot .unit .tags .icon{width:11px;height:11px}.slot .unit .tags .more{white-space:nowrap;padding:0 1px}.slot .unit .stat-icon{width:8px}.slot .unit .stats{gap:1px}.slot .unit .atk,.slot .unit .hp{gap:0}.slot .unit .hp.damaged{border-width:1px}.card .atk,.card .hp{flex-direction:row;padding:3px 5px}.slot .unit .name{padding-bottom:2px}.playback-stage{background:var(--accent);color:var(--bg);border-radius:999px;padding:2px 8px;font-weight:700}.playback-scene{justify-content:center;align-items:center;gap:10px;min-height:118px;display:flex}.playback-scene .full-card{align-self:center;width:84px;padding:4px;font-size:.62rem}.playback-scene .full-card[data-role=target]{border-color:var(--bad)}.playback-scene .full-card .stats{gap:2px;font-size:.75rem}.playback-scene .full-card .atk,.playback-scene .full-card .hp,.playback-scene .full-card .cost{padding:2px 3px;font-size:.75rem}.playback-scene .full-card .icon,.playback-scene .full-card .stat-icon{width:11px;height:11px}.bot-playback .playback-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;display:grid}.card-back{background:repeating-linear-gradient(45deg, var(--line) 0 6px, var(--panel) 6px 12px)}@media (prefers-reduced-motion:no-preference){.playback-scene .full-card{animation:.26s ease-out playback-in}}@keyframes playback-in{0%{opacity:0;transform:translateY(-14px)scale(.9)}}.beat-ring{z-index:6;visibility:hidden;pointer-events:none;border:2px solid;border-radius:8px;position:fixed}.beat-banner,.beat-result{z-index:7;visibility:hidden;color:#fff8ee;white-space:nowrap;pointer-events:none;background:linear-gradient(#a85c28,#864418);border:2px solid #e09a5e;border-radius:10px;padding:10px 28px;font-size:1.6rem;font-weight:700;position:fixed;top:45%;left:50%;transform:translate(-50%,-50%);box-shadow:0 8px 24px #0009}.beat-banner.theirs{border:1px solid var(--wood);background:var(--line-bg);color:var(--fg);padding:4px 14px;font-size:1rem;top:18%}.beat-dim{z-index:6;pointer-events:none;background:#0007;position:fixed;inset:0}.beat-result{flex-direction:column;align-items:center;gap:2px;display:flex}.beat-result span{font-size:.95rem;font-weight:400}.beat-result[data-outcome=loss],.beat-result[data-outcome=draw]{background:linear-gradient(#5d564d,#3f3a34);border-color:#8f8577}.beat-motion{z-index:6;visibility:hidden;pointer-events:none;position:fixed;top:0;left:0}.beat-move .full-card{width:96px;padding:5px;font-size:.68rem;box-shadow:0 6px 20px #0008}.beat-move .full-card .stats{font-size:.8rem}.beat-move .full-card .icon,.beat-move .full-card .stat-icon{width:12px;height:12px}.beat-strike{inset:0}.beat-strike svg{width:100%;height:100%}.beat-strike line{stroke:var(--bad);stroke-width:6px;stroke-linecap:round}.beat-strike marker path{fill:var(--bad)}.beat-number b{color:#fff;background:#c0201f;border-radius:999px;padding:2px 10px;font-size:2rem;line-height:1.1;display:block}.beat-number b[data-sign=plus]{background:#1f7a3a}.app:has(.match){height:100dvh;min-height:0;padding-top:4px;padding-bottom:max(4px, env(safe-area-inset-bottom,0))}:is(.app:has(.match)>.app-header,.app:has(.match)>.footer){display:none}.app:has(.match)>main{min-height:0}.match{gap:4px;height:100%;min-height:0;position:relative}.match-header{white-space:nowrap;text-overflow:ellipsis;flex:none;min-height:32px;padding-right:52px;line-height:32px;overflow:hidden}.match-menu{z-index:20;position:absolute;top:-2px;right:0}.match-menu>summary{cursor:pointer;place-items:center;width:44px;height:44px;margin-top:-4px;margin-left:auto;font-size:1.4rem;list-style:none;display:grid}.match-menu[open]{left:0}.match-menu-sheet,.oboz-sheet{background:var(--bg);border:2px solid var(--accent);border-radius:12px;flex-direction:column;gap:10px;padding:12px;display:flex;overflow-y:auto;box-shadow:0 8px 40px #0007}.match-menu-sheet{max-height:calc(100dvh - 60px)}.sound-settings{flex-wrap:wrap;align-items:center;gap:8px 16px;display:flex}.sound-row{flex-wrap:wrap;flex:100%;align-items:center;gap:8px 16px;display:flex}.menu-sound{margin-top:12px}.menu-sound>.sound-settings{margin-top:8px}.sound-settings label{flex:160px;align-items:center;gap:8px;display:flex}.sound-settings input[type=range]{flex:auto;min-width:0}.sound-settings input:disabled{opacity:.45}.hints-settings{flex-wrap:wrap;align-items:center;gap:4px 16px;margin-top:8px;display:flex}.hints-settings p{margin:0;font-size:.85rem}.tutorial-hints-note{margin:0;font-size:.9rem}.match .table{flex:auto;gap:4px}.match .table:not(:has(.actions)){flex:none}.match .side{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 6px;padding:3px 4px;display:grid}.match .side.own{flex:auto;grid-template-rows:auto auto auto auto minmax(0,1fr);min-height:0}.match .side>.board,.match .side>.hand,.match .side>.actions,.match .side>.zone-title,.match .side>.side-counts{grid-column:1/-1}.match .side.own>.side-counts{grid-area:3/1}.match .side.own>.oboz{grid-area:3/2}.match .side>.zone-title,.match .side>.zone-heading,.match .side>.zone-hint,.match .side-strip .who,.match .side .side-strip .context-help,.match .side .side-counts .context-help,.match .influence-meter .context-help,.match .influence-meter .influence-pips,.match .influence-meter .resource-breakdown{display:none}.match .side-strip{flex-wrap:wrap;align-items:center;font-size:.8rem}.match .side-counts{white-space:nowrap;flex-wrap:nowrap;align-items:center;gap:8px;font-size:.75rem;overflow:hidden}.match .side-counts [data-zone=discard]{text-overflow:ellipsis;overflow:hidden}.hand-backs{vertical-align:middle;margin-left:4px;display:inline-flex}.hand-backs i{border:1px solid var(--muted);border-radius:2px;width:11px;height:15px;margin-left:-3px}.match .influence-meter{padding:2px 8px;display:block}.match .influence-heading{flex-wrap:nowrap;min-height:0;font-size:.75rem}.match .influence-total{margin-left:4px;font-size:1.3rem}.match .hand{grid-template-columns:repeat(4,minmax(0,1fr))}.match .card{gap:2px;padding:3px;font-size:.64rem;line-height:1.12}.match .card .cost{min-height:0;padding:1px 4px;font-size:.9rem}.match .card .stat-icon{width:11px;height:11px}.match .card .stats{gap:1px;font-size:.8rem}.match .card .atk,.match .card .hp{padding:1px 4px;font-size:.8rem}.match .card .tags .icon{width:11px;height:11px}.match .cost-shortfall{white-space:nowrap;padding:0 2px;font-size:.55rem}.match .resource-zone.oboz{border-width:1px;margin:0;padding:0;display:block}.oboz details>summary{cursor:pointer;min-height:24px;padding:0 8px;font-size:.75rem;font-weight:700;line-height:24px;list-style:none}.oboz-sheet{z-index:18;max-width:464px;max-height:60dvh;margin:0 auto;position:fixed;inset:auto 8px 8px}.match .actions{flex-flow:wrap;align-content:flex-start;align-self:stretch;gap:4px;min-height:0;font-size:.8rem;overflow-y:auto}.match .actions>h3{display:none}.match .actions>:not(button){flex:100%;margin:0}.match .actions .selected-card-name,.match .actions .oboz-preview{padding:3px 8px;font-size:.72rem;line-height:1.25}.match .actions>button{text-align:center;flex:auto}.turn-line-slot{min-height:44px}.turn-line{border:0;border-block:1px solid var(--line);background:var(--panel);width:100%;min-height:44px;color:var(--fg);text-align:left;cursor:pointer;border-radius:0;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;margin:0;padding:3px 6px;font-size:.85rem;line-height:1.3;display:grid}.turn-text{flex-direction:column;gap:1px;min-width:0;display:flex}.turn-fact,.turn-advice{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.turn-fact:only-child{-webkit-line-clamp:2;line-clamp:2}.turn-advice{border-left:3px solid var(--advice);padding-left:6px}.turn-open{color:var(--muted);font-size:1.2rem}.match>.bot-playback{flex:1 1 0;order:9;grid-template-columns:auto minmax(0,1fr);align-content:start;gap:2px 8px;min-height:0;margin:0;padding:4px 6px;display:grid;position:static;overflow:hidden}.match>.bot-playback>header{flex-wrap:nowrap;grid-column:2;font-size:.75rem}.match>.bot-playback>.playback-caption{grid-column:2;min-height:0;margin:0;font-size:.8rem;line-height:1.2}.match>.bot-playback>.playback-scene{grid-area:1/1/span 3;gap:3px;min-width:54px;min-height:72px}.match .playback-scene .full-card{width:50px;padding:2px;font-size:.5rem}.match .playback-scene .full-card .atk,.match .playback-scene .full-card .hp,.match .playback-scene .full-card .cost{min-height:0;padding:0 2px;font-size:.6rem}.match .playback-scene .full-card .stat-icon{width:7px;height:7px}.match .playback-scene .full-card .tags,.match .bot-playback .playback-legend{display:none}.match .bot-playback .playback-controls{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.match .bot-playback .playback-controls button{text-align:center;padding:0 2px;font-size:.68rem}@media (width>=600px) and (height>=1000px){.app:has(.match){max-width:620px}}.match-menu:not([open])>.match-menu-sheet,.oboz details:not([open])>.oboz-sheet{display:none}.match-menu .concede{margin-top:0}.match-menu>summary{background:var(--bg);border-radius:8px}.match>.bot-playback>header{flex-wrap:wrap;gap:2px 6px}.match .side .leader{padding:2px 6px}.match .card .cost,.match .card .atk,.match .card .hp{line-height:1.3}.match .table{min-height:0}.match .table>.side.opponent,.match .table>.table-center{flex:none}.match .actions>button{flex:1 1 0;order:-1;padding:4px 6px;line-height:1.15}.match .actions .action-problems,.match .actions .action-problem{gap:0;margin:0}.match .actions .action-problem{padding:3px 8px;font-size:.75rem;line-height:1.25}.match .actions .hint{line-height:1.25}.match .side-strip{gap:0 4px}.match .side .leader{flex:none}.match .chip{text-overflow:ellipsis;font-size:.68rem;overflow:hidden}@media (height<=739px){.app:has(.match){height:auto;min-height:100dvh}.match,.match .table{flex:none;height:auto}.match .side.own{flex:none;grid-template-rows:none}.match .actions{overflow:visible}.match>.bot-playback{z-index:12;background:var(--panel);flex:none;position:sticky;bottom:0;overflow:visible}}.match-menu .footer{margin:0}.oboz details>summary{min-height:44px;line-height:44px}.match .slot .unit,.match .slot .unit .tags span,.match .card,.match .card .tags span,.match .card .type,.match .cost-shortfall,.match .chip,.match .place span:last-child,.match .icon-x{font-size:11px}.match .slot .unit .atk,.match .slot .unit .hp,.match .card .atk,.match .card .hp{font-size:13px}.match .cost-shortfall{line-height:1.1}.match>.bot-playback small,.match .bot-playback .playback-controls button{font-size:11px}.match .playback-scene .full-card{width:64px;padding:3px;font-size:11px;line-height:1.05}.match .playback-scene .full-card .atk,.match .playback-scene .full-card .hp,.match .playback-scene .full-card .cost{font-size:12px}.match .actions>.leftover-title,.match .actions>.leftover{order:-2}.match .actions>.leftover-title{color:var(--fg);font-weight:600}.leftover{margin:0;padding-left:18px;line-height:1.3}.playback-rule{color:var(--muted);display:block}.match>.bot-playback>.playback-rule{grid-column:2;font-size:.72rem;line-height:1.2}.tutorial h2{margin:0;font-size:1.4rem}.tutorial-stage h3{margin:8px 0 4px;font-size:1rem}.tutorial-kicker{color:var(--muted);margin:0;font-size:.85rem}.tutorial-hint{color:#2a1d10;background:#f3e8cf;border-radius:12px;margin:0;padding:12px 14px;font-size:16px;line-height:1.35}.tutorial-battles{flex-direction:column;gap:6px;margin:0;padding-left:1.4em;display:flex}.tutorial-battle{justify-content:space-between;gap:8px;display:flex}.tutorial-battle.won{color:var(--ok)}.tutorial-battle.open{color:var(--accent);font-weight:600}.tutorial-battle.locked{color:var(--muted)}.tutorial-line{font-style:italic}.tutorial-notice{border:1px solid var(--accent);border-radius:8px;align-items:flex-start;gap:8px;padding:6px 8px;display:flex}.tutorial-notice p{flex:1;margin:0}.survey{flex-direction:column;gap:14px;max-width:480px;margin:0 auto;padding:16px;display:flex}.survey fieldset{border:1px solid var(--line,#55452e);border-radius:10px;flex-wrap:wrap;gap:8px 16px;margin:0;padding:10px 12px;display:flex}.survey fieldset label,.survey-consent{align-items:center;gap:6px;min-height:44px;display:flex}.survey-email{flex-direction:column;gap:6px;display:flex}.survey-email input{min-height:44px;font-size:16px}.survey-consent{align-items:flex-start}.survey-consent input{margin-top:4px}.survey button:disabled{opacity:.45;cursor:not-allowed}.support-link{text-align:center;flex-direction:column;align-items:center;gap:4px;margin:16px 0 4px;display:flex}.support-link a{border:1px solid var(--line,#55452e);min-height:44px;color:inherit;border-radius:10px;align-items:center;padding:0 16px;text-decoration:none;display:inline-flex}.coach{z-index:40;pointer-events:none;position:fixed;inset:0}.coach-spot{box-shadow:0 0 0 3px var(--accent,#e0a050), 0 0 0 9999px #0000008c;border-radius:12px;animation:1.4s ease-in-out infinite coach-pulse;position:fixed}@keyframes coach-pulse{50%{box-shadow:0 0 0 6px var(--accent,#e0a050), 0 0 0 9999px #0000008c}}.coach-bubble{color:#2a1d10;pointer-events:auto;background:#f3e8cf;border-radius:12px;flex-direction:column;gap:10px;max-width:420px;margin:0 auto;padding:12px 14px;display:flex;position:fixed;top:30%;left:16px;right:16px;box-shadow:0 6px 20px #00000080}.coach-bubble.above{top:auto}.coach.soft .coach-spot{animation:none;box-shadow:0 0 0 2px #f3e8cf}.coach.soft .coach-bubble{pointer-events:none;max-width:300px;padding:8px 10px;animation:.15s ease-out coach-fade}.coach.soft .coach-bubble p{font-size:15px}.coach.first .coach-bubble{pointer-events:auto;max-width:320px}.coach-first-title{align-items:center;gap:6px;display:flex}.coach-first-title svg{width:18px;height:18px}.coach-ok{color:#2a1d10;background:0 0;border:1px solid #2a1d10;border-radius:8px;align-self:flex-end;padding:4px 12px;font-size:14px}@keyframes coach-fade{0%{opacity:0}}.coach-bubble p{margin:0;font-size:16px;line-height:1.35}.coach-bubble.nudge{animation:.35s ease-in-out coach-nudge}@keyframes coach-nudge{25%{transform:translate(-6px)}75%{transform:translate(6px)}}@media (prefers-reduced-motion:reduce){.coach-spot,.coach-bubble.nudge,.coach.soft .coach-bubble{animation:none}}:root{--bg:#ece2d0;--fg:#2a1c10;--muted:#5f4a33;--panel:#f7efe1;--line:#a88661;--accent:#9a4f1e;--advice:#9a6a1f;--ok:#1f6e36;--bad:#b31d1d;--wood:#8a6440;--wood-hi:#f3e6d0;--wood-lo:#e3cfb0;--felt-grain:#5a3b2210;--slot-bg:#00000012;--line-bg:#f1e6d3}@media (prefers-color-scheme:dark){:root{--bg:#1b130d;--fg:#f3e7d4;--muted:#bba487;--panel:#2b1d13;--line:#5c3f27;--accent:#d0844a;--advice:#e9c48f;--ok:#7fcf8f;--bad:#ff7a6b;--wood:#6b4a2c;--wood-hi:#3d2a1a;--wood-lo:#2c1e13;--felt-grain:#ffffff07;--slot-bg:#00000040;--line-bg:#24180f}}body{background:repeating-linear-gradient(115deg, var(--felt-grain) 0 1px, transparent 1px 4px), repeating-linear-gradient(25deg, var(--felt-grain) 0 1px, transparent 1px 5px), var(--bg);background-attachment:fixed}.side{border:2px solid var(--wood);background:linear-gradient(180deg, transparent, #00000014), var(--panel);border-left-width:2px;position:relative;box-shadow:inset 0 0 0 1px #0000004d,inset 0 1px #ffffff14,0 2px 6px #00000040}.slot.empty{background:var(--slot-bg);border:1px solid #00000040;box-shadow:inset 0 1px 3px #00000059}.turn-line{background:var(--line-bg);border-block:1px solid var(--wood)}button:not(.danger,.turn-line,.primary,[data-tap]){border-color:var(--wood);background:linear-gradient(180deg, var(--wood-hi), var(--wood-lo))}button.primary{color:#fff8ee;background:linear-gradient(#a85c28,#864418);border-color:#e09a5e}.match-menu-sheet,.menu{background:var(--line-bg)}[data-tap=can]{border:2px solid var(--accent)}[data-tap=unavailable]{opacity:.82}.side:before{content:"";background:var(--faction,var(--line));height:9px;-webkit-mask:var(--motif) left center / auto 9px repeat-x;-webkit-mask:var(--motif) left center / auto 9px repeat-x;mask:var(--motif) left center / auto 9px repeat-x;opacity:.85;flex:none;grid-column:1/-1;margin:-2px 0 2px;display:block}[data-faction=nomads]{--motif:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10'%3E%3Cpath d='M12 9.5C12 4.5 8.5 1 5.5 2.6 3.4 3.8 4 6.9 6.2 6.4M12 9.5C12 4.5 15.5 1 18.5 2.6 20.6 3.8 20 6.9 17.8 6.4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")}[data-faction=oasis]{--motif:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M0 5 4 1 8 5 12 1 16 5M0 5 4 9 8 5 12 9 16 5' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3Ccircle cx='4' cy='5' r='1.3'/%3E%3Ccircle cx='12' cy='5' r='1.3'/%3E%3C/svg%3E")}[data-faction=spirits]{--motif:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M0 9.5 4.5 2.5 8 7 11 3.5 16 9.5' fill='none' stroke='%23000' stroke-width='1.4' stroke-linejoin='round'/%3E%3Ccircle cx='13' cy='1.8' r='1.2'/%3E%3C/svg%3E")}[data-faction=underworld]{--motif:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M0 8.5H4V2H12V8.5H16M6.5 5.5H9.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E")}
