:root{color-scheme:dark;font-family:system-ui,sans-serif;background:#0d151c;color:#eef2f3}*{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden;display:flex;flex-direction:column}header{height:56px;flex:none;display:flex;justify-content:space-between;align-items:center;padding:8px 18px;gap:12px;border-bottom:1px solid #31404a}h1{font-size:clamp(17px,2.8vw,26px);letter-spacing:-.04em;margin:0}h1 small{color:#e6bc70;font-size:12px;margin-left:8px}button,select{font:inherit;border:1px solid #46545f;border-radius:7px;min-height:42px;padding:7px 10px;color:#edf1f2;background:#26343e;cursor:pointer}button:disabled,select:disabled{opacity:.48;cursor:default}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #efc477;outline-offset:2px}header button{font-size:14px;min-height:36px}main{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 370px;gap:12px;padding:12px;max-width:1500px;width:100%;margin:auto}.table{display:flex;flex-direction:column;min-height:0;overflow:hidden;border:1px solid #3b4b53;border-radius:12px;background:#15232c}.arena{flex:1;min-height:0;background:#221d19 url('assets/dark-wood.webp') center/cover;position:relative}#board{width:100%;height:100%;display:block;overflow:visible}.health{display:grid;grid-template-columns:1fr 1fr;gap:22px;padding:12px 14px}.health-title{display:flex;justify-content:space-between;gap:6px;font-size:14px}.healthbar{display:flex;gap:4px;height:18px;margin:6px 0}.hp-unit{display:flex;gap:1px;flex:1;transform:skewX(-8deg)}.hp-segment{flex:1;background:#35434a;transition:background .35s}.hp-segment.alive{background:#45d79c}.hp-segment.scratch{background:#edb955}.hp-segment.lost{background:#66343d}.health-meta{font-size:12px;color:#b1c2ca}.stage{display:flex;align-items:center;gap:12px;padding:8px 12px;font-size:14px}#phase{color:#dfc187}#notice{font-size:14px;color:#e0e8e9;min-height:30px;padding:0 12px 8px;line-height:1.35}aside{overflow-y:auto;min-height:0;overscroll-behavior:contain;padding-right:4px}.player{background:#1a2832;border:1px solid #3c4c56;border-radius:9px;padding:12px;margin-bottom:10px}.player h2{font-size:17px;margin:0 0 8px}.current{font-size:12px;color:#bdcbd2;display:block;font-weight:400;margin-top:3px}.controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.wide{grid-column:1/-1}label{display:flex;flex-direction:column;gap:4px;font-size:14px;color:#c9d3d8}select{width:100%;min-width:0;max-width:100%}.inertia{font-size:13px;line-height:1.45;color:#e9c987;margin:8px 0}.speed{font-size:14px;margin:8px 0;color:#cad8dc}.speed b{color:#fff}.confirm,.primary{background:#edc379;color:#17232a;border:0;font-weight:700;width:100%}.formula{display:block;font-size:12px;color:#9fb3bd;margin-top:3px}details{border-top:1px solid #3a4c56;padding:12px 2px;font-size:14px;line-height:1.5}summary{cursor:pointer;font-weight:600}details p{color:#b9cbd1}#actions{margin-bottom:12px}#actions p{font-size:14px}.directionbuttons{display:flex;gap:8px}.directionbuttons button{flex:1}.token-label{fill:#fff;font:bold 12px system-ui;paint-order:stroke;stroke:#111e26;stroke-width:4px}.damage-label{font:bold 15px system-ui;fill:#fff;paint-order:stroke;stroke:#14202a;stroke-width:4px}.inertia-label{font:bold 12px system-ui;fill:#ffe2a3;paint-order:stroke;stroke:#17212a;stroke-width:3px}.ray{stroke-dasharray:96;stroke-dashoffset:96;animation:shoot .7s ease-out forwards}.impact{transform-box:fill-box;transform-origin:center;animation:impact .65s ease-out both}.damage-pop{animation:float 1.7s ease-out both}@keyframes shoot{to{stroke-dashoffset:0}}@keyframes impact{0%{opacity:0;scale:.3}35%{opacity:1;scale:1.25}100%{opacity:.9;scale:1}}@keyframes float{0%{opacity:0;translate:0 8px}20%{opacity:1}100%{opacity:1;translate:0 -16px}}@media(max-width:760px){header{height:44px;padding:4px 10px}main{grid-template-columns:1fr;grid-template-rows:minmax(0,56fr) minmax(0,44fr);gap:8px;padding:6px}.health{padding:7px 10px;gap:16px}.healthbar{height:13px;margin:4px 0}.health-title{font-size:13px}.health-meta{font-size:12px}.stage{padding:5px 9px;font-size:13px}#notice{font-size:12px;min-height:28px;padding:0 9px 6px}#players{display:grid;grid-template-columns:1fr 1fr;gap:8px}.player{padding:9px;margin:0}.player h2{font-size:15px}.controls{gap:5px}label{font-size:12px}select{font-size:14px;padding:6px;min-height:38px}.speed{font-size:13px}.formula{font-size:12px}.inertia{font-size:12px}.confirm{font-size:13px}#actions{margin-top:8px}aside{padding-right:0}.current{font-size:12px}.health-title b{font-size:13px}}@media(max-height:470px) and (orientation:landscape){main{grid-template-columns:minmax(0,1fr) 330px;grid-template-rows:1fr}.health-meta{display:none}#players{display:block}.player{margin-bottom:8px}}@media(prefers-reduced-motion:reduce){.ray,.impact,.damage-pop{animation-duration:.01s}.hp-segment{transition:none}}
.theme-golem{--fighter-accent:#afcf92;--fighter-texture:url('assets/golem-theme.webp')}.theme-assassin{--fighter-accent:#8ad6e8;--fighter-texture:url('assets/assassin-theme.webp')}.player,.fighter-hud{background-image:linear-gradient(#15232aeb,#15232ae8),var(--fighter-texture);background-size:cover;background-position:center;border-color:color-mix(in srgb,var(--fighter-accent) 35%,#253843)}.player h2,.health-title b{color:var(--fighter-accent)}.player h2{background:linear-gradient(90deg,#18263030,transparent);border-bottom:1px solid color-mix(in srgb,var(--fighter-accent) 25%,transparent);padding-bottom:8px}.fighter-hud{border:1px solid #3b4d53;border-radius:7px;padding:6px 8px}.health{gap:12px;padding:8px}.portrait{transform-box:fill-box;transform-origin:center}.portrait.windup{animation:windup .28s ease-out both}.portrait.strike{animation:strike .42s cubic-bezier(.16,.8,.25,1) both}.portrait.recoil{animation:recoil .36s ease-out both}.portrait.fallen{animation:fallen 1.25s ease-in forwards}.portrait.triumphant{animation:triumph 1.1s ease-out both}.ray{animation:shoot .42s cubic-bezier(.1,.75,.2,1) forwards;filter:drop-shadow(0 0 3px #e4fff9)}.ray-rest{opacity:.3}.shockwave{transform-box:fill-box;transform-origin:center;animation:shock .65s ease-out both}.spark{animation:spark .55s ease-out both}.damage-pop{animation:damage-arc 1.1s cubic-bezier(.16,.9,.3,1) both}.damage-label{font-size:16px;font-weight:850}.victory-ring{transform-box:fill-box;transform-origin:center;animation:win-ring 1.6s ease-out both;filter:drop-shadow(0 0 5px #ffe89d)}.victory-ring.second{animation-delay:.15s}.winner-label{fill:#ffe299;font:900 17px system-ui;letter-spacing:2px;paint-order:stroke;stroke:#19242c;stroke-width:4px;animation:winner-title .7s ease-out both}@keyframes windup{to{translate:0 3px;scale:.94}}@keyframes strike{0%{translate:0 3px;scale:.94}35%{translate:0 -4px;scale:1.08}100%{translate:0 0;scale:1}}@keyframes recoil{0%,100%{translate:0 0}20%{translate:2px 1px}40%{translate:-2px -1px}65%{translate:1px 0}}@keyframes fallen{0%{opacity:1}35%{filter:grayscale(1);scale:.94}100%{opacity:.18;scale:.65;rotate:12deg;filter:grayscale(1)}}@keyframes triumph{0%{scale:.9}45%{scale:1.08;filter:drop-shadow(0 0 2px #ffebae)}100%{scale:1;filter:drop-shadow(0 0 1px #ffe6a0)}}@keyframes shock{0%{scale:.5;opacity:1}100%{scale:3;opacity:0}}@keyframes spark{0%{opacity:1;translate:0 0}100%{opacity:0;translate:var(--dx) var(--dy)}}@keyframes damage-arc{0%{opacity:0;translate:0 8px;scale:.8}25%{opacity:1;scale:1.15}100%{opacity:1;translate:0 -16px;scale:1}}@keyframes win-ring{0%{opacity:0;scale:.7}45%{opacity:1;scale:1.1}100%{opacity:.85;scale:1}}@keyframes winner-title{0%{opacity:0;translate:0 8px}100%{opacity:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.portrait,.ray,.shockwave,.spark,.damage-pop,.victory-ring,.winner-label{animation-duration:.01s!important;animation-delay:0s!important}}
/* Fantasy arcade shell, with the paper tokens kept as the playable objects. */
:root{color-scheme:dark;background:#080d20;color:#f2f5ff;font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif;--gold:#ffcf69;--edge:#60719c}body{background:radial-gradient(ellipse at top,#273a69 0,#111b37 42%,#080e20 90%);touch-action:pan-y}header{height:60px;padding:8px 22px;border-bottom:2px solid #48557c;background:linear-gradient(#2a3658,#17213d);box-shadow:0 4px 20px #0005;z-index:2}h1{font-weight:900;letter-spacing:-.035em;text-shadow:0 2px #080c20;font-size:clamp(19px,2.5vw,29px)}h1 small{display:inline-block;letter-spacing:.12em;color:#ffdc89;border:1px solid #9c804e;border-radius:4px;padding:3px 5px;vertical-align:middle}main{gap:16px;padding:14px;grid-template-columns:minmax(0,1fr) 395px;max-width:1600px}.table{border:2px solid #7583ab;border-radius:18px;background:linear-gradient(#202e52,#131e39);box-shadow:0 8px 0 #050a18,0 16px 32px #0005;isolation:isolate}.arena{background-color:#193849;overflow:hidden;border-top:2px solid #10172d;border-bottom:2px solid #475573}#board{position:relative;touch-action:none;cursor:grab;overflow:hidden}#board:active{cursor:grabbing}.camera-controls{position:absolute;z-index:3;right:9px;bottom:9px;display:flex;gap:5px;opacity:.92}.camera-controls button{min-height:34px;min-width:34px;padding:3px 9px;font-size:16px;background:#111c35e8;border:1px solid #a7b7d8;color:white;box-shadow:0 2px 0 #030713}.camera-controls #zoom-fit{font-size:12px}.health{gap:12px;padding:10px;background:linear-gradient(#273554,#15203e)}.fighter-hud{padding:8px 10px;border-width:2px;border-radius:12px;box-shadow:inset 0 1px 0 #ffffff32,0 3px 0 #080e20}.health-title{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0}.health-title b{font-size:15px;text-shadow:0 1px 2px #000;overflow-wrap:anywhere}.health-title>span{font-size:14px;font-weight:900;color:white}.fighter-portrait{width:42px;height:42px;object-fit:cover;object-position:center;border:2px solid var(--fighter-accent,#ffcf69);border-radius:12px;background:#f4f2e8;box-shadow:0 2px 7px #0007;flex:none}.health-title .fighter-portrait{width:38px;height:38px}.healthbar{height:20px;padding:2px;background:#070d20;border:1px solid #8192ad;border-radius:5px;gap:3px;box-shadow:inset 0 2px 3px #000a}.hp-unit{transform:none;gap:1px}.hp-segment{border-radius:1px}.hp-segment.alive{background:linear-gradient(#d4fa9d,#7cce49 45%,#328834)}.theme-assassin .hp-segment.alive{background:linear-gradient(#cbfaff,#50d2ed 45%,#257bbf)}.hp-segment.scratch{background:repeating-linear-gradient(135deg,#ffdfa6 0 2px,#e7a036 2px 5px)}.hp-segment.lost{background:#321b33;box-shadow:inset 0 1px 3px #090c17}.health-meta{font-size:12px;color:#e2eafa;font-weight:600}.theme-golem{--fighter-accent:#b7ef71;--fighter-texture:url('assets/golem-theme.webp');--fighter-base:#173725}.theme-assassin{--fighter-accent:#71e4ff;--fighter-texture:url('assets/assassin-theme.webp');--fighter-base:#162b58}.player,.fighter-hud{background-image:linear-gradient(110deg,color-mix(in srgb,var(--fighter-base) 85%,transparent),color-mix(in srgb,var(--fighter-base) 60%,transparent)),var(--fighter-texture);background-size:cover;border-color:color-mix(in srgb,var(--fighter-accent) 68%,#14223c)}.player{position:relative;border-width:2px;border-radius:15px;padding:14px;margin-bottom:14px;box-shadow:0 5px 0 #060d1e,inset 0 1px 0 #ffffff30;overflow:hidden}.player.theme-assassin{background-image:linear-gradient(125deg,#192c58db,#1a568787,#12234ceb),var(--fighter-texture)}.player h2{display:flex;align-items:center;gap:10px;min-width:0;font-size:19px;padding:0 0 10px;margin:0 0 12px;border-bottom:1px solid #ffffff2b;text-shadow:0 2px 2px #0009}.fighter-heading{min-width:0;overflow-wrap:anywhere}.current{font-size:12px;line-height:1.35;color:#e0ecf4;margin-top:4px}.controls{gap:9px}label{font-size:14px;color:#f1f6fc;line-height:1.35;font-weight:600}button,select{border-radius:9px;border:1px solid #8399c0;background:linear-gradient(#344c76,#223757);min-height:44px;font:700 15px ui-rounded,'Trebuchet MS',system-ui,sans-serif;box-shadow:0 3px 0 #070e23,inset 0 1px 0 #ffffff24;transition:filter .15s,transform .15s}button:hover{filter:brightness(1.14)}button:active{transform:translateY(2px);box-shadow:0 1px 0 #070e23}select{color:white;background-color:#203955;white-space:normal}select option{background:#20314f;color:white}button:disabled,select:disabled{opacity:.6}button:disabled{transform:none}.confirm{background:linear-gradient(#eaffb1,#a7d55e);color:#183526;border:1px solid #d8f7a2;box-shadow:0 4px 0 #375326,inset 0 1px 0 #fff8}.theme-assassin .confirm{background:linear-gradient(#c4faff,#5ad1f0);border-color:#b2efff;box-shadow:0 4px 0 #214f83,inset 0 1px 0 #fff8;color:#142f58}.primary{background:linear-gradient(#ffe5a4,#ffc45b 58%,#eda23c);color:#482708;border:1px solid #ffe9b8;box-shadow:0 4px 0 #835327,inset 0 1px 0 #fff9;min-height:48px;line-height:1.3}.inertia{font-size:13px;color:#e8f2ff;background:#0b162760;border-radius:6px;padding:7px;margin:10px 0}.speed{display:block;color:white;font-size:15px;margin:10px 0}.speed b{display:inline-block;font-size:22px;color:var(--fighter-accent);margin-left:3px}.formula{color:#d2e2eb;line-height:1.5;font-size:12px}.stage{padding:9px 12px;justify-content:space-between;gap:8px}#turn{color:#ffe8a9;font-size:16px}#phase{font-weight:700;font-size:14px;text-align:right;color:#d2e6ff}#notice{padding:0 12px 10px;font-size:14px;line-height:1.45;min-height:50px;color:#f1f5fc}.phase-track{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;padding:5px 9px;background:#111c36}.phase-track span{text-align:center;padding:5px 2px;font-size:11px;color:#aebedb;border-bottom:2px solid #3c4c70;overflow-wrap:anywhere}.phase-track .active{color:#ffdf87;border-color:#ffd270;background:#ffce6615;font-weight:900}.ready-card{padding:14px;border:1px solid #e6b859;border-radius:12px;background:linear-gradient(#493b33,#25253d);box-shadow:0 4px 0 #090e21}.ready-card>b{color:#ffe5a2}.ready-card p{font-size:14px;color:#eee7d9;margin:7px 0 12px}.outcomes{display:grid;gap:6px;margin-bottom:10px}.outcomes:empty{display:none}.hit-card{display:grid;gap:3px;padding:9px 11px;border:1px solid var(--fighter-accent);border-left-width:4px;border-radius:8px;background:var(--fighter-base);animation:card-impact .4s ease-out both;font-size:13px;overflow-wrap:anywhere}.hit-card span{color:#edf6ff}.finale{padding:18px;border:2px solid #ffdb85;background:radial-gradient(ellipse at top,#786038,#1b2647 78%);border-radius:16px;text-align:center;margin-bottom:14px;box-shadow:0 0 25px #ffce6940,0 6px 0 #0c1027;animation:finale-enter 1.2s cubic-bezier(.2,1.5,.3,1) both}.finale[hidden]{display:none}.finale-kicker{display:block;font-size:11px;letter-spacing:.12em;color:#ead8b1;margin-bottom:10px}.finale>div{display:flex;justify-content:center;align-items:center;gap:14px}.finale .fighter-portrait{width:66px;height:66px}.finale strong{color:#ffe79f;font-size:23px;line-height:1.2;text-align:left;text-shadow:0 3px #68402c}.finale p{font-size:14px;color:#f4e9d5;margin-bottom:0}details{background:#14213b;border:1px solid #3e527c;border-radius:10px;margin:10px 0;padding:12px}details p{color:#d0dcf0}summary{font-size:15px;color:#e8f0ff}.token-disc{isolation:isolate}.motion-ring{animation:motion-ripple .9s ease-out infinite;transform-origin:0 0}.motion-ring.echo{animation-delay:.3s}.mist .motion-ring{filter:drop-shadow(0 0 3px #52dfff)}.stone .motion-ring{animation-timing-function:steps(6)}.trail-pulse{animation:trail-pulse .5s ease-out both;transform-box:fill-box;transform-origin:center}.portrait.stone,.portrait.golem{--fall-color:#a6dc65}.portrait.assassin{--fall-color:#7feaff}.portrait.golem.fallen{animation:stone-fall 1.8s ease-in forwards}.portrait.assassin.fallen{animation:mist-fall 1.8s ease-in forwards}.end-ring{transform-origin:0 0;animation:end-ring 1.8s ease-out both}.winner .end-ring{animation-iteration-count:3}.end-spark{animation:end-spark 1.8s ease-out both}.winner .end-spark{animation-iteration-count:2}.defeated.mist .end-ring{stroke-dasharray:12 6;filter:blur(.5px)}.defeated.stone .end-spark{stroke-linecap:square}.arena[data-phase="attack"]{animation:arena-flash .5s ease-out}.portrait.assassin.strike{animation:assassin-strike .42s ease-out both}.portrait.golem.strike{animation:golem-strike .42s ease-out both}
@keyframes card-impact{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes finale-enter{0%{opacity:0;transform:scale(.65);filter:brightness(2)}55%{opacity:1;transform:scale(1.025)}100%{transform:scale(1);filter:brightness(1)}}@keyframes motion-ripple{0%{opacity:.8;scale:.94}100%{opacity:0;scale:1.22}}@keyframes trail-pulse{from{scale:.3;opacity:1}to{scale:2;opacity:0}}@keyframes end-ring{0%{scale:.5;opacity:0}20%{opacity:1}100%{scale:1.65;opacity:0}}@keyframes end-spark{0%{opacity:0}20%{opacity:1}100%{translate:var(--dx) var(--dy);opacity:0}}@keyframes stone-fall{0%{filter:brightness(1.6)}25%{translate:2px 0}35%{translate:-2px 1px}100%{opacity:.14;translate:0 6px;scale:.73;filter:grayscale(1)}}@keyframes mist-fall{0%{filter:brightness(1.5)}100%{opacity:0;scale:1.3;filter:blur(4px)}}@keyframes arena-flash{0%{box-shadow:inset 0 0 70px #a0e9ff44}100%{box-shadow:inset 0 0 0 transparent}}@keyframes assassin-strike{0%{translate:0 3px;opacity:.65}45%{translate:0 -7px;filter:drop-shadow(0 3px 2px #73efff)}100%{translate:0 0;opacity:1}}@keyframes golem-strike{0%{translate:0 4px;scale:.95}45%{translate:0 -5px;scale:1.07}100%{translate:0 0;scale:1}}
@media(max-width:760px){header{height:50px;padding:5px 10px}h1{font-size:20px}h1 small{font-size:9px}main{padding:7px;gap:10px;grid-template-columns:1fr;grid-template-rows:minmax(260px,57fr) minmax(0,43fr)}.table{border-radius:13px}.health{padding:6px;gap:6px}.fighter-hud{padding:5px 6px;border-radius:9px}.health-title{grid-template-columns:30px minmax(0,1fr) auto;gap:4px}.health-title .fighter-portrait{width:30px;height:30px;border-radius:8px}.health-title b{font-size:13px}.health-title>span{font-size:12px}.healthbar{height:15px;margin:5px 0}.health-meta{font-size:11px}.phase-track{padding:3px 5px}.phase-track span{font-size:9px;padding:3px 1px}.stage{padding:6px 9px}#turn{font-size:14px}#phase{font-size:12px}#notice{font-size:12px;min-height:43px;padding:0 9px 7px}.camera-controls{right:6px;bottom:6px}.camera-controls button{min-height:30px;min-width:30px}#players{display:grid;grid-template-columns:1fr 1fr;gap:8px}.player{padding:9px;margin-bottom:0;border-radius:11px}.player h2{font-size:16px;gap:6px;align-items:flex-start;margin-bottom:8px;padding-bottom:8px}.player h2 .fighter-portrait{width:32px;height:32px;border-radius:8px}.current{font-size:11px}.controls{gap:7px}label{font-size:13px}select{font-size:16px;min-height:42px;padding:6px}.inertia{font-size:12px;padding:5px}.formula{font-size:11px}.confirm{font-size:13px;padding:8px 4px}.speed{font-size:14px}.speed b{font-size:20px}aside{padding:0 1px 5px}.finale strong{font-size:20px}#actions{margin-top:12px}.hit-card{font-size:12px}}
@media(max-width:350px){#players{grid-template-columns:1fr}.player h2 .fighter-portrait{width:38px;height:38px}.health-title{grid-template-columns:26px minmax(0,1fr)}.health-title>span{grid-column:2}.health-title .fighter-portrait{width:26px;height:26px}.phase-track span{font-size:8px}}
@media(max-height:500px) and (orientation:landscape){header{height:42px}main{grid-template-columns:minmax(0,1fr) 330px;grid-template-rows:1fr;padding:6px}.health-meta,.phase-track{display:none}.health-title .fighter-portrait{width:26px;height:26px}.health-title{grid-template-columns:26px minmax(0,1fr) auto}.healthbar{height:12px;margin:3px 0}.health{padding:4px}.stage{padding:4px 8px}#notice{font-size:11px;min-height:29px;padding-bottom:4px}#players{grid-template-columns:1fr}.player{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01s!important;animation-iteration-count:1!important;animation-delay:0s!important;transition-duration:.01s!important}}
.player.theme-assassin::before{content:"";position:absolute;inset:0;background:url('assets/dungeon-fulmini.webp') center/cover;opacity:.15;mix-blend-mode:screen;pointer-events:none}.player>*{position:relative}.theme-assassin .fighter-portrait{box-shadow:0 0 12px #4dbde850}.theme-golem .fighter-portrait{box-shadow:0 0 10px #8dc95a40}
/* v7: character selection and tactile hour coupling. */
:root{background:#101821;--edge:#567591}body{background:radial-gradient(ellipse at top,#284960,#15232f 48%,#0c141d)}header{background:linear-gradient(#2d455a,#192b3b);border-color:#56718b}main{grid-template-columns:minmax(0,1fr) 420px}.table{background:linear-gradient(#263d52,#172735);border-color:#607d94}.arena{background:#1b2833;background-image:none}.health{background:linear-gradient(#293f52,#172837)}.phase-track{background:#152533}.theme-mage{--fighter-accent:#ff9b45;--fighter-texture:url('assets/mage-theme.png');--fighter-base:#482817}.player.theme-mage,.fighter-hud.theme-mage{background-image:linear-gradient(115deg,#301f1bea,#4e281b9c),var(--fighter-texture)}.theme-mage .hp-segment.alive{background:linear-gradient(#ffe4a9,#ff9b45 45%,#b54a21)}.theme-mage .confirm{background:linear-gradient(#ffe2a8,#ff9b45);color:#432610;border-color:#ffe0a0;box-shadow:0 4px #773c20}.fighter-heading>small{display:block;color:#c6d5e0;font-size:10px;letter-spacing:.15em;margin-bottom:3px}.lock-badge{margin-left:auto;background:var(--fighter-accent);color:#142533;border-radius:50%;width:28px;height:28px;display:grid;place-items:center}.card-choices{display:flex;gap:8px}.card-choices button{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:5px;padding:7px 5px;background:#101d2dc9;font-size:13px;border-color:#6c8198}.card-choices img{width:36px;height:36px}.card-choices button[aria-pressed=true],.spin-box button[aria-pressed=true]{border-color:var(--fighter-accent);background:color-mix(in srgb,var(--fighter-base) 70%,#587585);box-shadow:0 0 0 1px var(--fighter-accent),inset 0 1px #ffffff50}.coupling{margin-top:14px;background:#0a142583;border:1px solid #ffffff20;border-radius:12px;padding:9px 6px 4px}.dial-labels{display:grid;grid-template-columns:1fr 1fr;text-align:center;color:#dae7ee;font-size:12px}.coupling-svg{width:100%;max-height:215px;display:block;overflow:visible}.coupling-svg [data-dial]{cursor:grab;touch-action:none;outline:none}.coupling-svg [data-dial]:active{cursor:grabbing}.coupling-svg [data-dial]:focus-visible>circle{stroke:#ffe09a;stroke-width:2}.coupling-svg [aria-disabled=true]{cursor:default}.dial-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dial-buttons>div{display:flex;align-items:center;justify-content:center;gap:10px}.dial-buttons button{min-width:40px;min-height:38px;padding:3px;font-size:24px}.dial-buttons output{font-size:22px;font-weight:900;width:28px;text-align:center;color:#ffe0a0}.coupling-hint{text-align:center;font-size:11px;color:#b3c8d7;margin:9px 0 3px}.spin-box{margin-top:9px;font-size:12px;color:#dce6f1}.spin-box[hidden]{display:none}.spin-box>div{display:flex;gap:7px;margin-top:6px}.spin-box button{flex:1;font-size:12px;min-height:36px}.speed{display:grid;grid-template-columns:1fr auto;align-items:center;padding:9px 11px;background:#07111f99;border:1px solid #ffffff20;border-radius:8px}.speed>span{font-size:11px;letter-spacing:.13em}.speed b{font-size:28px;line-height:1}.speed small{grid-column:1/-1;font-size:11px;color:#ccdae5;margin-top:6px}.is-confirmed .coupling{border-color:var(--fighter-accent)}.is-confirmed .coupling-svg{opacity:.78}dialog{color:#f4f7fb;background:radial-gradient(ellipse at top,#2d4d66,#142330 65%);border:2px solid #7290a8;border-radius:22px;width:min(760px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:24px;box-shadow:0 30px 90px #000a;overflow:auto}dialog::backdrop{background:#050d17d9;backdrop-filter:blur(7px)}.setup-heading{text-align:center}.setup-heading>span{font-size:11px;letter-spacing:.22em;color:#ffd087}.setup-heading h2{font-size:30px;margin:8px 0}.setup-heading p{font-size:14px;color:#bfcedb;margin:0 0 20px}.select-player h3{font-size:14px;text-transform:uppercase;letter-spacing:.12em;color:#d7e7f2;margin:18px 0 10px}.roster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.roster-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;min-height:180px;padding:10px;background-image:linear-gradient(#0c17207a,#101a25ed),var(--fighter-texture);background-size:cover;border:1px solid #7893a4;color:white}.roster-card img{width:100%;height:95px;object-fit:contain;filter:drop-shadow(0 4px 5px #0008)}.roster-card b{font-size:16px;color:var(--fighter-accent)}.roster-card span{font-size:11px;line-height:1.3;font-weight:400}.roster-card em{font-size:11px;font-style:normal;color:var(--fighter-accent)}.roster-card[aria-pressed=true]{border:2px solid var(--fighter-accent);box-shadow:0 0 18px color-mix(in srgb,var(--fighter-accent) 20%,transparent)}.roster-card:disabled{opacity:.38}.priority-note{font-size:12px;line-height:1.6;text-align:center;color:#cedce6;margin:20px 0}.fire-orb{filter:drop-shadow(0 0 5px #ff8128)}.portrait.mage.strike{animation:mage-strike .42s ease-out both}.portrait.mage.fallen{animation:ember-fall 1.8s ease-in forwards}@keyframes mage-strike{40%{filter:drop-shadow(0 0 4px #ffab38);scale:1.05}100%{scale:1}}@keyframes ember-fall{20%{filter:brightness(2) sepia(1)}100%{opacity:0;scale:.7;filter:blur(3px)}}
@media(max-width:760px){main{grid-template-columns:1fr;grid-template-rows:minmax(240px,52fr) minmax(0,48fr)}#players{display:block}.player{margin-bottom:12px;padding:12px}.player h2{font-size:18px;align-items:center}.player h2 .fighter-portrait{width:42px;height:42px}.card-choices img{width:38px;height:38px}.coupling-svg{max-height:205px}.health-title b{font-size:12px}dialog{padding:16px}.setup-heading h2{font-size:25px}.roster{gap:6px}.roster-card{padding:7px 4px;min-height:160px}.roster-card img{height:78px}.roster-card b{font-size:13px}.roster-card span{font-size:10px}.roster-card em{font-size:10px}.select-player h3{margin-top:13px}.setup-heading p{margin-bottom:10px}}
@media(max-height:500px) and (orientation:landscape){main{grid-template-columns:minmax(0,1fr) 350px;grid-template-rows:1fr}.coupling-svg{max-height:180px}dialog{max-width:760px}.roster-card{min-height:130px}.roster-card img{height:64px}}
/* v8: battlefield first; dark intact life, coloured scratches, faded loss. */
main{grid-template-columns:minmax(0,1fr) 380px;gap:10px;padding:8px;max-width:none}header{height:46px;padding:4px 12px}h1{font-size:23px}.header-actions{display:flex;gap:8px;align-items:center}.header-actions button{font-size:12px;min-height:34px;padding:5px 9px}.health{padding:5px 7px;gap:10px;flex:none}.fighter-hud{padding:4px 7px;border-width:1px;border-radius:8px}.health-title{grid-template-columns:24px minmax(0,1fr) auto;gap:6px}.health-title .fighter-portrait{width:24px;height:24px;border-radius:6px;border-width:1px}.health-title b{font-size:13px}.health-title>span{font-size:13px}.healthbar{height:12px;margin:3px 0 0;padding:1px;border-color:#71828c;gap:3px}.health-meta{display:none}.hp-bonus{font-style:normal;font-size:11px;color:#ffe1a3;margin-left:5px}.fighter-hud .hp-segment.alive{background:linear-gradient(#34434b,#1c2931);box-shadow:inset 0 1px #72808755}.fighter-hud .hp-segment.scratch{background:linear-gradient(color-mix(in srgb,var(--fighter-accent) 65%,white),var(--fighter-accent));box-shadow:0 0 4px color-mix(in srgb,var(--fighter-accent) 45%,transparent)}.fighter-hud .hp-segment.lost{background:#673c43;box-shadow:inset 0 1px 3px #321c2280;opacity:.65}.phase-track{padding:2px 6px}.phase-track span{padding:3px 1px}.stage{padding:5px 9px}#notice{min-height:0;padding:0 9px 6px;font-size:13px;line-height:1.35}.setup-audio{display:block;margin:0 auto 12px;min-height:36px;font-size:13px}.sound-settings label{display:flex;flex-direction:row;justify-content:space-between;margin-top:14px;font-size:14px}.sound-settings output{color:#bddaea;font-size:13px}.sound-settings input{width:100%;margin:9px 0;accent-color:#8dd6eb;cursor:pointer;min-height:28px}.sound-settings summary{font-size:15px}.card-choices img,.coupling-svg image,.token-disc image{clip-path:circle(49%)}
@media(max-width:760px){header{height:43px;padding:3px 8px;gap:6px}h1{font-size:18px}h1 small{display:none}.header-actions{gap:5px}.header-actions button{font-size:11px;padding:4px 7px;min-height:32px}main{grid-template-columns:1fr;grid-template-rows:minmax(0,68fr) minmax(150px,32fr);padding:5px;gap:7px}.health{padding:4px;gap:5px}.fighter-hud{padding:3px 5px}.health-title{grid-template-columns:22px minmax(0,1fr) auto;gap:4px}.health-title .fighter-portrait{width:22px;height:22px}.health-title b{font-size:12px;line-height:1.2}.health-title>span{font-size:12px}.healthbar{height:11px;margin-top:3px}.phase-track{padding:1px 4px}.phase-track span{font-size:10px;padding:2px 0}.stage{padding:4px 7px}#turn{font-size:13px}#phase{font-size:12px}#notice{font-size:12px;padding:0 7px 5px;min-height:0}.hp-bonus{display:none}.table{border-width:1px}.coupling-svg{max-height:190px}}
@media(max-height:500px) and (orientation:landscape){header{height:38px}main{grid-template-columns:minmax(0,1fr) 320px;grid-template-rows:minmax(0,1fr);padding:4px}.health-title{grid-template-columns:20px minmax(0,1fr) auto}.health-title .fighter-portrait{width:20px;height:20px}.healthbar{height:9px}.phase-track{display:none}#notice{font-size:11px}#players{display:block}}
/* v9: one public battlefield, private controls for one player at a time. */
body{display:block}main{display:block;padding:0;margin:0;max-width:none;height:100dvh}.table{position:fixed;inset:0;border:0;border-radius:0;background:none;overflow:hidden}.arena{position:absolute;inset:0;border:0}.health{padding:0;background:none;display:contents}.fighter-hud{position:fixed;left:10px;width:min(285px,62vw);z-index:4;background-color:#122432ed}.hud-top{top:47px}.hud-bottom{bottom:calc(var(--controls-height,0px) + 9px)}header{position:fixed;right:5px;top:4px;height:36px;padding:0;background:none;box-shadow:none;border:0;z-index:7}header h1{display:none}.header-actions button{min-height:34px}.stage{position:fixed;top:104px;left:10px;z-index:4;background:#102335dc;border-radius:7px;padding:5px 8px;max-width:calc(100vw - 20px)}.phase-track{display:none}#notice{position:fixed;top:139px;left:10px;right:10px;z-index:4;width:fit-content;max-width:min(620px,calc(100vw - 20px));padding:6px 8px;background:#102335dd;border-radius:7px;font-size:12px}aside{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(440px,100%);max-height:42dvh;overflow-y:auto;z-index:5;padding:0 6px 5px;scrollbar-width:thin}aside>details{display:none}body.settings-open aside>details{display:block}#players{display:block}.player{margin:0 0 5px;padding:9px 12px}.player h2{font-size:15px;margin-bottom:5px;padding-bottom:5px}.player h2 .fighter-portrait{width:28px;height:28px}.fighter-heading>small{display:none}.card-choices img{width:27px;height:27px}.card-choices button{min-height:38px}.coupling{margin-top:6px;padding-top:5px}.coupling-svg{max-height:155px}.coupling-hint{margin:3px 0;font-size:12px}.micro-readout{font-size:13px;color:#ffe19c;margin:5px 0;text-align:center}.hour-option{fill:transparent;stroke:transparent;stroke-width:1.7;pointer-events:none}.hour-option.available{stroke:#ffd76d;fill:#ffdc6825;pointer-events:all;cursor:pointer}.hour-option.selected{stroke:#fff4bc;stroke-width:2.6;fill:#ffc45f55}.hour-option:focus-visible{stroke:white;outline:none}.speed{margin:6px 0;padding:5px 9px}.speed b{font-size:22px}.inertia{margin:5px 0;padding:4px;font-size:12px}.spin-box{margin-top:4px}.spin-box>div{margin-top:3px}.spin-box button{min-height:30px}.confirm{min-height:42px}.camera-controls{bottom:auto;top:48px;right:8px}.micro-arrow{animation:micro-pulse 1.1s ease-in-out infinite;filter:drop-shadow(0 0 3px #fff6)}@keyframes micro-pulse{50%{opacity:.35}}#handoff{position:fixed;inset:0;background:#102333;z-index:50;display:grid;place-items:center;padding:24px;text-align:center}#handoff[hidden]{display:none}#handoff>div{width:min(400px,100%)}#handoff h2{font-size:26px;line-height:1.25}#handoff p{font-size:12px;letter-spacing:.15em;color:#b8cbd9}#handoff strong{display:block;color:#ffe1a2;font-size:22px;margin:20px 0 30px}.private-cover main,.private-cover header{visibility:hidden}#announcement{position:fixed;left:50%;top:40%;transform:translate(-50%,-50%);z-index:8;width:min(620px,calc(100% - 32px));padding:20px;background:#102535f5;border:1px solid #f2cc82;border-radius:14px;color:#fff1cd;text-align:center;font-size:17px;line-height:1.6;box-shadow:0 12px 40px #0008}#announcement[hidden]{display:none}#actions{margin:5px 0}#outcomes{display:grid;gap:5px}.hit-card{font-size:15px}.finale{margin:0 0 6px;padding:12px}body[data-stage="microReveal"] aside:not(:has(#bot-arena-controls:not([hidden]))){display:none}
@media(min-width:900px){aside{left:auto;right:10px;transform:none;width:360px;max-height:48dvh}.hud-bottom{bottom:15px;left:10px}.coupling-svg{max-height:165px}}
@media(max-height:500px) and (orientation:landscape){aside{left:auto;right:5px;transform:none;width:310px;max-height:65dvh}.hud-bottom{bottom:8px}.hud-top{top:45px}.stage{top:99px}#notice{top:133px;max-width:45vw}.camera-controls{right:10px;top:44px}}
.hud-known{display:block;font-size:11px;line-height:1.2;color:#d1dce5;font-weight:400;margin-top:2px}body:not(.settings-open) aside:not(:has(#bot-arena-controls:not([hidden]))):has(#players:empty):has(#actions:empty):has(#outcomes:empty):has(#finale[hidden]){display:none}

/* Bounded camera, compact privacy handoff and legible direction markers. */
.private-cover main,.private-cover header{visibility:visible}
#handoff{position:relative;inset:auto;z-index:auto;min-height:180px;padding:18px 14px;border:1px solid #537187;border-radius:12px;background:#102333;box-shadow:0 6px 24px #0007}
#handoff h2{font-size:20px;margin:6px 0}#handoff strong{font-size:18px;margin:8px 0 14px}#handoff p{margin:0 0 6px}
body.private-cover aside{display:block!important}body.private-cover aside>details{display:none}body.private-cover #outcomes,body.private-cover #finale{display:none}
.dial-buttons{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:2px 0}.dial-buttons>div{display:flex;gap:8px;justify-content:center}.dial-buttons button{min-width:54px;min-height:40px;padding:1px 14px;font-size:25px;line-height:1.2}.coupling-svg [data-dial]{cursor:default;touch-action:pan-y}
.hour-option.selected{stroke:#10212e;stroke-width:3;fill:#ffdb6866;animation:micro-selected 1.15s ease-in-out infinite;filter:drop-shadow(0 0 1px #fff5)}
@keyframes micro-selected{50%{stroke-width:4.4;fill:#ffe99eaa}}
.micro-arrow{animation:micro-pulse 1.2s ease-in-out infinite;filter:none}@keyframes micro-pulse{50%{opacity:.7}}
.micro-emerge.entering{animation:micro-emerge .75s cubic-bezier(.18,.8,.3,1) both}@keyframes micro-emerge{from{opacity:0;translate:0 22px}to{opacity:1;translate:0 0}}
.inertia-arrows{filter:drop-shadow(1px 0 0 #10202c) drop-shadow(-1px 0 0 #10202c) drop-shadow(0 1px 0 #10202c) drop-shadow(0 -1px 0 #10202c)}
#announcement{width:auto;max-width:90vw;padding:0;background:none;border:0;box-shadow:none;font-size:clamp(24px,5vw,40px);font-weight:900;text-transform:uppercase;text-shadow:0 3px 0 #0b1e2b,0 0 12px #102535;pointer-events:none;animation:micro-title .8s ease-out both;top:28%}
@keyframes micro-title{from{opacity:0;translate:0 12px;scale:.85}to{opacity:1;translate:0 0;scale:1}}
.collision-label{pointer-events:none}.collision-label text{font:700 12px system-ui;fill:#fff2db;paint-order:stroke;stroke:#10212e;stroke-width:3px;stroke-linejoin:round}.collision-label .speed-total{font-size:23px;fill:var(--speed-color)}.collision-label .speed-key{font-size:10px;fill:#dfebf0}.collision-label .speed-winner{fill:var(--speed-color);font-size:15px;animation:winner-title .5s ease-out both}
@media(prefers-reduced-motion:reduce){.hour-option.selected,.micro-arrow{animation:none}.micro-emerge.entering,#announcement,.speed-winner{animation-duration:.01s!important}}
/* Additional decision surfaces exist only for nonstandard configurations. */
.configurable-decisions { display:flex; flex-direction:column; gap:.5rem; }
.decision-options { display:flex; flex-wrap:wrap; gap:.4rem; max-height:45dvh; overflow:auto; }
.decision-options button { flex:1 1 10rem; min-height:44px; }

.mist-hud-icon{width:28px;height:28px;object-fit:contain}.mist-filaments{animation:mist-drift 14s linear infinite}@keyframes mist-drift{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mist-filaments{animation:none}}
/* Experimental Policy playtest controls. */
#experimental-setup{max-width:400px;width:calc(100% - 36px);padding:20px}#experimental-setup label{display:block;margin:14px 0}#experimental-setup select{display:block;width:100%;padding:10px;margin-top:6px}#experimental-label{font-size:11px;text-align:right;max-width:150px}#experimental-label small{font-size:9px}#playtest-controls{border-top:1px solid #666;padding-top:10px;margin-top:14px}#playtest-controls button{margin:4px;font-size:12px}#playtest-status{font-size:12px;overflow-wrap:anywhere}

/* Shared tactical clash controls, including narrow portrait screens. */
.clash-summary{width:100%;border-collapse:collapse;font-size:.9rem}.clash-summary th,.clash-summary td{padding:.4rem;border-bottom:1px solid #ffffff28;text-align:left;overflow-wrap:anywhere}#clash-bid-form,#clash-effect-form{display:grid;gap:.65rem;min-width:0}#clash-bid-form label,#clash-effect-form label{display:grid;gap:.25rem;min-width:0}#clash-bid-form input,#clash-effect-form input,#clash-effect-form select{min-width:0;width:100%;min-height:44px;box-sizing:border-box}#clash-effect-form fieldset{min-width:0}#clash-effect-form fieldset[hidden]{display:none}

/* Compact Scontro tray: same translucent character surface as public HUDs. */
.clash-panel{--identity:#79cce3;--character-bg:20 35 45;display:grid;gap:5px;padding:7px 9px;border:1px solid color-mix(in srgb,var(--identity) 52%,transparent);border-radius:10px;background:rgb(var(--character-bg)/.65);color:#f6f5ee;backdrop-filter:blur(3px);line-height:1.2;min-width:0}
.clash-panel h2{margin:0;font-size:14px;color:#fff}.clash-panel p{margin:0;font-size:12px}.clash-forces{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.clash-force{min-width:0;display:grid;gap:2px;padding:4px 6px;border-left:2px solid var(--identity);border-radius:4px;background:transparent;color:#f6f5ee;overflow-wrap:anywhere}.clash-force>b{color:var(--character-ink);font-size:13px}.clash-force strong{font-size:13px}.clash-force small{font-size:12px;line-height:1.2}
.clash-results{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px;line-height:1.2}.clash-results th,.clash-results td{padding:4px 3px;text-align:left;border-bottom:1px solid #ffffff25;overflow-wrap:anywhere}.clash-results th:first-child{width:22%}.clash-results th:last-child{width:34%}.clash-results thead th:not(:first-child):not(:last-child),.clash-results td:not(:last-child){color:var(--character-ink);background:rgb(var(--character-bg)/.3)}
#clash-bid-form{grid-template-columns:repeat(var(--clash-categories,2),minmax(0,1fr));gap:5px}#clash-bid-form>p{grid-column:1;align-self:center}#clash-bid-form>button{grid-column:2/-1}#clash-effect-form{gap:5px}#clash-bid-form label,#clash-effect-form label{gap:2px;font-size:12px}
.clash-panel input,.clash-panel select{background:rgb(var(--character-bg)/.68);color:#fff;border:1px solid color-mix(in srgb,var(--identity) 52%,transparent);border-radius:6px;padding:3px 6px;font-size:16px}
#clash-effect-form fieldset{display:grid;grid-template-columns:minmax(70px,1fr) minmax(0,1.6fr);gap:6px;margin:0;padding:3px 6px 5px;border:1px solid #ffffff40;border-radius:6px}#clash-effect-form fieldset[hidden]{display:none}#clash-effect-form legend{font-size:12px;padding:0 3px}
#clash-effect-form>label{display:grid;grid-template-columns:80px 1fr;align-items:center}#clash-effect-form>p{font-size:11px}#clash-effect-form #clash-preview{font-size:12px;font-weight:600}
.clash-panel button{min-height:40px;width:100%;padding:5px;font-size:13px;background:rgb(var(--character-bg)/.68);color:#f6f5ee;border-color:var(--identity);background-image:none}
body[data-stage^="clash"] aside{overflow-y:auto;overscroll-behavior:contain;max-height:calc(100dvh - 185px);width:min(440px,100%);padding-bottom:max(5px,env(safe-area-inset-bottom))}
body[data-stage^="clash"] #actions{margin:4px 0 0;background:none}body[data-stage^="clash"] #actions button{width:100%;min-height:40px;font-size:13px;padding:5px;background:rgb(10 19 29/.68);color:#f6f5ee;background-image:none}
@media(max-height:500px) and (orientation:landscape){body[data-stage^="clash"] aside{width:min(390px,49vw);max-height:calc(100dvh - 12px)}.clash-panel{gap:3px;padding:5px 7px}.clash-results th,.clash-results td{padding:2px 3px}}
