@font-face {
  font-family:"Barlow Condensed";
  src:url("/fonts/barlow-condensed-extrabold-italic.ttf") format("truetype");
  font-style:italic;
  font-weight:800;
  font-display:swap;
}
:root {
  color-scheme:light;
  --paper:#faf7ef;
  --sheet:#fffdf7;
  --ink:#211f1e;
  --muted:#605b53;
  --rule:#c8c1b4;
  --red:#b52621;
  --blue:#0d5364;
  --body:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif;
  --display:"BF Display","Microsoft JhengHei",serif;
  --race:"Barlow Condensed","Arial Narrow",Impact,sans-serif;
  --mono:ui-monospace,Consolas,monospace;
  --width:1230px;
  --edge:clamp(20px,5.6vw,90px);
}
* {box-sizing:border-box}
html {min-width:300px;background:var(--paper);scrollbar-color:#93897c var(--paper)}
body {margin:0;color:var(--ink);background:var(--paper);font:16px/1.55 var(--body);-webkit-font-smoothing:antialiased}
button,input,select,textarea {color:inherit;font:inherit}
button,a,select {touch-action:manipulation}
button {border:0;padding:0;background:none;cursor:pointer}
button:disabled,select:disabled {opacity:.55;cursor:default}
a {color:inherit;text-underline-offset:4px}
a:hover,button.text-link:hover {color:var(--red)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {outline:3px solid #117495;outline-offset:3px}
h1,h2,h3,p,figure {margin:0}
h1,h2,h3 {line-height:1.22}
p+p {margin-top:.7em}
img {display:block;max-width:100%}
[hidden] {display:none!important}
.mast {position:relative;z-index:2;background:var(--sheet);border-bottom:1px solid #dcd5c8}
.mast-inner,.foot,#app,.hall-inner,.flag-dock {width:min(var(--width),calc(100% - 2 * var(--edge)));margin-inline:auto}
.mast-inner {display:flex;align-items:center;justify-content:space-between;min-height:71px;gap:20px}
.brand {display:inline-flex;align-items:center;gap:11px;text-decoration:none}
.brand img {width:112px;height:auto}
.brand span {color:#48443e;letter-spacing:.16em;font:700 10px/1.1 var(--mono);border-left:1px solid #b7ada0;padding:4px 0 4px 12px}
nav {display:flex;align-self:stretch;gap:clamp(14px,2.6vw,40px)}
nav button {position:relative;min-height:44px;font-size:.86rem;font-weight:700;color:var(--muted)}
nav button:hover,nav button[aria-current=page] {color:var(--ink)}
nav button[aria-current=page]::after {content:"";position:absolute;bottom:10px;left:0;width:21px;height:3px;background:var(--red);transform:skewX(-23deg)}
#app {min-height:65vh;outline:0}
#app[data-scene=home] {width:100%}
.hall {position:relative;isolation:isolate;overflow:hidden;background:#f5efe0}
.hall::before {content:"";position:absolute;z-index:-1;inset:0 auto 0 max(-185px,calc((100vw - var(--width))/2 - 265px));width:min(66%,900px);background:#a49b88;opacity:.14;mask:url("/art/buddy-emblem.webp") 34% 58%/118% auto no-repeat;pointer-events:none}
.hall-inner {display:flex;align-items:center;min-height:clamp(348px,31.2vw,460px);padding-block:36px}
.hall-intro {position:relative;width:49%;z-index:1}
.fight-call {display:flex;align-items:center;gap:10px;color:var(--red);font:italic 800 clamp(1.07rem,1.85vw,1.65rem)/1 var(--race);text-transform:uppercase;letter-spacing:.055em}
.fight-call::before {content:"";width:31px;height:4px;background:var(--red);clip-path:polygon(6% 0,100% 0,88% 100%,0 100%)}
.hall h1 {display:inline-block;margin:8px 0 14px;font:400 clamp(3.8rem,6.4vw,6.6rem)/1.13 var(--display);letter-spacing:-.055em;white-space:nowrap;transform:skewX(-5deg);transform-origin:left bottom}
.hall h1 span {color:var(--red)}
.hall-copy {color:#47423b;font-size:clamp(.88rem,1.11vw,1rem);font-weight:550;letter-spacing:.025em}
.hall-commands {margin-top:22px}
.actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px}
.btn {display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:42px;padding:7px 14px;font-size:.9rem;font-weight:750;line-height:1.38;text-decoration:none}
.primary {position:relative;background:var(--red);color:#fffdf5;border-radius:2px 2px 9px 2px;padding:10px 22px}
.primary:hover {background:#8d1d1b}
.create-action {min-width:150px;min-height:48px;padding-inline:20px}
.create-action::before {content:"";width:12px;height:12px;border:2px solid #ffefac;box-shadow:inset 0 0 0 2px var(--red);background:#ffefac;transform:rotate(45deg)}
.ink-link,.library-link,.quiet {color:var(--ink);background:none}
.ink-link {padding-inline:7px;text-decoration:underline;text-decoration-color:#b3a99a;text-underline-offset:6px}
.ink-link::after,.library-link::after {content:"→" / "";font:normal 1.05em/1 var(--body)}
.ink-link:hover,.library-link:hover,.quiet:hover,.buddy-name:hover,.deck-print button:hover strong,.deck-leader:hover strong {color:var(--red)}
.quiet {min-height:38px;padding:6px 0;text-decoration:underline;text-underline-offset:5px;text-decoration-color:#b5aa9c}
.btn.compact {font-size:.82rem}
.loadout {display:flex;align-items:baseline;gap:9px;margin-top:15px;color:var(--muted);font-size:.74rem}
.loadout strong {font-weight:750;color:var(--ink)}
.cover-art {--cut:polygon(20% 0,100% 0,100% 100%,0 100%,6% 86%,3% 89%,11% 67%,7% 70%,15% 48%,12% 51%,18% 31%,15% 34%,22% 12%,18% 16%);position:absolute;z-index:-1;inset:0 0 0 44.2%;background:var(--ink);clip-path:var(--cut)}
.cover-scene {position:absolute;inset:0;overflow:hidden}
.cover-art::after {content:"";position:absolute;inset:0;pointer-events:none;background:var(--ink);clip-path:polygon(20% 0,21.6% 0,19.6% 13%,23.4% 10%,16.9% 31%,19.4% 29%,13.9% 48%,17% 45%,9% 69%,12.4% 65%,5.2% 87%,7.6% 84%,1.5% 100%,0 100%,0 0)}
.cover-paint {height:100%;width:100%;object-fit:cover;object-position:55% 49%}
.danger-scene {background:radial-gradient(ellipse at 57% 57%,#c25c47 0%,#8c3436 46%,#431d29 100%)}
.danger-scene::before {content:"";position:absolute;inset:0;background-image:radial-gradient(#4a2e24 .9px,transparent 1.1px);background-size:5px 5px;opacity:.3;mask-image:linear-gradient(115deg,black,transparent 57%,black)}
.danger-scene::after {content:"";position:absolute;bottom:-16%;left:8%;width:110%;height:37%;background:#201e21;clip-path:polygon(0 64%,61% 0,42% 36%,87% 2%,63% 34%,100% 17%,100% 100%,0 100%)}
.cover-crest {position:absolute;right:-9%;height:117%;width:65%;object-fit:contain;top:-7%;mix-blend-mode:screen;opacity:.23}
.rouga {position:absolute;z-index:1;left:51%;top:4%;height:116%;width:auto;filter:drop-shadow(1px 1px 0 #ffdf93)}
.cerberus {position:absolute;z-index:2;left:14%;bottom:2%;width:54%;height:82%;object-fit:contain;filter:drop-shadow(0 5px 2px #542d2b70)}
.luminize-call {position:absolute;z-index:3;right:6%;bottom:9%;display:flex;align-items:center;gap:8px;padding:3px 20px 6px 10px;color:var(--sheet);background:#251e20;transform:rotate(-6deg);box-shadow:4px 4px 0 #c8462b;pointer-events:none}
.luminize-call img {width:clamp(24px,4vw,50px);height:auto}
.luminize-call strong {font:italic 800 clamp(1.55rem,4.5vw,4.8rem)/1 var(--race);text-transform:uppercase}
.section {margin-block:clamp(26px,3.4vw,48px)}
.section-head,.collection-head,.room-top,.duel-head,.line-head,.hand-head,.deck-contents,.print-meta {display:flex;align-items:center;justify-content:space-between;gap:10px 18px}
.section-head {margin-bottom:8px}
.section-head h2,.hand h2,.rail h2,.deck-contents h3 {font-size:clamp(1.15rem,1.8vw,1.52rem);letter-spacing:.015em}
.library-link {min-height:40px;padding:4px 0 4px 12px;font-size:.84rem;gap:7px}
.world-stage {display:grid;grid-template-columns:1fr 1fr;position:relative;border-block:1px solid var(--rule)}
.starter {display:grid;grid-template-columns:minmax(125px,44%) 1fr;align-items:center;min-width:0;position:relative;text-align:left;isolation:isolate;padding:12px 10px 12px 0}
.starter+.starter::before {content:"";position:absolute;left:0;top:19px;bottom:19px;width:1px;background:var(--rule)}
.starter-words {display:flex;align-items:flex-start;flex-direction:column;min-width:0;padding:4px 8px 4px 0}
.starter-words small,.list-cover small {color:var(--muted);font-size:.75rem;font-weight:700}
.starter-words small {display:flex;align-items:center;gap:5px}
.starter-words small img {width:19px;height:19px;object-fit:contain}
.starter-words small b {font:700 .76rem/1.1 var(--mono);color:var(--red)}
.starter-words>strong {font:400 clamp(1.77rem,3vw,3.1rem)/1.35 var(--display);letter-spacing:.025em}
.starter-words em,.list-cover>div>p {font:italic 800 clamp(1.05rem,1.6vw,1.43rem)/1.08 var(--race);color:#5a5349}
.pick-state,.open-list {display:inline-flex;align-items:center;gap:7px;margin-top:15px;color:var(--muted);font-size:.75rem;font-weight:750}
.pick-state i {width:13px;height:13px;border-radius:50%;border:1.5px solid #928a7f}
[aria-pressed=true] .pick-state {color:var(--red)}
[aria-pressed=true] .pick-state i {border-color:var(--red);background:var(--red);box-shadow:inset 0 0 0 2.5px var(--paper)}
.pack-art {position:relative;display:block;isolation:isolate;height:clamp(145px,13vw,185px);width:100%;min-width:0}
.pack-art::before {content:"";position:absolute;z-index:-1;left:10%;bottom:3%;width:83%;height:32%;background:radial-gradient(ellipse,#72523b3c 2%,transparent 68%);transform:rotate(-7deg)}
.pack-art::after {content:"";position:absolute;z-index:-2;inset:12% 8% 8% 8%;background:#b4824f;opacity:.16;mask:url("/art/buddy-emblem.webp") center/contain no-repeat}
[data-world=danger] .pack-art::after {background:#877027}
.pack-box {position:absolute;height:96%;width:auto;left:44%;bottom:3%;transform:translateX(-50%) rotate(-8deg);filter:drop-shadow(3px 5px 2px #3e312b32)}
.pack-print {position:absolute;height:70%;width:auto;max-width:48%;object-fit:contain;left:52%;bottom:9%;transform:rotate(12deg);transform-origin:35% 89%;border-radius:4px;filter:drop-shadow(2px 3px 2px #302c243b)}
.starter:hover .starter-words>strong {color:var(--red)}
.open-list {color:var(--red)}
.showcase {display:flex;justify-content:space-between;align-items:center;gap:9px 14px;min-height:55px}
.buddy-caption {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px}
.buddy-word,.meta,.muted,.micro {color:var(--muted)}
.meta,.micro {font-size:.8rem}
.buddy-word {font-size:.75rem}
.buddy-name {font-size:.91rem;font-weight:750;text-align:left}
.buddy-caption>span[lang=en] {color:var(--muted);font:italic 800 .99rem/1 var(--race)}
.text-link,.row-print,.print-links a {font-size:.79rem;text-decoration:underline;text-underline-offset:4px}
.showcase .actions {flex-wrap:nowrap}
.booster-entry {display:grid;grid-template-columns:clamp(116px,17vw,205px) 1fr auto;align-items:center;gap:clamp(12px,2vw,26px);width:100%;padding:14px 0;margin-top:10px;border-block:1px solid var(--rule);text-align:left}
.booster-entry>img {width:100%;aspect-ratio:660/372;object-fit:contain}
.booster-title {display:grid;align-content:center;gap:2px}
.booster-title small {color:var(--red);font:700 .73rem var(--mono)}
.booster-title strong {font-size:clamp(1.4rem,2.6vw,2rem);line-height:1.25}
.booster-title em {color:var(--muted);font:italic 800 1.05rem/1 var(--race)}
.booster-link {font-weight:700;font-size:.84rem;text-align:right}
.booster-link i {color:var(--red);font-style:normal}
.booster-entry:hover .booster-link {color:var(--red);text-decoration:underline;text-underline-offset:4px}
.foot {display:flex;align-items:center;justify-content:space-between;gap:12px 20px;flex-wrap:wrap;padding:19px 0 25px;border-top:1px solid var(--rule);color:var(--muted);font-size:.72rem}
.foot>span {font:italic 800 1rem/1 var(--race)}
.foot>div {display:flex;align-items:center;gap:16px}
.foot a,.foot button {font:inherit;color:inherit;text-decoration:none}
.foot a:hover,.foot button:hover {text-decoration:underline}
.collection-head,.room-top {padding:clamp(24px,4vw,54px) 0 10px;align-items:baseline}
.collection-head h1,.room-top h1 {font:400 clamp(2.1rem,4.4vw,4rem)/1.3 var(--display);letter-spacing:-.035em}
.collection-own {min-height:100px}
.collection-own>.muted {font-size:.91rem}
.mono,.count {font-family:var(--mono)}
.loading {padding:4rem 0;text-align:center}
.catalog-list {list-style:none;margin:10px 0;padding:0}
.catalog-list li {display:flex;align-items:center;gap:12px;padding:6px 0;border-top:1px solid var(--rule)}
.catalog-list li .count {margin-left:auto;white-space:nowrap;color:var(--muted);font-size:.83rem}
.waiting {margin:6px 0 48px}
.invite-rail,.ready-rail,.ready-rail label {display:flex;align-items:center;gap:12px 18px;flex-wrap:wrap}
.invite-rail {padding:14px 0 18px}
.room-code {font:italic 800 clamp(1.75rem,3.4vw,2.9rem)/1 var(--race);letter-spacing:.065em;color:var(--red)}
.seats {display:grid;grid-template-columns:1fr 1fr;position:relative;isolation:isolate}
.seat {position:relative;min-height:200px;display:grid;grid-template-columns:45% 1fr;align-items:center;padding:13px 6%;overflow:hidden;background:#e9e0ce}
.seat[data-world=danger] {background:#e5d6b5}
.seat.peer {border-left:4px solid var(--paper)}
.seat .pack-art {height:145px}
.seat-text {display:grid;justify-items:start;gap:4px;min-width:0}
.seat-text small,.seat-text span,.seat-state {font-size:.8rem}
.seat-text strong {font-size:clamp(1.2rem,2.3vw,2.2rem);line-height:1.2;overflow-wrap:anywhere}
.seat-state {color:var(--muted);margin-top:5px}
.seat-state.ready {color:#235c42}
.vacant {background:#e6e3d9}
.vacancy-mark {justify-self:center;width:64px;opacity:.45;rotate:-7deg}
.versus {position:absolute;z-index:2;left:50%;top:50%;translate:-50% -50%;font:italic 800 2.2rem/1 var(--race);color:var(--sheet);background:var(--ink);padding:3px 10px 7px;transform:rotate(-8deg)}
.ready-rail {justify-content:space-between;padding-top:18px}
.ready-rail label {font-size:.88rem;font-weight:750}
.ready-rail select {width:auto;max-width:100%}
dialog {width:min(585px,calc(100% - 28px));max-height:88dvh;margin:auto;padding:0;border:0;background:var(--sheet);color:var(--ink);box-shadow:0 16px 65px #16151d58;overflow:auto}
dialog::backdrop {background:#232025b8}
dialog.card-dialog {width:min(708px,calc(100% - 28px))}
dialog.deck-dialog {width:min(890px,calc(100% - 28px))}
.modal-frame {position:relative;padding:clamp(23px,3.2vw,40px)}
.modal-tools {position:sticky;top:0;height:0;z-index:3}
.modal-frame h2 {margin:0 28px 17px 0;line-height:1.25;font-size:clamp(1.5rem,3vw,2.2rem);letter-spacing:-.035em}
.modal-frame h3 {margin:16px 0 6px;font-size:1.1rem}
.modal-frame>div>p,.modal-frame>div>.actions,.modal-frame>div>article>p {margin-block:12px}
.close {position:absolute;z-index:3;top:8px;right:8px;width:36px;height:36px;display:grid;place-items:center;color:var(--ink);font:300 29px/1 var(--body);background:#fffaf0dc;border-radius:50%}
.close:hover {color:var(--red);background:#eee6da}
.form,.manual-list,.edit-rows,label.field,fieldset {display:grid;gap:13px}
label.field,fieldset {gap:5px;font-size:.9rem;font-weight:700}
input:not([type=checkbox]):not([type=radio]),select,textarea {min-width:0;width:100%;min-height:43px;padding:8px 10px;border:1px solid #a79d8e;border-radius:2px;background:#fffdf8;color:var(--ink)}
textarea {resize:vertical}
fieldset {margin:0;padding:10px;border:1px solid var(--rule)}
legend {padding-inline:4px}
.checks,.check {display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.check {font-size:.88rem}
input[type=checkbox],input[type=radio] {accent-color:var(--red);width:1.05rem;height:1.05rem}
.form-error {color:#a32124;font-weight:700}
.form-info,.result {padding:12px 16px;background:#f1dfb3;border-left:3px solid #b87529}
.prose p,.prose li {line-height:1.75}
.prose ul {padding-left:1.3em}
.prose li {margin-bottom:6px}
.list-cover {display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;isolation:isolate;overflow:hidden;min-height:106px;margin:0 0 16px;padding:0 8% 13px 0;border-bottom:2px solid var(--ink)}
.list-cover::before {content:"";position:absolute;inset:0 3% 0 auto;width:41%;z-index:-1;background:#c5ad70;opacity:.3;mask:url("/art/buddy-emblem.webp") center/contain no-repeat}
.list-cover h2 {font:400 clamp(1.9rem,3.9vw,3.2rem)/1.3 var(--display);margin:2px 0 0}
.list-cover img {height:103px;width:auto;transform:rotate(8deg)}
.booster-cover {padding-right:5%}
.booster-cover img {height:auto;width:min(44%,210px);transform:none}
.set-tools,.set-tools label {display:flex;align-items:center;gap:9px}
.set-tools {justify-content:space-between;flex-wrap:wrap;margin:0 0 15px}
.set-tools label {font-size:.85rem;font-weight:700}
.set-tools select {width:auto}
.deck-leaders {display:grid;grid-template-columns:1fr 1fr;gap:12px}
.deck-leader,.edit-card,.drop-card {display:flex;align-items:center;gap:10px;min-width:0;text-align:left}
.leader-face,.list-face {width:32px;height:45px;object-fit:contain;flex:none}
.combat-choice {min-width:0;border:0;padding:6px 0;gap:9px}
.combat-choice label {display:flex;align-items:center;gap:9px;min-width:0;padding:7px 12px 7px 6px;cursor:pointer;color:var(--ink);background:linear-gradient(115deg,#ead5a3 16%,#fffaf0 16.3%,#f2e7cc);box-shadow:inset 4px 0 #9b7444,0 2px 0 #35221944;overflow-wrap:anywhere}
.combat-choice .list-face {width:45px;height:63px;filter:drop-shadow(1px 2px 2px #20140c55)}
.combat-choice label>input {flex:none}
.combat-choice small {display:block;font:700 .77rem/1.4 var(--body);letter-spacing:.02em}
.combat-choice strong {margin-left:auto;min-width:3em;text-align:center;font-size:1.5rem;line-height:1.15}
.combat-choice label:hover {box-shadow:inset 4px 0 var(--red),0 0 0 1px #ae7534}
.combat-choice label:has(:checked) {color:white;background:linear-gradient(115deg,#cf922f 16%,#352220 16.3%,#661e15);box-shadow:inset 4px 0 #ffdc74,0 2px 0 #351411}
.combat-choice label:has(:checked) strong {color:#ffdc74}
.combat-choice label:focus-within {outline:2px solid var(--ink);outline-offset:2px}
.deck-leader>span {display:grid}
.deck-leader small,.print-meta small,.edit-rows small {font-size:.74rem;color:var(--muted)}
.deck-leader strong {font-size:.92rem}
.deck-contents {border-top:1px solid var(--rule);padding-top:8px;margin:14px 0 9px;flex-wrap:wrap}
.deck-contents h3 {margin:0}
.deck-contents h3 small {color:var(--muted);font-size:.78rem;font-weight:550}
.deck-prints {list-style:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px 13px;margin:0 0 24px;padding:0}
.deck-print {min-width:0;display:flex;flex-direction:column}
.deck-print button {display:block;text-align:left;width:100%}
.print-window {display:grid;place-items:center;aspect-ratio:143/184}
.gallery-face {width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 2px #2a241626)}
.deck-print button strong {display:block;margin:6px 0 2px;font-size:.84rem;line-height:1.35}
.print-meta {margin-top:auto;gap:3px;padding-top:2px}
.row-print {color:var(--muted);font-size:.69rem}
.expansion-prints .print-meta {flex-wrap:wrap;align-items:baseline;row-gap:0}
.print-meta small {min-width:0;overflow-wrap:anywhere}
.print-meta .print-number {display:block;font-variant-numeric:tabular-nums}
.print-meta .other-print {display:block;color:#814313;font-weight:700}
.row-print {white-space:nowrap}
.modal-back {margin-bottom:9px}
.thin-rule {border:0;border-top:1px solid var(--rule);margin:16px 0}
.edit-rows {gap:0}
.edit-rows label {display:grid;grid-template-columns:1fr 65px;align-items:center;gap:12px;padding:5px 0;border-top:1px solid var(--rule)}
.edit-rows small {margin-right:4px}
.edit-group summary {cursor:pointer;font-weight:750;padding-block:7px}
.edit-group summary small {color:var(--muted);font-weight:550}
.transfer {margin-top:14px}
.toast {position:fixed;bottom:18px;left:50%;translate:-50% 0;z-index:10;max-width:min(94vw,640px);padding:12px 18px;background:var(--ink);color:white;box-shadow:0 4px 28px #2d201b35}
.inspector.with-face {display:grid;grid-template-columns:minmax(140px,37%) 1fr;align-items:start;gap:clamp(16px,2.5vw,30px)}
.inspector figure {display:grid;place-items:center}
.detail-face {width:100%;max-height:38dvh;object-fit:contain;filter:drop-shadow(2px 4px 3px #342a2330)}
.inspector:has(.detail-face[hidden]) {display:block}
.inspector figure:has(img[hidden]) {display:none}
.print-id {display:block;color:var(--red);font:700 .78rem var(--mono);margin-bottom:9px}
.inspector h2 {margin:0 12px 4px 0}
.print-en {font:italic 800 1.27rem/1.12 var(--race);color:var(--muted)}
.card-facts {display:flex;gap:7px 17px;flex-wrap:wrap;margin:13px 0}
.card-facts:empty {display:none}
.card-facts span {display:grid}
.card-facts small {font-size:.7rem;color:var(--muted)}
.card-facts b {font:italic 800 1.45rem/1 var(--race)}
.effect-copy {margin:11px 0 14px;padding-top:11px;border-top:1px solid var(--rule);line-height:1.66}
.field-status {font-size:.83rem;font-weight:700;color:var(--muted)}
.print-links {display:flex;align-items:center;gap:7px 12px;flex-wrap:wrap}

.duel-head {align-items:baseline;padding:18px 0 4px}
.duel-head h1 {font-size:clamp(1.3rem,2.05vw,1.9rem);overflow-wrap:anywhere}
.duel-head h1 i {padding-inline:.12em;color:var(--red);font:italic 800 1.15em/1 var(--race)}
.duel-head .meta {flex:none}
.phase-line {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 18px;margin:8px 0 14px}
.phase-steps {display:flex;align-items:baseline;gap:clamp(8px,1.2vw,17px)}
.phase-steps b {margin-right:3px;font-size:.78rem;white-space:nowrap}
.phase-steps em {color:var(--red);font:italic 800 1.65rem/.9 var(--race)}
.phase-steps span {font-size:.78rem;color:var(--muted);white-space:nowrap}
.phase-steps .active {color:var(--red);font-weight:800;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
.board-layout {display:grid;grid-template-columns:minmax(0,1fr) minmax(185px,20%);gap:clamp(18px,2.5vw,34px);align-items:start;margin-bottom:30px}
.board-main,.rail,.panel {min-width:0}
.arena {position:relative;isolation:isolate;background:#222827;color:#f8f2de;overflow:hidden;box-shadow:0 3px 9px #34251c29}
.arena::before {content:"";position:absolute;z-index:-1;inset:0;background:repeating-linear-gradient(17deg,transparent 0 2px,#fff1 2.5px,transparent 3px);opacity:.14;pointer-events:none}
.side {--crest:url("/art/dragon-world.webp");--tint:#16554b;--mark:#e5d597;--zone-stroke:#b7d4b882;--zone-fill:#244840;position:relative;isolation:isolate;display:flex;flex-direction:column;padding:9px clamp(9px,1.4vw,20px) 11px}
.side[data-world=danger] {--crest:url("/art/danger-world.webp");--tint:#682f2d;--mark:#f4cf84;--zone-stroke:#ddae8f82;--zone-fill:#4d302c}
.side::before {content:"";position:absolute;z-index:-2;inset:0;background:linear-gradient(110deg,#10191a38,transparent 23%,transparent 75%,#11151557),linear-gradient(160deg,var(--tint),#212624 126%);pointer-events:none}
.side::after {content:"";position:absolute;z-index:-1;inset:0;opacity:.19;background:var(--mark);mask:var(--crest) 86% 35%/auto 142% no-repeat;mask-mode:luminance;pointer-events:none}
.side.opponent::after {mask-position:14% 63%}
.fighter-line {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:30px}
.side:not(.opponent) .fighter-line {order:1;margin-top:3px}
.fighter-name,.vitals,.life {display:flex;align-items:center;gap:8px}
.fighter-name {min-width:0}
.fighter-crest {width:26px;height:26px;object-fit:contain;filter:drop-shadow(1px 1px 1px #161b15af)}
.fighter-name small {flex:none;color:var(--mark);font-size:.68rem;font-weight:750}
.fighter-name strong {font-size:.96rem;line-height:1.22;overflow-wrap:anywhere}
.on-turn .fighter-name small::before {content:"";display:inline-block;margin-right:5px;border:4px solid transparent;border-left:6px solid var(--mark);border-right:0}
.vitals {gap:15px;flex:none}
.hand-count,.life {font-size:.71rem;color:#e6e5d7}
.hand-count b {font-family:var(--mono);color:#fff}
.life {gap:5px;position:relative;font-weight:700}
.life b {display:grid;place-items:center;min-width:33px;height:33px;padding:0 4px;border-radius:50%;border:2px solid var(--mark);outline:1px solid #e3d6b340;outline-offset:2px;color:#fff3cb;font:italic 800 1.49rem/1 var(--race)}
.mat-half {display:grid;grid-template-columns:minmax(45px,11%) minmax(0,1fr) minmax(45px,11%);grid-template-areas:"gauge monsters stock" "gauge fighter stock";gap:4px 12px;align-items:center;padding:5px 0}
.opponent .mat-half {grid-template-areas:"stock fighter gauge" "stock monsters gauge"}
.monster-row {grid-area:monsters;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:6px;padding-block:7px}
.field-slot {position:relative;min-width:0;text-align:center;color:#f8f4e4}
.monster-slot {--socket:polygon(8% 15%,52% 0,90% 18%,90% 79%,51% 100%,9% 80%);height:118px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;isolation:isolate}
.monster-slot:nth-child(2) {top:-7px}
.opponent .monster-slot:nth-child(2) {top:7px}
.monster-slot::before,.monster-slot::after {content:"";position:absolute;z-index:-1;pointer-events:none;left:50%;top:50%;translate:-50% -50%;width:min(86%,124px);height:99%;clip-path:var(--socket);background:var(--zone-stroke)}
.monster-slot::after {width:min(calc(86% - 3px),121px);height:calc(99% - 3px);background:var(--zone-fill)}
.opponent .monster-slot::before,.opponent .monster-slot::after {transform:rotate(180deg)}
.occupied.monster-slot::before,.occupied.monster-slot::after {opacity:.16}
.zone-label {font-size:.72rem;font-weight:600;color:#e0dfc9;letter-spacing:.08em}
.occupied {text-align:left}
.occupied:hover .unit-text strong,.mat-leader:hover,.drop-stock:hover {color:#ffdfa3}
.unit-face {--rest-angle:rotate(90deg) scale(.85);position:relative;z-index:1;flex:none;width:clamp(49px,4.7vw,66px);height:clamp(68px,6.5vw,92px);object-fit:contain;filter:drop-shadow(1px 2px 2px #0009)}
.unit-face.deity-pair {display:grid;grid-template-rows:repeat(2,minmax(0,1fr))}
.deity-pair .deity-half {width:100%;height:100%;object-fit:contain}
.rested .unit-face {transform:var(--rest-angle)}
.unit-text {display:grid;gap:2px;max-width:60%;min-width:0;line-height:1.24}
.unit-text small {font-size:.58rem;color:#e2ddc4}
.unit-text strong {font-size:.72rem}
.field-combat {display:flex;gap:1px 5px;flex-wrap:wrap;font-size:.57rem;color:#e5e1ce}
.field-combat span {white-space:nowrap}
.monster-slot.oppressed {
  background:repeating-linear-gradient(125deg,#ffcd570c 0 5px,transparent 5px 12px),radial-gradient(ellipse at 50% 0,#90352188,transparent 72%);
  box-shadow:inset 0 2px #ffcc60,inset 0 -2px #ab3728;
}
.monster-slot.oppressed::after {
  content:attr(data-control);position:absolute;z-index:2;left:0;top:0;padding:2px 9px 2px 4px;
  color:#26150d;background:linear-gradient(100deg,#ffed95,#ef932f);
  font:700 .65rem/1.25 system-ui,sans-serif;clip-path:polygon(0 0,100% 0,calc(100% - 6px) 100%,0 100%);
  pointer-events:none;
}
.monster-slot .unit-text {max-width:100%;justify-items:center;gap:1px;text-align:center}
.monster-slot .unit-text small {position:absolute;top:6px;right:1px;max-width:32%;font-size:.56rem}
.fighter-zone {grid-area:fighter;display:flex;justify-content:center;align-items:center;gap:clamp(12px,2.1vw,33px);min-height:43px}
.opponent .fighter-zone {flex-direction:row-reverse}
.mat-leader.flag-stack-count {
  min-height:32px;padding:4px 12px;color:#ffe4a1;white-space:nowrap;
  background:linear-gradient(115deg,#774018 0 5%,#f8bc59 5% 8%,#253b52 8%,#0a1827 72%,#604221);
  border-block:1px solid #d69a4c;clip-path:polygon(8px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px);
}
.mat-leader.flag-stack-count:is(:hover,:focus-visible) {color:white;filter:brightness(1.3);box-shadow:inset 0 0 0 2px #ffcf72}
.mat-leader {display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:42px;min-width:0;font-size:.68rem;color:#e4e3d4;font-weight:650}
.side-print {width:25px;height:35px;object-fit:contain;filter:drop-shadow(1px 2px 2px #0f1514ac)}
.item-slot {min-width:61px;min-height:37px;display:flex;align-items:center;justify-content:center;gap:5px}
.item-slot.empty {border-bottom:1px solid var(--zone-stroke)}
.item-slot .zone-label {font-size:.67rem}
.item-slot .unit-face {width:33px;height:46px}
.item-slot .unit-text {max-width:95px}
.stock-column {grid-area:stock;align-self:stretch;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border-left:1px solid #e0d1b02c}
.opponent .stock-column {flex-direction:column-reverse;border-left:none;border-right:1px solid #e0d1b02c}
.gauge-stock,.deck-stock,.drop-stock {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;color:#f2ead4}
.gauge-stock {grid-area:gauge;position:relative}
.gauge-stock>span:last-child,.deck-stock>span:last-child,.drop-stock>span:last-child {font-size:.67rem;line-height:1.2;white-space:nowrap}
.gauge-stock>span:last-child {font-size:.76rem}
.gauge-stock b,.deck-stock b,.drop-stock b {font-family:var(--mono);color:white}
.pile-art {position:relative;display:block;flex:none;width:24px;height:33px;margin:3px 0 5px}
.pile-art img {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transform:translate(calc(var(--layer)*1px),calc(var(--layer)*-1.5px));filter:drop-shadow(1px 1px 0 #352d24)}
.gauge-stock .pile-art {width:35px;height:47px;transform:rotate(-76deg);margin:0 0 4px}
.gauge-stock .pile-art img {transform:translate(calc(var(--layer)*-3px),calc(var(--layer)*1px))}
.pile-art:empty {border:1px dashed #d7cbb47a}
.drop-stock {min-width:48px;min-height:44px}
.drop-top,.drop-stock>i {width:23px;height:30px;object-fit:contain}
.drop-stock>i {border:1px dashed #d7cbb47a;rotate:4deg}
.battle-strip {display:flex;align-items:center;justify-content:center;gap:10px;min-height:18px;padding-inline:12px;background:#1b2221}
.battle-strip::before,.battle-strip::after {content:"";height:1px;width:32%;background:#d7c69a70}
.battle-strip span {white-space:nowrap;font:italic 800 .76rem/1 var(--race);letter-spacing:.16em;text-transform:uppercase;color:#d9ccaa}
.battle-strip strong {font-size:.78rem;color:#fff1ca;text-align:center}
.target {outline:2px solid #ffc655;outline-offset:1px}
.hand {margin-top:18px}
.hand-head {align-items:baseline;gap:10px;margin-bottom:6px}
.hand-head h2 small {font-weight:500;font-size:.75rem}
.hand-head .micro {font-size:.72rem}
.hand-list {--print-height:clamp(115px,10vw,150px);display:flex;align-items:flex-start;gap:10px;overflow:auto;padding:6px 4px 10px;scrollbar-width:thin}
.hand-card {display:flex;align-items:flex-start;flex-direction:column;gap:3px;text-align:left;flex:0 0 calc(var(--print-height)*.715);min-width:0}
.hand-card.impact {flex-basis:calc(var(--print-height)*1.4)}
.hand-face {display:block;width:100%;height:var(--print-height);object-fit:contain;filter:drop-shadow(1px 2px 2px #29251c30)}
.hand-kind {margin-top:2px;font-size:.65rem;font-weight:650;color:var(--muted)}
.hand-card strong {font-size:.78rem;line-height:1.35;overflow-wrap:anywhere}
.hand-card:hover strong {color:var(--red)}
.rail .panel {padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--rule)}
.rail .panel:last-child {border-bottom:none}
.rail h2 {font-size:1.06rem;margin-bottom:8px}
.rail .actions {align-items:flex-start;gap:0 13px}
.rail .btn {min-height:33px}
.rail .danger {color:var(--red)}
.record {margin:0;padding:0;list-style:none;max-height:340px;overflow-y:auto;scrollbar-width:thin}
.record li {display:grid;grid-template-columns:25px 1fr;gap:4px;padding:7px 0;font-size:.78rem;line-height:1.5;overflow-wrap:anywhere}
.record li+li {border-top:1px dotted #cac1ae}
.record small {color:var(--red);font:700 .66rem/1.9 var(--mono)}
.result {margin-block:12px}
.result .actions {margin-top:5px}
.flag-ceremony,.call-layer {position:absolute;z-index:5;inset:0;isolation:isolate;overflow:hidden;pointer-events:none}
.flag-ceremony {display:flex;gap:clamp(18px,4vw,60px);align-items:center;justify-content:center;background:#131814a8}
.flag-ceremony img {height:58%;max-width:30%;object-fit:contain;filter:drop-shadow(0 7px 5px #0b1013a8)}
.flag-ceremony strong,.call-ribbon {position:absolute;z-index:1;color:var(--sheet);background:#2b2521;padding:4px 18px 7px;box-shadow:5px 4px 0 var(--red);transform:rotate(-4deg)}
.flag-ceremony strong {top:53%;font:italic 800 clamp(2rem,5.5vw,5rem)/1 var(--race);text-transform:uppercase}
.call-ribbon {left:10%;top:40%;display:grid;gap:4px}
.call-ribbon b {font:italic 800 clamp(1.4rem,3vw,3.3rem)/.9 var(--race);color:#f8d150;text-transform:uppercase}
.call-ribbon span {font-size:clamp(.85rem,1.6vw,1.5rem);font-weight:800}
.call-face {position:absolute;top:5%;right:16%;width:30%;height:90%;object-fit:contain;filter:drop-shadow(2px 4px 3px #161710aa)}
.call-trail {position:absolute;inset:9% 2% 8%;background:#dbb54f;mask:url("/art/buddy-emblem.webp") center/contain no-repeat}
.buddy-call .call-trail {mask-image:var(--crest);background:var(--mark)}
.impact-call .call-trail {background:#e8442e}
.punisher .call-trail {inset:5% -6%;background:linear-gradient(175deg,#ed4a25 20%,#ffc658 46%,#fff7cc 52%,#ffbe46 55%,#ca241b 72%);mask:none;clip-path:polygon(0 88%,39% 51%,20% 60%,76% 19%,62% 34%,100% 7%,82% 29%,90% 26%,30% 77%,42% 62%);filter:drop-shadow(2px 4px 0 #201812)}
.drill .call-trail {inset:18% 4%;mask:none;background:none;transform:rotate(-10deg)}
.drill .call-trail::before {content:"";position:absolute;inset:12% 0 18%;background:linear-gradient(0deg,#da6b21,#ffdf80 42%,#fff5c3 57%,#c56821);clip-path:polygon(0 10%,100% 51%,0 97%,19% 55%)}
.drill .call-trail>i {position:absolute;left:29%;top:18%;width:8%;height:61%;border:clamp(3px,.5vw,7px) solid #fff1b0;border-left-color:#c77824;border-radius:50%;rotate:-21deg}
.drill .call-trail>i:nth-child(2) {left:46%;top:25%;width:6.5%;height:46%}
.drill .call-trail>i:nth-child(3) {left:64%;top:32%;width:4.5%;height:32%}
.impact-call .call-face {top:12%;height:70%;width:48%;right:9%}
.attack-stroke {position:absolute;z-index:3;pointer-events:none;height:8px;transform-origin:0 50%;background:#f9d060;clip-path:polygon(0 22%,92% 0,100% 48%,57% 48%,9% 100%,22% 57%)}
.life-delta {position:absolute;top:0;right:75%;z-index:4;padding:0 5px;background:#9c2424;color:#fff;font:italic 800 1.2rem/1.3 var(--race)}
.life-delta.gain {background:#276042}
.charged-card {position:absolute;z-index:5;pointer-events:none;left:28%;top:0;width:28px;height:39px;background:url("/art/buddyfight-back.webp") center/contain no-repeat}

@media(min-width:1550px) {
  .cover-art {left:calc(50% - 86px)}
  .hall-inner {min-height:445px}
}
@media(max-width:980px) {
  :root {--edge:clamp(20px,4.4vw,44px)}
  .board-layout {grid-template-columns:minmax(0,1fr)}
  .rail {display:grid;grid-template-columns:minmax(140px,1fr) 2fr;gap:18px}
  .rail .panel {border-top:1px solid var(--rule);border-bottom:0;padding-top:11px}
  .record {max-height:165px}
  .unit-face {width:54px;height:75px}
  .hall h1 {font-size:clamp(3.2rem,7vw,4.5rem)}
  .starter {grid-template-columns:43% 1fr}
}
@media(max-width:720px) {
  .deck-prints.expansion-prints {grid-template-columns:repeat(auto-fit,minmax(min(116px,100%),1fr))}
  .expansion-prints .print-link-label {display:none}
  .expansion-prints .row-print {padding-inline:3px;font-size:.8rem}
  .mast-inner {min-height:58px}
  .brand img {width:93px}
  .brand span {font-size:9px}
  nav button {font-size:.78rem}
  nav button[aria-current=page]::after {bottom:6px}
  .hall-inner {min-height:294px;padding-block:26px}
  .hall-intro {width:51%}
  .hall h1 {margin:6px 0 10px}
  .hall-copy {font-size:.81rem}
  .hall-commands {gap:8px;margin-top:16px}
  .hall-commands .btn {font-size:.84rem;min-height:44px}
  .create-action {min-width:116px;padding:9px 12px}
  .loadout {margin-top:11px}
  .starter {grid-template-columns:41% 1fr;padding-block:9px}
  .pack-art {height:130px}
  .starter-words>strong {font-size:1.83rem}
  .starter-words em {font-size:1.03rem}
  .pick-state,.open-list {margin-top:9px}
  .starter-words small {font-size:.68rem}
  .buddy-caption>span[lang=en] {display:none}
  .deck-prints {grid-template-columns:repeat(4,minmax(0,1fr))}
  .section {margin-block:23px}
  .seat {grid-template-columns:40% 1fr;padding:9px 3%;min-height:145px}
  .seat .pack-art {height:110px}
  .versus {font-size:1.5rem}
  .monster-slot {height:99px}
  .unit-face {width:43px;height:60px}
}
@media(max-width:560px) {
  .booster-entry {grid-template-columns:minmax(76px,28%) 1fr auto;gap:9px;margin-top:7px;padding:12px 0}
  .booster-title strong {font-size:1.25rem}
  .booster-link,.booster-title small {font-size:.68rem}
  :root {--edge:17px}
  .mast-inner {gap:7px}
  .brand {gap:6px}
  .brand img {width:82px}
  .brand span {padding:3px 0 3px 7px;letter-spacing:.07em}
  nav {gap:13px}
  .hall {display:flex;flex-direction:column}
  .cover-art {position:relative;inset:auto;order:0;width:100%;height:clamp(159px,40vw,218px);z-index:0;clip-path:polygon(0 0,100% 0,100% 93%,83% 96%,87% 94%,61% 98%,65% 96%,30% 100%,34% 98%,0 100%)}
  .cover-art::after {inset:auto 0 0;height:9%;clip-path:polygon(0 85%,36% 60%,31% 83%,64% 38%,60% 59%,87% 12%,83% 32%,100% 1%,100% 100%,0 100%)}
  .cover-paint {object-position:53% 44%}
  .danger-scene .rouga {left:47%;height:161%;top:0}
  .danger-scene .cerberus {left:13%;width:46%;height:95%}
  .hall-inner {order:1;min-height:0;padding:16px 0 18px}
  .hall-intro {width:100%}
  .hall::before {width:100%;inset:45% auto -9% 12%;opacity:.12;mask-size:auto 100%}
  .fight-call {font-size:1rem}
  .fight-call::before {width:23px;height:3px}
  .hall h1 {font-size:clamp(2.8rem,11.5vw,3.8rem);margin:4px 0 7px}
  .hall-copy {font-size:.81rem}
  .hall-commands {margin-top:12px;gap:13px}
  .loadout {margin-top:8px}
  .section-head {margin-bottom:4px}
  .section-head h2 {font-size:1.13rem}
  .meta {font-size:.72rem}
  .world-stage {grid-template-columns:1fr}
  .starter {grid-template-columns:minmax(105px,35%) 1fr;padding:9px 0;min-height:120px}
  .starter+.starter::before {top:0;bottom:auto;left:0;right:0;width:auto;height:1px}
  .pack-art {height:110px}
  .pack-box {left:41%}
  .pack-print {left:48%;max-width:40%;height:65%}
  .starter-words {display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:7px;align-content:center;align-items:center;width:100%;padding:0 3px 0 8px}
  .starter-words small,.starter-words>strong,.starter-words>em {grid-column:1}
  .starter-words>strong {font-size:clamp(1.56rem,6vw,2.1rem);line-height:1.33}
  .pick-state,.open-list {grid-column:2;grid-row:1/4;font-size:.69rem;margin:0;flex-direction:column;gap:4px}
  .showcase {align-items:flex-start;flex-direction:column;gap:0;padding-top:10px}
  .showcase .btn {min-height:32px}
  .showcase .actions {gap:14px}
  .foot {padding:14px 0 20px;gap:7px}
  .foot>div {gap:12px}
  .foot>span {font-size:.9rem}
  .flag-dock {margin-block:16px 18px}
  .collection-head,.room-top {padding:21px 0 4px}
  .collection-head h1,.room-top h1 {font-size:2.1rem}
  .section-head .meta {max-width:50%;text-align:right}
  .seat {min-height:175px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px}
  .seat .pack-art {height:80px;width:92px}
  .seat-text {text-align:center;justify-items:center;gap:0;width:100%}
  .vacancy-mark {height:66px;width:auto;margin:5px}
  .ready-rail label {width:100%;display:grid;gap:4px}
  .ready-rail select {width:100%}
  .list-cover {padding-right:16%}
  .deck-prints {grid-template-columns:repeat(3,minmax(0,1fr));gap:13px 8px}
  .deck-leaders {gap:6px}
  .leader-face {width:25px;height:35px}
  .deck-leader {gap:6px}
  .deck-leader strong {font-size:.78rem}
  .deck-print button strong {font-size:.75rem}
  .print-meta small,.row-print {font-size:.64rem}
  .inspector.with-face {grid-template-columns:minmax(92px,34%) 1fr;gap:14px}
  .inspector h2 {font-size:1.3rem}
  .card-facts {gap:6px 11px}
  .effect-copy {font-size:.87rem}
  .print-id {font-size:.65rem}
  .print-en {font-size:1rem}
  .duel-head {align-items:center;padding-top:14px}
  .duel-head h1 {font-size:1.12rem}
  .duel-head .meta {font-size:.66rem}
  .phase-line {gap:7px;margin:7px 0 9px}
  .phase-steps {gap:11px}
  .phase-line .actions {gap:12px}
  .phase-line .btn {min-height:37px;padding:6px 12px;font-size:.8rem}
  .phase-line .quiet {padding-inline:0}
  .phase-line .micro {font-size:.73rem}
  .board-layout {gap:11px}
  .arena {margin-inline:calc(9px - var(--edge))}
  .side {padding:5px 7px}
  .fighter-line {min-height:26px}
  .fighter-name strong {font-size:.8rem}
  .fighter-crest {width:20px;height:20px}
  .vitals {gap:8px}
  .life b {min-width:26px;height:26px;font-size:1.12rem}
  .mat-half {grid-template-columns:34px minmax(0,1fr) 34px;gap:3px;padding:2px 0}
  .monster-row {gap:1px;padding-block:5px}
  .monster-slot {height:77px}
  .monster-slot::before {width:83%}
  .monster-slot::after {width:calc(83% - 2px)}
  .monster-slot.occupied {flex-direction:column;gap:1px}
  .unit-face {width:37px;height:52px}
  .unit-text {max-width:100%;text-align:center}
  .unit-text small,.field-combat {display:none}
  .unit-text strong {font-size:.63rem;line-height:1.16}
  .fighter-zone {min-height:32px;gap:8px}
  .side-print {width:16px;height:23px}
  .mat-leader {font-size:.59rem;gap:3px;min-height:34px}
  .item-slot {min-width:37px;min-height:27px}
  .item-slot .zone-label,.zone-label {font-size:.58rem}
  .item-slot .unit-face {width:21px;height:29px}
  .item-slot .unit-text {max-width:50px}
  .stock-column {gap:4px;border:0}
  .opponent .stock-column {border:0}
  .pile-art {width:18px;height:25px;margin-bottom:2px}
  .gauge-stock .pile-art {width:21px;height:29px}
  .drop-stock {min-width:32px;min-height:32px}
  .drop-stock>i,.drop-top {width:16px;height:21px}
  .gauge-stock>span:last-child,.deck-stock>span:last-child,.drop-stock>span:last-child {font-size:.57rem}
  .battle-strip {min-height:14px}
  .battle-strip span {font-size:.64rem}
  .hand {margin-top:10px}
  .hand-list {--print-height:110px;gap:8px}
  .rail {grid-template-columns:1fr;gap:0}
  .rail .panel {padding:8px 0 0;margin:0 0 8px}
}
@media(max-width:360px) {
  :root {--edge:12px}
  nav {gap:10px}
  .brand span {display:none}
  .starter-words {padding-left:5px}
  .starter {grid-template-columns:32% 1fr}
  .monster-slot {height:70px}
  .unit-face {width:33px;height:46px}
  .deck-prints {grid-template-columns:repeat(2,minmax(0,1fr))}
  .inspector.with-face {grid-template-columns:minmax(80px,32%) 1fr;gap:10px}
  .modal-frame {padding:18px 14px}
}
@media(hover:hover) and (prefers-reduced-motion:no-preference) {
  .pack-print,.pack-box,.hand-face,.gallery-face {transition:transform .23s cubic-bezier(.18,.72,.22,1)}
  .starter:hover .pack-print {transform:translate(4px,-4px) rotate(16deg)}
  .starter:hover .pack-box {transform:translate(-50%,-2px) rotate(-5deg)}
  .hand-card:hover .hand-face,.deck-print button:hover .gallery-face {transform:translateY(-3px) rotate(-1deg)}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {scroll-behavior:auto!important}
}

/* Browse a full print run without stretching the dialog on small screens. */
.full-editor,.full-editor>* {min-width:0}
.full-editor select,.full-editor input {max-width:100%;min-width:0}
.full-editor [data-leaders] {display:grid;gap:10px;overflow-wrap:anywhere}
.full-editor [data-leaders]>.edit-card {padding:10px;border-inline-start:4px solid #ffb528;background:linear-gradient(110deg,#95331955,transparent)}
.full-editor .print-choice {display:grid;grid-template-columns:minmax(0,1fr) 4.5rem;gap:8px 12px;align-items:center;padding:12px 0;border-top:1px solid var(--rule)}
.print-choice summary {cursor:pointer;overflow-wrap:anywhere}
.print-choice summary small {display:block}
.print-choice details[open] {grid-column:1/-1}
.print-choice details p {white-space:pre-line;overflow-wrap:anywhere}
.print-choice button {grid-column:1/-1;justify-self:start}
.print-choice button[aria-pressed=true] {color:#141c2a;background:#ffbd35}
.full-editor [data-results]>.line-head {margin:10px 0}
.full-editor .line-head {flex-wrap:wrap;gap:8px}
.collection-head {flex-wrap:wrap}

/* Keep the official file intact. Rotate within the card slot so resting
   the card and playing entrance animations still act on the outer frame. */
.art-frame {container-type:size;display:grid;place-items:center;grid-template:100% / 100%;overflow:hidden}
.art-frame.clockwise {--art-angle:90deg}
.art-frame.counterclockwise {--art-angle:-90deg}
.art-frame.art-frame>img {position:static;inset:auto;width:100cqh;height:100cqw;max-width:none;max-height:none;object-fit:contain;transform:rotate(var(--art-angle));place-self:center}
.detail-face.art-frame {aspect-ratio:88/63}
