:root{color-scheme:dark;--bg:#1b1e19;--panel:#24291f;--ink:#f1efe7;--muted:#afb5a7;--line:#42483a;--edge:#7c8771;--gold:#e7d59e;--red:#f68060}
*{box-sizing:border-box}[hidden]{display:none!important}html{min-height:100%}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 Arial,"PingFang SC","Microsoft YaHei",sans-serif}a{color:inherit;text-decoration:none}button,input,select{font:inherit;border:1px solid var(--edge);border-radius:3px;padding:11px 16px;color:var(--ink);background:transparent;min-height:44px}button{cursor:pointer}button:hover{background:#333c28;border-color:var(--gold)}button:disabled{opacity:.38;cursor:default}input,select{background:var(--panel);width:100%;min-width:0}input::placeholder{color:var(--muted)}.primary{background:var(--gold);color:#25271f;border-color:var(--gold)}.primary:hover{background:#f4e4b6}.quiet{border-color:transparent;color:var(--muted)}a:hover{color:var(--gold)}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px}h1,h2,h3,p{margin-top:0}h1,h2{font-weight:500;letter-spacing:-.045em}h2{font-size:22px;margin-bottom:16px}header,main,footer{width:100%;max-width:1440px;margin:auto;padding-inline:32px}header{height:76px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:12px}nav{display:flex;gap:20px;align-items:center}nav a{font-size:14px;color:var(--muted)}nav a+a{color:var(--ink);border-left:1px solid var(--line);padding-left:20px}main{padding-block:24px}footer{display:flex;justify-content:space-between;padding-block:20px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}.eyebrow{font:13px monospace;letter-spacing:.08em;color:var(--muted)}.subtle,.intro,.hero-meta,.entry-note,.board-hint,.board-legend,.mode-note,.neighbors,#action-help{display:none}
.hero{display:grid;grid-template-columns:1fr 1fr;align-items:center;min-height:360px;max-width:1100px;margin:auto;padding-block:20px 40px}.hero h1{font-size:clamp(56px,7vw,100px);line-height:1.05;margin:0}.hero em{font-style:normal;color:var(--gold)}.hero-art{height:320px;position:relative}.hero-sigil{position:absolute;inset:0;width:100%;height:100%;opacity:.16}.hero-stone{position:absolute;top:22%;width:29%;height:190px;padding:18px 10px 10px;border:1px solid #827c62;background:linear-gradient(140deg,#3b4531,#293324);box-shadow:0 12px 20px #0003;display:flex;align-items:center;flex-direction:column;transform:rotate(-13deg)}.hero-stone img{width:100%;height:135px}.hero-stone span{font-size:32px;font-weight:600;line-height:1}.hero-stone.one{left:4%;color:#f5b77b}.hero-stone.two{left:35%;top:10%;transform:rotate(0);color:#e9c994}.hero-stone.three{left:66%;transform:rotate(13deg);color:#cbe6a5}.spark{display:none}#entry-form{max-width:1100px;margin:auto;border-top:1px solid var(--edge);padding-top:26px}.entry-fields{display:grid;grid-template-columns:1fr 1fr;gap:24px}label{display:block;font-size:14px;color:var(--muted)}label input,label select{display:block;margin-top:8px}#code{text-transform:uppercase;font-family:monospace;letter-spacing:.15em}.entry-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:24px}.entry-actions button{min-width:190px;font-size:18px}.entry-actions span{margin-left:20px}.room-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}.room-heading h1{font-size:28px;margin:3px 0 0}.room-heading .eyebrow{margin-bottom:0}.room-actions{display:flex;gap:6px}.lobby-top{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--edge);padding-top:24px}.lobby-top p{display:none}.lobby-top h2{margin:0}.pill{font:14px monospace;color:var(--muted)}.lobby-seats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:24px 0}.lobby-seat{display:flex;align-items:center;gap:16px;padding:20px;border:1px solid var(--line);background:var(--panel);min-width:0}.lobby-seat img{width:60px;height:68px}.lobby-seat h3{font-size:18px;font-weight:500;margin:0;overflow-wrap:anywhere}.lobby-seat small{color:var(--muted);font-size:12px}.lobby-controls{display:flex;align-items:end;gap:24px;padding-top:22px;border-top:1px solid var(--line)}.lobby-controls label{max-width:230px;flex:1}.lobby-controls label:first-child{max-width:100px}.lobby-controls button{margin-left:auto}
.game-meta{display:flex;gap:18px;align-items:center;color:var(--muted);font-size:12px;margin-bottom:12px}#connection{margin-left:auto}.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}.table-column{min-width:0;position:relative}.turn-banner{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.turn-banner .eyebrow{display:none}.turn-banner h2{font-size:20px;margin:0}.turn-direction{color:var(--muted);font-size:13px}.magic-table{position:relative;padding:20px 10px;background:radial-gradient(ellipse at center,#384b34,#273a29);border:5px solid #77735a;box-shadow:inset 0 0 0 1px #b6a977;overflow:hidden}.table-center{position:absolute;inset:12%;opacity:.12;pointer-events:none}.table-center>img{width:100%;height:100%;object-fit:contain}.table-center>span{display:none}.seats{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px 14px;z-index:1}.seat{min-width:0;text-align:center;position:relative;padding:9px 7px 8px;background:#202c22f5;border:1px solid #60715b;border-radius:3px}.seat h3{font-size:14px;line-height:1.3;font-weight:500;margin:0 0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.seat.self{width:100%;max-width:300px;justify-self:center;margin-top:10px}.seat.active{border-color:var(--gold);outline:2px solid var(--gold);outline-offset:3px;box-shadow:0 0 28px #e7d59e20}.seat small{display:none}.life{font:12px monospace;color:#d5cbb0;margin-bottom:9px}.hand{display:flex;justify-content:center;gap:3px}.stone{position:relative;width:19%;min-width:0;aspect-ratio:.56;background:linear-gradient(145deg,#3f4b35,#2b3728);border:1px solid color-mix(in srgb,var(--spell,#9a9b80) 55%,#38402d);border-radius:2px;overflow:hidden;animation:card-in .35s ease-out}.stone img{display:block;position:absolute;bottom:4%;width:100%;height:62%;object-fit:contain}.stone b{position:absolute;top:5%;left:0;right:0;line-height:1;font-size:20px;font-weight:600;color:var(--spell,#cfceae);font-variant-numeric:lining-nums}.stone.spell-0{background:linear-gradient(145deg,#3d493b,#2a362d);border-color:#7f886b}.stone.spell-0 img{bottom:4%;height:64%}.stone.spell-0 b{color:#c9c8aa}.spell-1{--spell:#e78379}.spell-2{--spell:#b399ed}.spell-3{--spell:#efa7bd}.spell-4{--spell:#dfa568}.spell-5{--spell:#9394df}.spell-6{--spell:#a4e6e8}.spell-7{--spell:#f5a275}.spell-8{--spell:#c3e39e}.spell-number{color:var(--spell);font-weight:600;font-size:30px;line-height:1;font-variant-numeric:lining-nums}
.action-panel{margin-top:20px;border-top:1px solid var(--edge);padding-top:14px}.action-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.action-heading h2{font-size:18px;margin:0}.action-heading button{font-size:13px;padding:8px 12px;min-height:38px}.spell-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.spell-buttons button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 3px 8px;min-width:0;background:#252e23;border-color:#59664e;transition:background .15s,transform .15s}.spell-buttons button:hover:not(:disabled){background:#39432d;transform:translateY(-3px);border-color:var(--spell)}.spell-buttons .spell-number{font-size:29px}.spell-buttons img{height:62px;width:100%;object-fit:contain;margin:1px 0 4px}.spell-buttons strong{font-size:12px;font-weight:500;white-space:nowrap}.spell-buttons button:disabled{opacity:.3}.public-board{border-top:1px solid var(--edge);padding-top:16px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.section-heading h2{font-size:21px;margin:0}.section-heading .pill{font-size:13px}.count-board{display:grid;grid-template-columns:1fr}.count-row{padding:9px 0;border-top:1px solid var(--line)}.count-label{display:flex;align-items:center;gap:8px}.count-label .spell-number{min-width:31px;font-size:27px}.count-label img{width:31px;height:31px;object-fit:contain}.count-label span{font-size:15px;flex:1}.count-label strong{color:var(--spell);font:13px monospace}.count-slots{display:flex;gap:4px;flex-wrap:wrap;margin-top:7px}.count-slot{width:23px;height:24px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--spell) 45%,#32402d);font-size:13px;font-weight:600;color:var(--spell);background:#192419}.count-slot.unknown{opacity:.4}.count-slot.used{opacity:1;background:var(--spell);border-color:var(--spell);color:#243023}.tablet-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:16px;margin-top:16px}.tablet-panel h2{font-size:18px;margin:0}.tablet-panel p{font-size:12px;color:var(--muted);margin:4px 0 0}.tablet-panel button{font-size:12px;min-height:36px;padding:7px 10px}.history{margin-top:20px;padding-top:12px;border-top:1px solid var(--line);color:var(--muted)}summary{cursor:pointer;min-height:32px;font-size:14px}.history ul{font-size:13px;max-height:240px;overflow:auto;padding-left:20px;margin:0}.history li{padding:8px 0;border-bottom:1px solid var(--line)}.round-result{background:#252f25fa;border:1px solid var(--edge);padding:24px;margin-top:20px}.scoreboard>div{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding:12px 0}.round-result h2{font-size:28px}.round-result button{margin-top:16px}
.app-dialog{width:540px;max-width:calc(100vw - 32px);max-height:88dvh;overflow:auto;background:#282e24;color:var(--ink);padding:26px;border:1px solid var(--edge);border-radius:5px;box-shadow:0 20px 80px #0008}.app-dialog::backdrop{background:#0a110bd9;backdrop-filter:blur(7px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.dialog-heading h2{font-size:26px;margin:0}.dialog-heading button{font-size:27px;padding:0 8px;min-height:32px}.dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.dialog-actions button{min-width:95px}#confirm-body>img{width:140px;display:block;margin:20px auto}.my-tablets{display:flex;justify-content:center;gap:16px;flex-wrap:wrap}.my-tablets>div{text-align:center}.my-tablets img{width:100px;height:104px}.my-tablets p{font-size:14px}.rules h3{margin-top:28px;color:var(--gold);font-size:19px}.rules p{font-size:16px;line-height:1.85}.rules .subtle{display:block;font-size:13px;color:var(--muted)}.rules a{color:#9acbd7;text-decoration:underline}.effects{position:fixed;inset:0;pointer-events:none;z-index:35}.cast-notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:14px 20px;max-width:90vw;background:#e7d59e;color:#253023;box-shadow:0 8px 30px #0005;z-index:40;display:flex;align-items:center;gap:14px;font-size:14px}.cast-notice img{flex:none}#message{color:var(--red);padding:12px 0;border-top:1px solid var(--line)}.owl-heading{display:flex;align-items:center;justify-content:center}.owl-heading img{width:95px}.owl-picks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:12px 0}.owl-picks button{padding:8px 2px;background:#344232;min-width:0;border-color:#8e9674}.owl-picks img{width:100%;height:110px}.owl-picks button:disabled{visibility:hidden}.owl-result{display:flex;justify-content:center;align-items:center;gap:24px;min-height:180px}.owl-result img{width:140px}.owl-result .spell-number{font-size:58px}.owl-result h3{margin:10px 0;font-size:23px}.owl-done{display:block;margin:15px auto 0;min-width:120px}.center-tablets{position:absolute;inset:0;display:flex;gap:7px;align-items:center;justify-content:center;z-index:2;pointer-events:none}.center-tablets button{width:38px;height:58px;padding:2px;background:#283629;border:1px solid #8c9271;pointer-events:auto;box-shadow:0 4px 10px #0003}.center-tablets img{width:100%;height:100%}.center-tablets button:disabled{cursor:default;opacity:.6}.center-tablets button.taken{visibility:hidden}
@keyframes card-in{from{opacity:0;transform:translateY(-8px) rotateY(40deg)}to{opacity:1;transform:none}}
@media(max-width:1099px){.play-layout{grid-template-columns:1fr}.count-board{grid-template-columns:1fr 1fr;gap:0 20px}.count-label span{font-size:13px}.count-label .spell-number{font-size:25px;min-width:25px}.count-label img{width:27px}.count-label strong{font-size:12px}.count-slot{width:21px;height:23px}.reference-column{margin-top:16px}.center-tablets{display:none}}
@media(max-width:600px){header,main,footer{padding-inline:18px}header{height:72px;flex-wrap:wrap;align-content:center;gap:0}nav{gap:12px}nav a{font-size:12px}nav a+a{padding-left:12px}header>button{font-size:13px;padding:7px 3px;min-height:32px}.hero{min-height:260px;padding-block:22px 32px;grid-template-columns:.85fr 1.15fr}.hero h1{font-size:clamp(44px,10vw,58px)}.hero-art{height:210px}.hero-stone{height:120px;padding:10px 3px;width:31%;top:26%}.hero-stone img{height:75px}.hero-stone span{font-size:24px}.hero-stone.two{top:14%}.hero-stone.three{left:65%}.entry-fields{grid-template-columns:1fr;gap:18px}.entry-actions{display:grid;grid-template-columns:1fr 1fr}.entry-actions button{min-width:0;font-size:16px;padding:12px 8px}.entry-actions span{margin-left:5px}.room-heading{margin-bottom:18px}.room-heading h1{font-size:24px}.room-heading .eyebrow{font-size:12px}.room-actions{gap:0}.room-actions button{font-size:13px;padding:8px}.lobby-seats{grid-template-columns:1fr 1fr;gap:10px}.lobby-seat{padding:12px 8px;gap:6px}.lobby-seat img{width:40px;height:54px}.lobby-seat h3{font-size:15px}.lobby-controls{flex-wrap:wrap;gap:15px}.lobby-controls button{width:100%;margin:0}.lobby-controls label{max-width:none}.magic-table{padding:18px 8px}.seats{gap:20px 13px}.seat{padding:9px 5px}.seat h3{font-size:13px}.life{font-size:11px}.stone b{font-size:19px}.seat.self .stone{max-width:46px}.seat.self h3{font-size:16px}.seat.self{padding:12px 15px;max-width:270px}.game-meta{gap:12px;font-size:11px}.turn-banner h2{font-size:18px}.turn-direction{font-size:12px}.spell-buttons{gap:7px}.spell-buttons img{height:55px}.spell-buttons .spell-number{font-size:29px}.spell-buttons strong{font-size:11px}.action-heading h2{font-size:17px}.action-heading button{font-size:12px}.count-board{gap:0 14px}.count-label{gap:4px}.count-label span{font-size:12px}.count-label img{width:24px}.count-label .spell-number{font-size:24px;min-width:23px}.count-label strong{font-size:11px}.count-slot{width:20px;height:23px;font-size:12px}.count-slots{gap:4px}.section-heading h2{font-size:21px}.section-heading .pill{font-size:12px}footer{font-size:11px;gap:15px}.app-dialog{padding:20px}.owl-picks{gap:8px}.owl-picks img{height:85px}}
@media(min-width:1100px){
 html,body{height:100%;overflow:hidden}body{height:100dvh;display:flex;flex-direction:column}header{max-width:none;height:58px;flex:none;padding-inline:24px}main{flex:1;min-height:0;max-width:1920px;padding:12px 24px 16px;overflow:hidden}footer{display:none}#room{height:100%;display:flex;flex-direction:column}.room-heading{height:52px;flex:none;margin:0 0 10px}.room-heading h1{font-size:25px}.room-heading .eyebrow{font-size:12px}#game{display:flex;flex-direction:column;flex:1;min-height:0}.game-meta{height:24px;flex:none;margin:0 0 6px}.play-layout{flex:1;min-height:0;grid-template-columns:minmax(0,1fr) 320px;gap:22px;align-items:stretch}.table-column{display:grid;grid-template-rows:32px minmax(0,1fr) 138px;gap:9px;min-height:0}.turn-banner{margin:0}.turn-banner h2{font-size:19px}.magic-table{padding:0;border:10px solid #6c6149;border-radius:48% / 50%;box-shadow:inset 0 0 0 2px #a49769,inset 0 0 65px #172416b3,0 5px 16px #0003}.table-center{inset:12% 30%;opacity:.1}.seats{position:absolute;inset:0;display:block}.seat{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:clamp(182px,16vw,255px);padding:10px 10px 9px}.seat.self{width:clamp(200px,17.5vw,275px);max-width:none;margin:0}.seat h3{font-size:17px;margin-bottom:4px}.life{font-size:13px;margin-bottom:8px}.stone{height:clamp(67px,8vh,88px);aspect-ratio:auto}.stone b{font-size:25px}.stone img{height:63%}.seat.active{outline-width:2px}.action-panel{margin:0;padding:9px 0 0}.action-heading{margin-bottom:7px;height:30px}.action-heading h2{font-size:16px}.action-heading button{padding:4px 12px;font-size:12px;min-height:30px}.spell-buttons{grid-template-columns:repeat(8,minmax(0,1fr));gap:7px}.spell-buttons button{height:88px;padding:5px 2px;display:grid;grid-template-columns:30px 1fr;align-items:center}.spell-buttons .spell-number{font-size:32px}.spell-buttons img{height:52px;margin:0;width:100%}.spell-buttons strong{grid-column:1/-1;font-size:12px}.reference-column{min-height:0;display:flex;flex-direction:column;gap:12px}.public-board{padding-top:10px;flex:none}.section-heading{margin-bottom:8px}.section-heading h2{font-size:21px}.section-heading .pill{font-size:12px}.count-row{padding:5px 0}.count-label .spell-number{font-size:25px;min-width:30px}.count-label img{height:25px;width:27px}.count-label span{font-size:14px}.count-label strong{font-size:12px}.count-slots{gap:4px;margin-top:5px}.count-slot{width:22px;height:20px;font-size:12px}.tablet-panel{padding-top:12px;margin:0;flex:none}.tablet-panel h2{font-size:17px}.tablet-panel p{font-size:11px}.tablet-panel button{font-size:11px;padding:7px;min-height:32px}.history{padding-top:8px;margin:0;min-height:35px;flex:1;overflow:auto}.history ul{font-size:12px;max-height:none}.history li{padding:5px 0}.history summary{font-size:13px;min-height:28px}.round-result{position:absolute;inset:0;margin:0;z-index:4;overflow:auto}#entry{max-height:100%;overflow:auto}.hero{min-height:0;height:clamp(290px,43vh,430px)}.hero-art{height:100%;max-height:350px}#lobby{overflow:auto}.cast-notice{max-width:70vw;bottom:16px}
}
@media(min-width:1100px) and (max-height:800px){header{height:48px}.room-heading{height:43px}.room-heading h1{font-size:22px}.table-column{grid-template-rows:28px minmax(0,1fr) 120px}.seat{padding:6px 8px}.seat h3{font-size:15px}.life{font-size:11px;margin-bottom:5px}.stone{height:57px}.stone b{font-size:22px}.spell-buttons button{height:72px}.spell-buttons img{height:38px}.action-heading{height:25px;margin-bottom:5px}.count-row{padding:3px 0}.count-label img{height:22px}.count-label .spell-number{font-size:23px}.count-slot{height:17px}.count-slots{margin-top:3px}.tablet-panel{padding-top:8px}.reference-column{gap:8px}.section-heading{margin-bottom:5px}.public-board{padding-top:7px}.hero{height:320px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* A waiting room is a roster, not a set of character cards. */
.lobby-seats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:36px;row-gap:0;margin:24px 0 30px}.lobby-seat{display:flex;align-items:center;gap:16px;padding:19px 0;border:0;border-top:1px solid var(--line);background:transparent}.lobby-seat h3{flex:1;font-size:18px;font-weight:400;margin:0}.lobby-index{font:14px monospace;color:var(--muted)}.lobby-role{font-size:13px;color:var(--gold)}.lobby-controls{justify-content:space-between}.lobby-controls button{min-width:190px}.lobby-controls label:first-child{display:flex;align-items:center;gap:18px;max-width:none;flex:none;font-size:16px}.lobby-controls input{width:80px;margin:0}.magic-table{overflow:visible}.owl-result img{height:145px;object-fit:contain}
@media(max-width:600px){.hero{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:6px}.hero h1{font-size:clamp(32px,9vw,44px);white-space:nowrap}.hero-art{min-width:0}.lobby-seats{grid-template-columns:1fr;margin-bottom:26px}.lobby-seat{padding:17px 0}.lobby-seat h3{font-size:18px}.lobby-controls{align-items:center;gap:18px}.lobby-controls label:first-child{width:100%;justify-content:space-between}.lobby-controls button{width:100%;min-width:0}.lobby-top{padding-top:20px}.lobby-controls input{width:90px}}

@media(max-width:1099px){.seat.opposite{width:100%;max-width:270px;justify-self:center;padding:12px 15px}.seat.opposite .stone{max-width:46px}}

.count-slot.visible{border:1px dashed var(--spell);color:var(--spell);background:color-mix(in srgb,var(--spell) 10%,#1b241a);opacity:1}.count-slot.unknown{border-style:solid;opacity:.25}.count-key{display:flex;align-items:center;gap:18px;font-size:11px;color:var(--muted);border-top:1px solid var(--line);padding-top:8px;margin-top:4px}.count-key>span{display:flex;align-items:center;gap:5px}.count-key i{display:inline-block;width:12px;height:14px;border:1px solid #8f9d82}.count-key .key-public{background:#c6d0aa;border-color:#c6d0aa}.count-key .key-visible{border:1px dashed #c6d0aa;background:#c6d0aa15}.count-key .key-unknown{opacity:.3}

/* Open seating, larger two-row opponent hands, and a separate score rail. */
.magic-table{background:none;border:0;box-shadow:none;border-radius:0;padding:10px 0}.table-center{display:none}.seat{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;padding:12px 8px}.seat.active{outline:0;box-shadow:none;border-top:2px solid var(--gold);background:linear-gradient(#e7d59e08,transparent)}.seat .hand{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;justify-content:center}.seat .stone{width:100%;max-width:none;aspect-ratio:.68;min-height:0;height:auto}.seat .stone b{font-size:25px}.seat .stone img{height:66%;bottom:1%}.life{display:flex;align-items:center;justify-content:center;gap:5px;font-family:Arial,sans-serif;margin-bottom:10px}.life .heart-icon{font-size:25px;line-height:1;color:var(--health)}.life strong{font-size:24px;line-height:1;color:var(--health);font-weight:500}.life-max{font-size:12px;color:var(--muted);align-self:end}.life.healthy{--health:#c2ceac}.life.wounded{--health:#d7bc88}.life.critical{--health:#e69b86}.life.depleted{--health:#797e73}.score-strip{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:18px;border-block:1px solid var(--line);padding:10px 0;margin:0 0 16px}.score-entry{display:flex;align-items:baseline;gap:6px;min-width:0}.score-entry>span:first-child{font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.score-entry strong{font:500 22px monospace}.score-goal{font:11px monospace;color:#7e8776}.score-entry.is-you strong{color:var(--gold)}.seats{gap:20px 18px}.seat.opposite{max-width:210px}.seat.self{background:transparent;max-width:300px;border-top-color:var(--edge)}.seat.self.active{border-top-color:var(--gold)}
@media(max-width:1099px){.score-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px 18px;padding:12px 0}.seat .stone{aspect-ratio:.7}.seat .stone b{font-size:25px}.seat.self .stone{max-width:52px}.seat.opposite .stone{max-width:none}.seat.opposite{padding:12px 8px}.seat h3{font-size:15px}.seat.self h3,.life{margin-bottom:9px}.magic-table{padding:4px 0}.center-tablets{display:none}}
@media(min-width:1100px){.score-strip{flex:none;padding:8px 0;margin-bottom:10px;gap:22px;height:47px}.score-entry>span:first-child{font-size:14px}.magic-table{border:0;background:none;box-shadow:none;border-radius:0}.seat{width:clamp(182px,15vw,240px);padding:8px 10px}.seat.self{width:clamp(220px,18vw,290px)}.seat .hand{gap:5px}.seat .stone{height:clamp(61px,7.5vh,82px);aspect-ratio:auto}.seat .stone b{font-size:26px}.seat h3{font-size:17px;margin-bottom:6px}.life{margin-bottom:8px}.life strong{font-size:23px}.life .heart-icon{font-size:24px}.seat.self .stone{height:clamp(70px,9vh,98px)}.center-tablets{opacity:.7;transform:translateY(10%)}}
@media(min-width:1100px) and (max-height:800px){.score-strip{height:41px;padding:6px 0;margin-bottom:7px}.score-entry strong{font-size:20px}.seat{padding:5px 8px}.seat h3{font-size:15px;margin-bottom:4px}.life{margin-bottom:6px}.life strong{font-size:20px}.life .heart-icon{font-size:21px}.seat .stone{height:53px}.seat .stone b{font-size:22px}.seat.self .stone{height:65px}}

@media(max-width:1099px){.cast-notice{top:max(16px,env(safe-area-inset-top));bottom:auto}}

/* Suppress browser tap flashes and accidental selection on game controls. */
*{-webkit-tap-highlight-color:transparent}
button,button *,a,summary,[role="button"],.stone,.count-slot,.playing-card,.player,.word-card,canvas{-webkit-user-select:none;user-select:none}
button img,.stone img,.playing-card img,.player img{-webkit-user-drag:none}

.history ul{list-style:none;padding-left:0;margin:0}

.count-slot.known-tablet{border:1px solid var(--spell);opacity:1;color:var(--spell);background:repeating-linear-gradient(135deg,transparent,transparent 3px,color-mix(in srgb,var(--spell) 24%,transparent) 3px,color-mix(in srgb,var(--spell) 24%,transparent) 5px)}.count-key .key-tablet{border:1px solid #c6d0aa;background:repeating-linear-gradient(135deg,transparent,transparent 3px,#c6d0aa55 3px,#c6d0aa55 5px)}.count-key{gap:12px;flex-wrap:wrap}

/* Opposite is a position, not a larger player-card variant. */
.seat.opposite{max-width:none}
@media(max-width:1099px){.seat.opposite{width:calc((100% - 18px)/2);max-width:none;padding:12px 8px}}

/* All seats and hands share one scale, including the local player. */
.seat.self{max-width:none;margin:0;padding:12px 8px}.seat.self .stone{max-width:none}.seat.self h3{font-size:15px}
@media(max-width:1099px){.seat.self,.seat.opposite{width:calc((100% - 18px)/2);max-width:none;padding:12px 8px}}
@media(min-width:1100px){.seat.self{width:clamp(182px,15vw,240px);padding:8px 10px}.seat.self h3{font-size:17px}.seat.self .stone{height:clamp(61px,7.5vh,82px)}}
@media(min-width:1100px) and (max-height:800px){.seat.self{padding:5px 8px}.seat.self h3{font-size:15px}.seat.self .stone{height:53px}}

/* Six tracks permit centered one-, two-, and three-card rows at one card size. */
.seat .hand{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;justify-content:center}.seat .hand .stone{grid-column:span 2;width:100%;max-width:none}
.seat .hand[data-count="1"] .stone{grid-column:3 / span 2}
.seat .hand[data-count="2"] .stone:first-child{grid-column:2 / span 2}.seat .hand[data-count="2"] .stone:nth-child(2){grid-column:4 / span 2}
.seat .hand[data-count="4"] .stone:nth-child(odd){grid-column:2 / span 2}.seat .hand[data-count="4"] .stone:nth-child(even){grid-column:4 / span 2}.seat .hand[data-count="4"] .stone:nth-child(-n+2){grid-row:1}.seat .hand[data-count="4"] .stone:nth-child(n+3){grid-row:2}
.seat .hand[data-count="5"] .stone:nth-child(4){grid-column:2 / span 2;grid-row:2}.seat .hand[data-count="5"] .stone:nth-child(5){grid-column:4 / span 2;grid-row:2}

.rules>p{margin-bottom:16px}.rules ol,.rules ul{padding-left:24px;margin:14px 0 20px}.rules li{font-size:16px;line-height:1.85;margin:10px 0}.rules strong{font-weight:600;color:#f4e8c8}.spell-rule{border-top:1px solid var(--line);padding:14px 0}.spell-rule>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}.spell-rule h4{font-size:18px;font-weight:500;margin:0}.spell-rule span{font-size:12px;color:var(--muted)}.spell-rule p{margin:8px 0 0}.rules-table-wrap{max-width:100%;overflow:auto}.rules table{width:100%;border-collapse:collapse;font-size:15px}.rules th,.rules td{text-align:left;vertical-align:top;border-bottom:1px solid var(--line);padding:12px 8px;line-height:1.8}.rules th:first-child,.rules td:first-child{width:32%}.rules th{font-weight:500;color:var(--gold)}
/* The bottom and opposite seats can use the full center lane. */
.magic-table{container-type:inline-size}
.seat.self,.seat.opposite{width:100%;max-width:none}
.seat.self .hand,.seat.opposite .hand{display:flex;flex-wrap:nowrap;justify-content:center;gap:5px}
.seat.self .hand .stone,.seat.opposite .hand .stone{flex:none;width:calc((100cqw - 70px)/6);max-width:none;aspect-ratio:.7;height:auto}
@media(min-width:1100px){.seat.self,.seat.opposite{width:clamp(310px,26vw,390px);padding:8px 10px}.seat.self .hand .stone,.seat.opposite .hand .stone{width:calc((clamp(182px,15vw,240px) - 30px)/3);height:clamp(61px,7.5vh,82px);aspect-ratio:auto}}
@media(min-width:1100px) and (max-height:800px){.seat.self,.seat.opposite{padding:5px 8px}.seat.self .hand .stone,.seat.opposite .hand .stone{width:calc((clamp(182px,15vw,240px) - 26px)/3);height:53px}}

.cast-stage{position:fixed;inset:0;display:grid;place-items:center;background:#0e150dc9;backdrop-filter:blur(5px);z-index:45;padding:20px}.cast-stage-panel{width:320px;max-width:100%;padding:26px;background:#252d23;border:1px solid #8b8f73;text-align:center;box-shadow:0 18px 80px #0006;animation:cast-present .25s ease-out}.cast-stage-panel>p{font-size:15px;color:var(--muted);margin:0 0 12px}.cast-stage-panel h2{font-size:28px;margin:0 0 16px}.cast-stage-face{position:relative;max-width:190px;margin:auto}#cast-stage-art img{width:170px;height:175px;object-fit:contain}#cast-stage-number{position:absolute;right:0;top:0;font-size:42px}#cast-stage-result{font-size:54px;line-height:1.3;color:var(--gold);min-height:76px;margin-top:14px}.cast-stage[data-result=pending] #cast-stage-result{animation:cast-question 1.2s ease-in-out infinite}.cast-stage[data-result=success] #cast-stage-result{font-size:29px;color:#c2ceac;display:grid;place-items:center}.cast-stage[data-result=backfire] #cast-stage-result{font-size:32px;color:#e69b86;display:grid;place-items:center}.cast-stage[data-result=backfire] .cast-stage-panel{border-color:#aa7362}.cast-stage[data-result=success] .cast-stage-panel{border-color:#9fac87}@keyframes cast-question{50%{opacity:.45;transform:scale(.94)}}@keyframes cast-present{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.cast-stage-panel,#cast-stage-result{animation:none!important}}
/* Reactions stay outside the game log and never shift a hand. */
.seat.self{padding-right:48px!important}.seat-content{min-width:0}.emoji-toggle{position:absolute;right:0;top:50%;transform:translateY(-50%);width:40px;height:40px;min-height:40px;padding:0;font-size:27px;line-height:1;color:var(--gold);border-color:var(--line);background:var(--bg);font-family:Arial,sans-serif}.emoji-toggle[aria-expanded=true]{border-color:var(--gold)}.emoji-menu{position:fixed;z-index:42;background:#252d23;border:1px solid var(--edge);box-shadow:0 10px 40px #0007;overflow:auto;overscroll-behavior:contain;padding:14px}.emoji-menu-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.emoji-menu h2{font-size:19px;margin:0}.emoji-menu-heading button{padding:0 6px;min-height:30px;font-size:24px}.emoji-menu h3{font-size:12px;font-weight:400;color:var(--muted);margin:16px 0 8px}.emoji-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}.emoji-choice{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-variant-emoji:emoji;font-size:26px;padding:4px 0;min-height:43px;line-height:1.2;border:1px solid transparent}.emoji-choice:hover{background:#3a4430;border-color:var(--line)}.reactions{position:fixed;inset:0;pointer-events:none;z-index:44;overflow:hidden}.floating-emoji{position:absolute;font:40px/1.2 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-variant-emoji:emoji;filter:drop-shadow(0 3px 4px #0004);will-change:transform,opacity}
@media(min-width:1100px){.seat.self{width:clamp(360px,30vw,450px)}}

/* A caster calls out a stone at their seat; the table stays fully visible. */
.cast-stage{position:fixed;inset:auto;display:block;width:auto;height:auto;max-width:none;padding:0;background:none;backdrop-filter:none;pointer-events:none;z-index:45}.cast-stage-panel{position:relative;width:162px;padding:12px 10px 10px;border:1px solid #a19973;background:#283024f5;box-shadow:0 7px 20px #0004;animation:cast-present .2s ease-out}.cast-stage-panel::after{content:'';position:absolute;left:var(--tail-x,50%);bottom:-7px;width:12px;height:12px;background:#283024;border-right:1px solid #a19973;border-bottom:1px solid #a19973;transform:translateX(-50%) rotate(45deg)}.cast-stage[data-side=beside] .cast-stage-panel::after{display:none}.cast-stage-panel>p{font-size:11px;margin:0 0 4px}.cast-stage-panel h2{font-size:17px;margin:0 0 5px}.cast-stage-face{max-width:106px}#cast-stage-art img{width:88px;height:92px}#cast-stage-number{font-size:28px;right:-1px;top:0}#cast-stage-result{font-size:32px;min-height:40px;line-height:1.15;margin-top:3px}.cast-stage[data-result=success] #cast-stage-result,.cast-stage[data-result=backfire] #cast-stage-result{font-size:19px;min-height:40px}.cast-stage[data-result=backfire] .cast-stage-panel{border-color:#aa7362}.cast-stage[data-result=success] .cast-stage-panel{border-color:#9fac87}
@media(max-width:600px){.cast-stage-panel{width:140px;padding:10px 8px 8px}.cast-stage-panel h2{font-size:16px}#cast-stage-art img{height:78px;width:78px}.cast-stage-face{max-width:94px}#cast-stage-number{font-size:25px}.cast-stage-panel>p{font-size:10px}}

/* Text symbols follow the other games; actual reactions retain emoji rendering. */
body,button,input,a{font-variant-emoji:text}a,button,.arrow,.asterisk{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif}.emoji-choice,.floating-emoji{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-variant-emoji:emoji}
/* The declaration is layered directly over the caster, in the same x/y area. */
.seat-content{position:relative}.cast-stage{position:absolute;inset:0;width:100%;height:100%;display:grid;place-items:center;z-index:5;padding:0;pointer-events:none;background:none;backdrop-filter:none}.cast-stage-panel{width:min(100%,162px);max-height:100%;padding:7px 9px;border:1px solid #a19973;background:#283024f5;box-shadow:0 3px 12px #0004;overflow:hidden}.cast-stage-panel::after{display:none}.cast-stage-panel>p{font-size:10px;line-height:1.2;margin-bottom:3px}.cast-stage-panel h2{font-size:16px;line-height:1.25;margin:0 0 3px}.cast-stage-face{max-width:100px}#cast-stage-art img{height:var(--callout-art-height,64px);width:80px;object-fit:contain}#cast-stage-number{font-size:25px}#cast-stage-result{font-size:30px;min-height:31px;margin-top:1px;line-height:1}.cast-stage[data-result=success] #cast-stage-result,.cast-stage[data-result=backfire] #cast-stage-result{font-size:18px;min-height:31px}

.damage-flash{position:absolute;inset:0;pointer-events:none;z-index:6;background:color-mix(in srgb,var(--hit-flash,#f68060) 26%,transparent);box-shadow:inset 0 0 18px color-mix(in srgb,var(--hit-flash,#f68060) 38%,transparent);border:1px solid color-mix(in srgb,var(--hit-flash,#f68060) 70%,transparent)}
.heal-sweep{
 position:absolute;inset:0;pointer-events:none;z-index:6;overflow:hidden;
}
.heal-wash{
 position:absolute;inset:0 0 auto;height:145%;
 background:linear-gradient(to bottom,transparent,#a6e99a45 34%,#c8f5b665 62%,transparent);
}
.heal-plus{
 position:absolute;color:#deffd3;font:bold 21px/1 Arial,sans-serif;
 text-shadow:0 0 8px #a6e99acc;
}
.stone{animation-duration:.8s}
.score-entry:not(:first-child){border-left:1px solid var(--edge);padding-left:14px}
.seat.active{outline:2px solid var(--gold);outline-offset:2px;box-shadow:0 0 0 4px #e7d59e22,0 0 28px #e7d59e42;background-color:#e7d59e10}
.seat.self.active{border-top-color:var(--gold)}
.cast-stage-panel{overflow:visible}
#cast-draw{pointer-events:auto;margin-top:8px}
#cast-draw-pad{display:block;width:100%;height:58px;background:#1c241a;border:1px solid #777c65;touch-action:none;cursor:crosshair}
#cast-draw-button{width:100%;min-height:32px;margin-top:6px;padding:4px;font-size:13px;background:#313b2b;border-color:#9b9c7c}
@media(max-width:1099px){.score-entry:nth-child(4){border-left:0;padding-left:0}.score-entry:nth-child(5),.score-entry:nth-child(6){border-left:1px solid var(--edge);padding-left:10px}}

#result-toggle{float:right;min-height:30px;padding:4px 10px;font-size:12px;margin:0}
.round-result.collapsed>:not(#result-toggle){display:none}
.round-result.collapsed{padding:6px 10px;min-height:42px}
@media(min-width:1100px){
 .round-result{inset:auto 0 0;max-height:138px;padding:10px 14px;overflow:auto;box-shadow:none}
 .round-result>.eyebrow{display:none}
 .round-result h2{font-size:19px;margin:0 0 4px}
 .round-result #result-reason{font-size:12px;margin:0 0 6px}
 .round-result .scoreboard{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px 14px}
 .round-result .scoreboard>div{padding:3px 0;font-size:12px}
 .round-result #next-round{margin-top:6px;min-height:28px;padding:4px 12px;font-size:12px}
 .round-result #next-wait{margin:4px 0;font-size:12px}
 .round-result.collapsed{max-height:42px}
}

.bot-control{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.bot-options{display:flex;gap:6px}
.bot-options button{min-width:36px;min-height:38px;padding:6px 10px}
.bot-options button[aria-pressed=true]{color:var(--gold);border-color:var(--gold);background:#e7d59e15}
.bot-options button:disabled{opacity:.3;cursor:default}
@media(max-width:600px){.bot-control{width:100%;justify-content:space-between;gap:10px}.bot-options{gap:4px}.bot-options button{min-width:32px;padding:6px 8px}.lobby-controls .bot-options button{width:auto;min-width:32px}}

@media(min-width:1100px){
 .round-result{position:fixed;inset:130px 28px auto auto;width:440px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:24px;background:#252d23;border:1px solid var(--edge);z-index:40;box-shadow:0 12px 40px #0006;overflow:auto}
 .round-result>.eyebrow{display:block;font-size:12px;margin:0 0 8px}
 .round-result h2{font-size:28px;line-height:1.3;margin:0 0 12px;padding-right:70px;cursor:move;touch-action:none;user-select:none;overflow-wrap:anywhere}
 .round-result #result-reason{font-size:15px;line-height:1.6;margin:0 0 16px}
 .round-result .scoreboard{display:block}
 .round-result .scoreboard>div{font-size:15px;padding:10px 0}
 .round-result #next-round{font-size:15px;padding:9px 16px;min-height:40px;margin-top:16px}
 .round-result #next-wait{font-size:14px;margin-top:12px}
 .round-result.collapsed{width:auto;max-height:none;padding:5px;min-height:42px}
 .round-result.collapsed #result-toggle{float:none;font-size:14px;min-height:32px}
}

.player-tablets{display:inline-block;margin-left:8px;font-size:11px;font-weight:400;color:var(--gold);vertical-align:middle}

.cast-stage-panel:has(#cast-draw:not([hidden])){width:260px;max-width:calc(100vw - 32px);max-height:none;flex-shrink:0}
#cast-draw-pad{height:150px}
@media(min-width:1100px){.cast-stage-panel:has(#cast-draw:not([hidden])){width:320px}#cast-draw-pad{height:190px}}

/* Keep quick reactions beside the player without changing the hand layout. */
.seat.self{padding-right:88px!important}
.emoji-controls{position:absolute;right:0;top:50%;transform:translateY(-50%);width:80px;display:grid;grid-template-columns:repeat(2,38px);gap:4px}
.emoji-quick{display:contents}
.emoji-controls .emoji-choice,.emoji-controls .emoji-toggle{position:static;transform:none;width:38px;height:36px;min-height:36px;padding:0;line-height:1;font-size:24px}
.emoji-controls .emoji-toggle{font-size:25px}
.emoji-choice,.emoji-toggle{touch-action:manipulation}
.seat.self .hand .stone{width:min(calc((100cqw - 70px)/6),calc((100% - 20px)/5))}
@media(min-width:1100px){.seat.self .hand .stone{width:min(calc((clamp(182px,15vw,240px) - 30px)/3),calc((100% - 20px)/5))}}

.damage-particles{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:7}
.damage-particle{position:absolute;left:50%;top:50%;width:10px;height:10px;background:var(--particle-color)}
.damage-particle.ember{border-radius:50%;box-shadow:0 0 10px #ff824d}
.damage-particle.wisp{width:16px;height:20px;border-radius:50% 50% 45% 10%;background:radial-gradient(ellipse at 55% 32%,#f5eaff,var(--particle-color) 32%,transparent 75%)}
.damage-particle.bolt{width:11px;height:22px;clip-path:polygon(50% 0,100% 0,65% 39%,100% 39%,14% 100%,42% 52%,0 52%)}
.damage-particle.shard{width:9px;height:20px;clip-path:polygon(60% 0,100% 46%,30% 100%,0 48%)}
.damage-particle.flame{width:11px;height:18px;border-radius:75% 15% 55% 45%;background:linear-gradient(#ffe186,var(--particle-color) 75%)}
.damage-particle.spark{width:19px;height:19px;background:radial-gradient(circle,#fff4da 12%,#ffab88 38%,var(--particle-color) 75%);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%)}

.damage-particles::before{content:'';position:absolute;inset:0;opacity:0;pointer-events:none}
.ember-burst::before,.flame-burst::before{background:radial-gradient(ellipse at 50% 95%,#ffbd665e,transparent 70%);animation:damage-halo .48s ease-out}
.wisp-burst::before{background:radial-gradient(ellipse at 50% 40%,#9f71d957,transparent 69%);animation:damage-halo .64s ease-out}
.shard-burst::before{background:conic-gradient(from 18deg,transparent 0 14%,#a9f4ff63 15% 16%,transparent 17% 39%,#a9f4ff55 40% 41%,transparent 42% 68%,#a9f4ff63 69% 70%,transparent 71%);animation:damage-halo .38s ease-out}
.bolt-burst::before{background:linear-gradient(112deg,transparent 46%,#b2baff75 49%,#eef0ffd9 50%,#b2baff75 51%,transparent 54%);animation:damage-halo .24s ease-out}
.spark-burst::before{background:radial-gradient(ellipse,#ff8e6760,transparent 60%);animation:damage-halo .32s ease-out}
@keyframes damage-halo{0%{opacity:0;transform:scale(.6)}22%{opacity:1}100%{opacity:0;transform:scale(1.12)}}
