:root{font-family:Georgia,'Times New Roman',serif;color:#e7e5d7;background:#07171d;font-synthesis:none;--gold:#d6af66;--muted:#9baba9;--edge:#6d6550;--panel:#0d2228;--panel2:#132d31;--light:#e9dbc0}
*{box-sizing:border-box}body{margin:0;min-width:320px}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}.shell{min-height:100vh;background:radial-gradient(circle at 45% 38%,#284147 0,#10282d 42%,#06171c 100%);position:relative}.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 26px;background:linear-gradient(90deg,#06141a,#122b2e 50%,#06141a);border-bottom:1px solid #9e855a;box-shadow:0 3px 20px #0008}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:40px;height:40px;border:2px solid var(--gold);transform:rotate(45deg);color:var(--gold);font-size:27px}.brand-mark::first-letter{transform:rotate(-45deg)}.brand strong{font-size:20px;letter-spacing:.17em;color:var(--light);line-height:1}.brand small{display:block;font:10px Arial,sans-serif;letter-spacing:.27em;color:var(--gold);margin-top:4px}.status,.subtle,.eyebrow,.arena-top,.zone-label,.phase,.hand-header,.skill,.stack,.tabs,.inspector-head,.inspector-stats,.source-link,.control-bar,.modal-title,.catalog label,.catalog-list small,.support,.catalog-note{font-family:Arial,Helvetica,sans-serif}.status{display:flex;align-items:center;gap:8px;color:#e3d2af;font-size:12px;letter-spacing:.15em;text-transform:uppercase}.status-dot{width:7px;height:7px;border-radius:50%;background:#d9b97f;box-shadow:0 0 10px #d9b97f}.subtle{border:1px solid #796d53;background:#182d31;color:#d9cfba;padding:9px 14px;text-transform:uppercase;letter-spacing:.08em;font-size:11px}.subtle:hover,.tabs button:hover{background:#244146}.layout{display:grid;grid-template-columns:minmax(600px,1fr) 340px;max-width:1500px;margin:auto;min-height:calc(100vh - 68px)}.arena{padding:14px 22px 20px;position:relative;background:repeating-linear-gradient(135deg,transparent 0 39px,#fff1 40px 41px),radial-gradient(ellipse at center,#284547 0,#183439 50%,#0e262b 100%);border-left:1px solid #9e855a55;border-right:1px solid #9e855a55}.arena:before{content:'';position:absolute;inset:48px 22px 55px;border:1px solid #d0b57633;pointer-events:none}.arena-top{display:flex;justify-content:space-between;color:#b6b49e;font-size:10px;letter-spacing:.15em;margin:2px 3px 12px}.duelist{position:relative;padding:9px 20px 7px;max-width:770px;margin:auto}.duelist.opponent{border-bottom:1px solid #bb9b6666}.duelist.self{border-top:1px solid #bb9b6666}.duelist-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.duelist-meta strong{display:block;font-size:20px;letter-spacing:.04em}.eyebrow{font-size:9px;letter-spacing:.2em;color:var(--gold);display:block;margin-bottom:3px}.skill-name{display:block;color:#aebcbb;font:11px Arial,sans-serif;margin-top:2px}.lp{color:#f6e9cb;font-size:26px;letter-spacing:.02em}.lp small{font:10px Arial,sans-serif;color:#d6af66;margin-right:8px;letter-spacing:.12em}.board-line{display:flex;justify-content:center;gap:12px}.side-line{align-items:center;margin-bottom:11px}.stack,.skill{border:1px solid #9d875d77;background:linear-gradient(#17353b,#0d262a);color:#aebdb7;padding:7px 10px;font-size:10px;letter-spacing:.08em;min-width:70px;text-align:center}.stack b{display:block;color:#e2d5b9;font-size:14px;margin-top:2px}.skill{min-width:150px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.skill.up{border-color:var(--gold);color:#f4e1b5}.skill span{display:block;font-size:9px;color:var(--gold);margin-bottom:3px}.skill b{font-weight:600;font-size:11px}.zones{margin-bottom:7px}.zone{width:104px;height:140px;position:relative;border:1px solid #c3ab7659;background:linear-gradient(140deg,#1130368c,#091f25b5);box-shadow:inset 0 0 0 3px #0004,inset 0 0 20px #0006;padding:8px;display:grid;place-items:center}.zone-label{position:absolute;top:2px;left:4px;color:#9a9f91;font-size:8px;letter-spacing:.15em;z-index:1}.zone-empty{font-size:28px;color:#d9c29334}.card{display:flex;flex-direction:column;position:relative;width:78px;height:110px;padding:3px;border:2px solid #332621;border-radius:3px;box-shadow:0 2px 5px #000a;background:#bf8b48;color:#1d1711;text-align:left;overflow:hidden;flex:none;transition:transform .14s,box-shadow .14s}.card:hover{transform:translateY(-4px);box-shadow:0 5px 12px #000d}.card.selected{outline:3px solid #e8dcae;box-shadow:0 0 14px #eac077a8}.card.defense{transform:rotate(90deg) scale(.85)}.card.defense:hover{transform:rotate(90deg) scale(.85) translateY(-3px)}.card.spell{background:#398e8d}.card.trap{background:#9a547e}.card.back{background:repeating-radial-gradient(circle at center,#8a512e 0 3px,#422919 5px 9px,#bd7b43 11px 13px);border:3px solid #b49468;align-items:center;justify-content:center}.card-top{font:bold 7.2px Georgia,serif;line-height:1.08;min-height:17px;background:#f7ebcfb0;padding:2px}.card-symbol{font:6px Arial,sans-serif;min-height:11px;padding-top:3px;text-align:right}.card-art{display:grid;place-items:center;flex:1;background:radial-gradient(circle,#f3d7a7aa,#764f3577 64%,#342824aa);border:1px solid #3d2d24;color:#f4d697;font-size:30px;text-shadow:0 0 9px #ffdd91}.card.spell .card-art{background:radial-gradient(circle,#c4efdd8a,#075e6888)}.card.trap .card-art{background:radial-gradient(circle,#f1c6e08a,#542547aa)}.card-bottom{font:bold 7px Arial,sans-serif;background:#f9edcfbf;min-height:12px;text-align:right;padding:2px}.back-mark{color:#f9d39d;font:bold 20px Georgia;text-shadow:0 0 5px #301808;transform:rotate(-25deg)}.hand-header{display:flex;justify-content:space-between;font-size:9px;color:#d4c7a9;letter-spacing:.12em;margin:10px 0 5px}.hand{display:flex;justify-content:center;gap:6px;min-height:114px;overflow-x:auto;padding:1px 1px 8px}.hand .card{width:70px;height:98px}.hand .card-art{font-size:23px}.phase-rail{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:770px;margin:6px auto;padding:9px 15px;border-top:1px solid #c9a56577;border-bottom:1px solid #c9a56577;background:#071d22a8}.phase-track{display:flex;align-items:center;gap:5px}.phase{border:1px solid #77847177;color:#b7bfad;font-size:9px;letter-spacing:.08em;padding:7px 9px}.phase.active{border-color:#d3aa62;background:#bc8b4533;color:#ffe0a4}.turn-owner{font:9px Arial,sans-serif;letter-spacing:.12em;color:#a8b1ab;text-align:right}.turn-owner b{display:block;color:#f1ddaa;font-size:12px;margin-top:3px}.control-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:770px;margin:8px auto 0;padding:0 4px}.window-note{font-size:11px;color:#c9c9b8;letter-spacing:.02em}.primary{border:1px solid #f0cf8a;background:linear-gradient(#a77d3c,#755124);color:#fff0c8;text-transform:uppercase;letter-spacing:.12em;padding:12px 17px;font:bold 11px Arial,sans-serif;white-space:nowrap;box-shadow:inset 0 1px #fff5,0 3px 10px #0008}.primary:hover{filter:brightness(1.2)}.sidebar{background:linear-gradient(#112b30,#071d22);border-right:1px solid #9e855a66;display:flex;flex-direction:column;min-width:0}.tabs{display:flex;border-bottom:1px solid #9e855a66}.tabs button{flex:1;background:transparent;border:0;border-right:1px solid #7d765a44;color:#aebcba;padding:18px 4px;font-size:10px;letter-spacing:.13em}.tabs button.active{color:#f0d5a2;box-shadow:inset 0 -3px var(--gold)}.panel-content{padding:22px;overflow-y:auto;max-height:calc(100vh - 123px)}.empty-inspector{text-align:center;padding:70px 12px;color:#aebcba}.empty-inspector span{font-size:48px;color:#d3ab67}.empty-inspector h3{font-size:20px;color:#e9dbc0;font-weight:normal}.empty-inspector p{font:12px/1.6 Arial,sans-serif}.inspector-card{border:1px solid #8e7658;background:linear-gradient(140deg,#20383b,#0e252b);padding:18px;box-shadow:inset 0 0 40px #0005}.inspector-head{display:flex;justify-content:space-between;gap:10px;font-size:10px;letter-spacing:.07em;color:var(--gold)}.inspector-card h2{font-size:23px;margin:18px 0 9px;font-weight:normal;color:#f2e5c8;line-height:1.1}.inspector-stats{color:#c5c6b8;font-size:10px;line-height:1.5;text-transform:uppercase}.card-text{font-size:13px;line-height:1.55;border-top:1px solid #87765c66;padding-top:17px;margin:20px 0}.source-link{display:inline-block;color:#e1bd78;font-size:10px;letter-spacing:.08em;text-decoration:none}.support{font-size:9px;white-space:nowrap;padding:4px 6px;border:1px solid}.support.yes{color:#addeb8;border-color:#6a9a76}.support.no{color:#e2b59a;border-color:#a47457}.action-list{display:grid;gap:7px;margin-top:14px}.action{width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid #ab8f5d;background:#244045;color:#f1e4ca;text-align:left;padding:12px 14px;font:12px Arial,sans-serif}.action:hover,.modal-options button:hover{background:#34595d}.action span{font-size:17px;color:var(--gold)}.muted{font:12px/1.5 Arial,sans-serif;color:#9caaa4}.log{list-style:none;padding:0;margin:0}.log li{font:12px/1.45 Arial,sans-serif;border-bottom:1px solid #a4936544;padding:11px 0;color:#d8d7c8}.catalog label{display:block;color:var(--gold);font-size:10px;letter-spacing:.12em;margin-bottom:10px}.catalog input{width:100%;border:1px solid #9e855a;background:#091d22;color:#eee5d0;padding:10px;outline:0}.catalog input:focus{border-color:#ecc27d}.catalog-list{margin-top:13px;max-height:60vh;overflow:auto}.catalog-list button{display:flex;justify-content:space-between;gap:9px;width:100%;background:transparent;border:0;border-bottom:1px solid #8e76583f;padding:9px 2px;color:#e7e0d0;text-align:left;font:12px Arial,sans-serif}.catalog-list button:hover{color:#ffdb9b}.catalog-list small{color:#9db2ab;font-size:10px}.catalog-note{font-size:10px;line-height:1.5;color:#95a5a0}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:10;padding:12px 14px;background:#482e2b;border:1px solid #d19377;box-shadow:0 5px 15px #0009;font:12px Arial,sans-serif;color:#fff1e7;display:flex;gap:20px;max-width:90vw}.toast button{border:0;background:transparent;color:#fff;font-size:20px}.modal-backdrop,.end-overlay{position:fixed;inset:0;z-index:8;background:#030f12d9;display:grid;place-items:center;padding:18px}.modal{width:min(440px,100%);max-height:85vh;overflow:auto;background:linear-gradient(140deg,#1c3d41,#0a2027);border:2px solid #c1a16a;box-shadow:0 12px 40px #000;padding:20px}.modal-title{display:flex;justify-content:space-between;color:var(--gold);letter-spacing:.15em;font-size:10px}.modal-title button{border:0;background:transparent;color:#ebdbbc;font-size:24px}.modal h2{font-size:25px;font-weight:normal;color:#f0e0bf;margin:15px 0}.modal p{font:12px/1.5 Arial,sans-serif;color:#bac8c1}.modal-options{display:grid;gap:7px;max-height:50vh;overflow:auto}.modal-options button{display:flex;justify-content:space-between;background:#254145;border:1px solid #8e7858;color:#f0e5cf;padding:12px;text-align:left;font:12px Arial,sans-serif}.modal-options span{color:var(--gold)}.end-overlay>div{text-align:center;border:2px solid var(--gold);padding:45px 55px;background:#132c30;box-shadow:0 0 40px #000}.end-overlay h1{font-size:35px;color:#fff0c9;font-weight:normal}
@media(max-width:1000px){.layout{grid-template-columns:1fr}.sidebar{border-top:1px solid #9e855a}.panel-content{max-height:none}.arena{padding:12px 8px}.arena:before{inset:45px 6px 50px}.topbar{padding:0 12px}.status{display:none}}
@media(max-width:600px){.topbar{height:60px}.brand strong{font-size:15px}.brand-mark{width:32px;height:32px}.subtle{padding:8px;font-size:9px}.arena-top span:last-child{display:none}.duelist{padding:7px 2px}.duelist-meta strong{font-size:16px}.lp{font-size:20px}.board-line{gap:5px}.zone{width:30vw;max-width:88px;height:121px;padding:4px}.zone .card{width:69px;height:99px}.side-line{gap:4px}.stack{min-width:49px;padding:5px 2px;font-size:8px}.skill{min-width:100px;max-width:120px;padding:5px 3px}.hand{justify-content:flex-start}.phase-rail{padding:7px 3px;gap:3px}.phase-track{gap:2px}.phase{font-size:7px;padding:5px 3px}.turn-owner{font-size:7px}.turn-owner b{font-size:9px}.control-bar{flex-direction:column;align-items:stretch}.window-note{text-align:center}.primary{width:100%}}
@media(prefers-reduced-motion:reduce){.card{transition:none}}
@media(min-width:1001px){.duelist{padding-top:4px;padding-bottom:3px}.duelist-meta{margin-bottom:4px}.side-line{margin-bottom:5px}.zone{width:88px;height:87px;padding:3px}.zone .card{width:53px;height:72px}.zone .card-top{font-size:5.8px;min-height:13px}.zone .card-symbol{font-size:5px;min-height:7px}.zone .card-art{font-size:18px}.zone .card-bottom{font-size:5.8px;min-height:9px}.zones{margin-bottom:4px}.hand-header{margin:4px 0 2px}.hand{min-height:74px;padding-bottom:3px}.hand .card{width:50px;height:70px}.hand .card-top{font-size:5.4px;min-height:12px}.hand .card-symbol{font-size:5px;min-height:7px}.hand .card-art{font-size:18px}.hand .card-bottom{font-size:5.5px;min-height:8px}.hand .back-mark{font-size:15px}.phase-rail{margin:3px auto;padding:5px 10px}.phase{padding:5px 8px}.arena-top{margin-bottom:5px}.control-bar{margin-top:4px}.primary{padding:10px 14px}}
.card:has(.card-scan){padding:0;background:#15100d;border:1px solid #2c2722}.card-scan{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none}.counter-badge{position:absolute;right:0;bottom:0;background:#11252ee8;border:1px solid #e9bb70;color:#ffdfa5;font:bold 9px Arial,sans-serif;padding:2px 3px}.inspector-art{display:flex;justify-content:center;margin-top:18px}.inspector-art img{display:block;width:min(205px,100%);height:auto;box-shadow:0 7px 20px #000b;border:1px solid #bcaa84}
.mode-options{display:flex;gap:8px;margin:0 auto 18px;justify-content:center}.mode-options button{min-width:125px;min-height:46px;border:1px solid #987c52;background:#17353b;color:#d9d3c2;font:13px Arial,sans-serif}.mode-options button.active{border-color:#f6d28d;background:#68502c;color:#fff0ca}.ai-thinking{color:#e5d3aa;font:12px Arial,sans-serif;min-height:44px;display:flex;align-items:center}.control-bar .subtle{min-height:44px}.touch-actions{display:none}
button{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible{outline:3px solid #ffdc93;outline-offset:2px}.action,.modal-options button,.tabs button,.catalog-list button{min-height:44px}
@media(max-width:1000px){.touch-actions{display:block;position:fixed;left:0;right:0;bottom:0;z-index:6;background:#0b2429f5;border-top:2px solid #d0ac6c;padding:10px max(12px,env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom));box-shadow:0 -6px 22px #0009;max-height:min(48vh,380px);overflow-y:auto}.touch-actions-head{display:flex;justify-content:space-between;align-items:center;color:#f7e8c4;font-size:15px;gap:10px}.touch-actions-head button{min-width:44px;min-height:44px;background:transparent;border:0;color:#f7e8c4;font-size:26px}.touch-actions .action-list{display:flex;gap:8px;overflow-x:auto;margin:4px 0 0;padding-bottom:2px}.touch-actions .action{min-width:145px;width:auto;flex:0 0 auto;min-height:48px}.touch-actions .muted{align-self:center}.sidebar .action-list{display:none}.shell:has(.touch-actions) .arena{padding-bottom:145px}}
@media(max-width:600px){.control-bar .subtle{width:100%}.phase{min-height:27px}.modal-options button{min-height:52px}}
@media(min-width:1001px) and (max-height:850px){.duelist{padding-top:0;padding-bottom:0}.duelist-meta{margin-bottom:1px}.duelist-meta strong{font-size:17px}.side-line{margin-bottom:1px}.zone{height:64px}.zone .card{width:43px;height:57px}.hand{min-height:55px}.hand .card{width:42px;height:53px}.hand-header{margin:1px 0}.zones{margin-bottom:1px}.arena-top{margin-bottom:1px}.phase-rail{padding:3px 9px;margin:2px auto}.control-bar{margin-top:2px}.control-bar .primary{padding:8px 12px}}
html,body,#app{height:100%;width:100%;overflow:hidden}.shell{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.topbar{flex:none}.layout{flex:1;min-height:0;height:auto;width:100%;overflow:hidden}.arena{height:100%;min-height:0;overflow:hidden}.arena-stage{width:100%;transform-origin:top left}.sidebar{height:100%;min-height:0;overflow:hidden}.panel-content{flex:1;min-height:0;max-height:none;overflow-y:auto}.header-actions{display:flex;align-items:center;gap:6px}.panel-close,#open-panel{display:none}.card.armed{outline:3px solid #ffe27b;box-shadow:0 0 0 5px #d6af6655,0 0 22px #ffcf57;animation:target-pulse 1s ease-in-out infinite alternate}@keyframes target-pulse{to{box-shadow:0 0 0 8px #d6af6622,0 0 30px #ffcf57}}.card.armed:after{content:'TARGET';position:absolute;left:0;right:0;bottom:0;background:#584011e8;color:#fff4bf;font:bold 9px Arial,sans-serif;text-align:center;padding:2px}.touch-actions{display:block;position:fixed;z-index:6;left:50%;transform:translateX(-50%);bottom:8px;width:min(620px,calc(100% - 16px));padding:9px 12px;background:#0b2429f4;border:1px solid #d0ac6c;box-shadow:0 4px 25px #000b;max-height:30dvh;overflow:auto}.touch-actions-head{display:flex;align-items:center;gap:8px;color:#f6e6c4}.touch-actions-head strong{flex:1}.touch-actions-head button{border:1px solid #8e7858;background:#234045;color:#fff0c8;min-height:40px;min-width:44px;padding:4px 10px;font:12px Arial,sans-serif}.touch-actions .action-list{display:flex;gap:6px;overflow-x:auto;margin-top:7px}.touch-actions .action{min-width:125px;min-height:44px}.reaction-shade{position:fixed;inset:0;z-index:9;display:grid;place-items:center;padding:12px;background:#020b10ad}.reaction-prompt{width:min(430px,100%);max-height:85dvh;overflow:auto;border:2px solid #efc576;background:linear-gradient(145deg,#17383c,#081c22);box-shadow:0 16px 50px #000c;padding:18px}.reaction-prompt h2{font-size:25px;font-weight:normal;color:#fff0cd;margin:5px 0}.reaction-prompt p{font:12px/1.4 Arial,sans-serif;color:#c6d0c4}.reaction-list{display:grid;gap:7px;margin:12px 0}.reaction-list button{display:flex;align-items:center;gap:12px;min-height:62px;border:1px solid #ac8b56;background:#213f43;color:#f7e7c8;text-align:left;padding:5px;font:14px Arial,sans-serif}.reaction-list img{height:52px;width:37px;object-fit:cover}.reaction-list span{display:flex;flex-direction:column;gap:4px}.reaction-list small{color:#e5b870}.reaction-prompt>.subtle{width:100%;min-height:44px}
@media(max-width:1000px){.layout{display:block}.arena{padding:5px 4px}.arena:before{inset:28px 4px 8px}.sidebar{display:none;position:fixed;inset:50px 0 0;z-index:7;height:auto;background:#0a2025}.sidebar.open{display:flex}.panel-close{display:block;flex:0 0 44px!important;color:#f5ddb0!important;font-size:24px!important;padding:0!important}#open-panel{display:block}.sidebar .action-list{display:grid}.shell:has(.touch-actions) .arena{padding-bottom:5px}.touch-actions{left:0;right:0;bottom:0;transform:none;width:100%;max-height:33dvh;padding-bottom:calc(9px + env(safe-area-inset-bottom))}.topbar{height:50px;padding:0 6px;gap:5px}.brand{gap:7px}.brand-mark{width:27px;height:27px;font-size:17px}.brand strong{font-size:13px;letter-spacing:.1em}.brand small{font-size:7px;letter-spacing:.14em}.header-actions{gap:3px}.header-actions .subtle{padding:5px 6px;font-size:8px;min-height:36px}.arena-top{margin:0 0 2px;font-size:8px}.duelist{padding:1px 2px;max-width:500px}.duelist-meta{margin-bottom:1px}.duelist-meta strong{font-size:13px}.duelist-meta .skill-name{font-size:8px;margin-top:0}.eyebrow{font-size:7px;margin-bottom:1px}.lp{font-size:17px}.lp small{font-size:8px;margin-right:3px}.board-line{gap:4px}.side-line{margin-bottom:2px}.stack,.skill{min-width:48px;padding:2px 3px;font-size:7px;min-height:28px}.stack b{font-size:11px;margin:0}.skill{min-width:100px;max-width:125px}.skill span{font-size:7px;margin:0}.skill b{font-size:9px}.zone{width:min(24vw,77px);height:72px;padding:2px}.zone .card{width:50px;height:65px}.zones{margin-bottom:2px}.hand-header{margin:2px 0;font-size:8px}.hand{min-height:58px;gap:3px;padding:0 1px 2px;justify-content:center}.hand .card{width:42px;height:55px}.hand .card.defense{transform:none}.phase-rail{margin:2px auto;padding:3px;gap:4px}.phase{padding:4px 3px;font-size:7px;min-height:26px}.turn-owner{font-size:7px}.turn-owner b{font-size:9px;margin-top:1px}.control-bar{flex-direction:row;align-items:center;gap:4px;margin:3px auto 0}.window-note{font-size:9px;line-height:1.2;text-align:left;flex:1}.control-bar .primary,.control-bar .subtle{width:auto;max-width:55%;min-height:39px;padding:5px 7px;font-size:8px;white-space:normal}.control-bar .subtle{min-width:75px}.arena-stage{width:100%}}
@media(max-width:390px){.brand small{display:none}.header-actions .subtle{font-size:7px;padding:4px}.zone{width:23vw;height:67px}.zone .card{width:47px;height:61px}.hand{min-height:54px}.hand .card{width:40px;height:52px}}
@media(max-width:600px) and (min-height:750px){.zone{height:89px}.zone .card{width:60px;height:82px}.hand{min-height:67px}.hand .card{width:47px;height:64px}}
.field-slot{display:grid;place-items:center;min-width:56px;min-height:40px;border:1px solid #9d875d77;background:#0e282b;color:#d5bb80;font:8px Arial,sans-serif;letter-spacing:.08em}.field-slot .card{width:25px;height:35px}.field-slot .back-mark{font-size:10px}.field-slot .card.armed:after{font-size:5px}@media(max-width:1000px){.field-slot{min-width:45px;min-height:29px}.field-slot .card{width:22px;height:29px}.field-slot .back-mark{font-size:8px}}
.token-face{display:grid;place-items:center;width:100%;height:100%;background:radial-gradient(circle,#d5c590,#796237 67%,#322b1c);border:2px solid #ead39d;color:#fff2c4;text-align:center;font:bold 9px/1.2 Georgia,serif;padding:3px;text-shadow:0 1px 4px #000}.card:has(.token-face){background:#8e793f;padding:2px}
.deck-editor{font-family:Arial,Helvetica,sans-serif;color:#e7ddc9}.deck-editor h2{font:25px Georgia,serif;color:#f4e4bd;margin:0 0 8px}.deck-editor h3{font:12px Arial,sans-serif;color:#e1bc75;letter-spacing:.1em;margin:15px 0 6px}.deck-editor label{display:block;color:#e1bc75;font-size:10px;letter-spacing:.12em;margin:16px 0 7px}.deck-editor input{width:100%;border:1px solid #9e855a;background:#091d22;color:#eee5d0;padding:10px;min-height:44px}.deck-switch,.deck-skills{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0}.deck-switch button,.deck-skills button{border:1px solid #816f50;background:#203a3e;color:#ddd4c3;min-height:38px;padding:6px 9px;font:11px Arial,sans-serif}.deck-switch button.active,.deck-skills button.active{border-color:#f2ca80;background:#68502c;color:#fff0cb}.deck-count{border-block:1px solid #816f5088;padding:9px 0;color:#c9c4b5;font-size:11px}.deck-count b{color:#f5d28b}.deck-skills span{width:100%;font-size:10px;color:#c7ab75}.deck-current{max-height:135px;overflow-y:auto;border:1px solid #705c3d66;padding:3px 7px;background:#0a2025}.deck-row{display:flex;align-items:center;justify-content:space-between;min-height:31px;gap:6px;font-size:11px;border-bottom:1px solid #ffffff17}.deck-row b{color:#deb875}.deck-row button{min-width:31px;min-height:31px;border:0;background:#3d3025;color:#f8ddae;font-size:20px}.deck-candidates{max-height:220px;overflow-y:auto;border:1px solid #705c3d66}.deck-candidates button{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:43px;background:#1e363a;color:#efe2c7;border:0;border-bottom:1px solid #6a5c4077;text-align:left;padding:5px 9px;font:12px Arial,sans-serif}.deck-candidates button:hover{background:#355357}.deck-candidates small{display:block;color:#a9bab2;font-size:10px;margin-top:3px}.deck-candidates b{color:#e6bf75;font-size:21px}.deck-buttons{display:grid;gap:7px;margin:13px 0}.deck-buttons .primary,.deck-buttons .subtle{width:100%;min-height:44px}.tabs button{letter-spacing:.05em;font-size:9px}
.setup-overlay{position:fixed;inset:0;z-index:12;display:grid;place-items:center;padding:18px;background:#051419e8}.setup-box{width:min(520px,100%);padding:36px;background:radial-gradient(circle at top,#2b4b4c,#10282d 65%);border:2px solid #d4aa69;box-shadow:0 15px 60px #000b;text-align:center}.setup-box h1{font-size:33px;font-weight:normal;color:#f8e8c1;margin:16px 0}.setup-box p{font:14px/1.6 Arial,sans-serif;color:#d4dfd8;margin:0 0 22px}.setup-box p strong{color:#f6d69c}.setup-options{display:flex;gap:10px;justify-content:center;margin-bottom:19px}.setup-options .primary{width:auto}.setup-box small{font:11px/1.5 Arial,sans-serif;color:#acbbb2;display:block}@media(max-width:500px){.setup-options{flex-direction:column}.setup-box{padding:25px 18px}.setup-box h1{font-size:26px}}
.deck-candidates .deck-art-thumb{width:42px;height:61px;object-fit:contain;flex:none;margin-right:9px}.artwork-choices{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.artwork-choices button{min-width:72px;min-height:48px;padding:6px}.artwork-choices img{display:block;width:60px;height:87px;object-fit:contain;margin:auto}.artwork-choices span{display:block;font-size:11px;margin-top:5px}.artwork-choices .active{outline:2px solid #dbb56e}

/* Five columns follow the Speed Duel mat. The opponent faces the player. */
.zone.placeable{border:2px solid #ffe098!important;background:#496b5555;cursor:pointer;box-shadow:inset 0 0 24px #d6bb6955,0 0 9px #e9c26a66}
.zone.placeable:hover,.zone.placeable:focus-visible{outline:3px solid #fff1ac;background:#7b985c66}
.placement-label{position:absolute;bottom:2px;left:0;right:0;font:bold 8px Arial,sans-serif;color:#ffe9a7;text-align:center;letter-spacing:.1em}
.board-line.zones{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;width:min(100%,640px);margin:0 auto 4px}
.board-line.zones .zone{width:100%;height:87px;min-width:0;padding:4px}
.board-line.zones .card,.board-line.zones .field-slot .card{width:53px;height:72px}
.board-line.zones .zone-label{font-size:8px;letter-spacing:.06em;z-index:2}
.pile-zone{position:relative;color:#e9d8ad;display:grid;place-items:center;font-family:Arial,sans-serif}
.pile-zone img,.pile-back{display:block;width:53px;height:72px;object-fit:fill;box-shadow:2px 2px 0 #7f673e,4px 4px 0 #291e14;pointer-events:none}
.pile-back{display:grid;place-items:center;border:3px solid #b49468;background:repeating-radial-gradient(circle at center,#8a512e 0 3px,#422919 5px 9px,#bd7b43 11px 13px)}
.pile-back>span{font:bold 17px Georgia,serif;color:#f9d39d;text-shadow:0 1px 4px #000;transform:rotate(-25deg)}
.pile-count{position:absolute;right:3px;bottom:2px;min-width:21px;padding:2px 4px;background:#092028eb;border:1px solid #a98c57;color:#ffdea0;font:bold 12px Arial,sans-serif;z-index:3}
.pile-zone:hover{border-color:#efd08b;background:#2a4649}
.auxiliary-row{width:min(100%,640px);margin:1px auto 4px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.auxiliary-row.mirrored{flex-direction:row-reverse;margin:4px auto 1px}
.auxiliary-row .skill{min-height:35px;min-width:140px;max-width:180px;padding:3px 7px;text-align:left;white-space:normal}
.auxiliary-row .mini{width:100px;height:35px;padding:2px 3px;grid-template-columns:1fr 20px;gap:3px;min-width:0}
.auxiliary-row .mini img,.auxiliary-row .mini .pile-back{width:20px;height:27px;grid-column:1;justify-self:center}
.auxiliary-row .mini .zone-label{top:3px;left:3px;font-size:7px;background:#0c272bcc}
.auxiliary-row .mini .zone-empty{font-size:22px}
.opponent .zones .card{transform:rotate(180deg)}
.opponent .zones .card:hover{transform:rotate(180deg) translateY(-3px)}
.opponent .zones .card.defense{transform:rotate(270deg) scale(.85)}
.opponent .zones .card.armed:after{transform:rotate(180deg)}
.self .duelist-meta{margin:3px auto 0;width:min(100%,640px)}
.opponent .pile-zone:not(.mini) img,.opponent .pile-back{transform:rotate(180deg)}
.hand-area{max-width:640px;margin:auto}
.opponent .hand-header{margin-top:1px}
.opponent .hand{padding-bottom:4px}
.pile-shade{position:fixed;inset:0;z-index:11;display:grid;place-items:center;background:#020e14d9;padding:16px}
.pile-browser{width:min(860px,100%);max-height:90dvh;display:flex;flex-direction:column;border:2px solid #c4a36b;background:linear-gradient(145deg,#214348,#0b2229);padding:18px;box-shadow:0 20px 50px #000b;min-height:200px}
.pile-browser>header{display:flex;justify-content:space-between;align-items:center;gap:12px}
.pile-browser h2{font:23px Georgia,serif;color:#f3deb4;margin:6px 0}
.pile-browser h2 small{font:12px Arial,sans-serif;color:#c4ccc1}
.pile-browser>header button{min-width:44px;min-height:44px;border:1px solid #af8d57;background:#17353b;color:#f0d9ad;font-size:25px}
.pile-browser p{font:12px/1.5 Arial,sans-serif;color:#cbd2c5}
.pile-content{display:flex;gap:16px;min-height:0;overflow:auto}
.pile-grid{flex:1;min-width:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:10px;align-content:start;overflow:auto;padding:3px}
.pile-grid button{border:1px solid #7e7154;background:#102b32;color:#e8dbc2;min-width:0;padding:5px;font:10px/1.3 Arial,sans-serif}
.pile-grid button.active{border-color:#ffe198;box-shadow:0 0 0 2px #e1b366}
.pile-grid button img{width:100%;max-height:145px;object-fit:contain;display:block;margin-bottom:5px}
.pile-detail{flex:0 0 230px;border-left:1px solid #ae8a5655;padding-left:15px;overflow:auto}
.pile-detail>img{display:block;width:175px;max-width:100%;margin:auto}
.pile-detail h3{font:18px Georgia,serif;color:#f3dfba}
.pile-empty{grid-column:1/-1;padding:35px 10px;font:14px Arial,sans-serif;color:#cbd5cd;text-align:center}
.hidden-pile-card{font:12px Arial,sans-serif;color:#c4c9b7}
@media(max-width:1000px){.board-line.zones{gap:4px;width:100%;margin-bottom:3px}.board-line.zones .zone{height:76px;padding:3px}.board-line.zones .card,.board-line.zones .field-slot .card,.pile-zone img,.pile-back{width:43px;height:60px}.board-line.zones .zone-label{font-size:7px;letter-spacing:0;left:2px;background:#0b232bcc}.pile-count{min-width:17px;font-size:10px;padding:1px 3px;right:1px;bottom:1px}.auxiliary-row{width:100%;margin-bottom:3px}.auxiliary-row .skill{min-width:100px;max-width:130px;min-height:31px;padding:2px 5px}.auxiliary-row .mini{width:76px;height:31px}.auxiliary-row .mini .zone-label{font-size:7px}.auxiliary-row .mini img{width:17px;height:24px}.duelist{max-width:500px}.hand{min-height:60px}.pile-browser{padding:12px}.pile-detail{flex-basis:160px;padding-left:10px}.pile-detail>img{width:140px}}
@media(max-width:600px){.pile-shade{padding:8px}.pile-content{flex-direction:column}.pile-grid{flex:none;max-height:40dvh;grid-template-columns:repeat(auto-fill,minmax(66px,1fr));gap:6px}.pile-grid button img{max-height:110px}.pile-detail{flex:auto;border-left:0;border-top:1px solid #af8e5666;padding:12px 0;max-height:30dvh}.pile-detail>img{float:left;width:85px;margin:0 12px 8px 0}.pile-detail h3{margin:0 0 7px}.pile-detail p{margin:0}.pile-browser h2{font-size:19px}}
@media(max-width:390px){.board-line.zones{gap:3px}.board-line.zones .zone{height:68px}.board-line.zones .card,.board-line.zones .field-slot .card,.pile-zone img,.pile-back{width:37px;height:52px}.board-line.zones .zone-label{font-size:7px}.hand{min-height:55px}.auxiliary-row .skill{min-height:29px}.auxiliary-row .mini{height:29px}}
@media(prefers-reduced-motion:reduce){.card.armed{animation:none}}

:root{--motion-gold:#f5cc75;--motion-cyan:#83e8ff;--motion-violet:#c4a1ff;--motion-red:#ff927e}
.card.back{background:#251309;padding:0;overflow:visible}.card-back{display:block;width:100%;height:100%;object-fit:fill;border-radius:3px}.pile-back{display:block;width:53px;height:72px;background:none!important;padding:0;border:0}.pile-back img{width:100%;height:100%;object-fit:fill;box-shadow:none;transform:none!important}.board-line.zones .card{overflow:visible}.opponent .card:not(.defense) .card-stats{transform:translateX(-50%) rotate(180deg)}
.card-stats{position:absolute;left:50%;bottom:-9px;transform:translateX(-50%);color:#fff2d3;background:#10262bec;border:1px solid #b59c594f;border-radius:3px;font:700 9px monospace;white-space:nowrap;padding:1px 3px;pointer-events:none;z-index:4}.card.defense .card-stats{transform:translateX(-50%) rotate(90deg);bottom:18%;left:0}.hand .card-stats{display:none}
.lp b{font:inherit}.phase-rail{flex-wrap:wrap}.duel-history{width:100%;font:12px/1.4 Arial,sans-serif;color:#ecddba;text-align:center;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:20px;padding:2px 8px}.shell[aria-busy="true"] .control-bar{color:#ecd8a9}.shell[aria-busy="true"] .status-dot{background:var(--motion-gold)}
.motion-settings{border-bottom:1px solid #ffffff20;margin-bottom:14px;padding-bottom:14px}.motion-settings label{display:block;font-size:11px;color:#bbd2d8;margin-bottom:7px}.motion-settings select{background:#143038;color:#f4ecda;border:1px solid #537780;border-radius:6px;padding:10px;width:100%;min-height:44px}
.duel-fx{position:fixed;inset:0;pointer-events:none;z-index:90;overflow:hidden}.fx-card{position:absolute;object-fit:fill;border-radius:4px;box-shadow:0 0 18px #ffe0a577,0 8px 25px #000a;z-index:3}.fx-ring{position:absolute;border:2px solid var(--motion-gold);box-shadow:0 0 18px var(--motion-gold),inset 0 0 14px #ffeabc44;border-radius:6px}.fx-ring.cyan{border-color:var(--motion-cyan);box-shadow:0 0 20px #83e8ff88}.fx-ring.violet{border-color:var(--motion-violet);box-shadow:0 0 20px #c4a1ff88}.fx-ring.red{border-color:var(--motion-red);box-shadow:0 0 20px #ff927e99}
.fx-banner{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:18px;max-width:85vw;width:max-content;padding:16px 24px;background:linear-gradient(100deg,#071a20e8,#17363bf5,#071a20e8);border-block:1px solid #d6ba7677;box-shadow:0 8px 30px #0008;color:#faf0d6;text-align:center;border-radius:6px}.fx-banner strong{display:block;font-size:clamp(16px,2.5vw,28px);letter-spacing:.12em;line-height:1.3}.fx-banner span{display:block;font-size:13px;line-height:1.5;margin-top:6px;color:#d2e2e5;max-width:290px}.fx-banner img{width:112px;max-height:165px;object-fit:contain;box-shadow:0 0 20px #87dcf077}.fx-chain{align-self:start;border:1px solid #a1edfa;background:#143a45;color:#fff;min-width:32px;border-radius:50%;height:32px;line-height:30px;font-size:18px}.fx-arrow{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 0 5px #ffa844)}.fx-lp{position:absolute;font-size:clamp(23px,3vw,40px);font-weight:900;white-space:nowrap;transform:translateX(-50%);text-shadow:0 2px 5px #000,0 0 18px currentColor}.fx-lp.loss{color:#ff927e}.fx-lp.gain{color:#91f9c5}
@media(max-width:1000px){.pile-back{width:43px;height:60px}}
@media(max-width:600px){.fx-banner{padding:12px;gap:10px;max-width:92vw}.fx-banner img{width:82px;max-height:120px}.fx-banner strong{font-size:16px;letter-spacing:.05em}.fx-banner span{font-size:12px;max-width:200px}.duel-history{font-size:11px}.card-stats{font-size:8px}.fx-chain{min-width:25px;height:25px;line-height:23px;font-size:15px}}
@media(max-width:390px){.pile-back{width:37px;height:52px}}
@media(prefers-reduced-motion:reduce){.fx-arrow,.fx-card{display:none}.fx-ring{box-shadow:none!important}.fx-banner{transform:translate(-50%,-50%)}.fx-lp{text-shadow:0 2px 5px #000}}
/* Fixed field geometry: effects and text cannot change the camera scale. */
.shell:has(.touch-actions) .arena{padding-bottom:20px}.hand{height:74px;min-height:74px;max-height:74px}.hand .card{transform:none!important}.duel-history{height:38px;min-height:38px;max-height:38px}.control-bar{height:48px;min-height:48px;max-height:48px}.duelist-meta{height:44px;min-height:44px}.card{transition:box-shadow .14s}.card:hover{transform:none}.opponent .zones .card:hover{transform:rotate(180deg)}.card.defense:hover{transform:rotate(90deg) scale(.85)}.opponent .zones .card.defense:hover{transform:rotate(270deg) scale(.85)}
.choice-tray{position:fixed;z-index:6;bottom:8px;left:50%;transform:translateX(-50%);width:min(800px,calc(100% - 16px));padding:10px 12px;background:#0b2429fa;border:1px solid #d0ac6c;box-shadow:0 4px 20px #000a;font:12px Arial,sans-serif}.choice-tray header{display:flex;gap:10px;justify-content:space-between;align-items:center;padding-bottom:6px}.choice-tray header strong{color:#ffe1a1}.choice-tray header span{font-size:10px;color:#bbc8c2}.choice-cards{display:flex;gap:8px;overflow:auto;max-height:122px}.choice-cards button{display:flex;gap:7px;align-items:center;flex:0 0 170px;border:1px solid #9e855a;background:#213e43;color:#eee2ca;text-align:left;padding:4px;min-height:62px;font:12px Arial,sans-serif}.choice-cards img{height:70px;width:48px;object-fit:contain}.choice-cards span{display:flex;flex-direction:column;gap:5px}.choice-cards small{font-size:10px;color:#d6bc84}.picked{outline:2px solid #ffe1a1;background:#465541!important}.choice-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:7px}.choice-footer button{min-height:40px;padding:7px 14px}.choice-footer span{flex:1;font-size:10px}.prompt-options{display:grid;gap:8px;margin:14px 0}.prompt-options button{min-height:44px;border:1px solid #c0a46c;background:#244047;color:#f2e2bf;padding:10px;font:13px Arial,sans-serif;text-align:left}.prompt-card{height:150px;display:block;margin:auto}.loading{padding:40px;font:18px Arial,sans-serif;color:#f2dfb9}.field-slot.placeable{border:2px solid #ffe098;cursor:pointer}.zone.picked{outline:2px solid #ffe098}
@media(max-width:1000px){.hand{height:60px;min-height:60px;max-height:60px}.duelist-meta{height:32px;min-height:32px}.duel-history{height:35px;min-height:35px;max-height:35px}.control-bar{height:44px;min-height:44px;max-height:44px}.shell:has(.touch-actions) .arena{padding-bottom:5px}.choice-tray{left:0;bottom:0;transform:none;width:100%;max-height:30dvh;padding:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}.choice-tray header{display:block}.choice-tray header span{display:block;padding-top:3px}.choice-cards button{flex-basis:155px}.choice-cards img{height:55px;width:38px}.choice-footer button{width:auto}.touch-actions .action{width:auto}.reaction-prompt{max-height:85dvh}.choice-cards{max-height:85px}.choice-footer{margin-top:5px}}
.reaction-prompt .prompt-options{max-height:45dvh;overflow-y:auto;padding:2px}.reaction-prompt .prompt-options:has([data-mask]){grid-template-columns:1fr 1fr}.reaction-prompt>.primary{width:100%;min-height:44px}.reaction-prompt input{width:100%;min-height:44px;background:#102d34;border:1px solid #d2ad6a;color:#fff0c8;padding:10px;margin:10px 0}.reaction-prompt .prompt-options button{white-space:normal}
@media (orientation: landscape) and (max-height: 520px){
 .topbar{height:40px}.sidebar{inset:40px 0 0}.arena{padding:2px 4px}.arena-top{display:none}.duelist{max-width:800px;padding:0 106px;min-height:100px}.duelist-meta{position:absolute;left:0;top:3px;width:98px;height:40px;min-height:40px;display:block}.duelist-meta strong{font-size:10px}.duelist-meta .skill-name,.duelist-meta .eyebrow{display:none}.duelist-meta .lp{font-size:15px;margin-top:2px}.self .duelist-meta{bottom:3px;top:auto;margin:0;width:98px}.opponent .hand-area{position:absolute;left:0;top:46px;width:98px}.opponent .hand-header{display:none}.opponent .hand{height:47px;min-height:47px;max-height:47px;gap:1px;justify-content:flex-start}.opponent .hand .card{width:18px;height:26px}.board-line.zones{gap:3px;margin-bottom:2px}.board-line.zones .zone{height:48px;padding:1px}.board-line.zones .card,.board-line.zones .field-slot .card,.pile-zone img,.pile-back{width:31px;height:43px}.board-line.zones .zone-label{font-size:6px}.auxiliary-row,.auxiliary-row.mirrored{position:absolute;right:0;top:3px;width:98px;display:grid;gap:3px;margin:0}.self .auxiliary-row{bottom:3px;top:auto}.auxiliary-row .skill{min-width:98px;max-width:98px;min-height:35px}.auxiliary-row .mini{width:98px;height:28px}.phase-rail{height:30px;margin:2px auto;padding:1px 4px;flex-wrap:nowrap;gap:5px;position:relative}.phase-track{flex:none}.phase{min-height:22px;padding:3px;font-size:7px}.turn-owner{flex:none}.duel-history{width:auto;flex:1;height:28px;min-height:28px;max-height:28px;font-size:9px;line-height:1.3;padding:0 3px}.self .hand-area{height:48px}.self .hand-header{display:none}.self .hand{height:48px;min-height:48px;max-height:48px;justify-content:center;gap:4px}.self .hand .card{width:42px;height:46px}.self .hand .card-scan{object-fit:contain}.control-bar{height:40px;min-height:40px;max-height:40px;margin:1px auto 0;max-width:580px}.control-bar .primary,.control-bar .subtle{min-height:36px}.choice-tray{width:min(800px,100%);left:50%;transform:translateX(-50%);max-height:45dvh}.touch-actions{width:min(650px,100%);left:50%;right:auto;transform:translateX(-50%);max-height:45dvh}.reaction-prompt{max-height:90dvh}.reaction-prompt .prompt-options{max-height:40dvh}.card-stats{font-size:6px}
}
.auxiliary-row .skill{height:35px;max-height:35px;overflow:hidden}
@media(max-width:1000px){.auxiliary-row .skill{height:31px;max-height:31px}}
@media (orientation: landscape) and (max-height: 520px){.auxiliary-row .skill{height:35px;max-height:35px}}
/* Keep selection controls inside short touch viewports. */
.choice-tray{display:flex;flex-direction:column;overflow:hidden;max-height:55dvh}
.choice-tray header,.choice-footer,.material-summary{flex-shrink:0}
.choice-cards{min-height:0;flex-shrink:1}

.deck-page{--deck-edge:#45606c;--deck-gold:#dfbd79;position:fixed;inset:0;z-index:15;background:radial-gradient(ellipse at top,#243d49,#08151e 70%);color:#eee8db;display:flex;flex-direction:column;font:14px Arial,sans-serif;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));overflow:hidden}.deck-page-header{display:flex;align-items:center;gap:12px;flex:none;padding:0 8px 14px;border-bottom:1px solid var(--deck-edge)}.deck-page-header>div{margin-right:auto}.deck-page h1{font:28px Georgia,serif;margin:3px 0;color:var(--deck-gold)}.deck-page h2{font:19px Georgia,serif;margin:0 0 12px;color:var(--deck-gold)}.deck-page h2 small{font:12px Arial;color:#c1d0d5;float:right}.deck-page button,.deck-page select,.deck-page input{font-family:Arial,sans-serif}.deck-page button{min-height:44px}.deck-workspace{display:grid;grid-template-columns:minmax(220px,24%) minmax(340px,1fr) minmax(320px,34%);gap:12px;min-height:0;flex:1;padding-top:12px}.deck-pane{background:#0a1b26d9;border:1px solid var(--deck-edge);min-width:0;min-height:0;overflow:auto;padding:14px;scrollbar-color:#9a8054 #172a34}.deck-detail-art{display:block;max-height:36vh;max-width:100%;margin:auto;object-fit:contain}.deck-detail h3{font:21px Georgia;margin:16px 0 8px;color:#ffe8b9}.deck-properties,.deck-family{color:#abc8d4;font-size:12px;line-height:1.6}.deck-effect{font-size:14px;line-height:1.7;white-space:pre-line}.deck-detail>.primary{width:100%;margin-top:16px}.deck-art-options{display:flex;gap:6px;flex-wrap:wrap}.deck-art-options button{border:1px solid #7c6d52;background:#1d3540;color:#f9e5bc;padding:8px}.deck-page button.active{background:#73552a;border-color:#ebc27a;color:#fff1d3}.deck-composition-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}.deck-format{font-size:10px;letter-spacing:.1em;color:#bad2d5}.deck-skill-select{display:flex;align-items:center;gap:12px;margin:12px 0 20px}.deck-page select,.deck-page input[type=search]{border:1px solid var(--deck-edge);background:#142b37;color:#eee8dc;min-height:44px;padding:8px;width:100%;border-radius:2px}.deck-skill-select select{flex:1;min-width:0}.deck-section-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--deck-edge);margin-bottom:12px}.deck-section-heading b{font-size:12px;color:#e4d0a6}.deck-section-heading .invalid{color:#ffa99a}.deck-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:7px;align-content:start}.deck-tile{position:relative;min-width:0}.deck-tile>button:first-child{display:block;padding:0;border:0;background:none;width:100%;min-height:0;aspect-ratio:59/86}.deck-tile img{width:100%;height:100%;object-fit:contain;display:block}.deck-page .deck-remove{position:absolute;bottom:0;right:0;width:32px;min-height:32px;background:#081721e8;border:1px solid #b89657;color:#ffe4ba;font-size:22px}.deck-page button:focus-visible{outline:3px solid #61d7f0;outline-offset:2px}.deck-page button:disabled{opacity:.5;cursor:not-allowed}.extra-grid{margin-bottom:20px}.deck-section-heading:not(:first-child){margin-top:20px}.deck-help,.deck-empty{font-size:13px;color:#aabfc8;line-height:1.6}.deck-search-pane{padding:0;display:flex;flex-direction:column;overflow:hidden}.deck-search-controls{padding:14px;border-bottom:1px solid var(--deck-edge);flex:none;max-height:60%;overflow:auto}.deck-search-bar{display:flex;gap:8px}.deck-search-bar input{min-width:0}.deck-kind-tabs{display:flex;gap:5px;margin-top:10px}.deck-kind-tabs button{flex:1;background:#1a3442;border:1px solid var(--deck-edge);color:#dbded7;min-width:0;padding:6px}.deck-filters{display:none;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.deck-filters.open{display:grid}.deck-filters label{font-size:11px;color:#c5d3d6;line-height:2}.deck-support-option{display:flex;align-items:center;gap:8px}.deck-support-option input{width:18px;height:18px;flex:none}.deck-results{overflow:auto;flex:1;min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:10px;padding:14px;align-content:start}.deck-result{min-width:0}.deck-result>button:first-child{border:0;background:none;color:#e0e4df;width:100%;padding:0;text-align:left}.deck-result img{display:block;width:100%;aspect-ratio:59/86;object-fit:contain}.deck-result span{display:block;font-size:11px;line-height:1.3;margin:5px 0}.deck-result small{display:block;font-size:10px;color:#ddbd82;margin-bottom:4px}.deck-page .deck-add{display:flex;align-items:center;justify-content:space-between;width:100%;border:1px solid #927d53;background:#244354;color:#ffe5ae;font-size:22px;padding:0 9px;min-height:40px}.deck-add span{font-size:12px}.deck-mobile-nav{display:none}#more-deck-results{grid-column:1/-1}.deck-page .primary,.deck-page .subtle{white-space:normal}
@media(max-width:1000px){.deck-mobile-nav{display:flex;margin-top:8px;gap:6px}.deck-mobile-nav button{flex:1;border:1px solid var(--deck-edge);background:#1a3442;color:#e3e7df}.deck-workspace{grid-template-columns:minmax(200px,28%) minmax(260px,1fr)}.deck-detail{display:none}.deck-detail:focus-within{display:block}.deck-workspace[data-mobile-view=card]{grid-template-columns:minmax(200px,28%) minmax(260px,1fr)}.deck-workspace[data-mobile-view=card] .deck-detail{display:block}.deck-workspace[data-mobile-view=card] .deck-composition{display:none}.deck-page-header .eyebrow{display:none}}
@media(max-width:640px){.deck-page{padding:8px}.deck-page-header{padding:0 0 8px;gap:6px;flex-wrap:wrap}.deck-page-header>div{width:100%;margin:0}.deck-page h1{font-size:23px;margin:0 0 5px}.deck-page-header>button{flex:1;font-size:12px;padding:8px}.deck-mobile-nav{display:flex;margin-top:8px;gap:6px}.deck-mobile-nav button{flex:1;border:1px solid var(--deck-edge);background:#1a3442;color:#e3e7df}.deck-workspace,.deck-workspace[data-mobile-view=card]{display:flex;padding-top:8px}.deck-pane{width:100%;padding:12px;display:none}.deck-workspace[data-mobile-view=deck] .deck-composition,.deck-workspace[data-mobile-view=search] .deck-search-pane,.deck-workspace[data-mobile-view=card] .deck-detail{display:block}.deck-workspace[data-mobile-view=search] .deck-search-pane{display:flex;padding:0}.deck-card-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.deck-page .deck-remove{width:44px;min-height:44px}.deck-detail-art{max-height:40vh}.deck-search-controls{max-height:68%}.deck-results{grid-template-columns:repeat(3,minmax(0,1fr))}.deck-page .deck-add{min-height:44px}}
@media(max-height:500px){.deck-page-header{padding-bottom:6px}.deck-page h1{font-size:21px}.deck-page-header .eyebrow{display:none}.deck-workspace{padding-top:6px}.deck-pane{padding:10px}.deck-detail-art{max-height:45vh}.deck-search-controls{max-height:68%}.deck-search-controls h2{font-size:16px;margin-bottom:6px}.deck-kind-tabs{margin-top:6px}}

.permitted-deck-top{grid-column:1/-1}.permitted-deck-top h3{font-size:14px}.permitted-deck-top button{max-width:120px}

.card-limit{display:block;color:#ffd36b;font-weight:800;font-size:11px;padding:2px 3px;background:#171923}.deck-legality{color:#ffc780;background:#311f1a;padding:8px;border-left:3px solid #edab58;font-size:12px;line-height:1.4}.free-duel-footer{flex-wrap:wrap}.free-duel-footer .deck-legality{max-width:340px;margin:0}.free-duel-footer select{max-width:300px}

.deck-limit-badge{position:absolute;top:2px;left:2px;z-index:1;pointer-events:none;background:#3c1720;border:1px solid #ffdc8b;color:#fff0bf;min-width:20px;height:20px;text-align:center;line-height:18px;font-size:12px;font-weight:900;border-radius:50%}.free-duel-footer #world-ruleset{width:290px;max-width:100%}

.deck-sort-tools{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin:12px 0}.deck-sort-tools label{display:grid;gap:5px;font:12px Arial,sans-serif;flex:1}.deck-sort-tools select{max-width:100%;min-width:0;padding:9px;background:#142c3c;color:#f1e2be;border:1px solid #799aa7;min-height:42px}

.deck-count-controls{display:flex;align-items:center;justify-content:space-between;gap:2px;margin-top:4px;background:#0b1b28;border:1px solid #9b8153;color:#ffe2ab}
.deck-page .deck-count-controls button{flex:1;min-width:34px;min-height:44px;padding:2px;background:#213b4b;color:#ffe2ab;border:0;font-size:24px}
.deck-count-controls span{font:12px Arial,sans-serif;margin:0 1px!important;white-space:nowrap}
.deck-card-grid{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}.deck-results{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}

:root{--world-art:url("./assets/e50477d3686dbc0ff99a9d817720c3e2b98cc7e97b216a3c79e85769976e4204.webp");--world-blue:#74dbf5;--world-gold:#eed297;--world-ink:#061126}
.world-page{height:100dvh;overflow:hidden;position:relative;color:#f5ecd9;background:linear-gradient(110deg,#041128bd,#04112863),var(--world-art) center/cover;font:14px Arial,sans-serif;padding:max(22px,env(safe-area-inset-top)) max(28px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(28px,env(safe-area-inset-left));isolation:isolate;--edge:#7894b769}
.world-page:before{content:'';position:absolute;inset:0;pointer-events:none;z-index:-1;background:linear-gradient(0deg,#020818f2,transparent 45%,#05102645)}
.world-page button,.world-page select,.world-shade button{touch-action:manipulation;min-height:44px;font-family:Arial,sans-serif;color:#f5ecd9;cursor:pointer}
.world-page button:focus-visible,.world-shade button:focus-visible,.world-page select:focus-visible{outline:3px solid #80e4ff;outline-offset:3px}
.world-page button:disabled,.world-shade button:disabled{opacity:.4;cursor:not-allowed}
.world-kicker{letter-spacing:.22em;font-size:10px;color:var(--world-gold);margin:0 0 10px;font-weight:bold}
.world-kicker span{font-size:15px;color:var(--world-blue);padding:0 13px}
.title-page{display:grid;grid-template-columns:1.45fr 1fr;align-items:center;gap:35px;padding:5vh 8vw 10vh}
.world-corners{position:absolute;inset:20px;border:1px solid #d7b57955;pointer-events:none;clip-path:polygon(0 0,100% 0,100% 18%,99.8% 18%,99.8% 99.8%,82% 99.8%,82% 100%,0 100%)}
.title-emblem{position:absolute;width:min(52vw,640px);left:4%;top:50%;transform:translateY(-50%);color:#e3b459;opacity:.08;pointer-events:none}
.title-lockup{text-align:center;position:relative;text-shadow:0 4px 18px #000}
.title-lockup .world-kicker{font-size:12px;letter-spacing:.35em;margin-bottom:20px}
.title-lockup h1{display:flex;flex-direction:column;margin:0;align-items:center;line-height:1;font-weight:normal}
.ygo-wordmark{font:900 italic clamp(46px,6vw,94px) Georgia,serif;color:#f3efde;-webkit-text-stroke:1px #b73732;text-shadow:2px 4px 0 #952b2c,0 0 30px #ea512b4d;letter-spacing:-.065em;transform:skew(-5deg);margin-bottom:17px}
.speed-wordmark{font:900 italic clamp(26px,3.5vw,55px) Arial,sans-serif;letter-spacing:.13em;color:#daeffd;text-shadow:0 3px #185b91,0 0 22px #388bbb}
.championship-wordmark{margin-top:12px;font:700 clamp(12px,1.55vw,23px) Georgia,serif;letter-spacing:.19em;color:#ffe0a3;white-space:nowrap}
.title-year{font:900 italic clamp(72px,9vw,132px) Georgia,serif;letter-spacing:.03em;background:linear-gradient(#fff7d5,#edc177 60%,#9a601d);color:transparent;background-clip:text;filter:drop-shadow(0 5px 0 #392416);line-height:1.1}
.fan-edition{font:12px Arial,sans-serif;text-transform:uppercase;letter-spacing:.3em;color:#c7c2b4;margin-top:9px}
.title-caption{color:#b4c4d9;font:italic 15px Georgia,serif;margin:28px 0 0}
.title-menu{width:min(390px,100%);margin:auto;display:grid;gap:10px;position:relative}
.menu-caption{letter-spacing:.2em;font-size:10px;color:#90b4cd;display:block;margin-bottom:8px}
.title-menu button{display:flex;align-items:center;gap:16px;background:linear-gradient(100deg,#082039ee,#102c42a8);border:1px solid #62839c7a;border-left:3px solid #d8b77b;text-align:left;min-height:64px;padding:12px 18px;font:20px Georgia,serif;box-shadow:0 5px 18px #0005;transition:background .15s,border-color .15s}
.title-menu button:hover:enabled{background:linear-gradient(100deg,#244e68,#17445bd4);border-color:#8ce5ff}
.title-menu button:enabled .menu-arrow{margin-left:auto;color:#ffe8ab;font:32px Georgia;line-height:1}
.menu-index{font:10px Arial;color:#88abc5;letter-spacing:.1em}
.title-menu button small{font:8px Arial;letter-spacing:.1em;margin-left:auto;white-space:nowrap;color:#bcc1c8}
.title-footer{position:absolute;bottom:28px;left:0;width:100%;display:grid;gap:12px;text-align:center;color:#9eb3c8;letter-spacing:.13em;font-size:9px}
.title-footer i{color:#d9b779;padding:0 13px;font-style:normal}.title-footer small{font-size:9px;color:#697e98;letter-spacing:.03em}
.world-hub{display:flex;flex-direction:column;background:linear-gradient(0deg,#061126ed,#061126a1),var(--world-art) center/cover}
.world-header{display:flex;align-items:center;gap:20px;border-bottom:1px solid var(--edge);padding-bottom:15px;flex:none}.world-header .world-kicker{margin-bottom:4px}.world-header h1{font:32px Georgia,serif;margin:0;color:#ffdfa7}.world-back{border:1px solid var(--edge);background:#0c2440aa;padding:10px 17px;font-size:12px}.world-header-seal{width:49px;height:45px;color:#dfc18b;margin-left:auto;opacity:.65}.world-header-seal svg{width:100%;height:100%}.world-intro{color:#9fb5c9;font-size:12px;margin:13px 0;flex:none}
.duel-matchup{display:grid;grid-template-columns:1fr 62px 1fr;gap:12px;max-width:950px;width:100%;align-self:center;flex:none;margin:8px 0 18px}.matchup-vs{display:grid;place-items:center;font:italic bold 24px Georgia;color:#ddba78}.duel-deck-slot{display:flex;align-items:center;gap:18px;background:#071a30dc;border:1px solid #5f7b97;min-width:0;text-align:left;padding:12px 18px}.duel-deck-slot.active{border-color:#efca83;box-shadow:inset 0 -3px #d0a55e}.duel-deck-slot img{width:43px;height:62px;object-fit:contain}.duel-deck-slot span{display:flex;flex-direction:column;gap:5px;min-width:0}.duel-deck-slot small{font:9px Arial;color:#78cddd;letter-spacing:.14em}.duel-deck-slot strong{font:19px Georgia;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duel-deck-slot em{font:10px Arial;color:#9bb1c7}
.world-roster-heading{display:flex;gap:15px;align-items:center;flex:none;margin:6px 0 16px}.world-roster-heading h2{font:21px Georgia;color:#e9d4ae;margin:0;margin-right:auto}.world-tabs{display:flex;gap:7px}.world-tabs button{font-size:12px;border:1px solid #57728b;background:#0c2036;padding:10px 15px}.world-tabs button.active{color:#ffdd99;background:#584429;border-color:#bb9660}
.world-deck-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;overflow:auto;min-height:0;flex:1;align-content:start;padding:10px 10px 20px;scrollbar-color:#b58e57 #0c1c33}.world-deck{min-width:0;position:relative;display:flex;flex-direction:column;align-items:center;border:1px solid #465d7680;background:radial-gradient(ellipse at 50% 30%,color-mix(in srgb,var(--box-color) 16%,#0a172d),#061228c9 80%);padding:18px 12px 14px;gap:16px;text-align:center;transition:border-color .15s,background .15s;min-height:230px;overflow:hidden}.world-deck:hover{border-color:#97d7ec;background:radial-gradient(ellipse at 50% 30%,color-mix(in srgb,var(--box-color) 25%,#0a172d),#0b2139e8 80%)}.world-deck.selected{border-color:#e8c37e;box-shadow:inset 0 -3px #d3ac69}.box-label{display:grid;gap:6px;position:relative}.box-label strong{font:18px Georgia;color:#f3e6ce}.box-label small{font:11px Arial;color:#b2c4d5}.box-count{font:9px Arial;color:#7f9bb9;letter-spacing:.05em}.box-count b{display:inline-block;color:#f0bb80;padding-left:8px}.box-selected{position:absolute;top:8px;right:8px;font:8px Arial;color:#ffda93;letter-spacing:.12em}.deck-case{display:block;position:relative;width:98px;height:112px;margin-right:14px;filter:drop-shadow(0 8px 8px #0008)}.case-face{position:absolute;inset:17px 0 0;border:1px solid color-mix(in srgb,var(--box-color) 70%,white);background:linear-gradient(120deg,var(--box-color),#09162b 150%);border-radius:3px;overflow:hidden;box-shadow:inset 0 0 0 4px #ffffff16}.case-face img{position:absolute;width:100%;height:140%;object-fit:cover;left:0;top:-8%;opacity:.86;clip-path:polygon(6% 5%,94% 5%,94% 92%,6% 92%)}.case-face svg{color:#dcd7b6;width:70%;margin:12px}.case-seal{position:absolute;bottom:5px;right:5px;font:900 italic 12px Arial;background:#0a1129d6;padding:3px;color:#f7d292;border:1px solid #eac67d66}.case-lid{position:absolute;left:0;right:0;top:0;height:18px;background:linear-gradient(90deg,color-mix(in srgb,var(--box-color) 70%,#fff),var(--box-color));clip-path:polygon(0 100%,15% 0,100% 0,100% 100%);border-bottom:1px solid #ffffff63}.case-spine{position:absolute;top:0;right:-14px;width:15px;height:112px;background:linear-gradient(90deg,var(--box-color),#10213f);clip-path:polygon(0 17%,100% 0,100% 85%,0 100%);border-left:1px solid #ffffff80}.world-new-deck{min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;border:1px dashed #88aac9;background:#1036533b}.world-new-deck>span{font:54px Arial;color:#7bc6e7}.world-new-deck strong{font:21px Georgia}.world-new-deck small{color:#9fb5ce}.world-empty{color:#a7bad0;grid-column:1/-1;padding:20px;font-size:14px;line-height:1.6}
.free-duel-footer,.library-footer{border-top:1px solid var(--edge);padding-top:15px;display:flex;gap:14px;align-items:center;flex:none}.free-duel-footer label{display:flex;gap:12px;align-items:center;color:#a9bdd0;font-size:11px}.free-duel-footer select{background:#0c2440;border:1px solid #5c758d;padding:8px 12px;width:150px}.free-duel-footer .primary{margin-left:auto;min-width:230px;letter-spacing:.14em;font-weight:bold}.free-duel-footer .primary span{float:right;font-size:18px}.library-footer span{font-size:11px;color:#9bb1c7}
.world-shade{position:fixed;inset:0;z-index:20;background:#010819dc;backdrop-filter:blur(4px);display:grid;place-items:center;padding:18px;font:14px Arial,sans-serif;color:#e6e1d6}.world-dialog{width:min(490px,100%);max-height:95dvh;overflow:auto;background:linear-gradient(145deg,#152e48,#071529 75%);border:1px solid #dbb876;padding:28px;box-shadow:0 18px 65px #000b;position:relative;text-align:center}.dialog-close{background:#132d45;border:1px solid #567187;color:#e8d6b3;font:24px Arial;width:44px;min-height:44px;flex:none}.world-dialog>.dialog-close{position:absolute;top:10px;right:10px}.world-dialog h2{font:25px Georgia;color:#f5dcae;margin:12px 0}.world-dialog p{font-size:13px;line-height:1.6;color:#a9bfd2}.dialog-deck-art{display:flex;justify-content:center;pointer-events:none}.dialog-deck-art .world-deck{background:none;border:0;min-height:0;padding:0 0 20px}.dialog-deck-art .box-label{display:none}.world-dialog-actions{display:grid;gap:8px;margin-top:22px}.world-dialog-actions button{min-height:48px;border:1px solid #668299;background:#183850;color:#f2e9d5;padding:10px 15px;font-size:14px}.world-dialog-actions button.primary{background:linear-gradient(100deg,#765121,#b9883c);border-color:#e6c082;color:#fff2d2}.world-dialog-actions small{display:block;font-size:9px;margin-top:4px;letter-spacing:.1em}.world-dialog-actions .world-danger{color:#f0aea8;background:#35212b}.world-draft-note{color:#e3b886!important}.world-inspection{width:min(1180px,100%);height:min(820px,94dvh);background:#0a1b30;border:1px solid #d4b075;padding:20px;display:flex;flex-direction:column;overflow:hidden}.world-inspection>header{display:flex;gap:12px;align-items:center;border-bottom:1px solid #405770;padding-bottom:14px;flex:none}.world-inspection>header>div{margin-right:auto;min-width:0}.world-inspection h2{font:26px Georgia;color:#f0d19b;margin:0}.world-inspection .world-kicker{font-size:9px;letter-spacing:.1em}.world-inspection-body{display:grid;grid-template-columns:1.6fr 1fr;gap:22px;min-height:0;flex:1;padding-top:20px}.world-check-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-content:start;gap:10px;overflow:auto;padding:4px}.world-check-grid button{border:1px solid transparent;background:none;aspect-ratio:59/86;padding:0;min-width:0}.world-check-grid img{width:100%;height:100%;object-fit:contain;display:block}.world-check-grid button.active{outline:2px solid #e7c27e;outline-offset:1px}.world-check-detail{overflow:auto;padding:4px 10px}.world-check-detail>img{height:39dvh;max-width:100%;object-fit:contain;display:block;margin:auto}.world-check-detail h3{font:22px Georgia;color:#ffe0ad}.world-check-detail p{font:13px/1.7 Arial;white-space:pre-line;color:#c9d4df}
.world-name-label{display:flex;flex-direction:column;gap:8px;color:#d6bd8d;font-size:12px;margin:14px 0}.deck-page input#world-deck-name{min-height:44px;width:100%;border:1px solid #6e8c9f;background:#102b3f;padding:10px;color:#f5ead5;font:18px Georgia}.deck-page .deck-composition-header strong{font:20px Georgia;color:#ddc799}.deck-page .deck-help{margin-top:20px}.world-notice{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:#153748;border:1px solid #c7a260;padding:14px 22px;color:#e8e5d7;font:13px Arial;z-index:30;max-width:90vw;text-align:center}.toast{z-index:40}
/* A dark, calm playmat: Egyptian gold inlay with Academy blue/red ends. */
.shell{background:linear-gradient(0deg,#050d20c9,#051128ab),var(--world-art) center/cover}.shell .topbar{background:linear-gradient(90deg,#071629ee,#102841eb,#071629ee);border-color:#d1ac68}.shell .arena{position:relative;background:radial-gradient(ellipse at 50% 48%,#13395790,#05112870 68%)}.shell .arena:before{background:linear-gradient(0deg,#c3502514,transparent 35%,transparent 65%,#2e90be19);border:1px solid #d2b36e66;box-shadow:inset 0 0 50px #071020,0 0 0 5px #b1925112}.shell .arena:after{content:'';position:absolute;left:50%;top:50%;width:440px;height:440px;border:1px solid #d5b77327;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;box-shadow:0 0 0 16px #d5b77306,0 0 0 17px #d5b7731a,inset 0 0 45px #3574a012;z-index:0}.shell .arena-stage{position:relative;z-index:1}.shell .duelist{background:#081a2b64}.shell .opponent{border-top:2px solid #3e8baf6b}.shell .self{border-bottom:2px solid #c071455e}.shell .zone{background:linear-gradient(140deg,#102d4280,#061326b8);border-color:#bd9d6157}.shell .sidebar{background:#07172ade;border-color:#698dab}.shell .phase-rail{background:#091c2cee;border-color:#b99b65}.shell .brand strong{color:#f6d59b}.shell .brand-mark{background:#112843;color:#e6c885;border-color:#8f7748}.shell .arena-top{color:#b3c8de}.shell .pile-count{background:#0a233e}
@media(min-width:1500px){.world-deck-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.world-deck{min-height:255px}.deck-case{width:110px;height:126px}.case-spine{height:126px}}
@media(max-width:1000px){.title-page{grid-template-columns:1.3fr 1fr;gap:22px;padding:5vh 5vw 10vh}.title-menu button{font-size:18px;padding:10px 12px;gap:10px}.title-lockup .world-kicker{font-size:9px}.title-caption{font-size:12px}.world-deck-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.world-deck{min-height:205px}.box-label strong{font-size:16px}.world-page{padding:18px}.world-check-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:640px){.title-page{display:flex;flex-direction:column;justify-content:center;gap:24px;padding:30px 30px 74px}.title-lockup{width:100%}.title-lockup .world-kicker{margin-bottom:13px}.ygo-wordmark{font-size:51px;margin-bottom:13px}.speed-wordmark{font-size:29px}.championship-wordmark{font-size:12px;letter-spacing:.15em}.title-year{font-size:79px}.fan-edition{font-size:9px;margin-top:4px}.title-caption{display:none}.title-menu{margin:0 auto;gap:7px;width:310px;max-width:100%}.title-menu button{min-height:49px;font-size:18px}.menu-caption{font-size:8px;margin-bottom:3px}.title-footer{bottom:18px;font-size:8px;gap:8px}.title-footer small{font-size:8px}.title-emblem{width:95vw;left:2%;top:32%}.world-corners{inset:10px}.world-page.world-hub{padding:12px}.world-header{gap:12px;padding-bottom:10px}.world-header h1{font-size:25px}.world-header .world-kicker{font-size:7px;letter-spacing:.14em}.world-header-seal{width:35px}.world-back{padding:8px 10px;font-size:11px}.world-intro{font-size:11px;line-height:1.4;margin:10px 0}.duel-matchup{grid-template-columns:1fr 26px 1fr;gap:4px;margin:0 0 12px}.duel-deck-slot{gap:8px;padding:9px 7px;min-height:84px}.duel-deck-slot img{width:29px;height:42px}.duel-deck-slot strong{font:13px Georgia;white-space:normal}.duel-deck-slot small{font-size:7px;letter-spacing:.05em}.duel-deck-slot em{font-size:8px}.matchup-vs{font-size:15px}.world-roster-heading{flex-wrap:wrap;gap:10px;margin:0 0 8px}.world-roster-heading h2{font-size:19px}.world-tabs{width:100%}.world-tabs button{flex:1;padding:8px;font-size:11px}.world-deck-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:7px 4px 14px;gap:10px}.world-deck{min-height:197px;padding:16px 6px 10px;gap:11px}.deck-case{width:77px;height:88px}.case-spine{height:88px}.case-face{inset:14px 0 0}.case-lid{height:15px}.box-label strong{font-size:14px}.box-label small{font-size:9px}.box-count{font-size:8px}.box-selected{font-size:6px;top:5px;right:5px}.free-duel-footer{gap:8px;flex-wrap:wrap;padding-top:9px}.free-duel-footer label{gap:8px}.free-duel-footer select{width:100px;min-height:44px}.free-duel-footer .primary{min-width:0;flex:1;width:auto;font-size:11px}.free-duel-footer #world-resume{font-size:10px;padding:8px}.world-new-deck{min-height:197px;padding:12px}.world-new-deck strong{font-size:17px}.world-new-deck small{font-size:9px}.library-footer{padding-top:10px}.library-footer span{font-size:10px;line-height:1.5}.world-shade{padding:9px}.world-dialog{padding:22px 18px}.world-dialog h2{font-size:21px}.world-dialog-actions{margin-top:13px;gap:6px}.world-dialog-actions button{min-height:46px}.world-inspection{padding:10px;height:96dvh}.world-inspection h2{font-size:18px}.world-inspection>header{gap:7px}.world-inspection>header .subtle{font-size:11px;padding:8px}.world-inspection-body{grid-template-columns:1fr;grid-template-rows:1fr 1fr;gap:12px;padding-top:12px}.world-check-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.world-check-detail{border-top:1px solid #46617d;padding:12px 4px}.world-check-detail>img{float:left;height:190px;max-width:40%;margin:0 13px 10px 0}.world-check-detail h3{font-size:19px;margin:0 0 10px}.world-check-detail p{font-size:12px;margin:0}.world-check-detail:after{content:'';display:block;clear:both}.shell .arena:after{width:75vw;height:75vw}}
@media(max-height:520px){.title-page{display:grid;grid-template-columns:1.4fr 1fr;gap:25px;padding:22px 6vw 38px}.title-menu{gap:5px;margin:auto}.title-menu button{min-height:44px;font-size:16px;padding:6px 12px}.menu-caption{margin-bottom:1px;font-size:8px}.title-lockup .world-kicker{font-size:8px;margin-bottom:10px}.ygo-wordmark{font-size:43px;margin-bottom:9px}.speed-wordmark{font-size:28px}.championship-wordmark{font-size:10px;margin-top:9px}.title-year{font-size:66px}.fan-edition{font-size:8px}.title-caption{display:none}.title-footer{bottom:11px;font-size:7px;gap:3px}.title-footer small{font-size:7px}.world-hub{padding:9px 16px}.world-header{padding-bottom:6px}.world-header h1{font-size:23px}.world-header .world-kicker{font-size:7px;margin-bottom:3px}.world-header-seal{height:30px}.world-intro{display:none}.duel-matchup{margin:8px 0;max-width:680px;grid-template-columns:1fr 40px 1fr;gap:8px}.duel-deck-slot{padding:5px 10px;min-height:57px;gap:10px}.duel-deck-slot img{height:43px;width:30px}.duel-deck-slot strong{font-size:14px}.duel-deck-slot small{font-size:7px}.duel-deck-slot em{font-size:8px}.world-roster-heading{margin:0 0 4px;gap:8px;flex-wrap:nowrap}.world-roster-heading h2{font-size:17px}.world-tabs{width:auto}.world-tabs button{font-size:10px;padding:7px 12px}.world-deck-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:6px 4px 10px}.world-deck{min-height:145px;padding:12px 7px 9px;gap:8px}.deck-case{width:60px;height:70px}.case-spine{height:70px}.case-face{inset:11px 0 0}.case-lid{height:12px}.box-label strong{font-size:13px}.box-label small{font-size:9px}.box-label{gap:3px}.box-count{font-size:8px}.world-new-deck{min-height:145px;gap:8px}.world-new-deck>span{font-size:32px}.world-new-deck strong{font-size:16px}.free-duel-footer,.library-footer{padding-top:6px}.free-duel-footer select{min-height:44px}.free-duel-footer .primary{min-width:190px}.world-dialog{display:grid;grid-template-columns:1fr 1.5fr;column-gap:20px;text-align:left;padding:18px 24px;width:min(650px,100%)}.dialog-deck-art{grid-row:1/6;align-items:center}.world-dialog h2{font-size:20px;margin:6px 0}.world-dialog .world-kicker{font-size:8px;margin:0}.world-dialog p{font-size:11px;margin:6px 0}.world-dialog-actions{grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}.world-dialog-actions button{font-size:12px;padding:7px;min-height:44px}.world-inspection{height:95dvh}.world-inspection-body{grid-template-columns:1.3fr 1fr;grid-template-rows:1fr}.world-check-detail{border:0}.world-check-detail>img{height:180px;float:left;width:auto;max-width:40%;margin:0 10px 10px 0}.world-check-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.world-check-detail h3{font-size:17px}.world-check-detail p{font-size:11px;line-height:1.5}}
@media(prefers-reduced-motion:reduce){.world-page *{transition:none!important}}
.title-year{text-shadow:none}
.deck-page{background:linear-gradient(0deg,#061126ed,#061126b8),var(--world-art) center/cover}
.deck-page .deck-pane{background:#071a2cde}
.deck-case{flex:none}
.shell .hand{overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#607b94 #0c2035}
.world-deck-grid .world-deck,.world-deck-grid .world-new-deck{min-height:230px}
@media(min-width:1500px){.world-deck-grid .world-deck{min-height:255px}}
@media(max-width:1000px){.world-deck-grid .world-deck{min-height:205px}}
@media(max-width:640px){.world-deck-grid .world-deck,.world-deck-grid .world-new-deck{min-height:197px}}
@media(max-height:520px){.world-deck-grid .world-deck,.world-deck-grid .world-new-deck{min-height:145px}}

/* Battle City title: the same modern pixel-art city as the Story overworld. */
.title-page{--title-art:url("./assets/f3c7e94b53dc80cf613202d236a3b2d5566bd970f99f425c120c0da26240724e.webp");--title-gold:#f6d594;--title-navy:#0a2039;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:28px;padding:36px 6vw 58px;background:linear-gradient(90deg,#07182b85,transparent 62%),var(--title-art) center/cover no-repeat}
.title-page:before{background:linear-gradient(0deg,#041121b8,transparent 18%)}
.title-page .world-corners{inset:16px;border-color:#e3ca8650}
.title-page .title-lockup{width:min(460px,43vw);text-align:left;text-shadow:2px 3px 0 #081a2d}
.title-page .title-lockup h1{align-items:flex-start}
.title-page .title-lockup .world-kicker{font:700 10px Cinzel,Georgia,serif;letter-spacing:.16em;color:#e9d6ac;margin-bottom:16px}
.title-page .ygo-wordmark{font-size:clamp(48px,5.3vw,76px);margin:0 0 13px;letter-spacing:-.06em;text-shadow:2px 3px 0 #85362c,4px 6px 0 #071b2d;-webkit-text-stroke:.6px #b96d4f}
.title-page .speed-wordmark{font:700 19px Cinzel,Georgia,serif;letter-spacing:.25em;text-shadow:2px 2px #123e5b;color:#dceeff}
.title-page .city-wordmark{font:800 clamp(35px,4.4vw,64px)/1.2 Cinzel,Georgia,serif;letter-spacing:-.035em;color:var(--title-gold);white-space:nowrap;margin-top:6px;text-shadow:2px 2px 0 #856043,4px 5px 0 #081b30}
.title-page .fan-edition{font:10px Cinzel,Georgia,serif;letter-spacing:.21em;color:#d4dce2;margin-top:9px}
.title-page .title-caption{font:italic 17px Alegreya,Georgia,serif;color:#e3e7e9;margin:18px 0 0}
.title-page .title-menu{width:min(370px,39vw);margin:0;gap:7px}
.title-page .menu-caption{font:700 9px Cinzel,Georgia,serif;color:#e3c997;letter-spacing:.19em;margin:0 0 4px}
.title-page .title-menu button{min-height:53px;padding:8px 16px;gap:14px;font:600 19px Cinzel,Georgia,serif;border:1px solid #b5c3c680;border-left:3px solid #f0ce86;background:linear-gradient(90deg,#102943f5,#102943b5);box-shadow:3px 3px 0 #05132185;transition:background .12s,border-color .12s}
.title-page .title-menu button:hover:enabled,.title-page .title-menu button:focus-visible{background:#234b66ee;border-color:#ffe3a1}
.title-page .title-menu button:first-of-type{border-color:#f1d49d;background:linear-gradient(90deg,#254360f5,#18354bd9)}
.title-page .title-menu button:disabled{opacity:.6}
.title-page .title-footer{bottom:23px;left:6vw;width:auto;text-align:left;letter-spacing:.02em;color:#ced6df}
@media(max-width:640px) and (min-height:521px){
 .title-page{align-items:center;gap:25px;padding:35px 25px 62px;background-position:67% center;background-image:linear-gradient(0deg,#07182be8,#07182b65 65%,#07182b96),var(--title-art)}
 .title-page .title-lockup{width:100%;text-align:center}.title-page .title-lockup h1{align-items:center}
 .title-page .title-lockup .world-kicker{font-size:8px;letter-spacing:.1em}.title-page .ygo-wordmark{font-size:56px}.title-page .city-wordmark{font-size:clamp(29px,9vw,48px)}
 .title-page .speed-wordmark{font-size:16px}.title-page .title-caption{font-size:16px;margin-top:16px}
 .title-page .title-menu{width:min(340px,100%)}.title-page .title-menu button{min-height:52px;font-size:17px}
 .title-page .title-footer{left:24px;right:24px;text-align:center;bottom:24px}.title-page .title-footer small{font-size:8px}
}
@media(max-height:650px) and (min-width:641px){
 .title-page{display:grid;grid-template-columns:1fr 1fr;align-content:center;align-items:center;gap:35px;padding:25px 6vw 45px;background-image:linear-gradient(90deg,#07182bbd,#07182b20),var(--title-art)}
 .title-page .title-lockup{width:100%}.title-page .title-menu{width:100%;max-width:330px;margin-left:auto}
 .title-page .ygo-wordmark{font-size:51px}.title-page .city-wordmark{font-size:40px}.title-page .speed-wordmark{font-size:15px}
 .title-page .title-menu button{min-height:44px;font-size:16px;padding:6px 12px}.title-page .title-caption{display:none}
 .title-page .title-lockup .world-kicker{font-size:8px}.title-page .title-footer{bottom:12px}
}
@media(max-height:520px) and (max-width:640px){.title-page{overflow-y:auto;justify-content:flex-start;gap:18px}.title-page .title-lockup,.title-page .title-menu{width:100%}.title-page .title-footer{position:static}.title-page .city-wordmark{font-size:30px}.title-page .ygo-wordmark{font-size:43px}}

/* A stone duel arena with holographic instruments. Geometry is fixed across
   selection, effects and drawer changes so the board camera stays still. */
.material-summary{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:7px 9px;margin:3px 0 8px;background:#254c47;border:1px solid #8cf1c8;color:#bfffe4;font:11px Arial,sans-serif}.material-summary span{font-size:10px;color:#daede6}.choice-cards button{position:relative}.choice-cards button.picked{border:2px solid #9dffd2!important;background:#244f4e!important;box-shadow:inset 0 0 12px #6dffc326;outline:1px solid #c5ffe4}.choice-check{position:absolute;right:4px;top:4px;width:20px;height:20px;border-radius:50%;background:#b8ffda;color:#09352c;display:grid;place-items:center;font:900 14px Arial,sans-serif}.material-badge{position:absolute;top:-9px;left:-6px;right:-6px;z-index:6;background:#b8ffda;color:#083b2b;border:1px solid #edfff6;text-align:center;font:700 7px Arial,sans-serif;padding:2px 1px;pointer-events:none}.card:has(.material-badge).armed:after{content:'SELECTED';background:#145044;color:#b9ffe0}.opponent .card .material-badge{transform:rotate(180deg)}.card.defense .material-badge{transform:rotate(-90deg)}.opponent .card.defense .material-badge{transform:rotate(90deg)}
@media(max-width:600px){.material-summary{display:block;padding:5px;font-size:10px}.material-summary span{display:block;font-size:9px;margin-top:3px}.material-badge{font-size:6px}}
.shell{--hud-blue:#70d8ff;--hud-red:#ff8b92;--stone-edge:#8f9693;--hud-ink:#eaf6fb;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(#04101c88,#04101cbb),var(--world-art) center/cover}
.shell .topbar{height:52px;padding:0 20px;background:linear-gradient(100deg,#080e17f5,#122d43eb,#080e17f5);border-bottom:1px solid #7bbfdb55;box-shadow:0 4px 16px #0006}
.shell .brand strong{font:700 17px Arial,sans-serif;letter-spacing:.16em;color:#f1f7fa}
.shell .brand small{font-size:8px;letter-spacing:.18em;color:#a2b5c4}
.shell .brand-mark{width:30px;height:30px;font-size:20px;border-color:#88bed7}
.shell .status{font-size:10px;color:#eefaff;letter-spacing:.12em;background:#102d45;padding:8px 15px;border:1px solid #6fb5d366;clip-path:polygon(10px 0,100% 0,calc(100% - 10px) 100%,0 100%)}
.shell .header-actions{gap:6px}
.shell .header-actions .subtle{min-height:34px;padding:7px 12px;border:1px solid #8db7c55e;background:#102538c9;color:#e8f4fb;font-size:10px}
.shell #open-panel{display:block}
.shell .layout{display:block;max-width:none}
.shell .arena,.shell:has(.touch-actions) .arena{padding:8px 16px 12px;background:radial-gradient(ellipse at center,#09172200 20%,#0208159c 100%);border:0}
.shell .arena:before{inset:10px 12px;opacity:.35;border:1px solid #9dc5d447;clip-path:polygon(20px 0,calc(100% - 20px) 0,100% 20px,100% calc(100% - 20px),calc(100% - 20px) 100%,20px 100%,0 calc(100% - 20px),0 20px)}
.shell .arena:after{width:600px;height:600px;border:1px solid #bfab652e;box-shadow:0 0 0 24px #bd9e4d08,0 0 0 27px #bd9e4d20;opacity:.8}
.shell .arena-top{max-width:910px;margin:0 auto 5px;color:#bdc7ce;font-size:8px;letter-spacing:.15em}
.shell .duelist{--side-color:var(--hud-blue);max-width:930px;padding:4px 106px;margin:auto;background:none;border:0;isolation:isolate}
.shell .duelist.opponent{--side-color:var(--hud-red)}
.shell .duelist:before{content:'';position:absolute;z-index:-1;inset:90px 95px 6px;background:linear-gradient(120deg,#b3afa227,#e6d4a321 45%,#454b493d),repeating-linear-gradient(35deg,#444a4e82 0 39px,#747d7d88 40px,#303e498c 42px 80px);border:3px ridge #9b978c80;box-shadow:0 5px 25px #0008,inset 0 0 25px #0005;clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px)}
.shell .duelist.self:before{inset:6px 95px 90px}
.shell .board-line.zones{max-width:660px;width:100%;gap:8px;margin-bottom:8px}
.shell .board-line.zones .zone{height:104px;padding:6px;background:linear-gradient(135deg,#2d3849bc,#101c2cdd),repeating-linear-gradient(35deg,#526071 0 15px,#3d4a5b 16px 35px);border:1px solid #aeb9bd66;box-shadow:inset 0 0 0 3px #a4bbd216,inset 0 0 0 4px #0006,inset 0 0 20px #0007,0 2px 1px #000a;border-radius:3px}
.shell .monster-row [data-zone-kind=monsters]{border-color:color-mix(in srgb,var(--side-color) 55%,#697782);background:linear-gradient(145deg,#293d52d9,#101c2cd9)}
.shell .spell-row [data-zone-kind=spells]{background:linear-gradient(145deg,#384844c7,#132b2ed9);border-color:#91afa276}
.shell .board-line.zones .card,.shell .board-line.zones .field-slot .card,.shell .pile-zone:not(.mini)>img,.shell .pile-zone:not(.mini) .pile-back{width:61px;height:87px}
.shell .zone .zone-label{font:7px Arial,sans-serif;letter-spacing:.1em;color:#cad5d8;left:6px;top:4px;background:transparent}
.shell .zone-empty{font-size:29px;color:#b1c6d533;text-shadow:0 1px #0008}
.shell .field-slot .zone-empty{color:#d4c17e66}
.shell .pile-count{border:1px solid #c9dded66;background:#0b1525f2;color:#fff;font:700 11px Arial,sans-serif;border-radius:2px;padding:2px 5px}
.shell .zone.placeable{border-color:#ffe09a!important;box-shadow:inset 0 0 20px #dec35b55,0 0 12px #ffd98655}
.shell .zone:focus-visible,.shell .skill:focus-visible{outline:3px solid #ffe29a;outline-offset:2px}
.shell .auxiliary-row,.shell .auxiliary-row.mirrored{display:contents;position:static;width:auto;margin:0}
.shell .auxiliary-row .skill{position:absolute;left:6px;top:38px;min-width:0;width:86px;max-width:none;min-height:0;padding:6px 5px;border:1px solid #9fbee266;border-top:2px solid var(--side-color);border-radius:3px;background:linear-gradient(#162b42f2,#08121ee6);box-shadow:0 5px 15px #0007;overflow:hidden;text-align:center;letter-spacing:0;white-space:normal}
.shell .opponent .auxiliary-row .skill{left:auto;right:6px;top:135px}
.shell .skill .skill-dock-label{font:700 8px Arial,sans-serif;letter-spacing:.18em;color:#b2d4ed;margin:0 0 5px}
.shell .skill .skill-frame{display:block;margin:0 auto 5px;width:66px;height:96px;background:#040c18;border:1px solid #a7c5df55;box-shadow:0 1px 7px #0009}
.shell .skill-scan{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none}
.shell .skill b{display:block;font:700 10px/1.2 Arial,sans-serif;color:#d5e3ed;min-height:24px}
.shell .skill .skill-status{font:8px/1.2 Arial,sans-serif;color:#94acbc;margin:4px 0 0}
.shell .skill .skill-hint{display:none}
.shell .skill.up{border-color:#83c9e5;box-shadow:0 0 14px #6bbbe82e,0 5px 15px #0007}
.shell .skill.available{border-color:#f4d180;box-shadow:0 0 13px #f4d18055}
.shell .skill.available .skill-status{color:#ffe59d}
.shell .skill:disabled{opacity:.4}
.shell .auxiliary-row .mini{position:absolute;right:7px;top:65px;width:85px;height:65px;border:1px solid #afa4c55c;border-radius:3px;background:linear-gradient(#28283edb,#101223e6);grid-template-columns:1fr;gap:0}
.shell .opponent .auxiliary-row .mini{right:auto;left:7px;top:166px}
.shell .auxiliary-row .mini img{width:25px;height:36px;margin-top:7px}
.shell .auxiliary-row .mini .zone-label{font-size:7px;left:5px;top:4px;background:none}
.shell .duelist-meta,.shell .self .duelist-meta{width:100%;height:40px;min-height:40px;margin:0 auto 3px;gap:8px;background:linear-gradient(90deg,#0b1c30d9,#102638aa 65%,#0b1c3066);border-bottom:2px solid var(--side-color);padding:4px 10px;box-shadow:0 3px 12px #0004}
.shell .opponent .duelist-meta{flex-direction:row-reverse;text-align:right;border-bottom:0;border-top:2px solid var(--side-color)}
.shell .duelist-meta .eyebrow{font:7px Arial,sans-serif;letter-spacing:.12em;color:var(--side-color)}
.shell .duelist-meta strong{font:700 14px Arial,sans-serif;letter-spacing:.02em;color:#f4f8fc}
.shell .duelist-meta .skill-name{display:none}
.shell .lp{position:relative;display:flex;align-items:baseline;gap:6px;min-width:106px;padding-bottom:6px;font:700 24px Arial,sans-serif;line-height:1;color:#fff;text-shadow:0 1px 3px #000}
.shell .lp small{font:700 9px Arial,sans-serif;color:var(--side-color)}
.shell .lp-meter{position:absolute;bottom:0;left:0;right:0;height:3px;background:#abc5d630;overflow:hidden}
.shell .lp-meter i{display:block;height:100%;background:var(--side-color);width:var(--lp-fill)}
.shell .hand-area{max-width:660px;position:static;width:auto;height:auto}
.shell .hand-header{margin:3px 0 2px;font-size:7px;color:#c0cbd9;letter-spacing:.1em}
.shell .hand{height:76px;min-height:76px;max-height:76px;gap:6px;padding:0 2px 5px;background:none}
.shell .hand .card{width:48px;height:68px;box-shadow:0 2px 8px #0009;flex-shrink:0}
.shell .phase-rail{max-width:718px;margin:2px auto 4px;padding:5px 8px;gap:6px;border-top:1px solid #859fb259;border-bottom:1px solid #859fb259;background:linear-gradient(90deg,#071726e6,#1e354bcc,#071726e6);box-shadow:0 3px 13px #0005;min-height:65px;height:65px}
.shell .phase-track{gap:4px}
.shell .phase{font:700 8px Arial,sans-serif;letter-spacing:.06em;padding:5px 9px;border:1px solid #9bb5c63b;background:#0714219c;color:#879cae;min-height:0;clip-path:polygon(5px 0,100% 0,calc(100% - 5px) 100%,0 100%)}
.shell .phase.active{background:#b5def2;color:#0e263c;border-color:#ecfaff;box-shadow:0 0 12px #63c8ff55}
.shell .turn-owner{font:7px Arial,sans-serif;color:#b8c7d4;letter-spacing:.1em}
.shell .turn-owner b{font:700 10px Arial,sans-serif;color:#fff}
.shell .duel-history{font:10px/1.4 Arial,sans-serif;height:24px;min-height:24px;max-height:24px;color:#dfe8f2;padding:2px 6px}
.shell .control-bar{max-width:718px;margin:5px auto 0;height:44px;min-height:44px;max-height:44px;color:#c7d8e6;font-size:11px}
.shell .primary,.shell .action{background:linear-gradient(115deg,#335b77,#122f49);border-color:#a0c7e4;color:#f1f9ff;font-family:Arial,sans-serif}
.shell .sidebar{display:none;position:fixed;z-index:7;top:62px;bottom:16px;left:16px;width:300px;height:auto;border:1px solid #88b3cc80;background:linear-gradient(#132b43fa,#06111ffa);box-shadow:0 12px 40px #000b}
.shell .sidebar.open{display:flex}
.shell .sidebar .panel-close{display:block;min-width:44px;min-height:44px;font-size:20px}
.shell .sidebar .tabs button{font-size:10px;color:#bbd4e8;border-color:#8aafc338}
.shell .sidebar .tabs button.active{color:#fff;border-bottom:2px solid #8cdaff}
.shell .sidebar .action-list{display:grid}
.shell .inspector-card h2{font:700 19px Arial,sans-serif;color:#fff}
.shell .card-text{font:12px/1.6 Arial,sans-serif;color:#cad7e2}
.shell .touch-actions,.shell .choice-tray,.shell .reaction-prompt,.shell .modal,.shell .pile-browser{background:linear-gradient(120deg,#18364df7,#091727fb);border-color:#91c6e4;color:#e6f3fc}
.shell .touch-actions{width:min(620px,calc(100% - 24px));border-radius:4px;bottom:12px}
.shell .touch-actions-head{font:12px Arial,sans-serif;color:#eefaff}
.shell .touch-actions .action{font-size:12px}
.shell .reaction-prompt h2,.shell .pile-browser h2{font-family:Arial,sans-serif;color:#f1f8fd}
.shell .prompt-options button,.shell .pile-grid button{background:#18364d;border-color:#708fa6;color:#e7f4fc}
.shell .auxiliary-row .skill{height:176px;max-height:176px}
.shell .duelist-meta,.shell .self .duelist-meta{position:relative;left:auto;right:auto;top:auto;bottom:auto;display:flex}
.shell .phase-rail{flex-wrap:wrap}
.shell .duel-history{width:100%;flex:none}
@media(max-width:1000px){
 .shell .arena,.shell:has(.touch-actions) .arena{padding:4px 6px}
 .shell .topbar{height:48px;padding:0 8px}
 .shell .brand strong{font-size:13px;letter-spacing:.08em}.shell .brand small{font-size:6px}.shell .brand-mark{display:none}
 .shell .status{font-size:8px;padding:6px 9px}.shell .header-actions .subtle{min-height:34px;padding:4px 7px;font-size:8px}
 .shell .duelist{max-width:720px;padding:2px 66px}
 .shell .duelist:before{inset:79px 59px 1px}.shell .duelist.self:before{inset:1px 59px 79px}
 .shell .board-line.zones{gap:5px;margin-bottom:5px}.shell .board-line.zones .zone{height:79px;padding:3px}
 .shell .board-line.zones .card,.shell .board-line.zones .field-slot .card,.shell .pile-zone:not(.mini)>img,.shell .pile-zone:not(.mini) .pile-back{width:44px;height:62px}
 .shell .zone .zone-label{font-size:6px;letter-spacing:0;left:3px;top:3px}
 .shell .duelist-meta,.shell .self .duelist-meta{height:32px;min-height:32px;padding:3px 6px}.shell .duelist-meta strong{font-size:11px}.shell .lp{font-size:21px;min-width:87px}
 .shell .hand{height:60px;min-height:60px;max-height:60px;gap:4px;padding-bottom:3px}.shell .hand .card{width:37px;height:52px}
 .shell .auxiliary-row .skill{left:2px;top:21px;width:58px;padding:4px 3px;height:135px;max-height:135px}.shell .opponent .auxiliary-row .skill{right:2px;left:auto;top:106px}
 .shell .skill .skill-frame{width:44px;height:64px;margin-bottom:4px}.shell .skill .skill-dock-label{font-size:7px;margin-bottom:4px}.shell .skill b{font-size:8px;min-height:27px}.shell .skill .skill-status{font-size:7px}
 .shell .auxiliary-row .mini{right:2px;top:48px;width:58px;height:52px}.shell .opponent .auxiliary-row .mini{left:2px;right:auto;top:128px}.shell .auxiliary-row .mini .zone-label{font-size:6px;left:3px}.shell .auxiliary-row .mini img{width:21px;height:30px}
 .shell .phase-rail{max-width:590px;height:62px;min-height:62px;padding:4px 6px}.shell .phase{font-size:7px;padding:5px 6px}.shell .turn-owner b{font-size:9px}
 .shell .control-bar{max-width:590px}.shell .touch-actions{width:calc(100% - 12px);left:6px;right:6px;bottom:6px;transform:none}
 .shell .sidebar{left:8px;right:8px;top:56px;bottom:8px;width:min(360px,calc(100% - 16px))}
}
@media(max-width:500px){
 .shell .topbar{gap:3px}.shell .brand small{display:none}.shell .brand strong{font-size:11px}.shell .status{font-size:7px;padding:5px 7px}.shell .header-actions{gap:3px}.shell #restart{max-width:47px}
 .shell .arena-top{font-size:7px;margin-bottom:3px}
 .shell .duelist{padding:2px 47px}.shell .duelist:before{inset:83px 43px 1px}.shell .duelist.self:before{inset:1px 43px 83px}
 .shell .board-line.zones{gap:3px}.shell .board-line.zones .zone{height:72px;padding:2px}
 .shell .board-line.zones .card,.shell .board-line.zones .field-slot .card,.shell .pile-zone:not(.mini)>img,.shell .pile-zone:not(.mini) .pile-back{width:37px;height:53px}
 .shell .zone .zone-label{font-size:5px;left:2px;top:2px}.shell .zone-empty{font-size:23px}.shell .pile-count{font-size:8px;padding:1px 3px}
 .shell .card-stats{font-size:6px;padding:1px 2px;bottom:-8px}
 .shell .duelist-meta strong{font-size:10px;max-width:145px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.shell .lp{font-size:19px;min-width:76px;gap:3px}.shell .lp small{font-size:7px}
 .shell .hand{height:63px;min-height:63px;max-height:63px;gap:3px}.shell .hand .card{width:36px;height:51px}.shell .hand-header span:last-child{display:none}
 .shell .auxiliary-row .skill{width:42px;left:0;top:12px;padding:4px 2px;height:125px;max-height:125px}.shell .opponent .auxiliary-row .skill{right:0;left:auto;top:109px}
 .shell .skill .skill-frame{width:33px;height:48px}.shell .skill b{font-size:7px;min-height:34px}.shell .skill .skill-status{font-size:6px}.shell .skill .skill-dock-label{font-size:6px;letter-spacing:.1em}
 .shell .auxiliary-row .mini{width:42px;right:0;top:50px}.shell .opponent .auxiliary-row .mini{left:0;right:auto;top:149px}.shell .auxiliary-row .mini .zone-label{font-size:5px;left:2px}
 .shell .phase-rail{height:64px;min-height:64px;margin:4px auto;padding:5px}.shell .phase-track{gap:3px}.shell .phase{font-size:6px;padding:5px 4px}.shell .turn-owner{font-size:6px}.shell .turn-owner b{font-size:8px;max-width:94px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shell .duel-history{font-size:9px}
 .shell .control-bar{font-size:9px}
}
@media(max-height:500px) and (min-width:501px){
 .shell .topbar{height:40px}.shell .arena-top{display:none}.shell .arena{padding-top:2px}.shell .duelist{max-width:700px}.shell .board-line.zones .zone{height:63px}.shell .board-line.zones .card,.shell .board-line.zones .field-slot .card,.shell .pile-zone:not(.mini)>img,.shell .pile-zone:not(.mini) .pile-back{width:35px;height:50px}
 .shell .hand{height:45px;min-height:45px;max-height:45px}.shell .hand .card{width:28px;height:39px}.shell .duelist-meta,.shell .self .duelist-meta{height:27px;min-height:27px}.shell .duelist:before{top:67px}.shell .duelist.self:before{top:1px;bottom:67px}.shell .opponent .auxiliary-row .skill{top:72px}.shell .opponent .auxiliary-row .mini{top:95px}.shell .phase-rail{height:52px;min-height:52px}.shell .control-bar{height:39px;min-height:39px}.shell .duel-history{height:18px;min-height:18px;max-height:18px;font-size:9px}
}
/* Landscape uses side instruments to keep cards large enough to tap. */
@media(orientation:landscape) and (max-height:520px){
 .shell .arena,.shell:has(.touch-actions) .arena{padding:2px 6px 4px}
 .shell .duelist{max-width:800px;padding:0 88px;min-height:154px}
 .shell .duelist:before,.shell .duelist.self:before{inset:0 81px 2px}
 .shell .board-line.zones{gap:5px;margin-bottom:5px}.shell .board-line.zones .zone{height:72px}
 .shell .board-line.zones .card,.shell .board-line.zones .field-slot .card,.shell .pile-zone:not(.mini)>img,.shell .pile-zone:not(.mini) .pile-back{width:43px;height:60px}
 .shell .duelist-meta,.shell .self .duelist-meta{position:absolute;left:0;right:auto;top:0;bottom:auto;width:80px;height:33px;min-height:33px;display:block;padding:3px;border:0;border-left:2px solid var(--side-color);text-align:left}
 .shell .self .duelist-meta{top:auto;bottom:3px}.shell .duelist-meta strong{font-size:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.shell .duelist-meta .eyebrow{display:none}.shell .duelist-meta .lp{font-size:16px;min-width:0;margin:1px 0 0;padding-bottom:4px}
 .shell .hand-area{position:absolute;left:0;top:39px;width:80px;height:72px}.shell .self .hand-area{top:0;height:111px}.shell .hand-header{display:none}
 .shell .hand{display:grid;grid-template-rows:repeat(2,29px);grid-auto-flow:column;grid-auto-columns:23px;justify-content:start;gap:3px;height:67px;min-height:67px;max-height:67px;padding:2px;overflow-x:auto}.shell .hand .card{width:21px;height:29px}
 .shell .self .hand{grid-template-rows:repeat(2,48px);grid-auto-columns:35px;height:109px;min-height:109px;max-height:109px;gap:3px}.shell .self .hand .card{width:33px;height:47px}
 .shell .auxiliary-row .skill,.shell .opponent .auxiliary-row .skill{left:auto;right:0;top:0;width:76px;height:117px;max-height:117px;padding:3px}
 .shell .skill .skill-frame{width:45px;height:64px;margin-bottom:2px}.shell .skill .skill-dock-label{font-size:6px;margin:0 0 2px}.shell .skill b{font-size:8px;min-height:20px}.shell .skill .skill-status{font-size:6px;margin-top:2px}
 .shell .auxiliary-row .mini,.shell .opponent .auxiliary-row .mini{left:auto;right:0;top:121px;width:76px;height:30px;display:flex;justify-content:center}.shell .auxiliary-row .mini img{width:13px;height:19px;margin:0}.shell .auxiliary-row .mini .zone-label{font-size:5px;left:3px;top:2px}
 .shell .phase-rail{max-width:624px;height:36px;min-height:36px;flex-wrap:nowrap;padding:3px 5px;margin:2px auto}.shell .phase{padding:5px;font-size:7px}.shell .duel-history{width:auto;flex:1;height:27px;min-height:27px;max-height:27px;font-size:8px;padding:0 3px}
 .shell .control-bar{max-width:624px;height:40px;min-height:40px;max-height:40px;margin:2px auto 0}
}

/* Reading cards never obscures the rules engine's response controls. */
.shell .choice-tray,.shell .touch-actions{z-index:13}
.shell .reaction-shade{z-index:14}
/* Larger player hand; compact two-line combat values stay within each lane. */
.shell .self .hand{height:99px;min-height:99px;max-height:99px}
.shell .self .hand .card{width:63px;height:89px}
.shell .card-stats{font-size:11px;line-height:1.08;padding:2px 3px;background:#07151af5;border-color:#e4c786;box-shadow:0 1px 3px #000;bottom:-10px}
.shell .card-stats b{display:flex;align-items:center;justify-content:space-between;gap:3px;font-size:7px;color:#c8d6dc}
.shell .card-stats strong{font-size:11px;color:#fff7d9;font-variant-numeric:tabular-nums}
.shell .self .card.defense .card-stats{transform:translateX(-50%) rotate(-90deg)}
@media(max-width:1000px){.shell .self .hand{height:79px;min-height:79px;max-height:79px}.shell .self .hand .card{width:48px;height:68px}}
@media(max-width:500px){.shell .card-stats strong{font-size:10px}.shell .card-stats b{font-size:6px;gap:2px}.shell .card-stats{padding:2px;bottom:-9px}}
@media(orientation:landscape) and (max-height:520px){.shell .self .hand-area{height:115px}.shell .self .hand{grid-template-rows:repeat(2,53px);grid-auto-columns:39px;height:115px;min-height:115px;max-height:115px}.shell .self .hand .card{width:37px;height:52px}}
.shell:has(.choice-tray) .sidebar.open{max-height:calc(100dvh - 310px)}
.shell:has(.choice-tray) .pile-browser{max-height:calc(100dvh - 300px);margin-bottom:260px}
@media(max-width:640px){
 .shell:has(.choice-tray) .sidebar.open{bottom:auto;height:32dvh;max-height:32dvh}
 .shell:has(.choice-tray) .pile-browser{max-height:40dvh;margin-bottom:35dvh}
}

/* Readability: actual cards grow, without enlarging the entire board. */
.shell .self .hand{height:111px;min-height:111px;max-height:111px}
.shell .self .hand .card{width:72px;height:102px}
.shell .card-stats{bottom:-12px;min-width:61px}
.shell .card-stats strong{font-size:14px}
.shell .card-stats b{font-size:9px;gap:4px}
.shell .card-text{font:15px/1.6 Arial,sans-serif}
.shell .inspector-stats{font-size:13px;line-height:1.6}
.shell .inspector-head{font-size:12px}
.shell .inspector-card h2{font-size:23px}
.shell .end-overlay{background:#030f1266}
.shell .end-overlay>div{padding:20px;display:flex;gap:14px;flex-wrap:wrap;justify-content:center}
@media(max-width:1000px){.shell .self .hand{height:91px;min-height:91px;max-height:91px}.shell .self .hand .card{width:56px;height:80px}}
@media(max-width:500px){.shell .card-stats strong{font-size:12px}.shell .card-stats b{font-size:8px;gap:3px}.shell .card-stats{min-width:55px;bottom:-11px}}
@media(orientation:landscape) and (max-height:520px){.shell .self .hand-area{height:138px}.shell .self .hand{grid-template-rows:repeat(2,64px);grid-auto-columns:47px;height:138px;min-height:138px;max-height:138px}.shell .self .hand .card{width:45px;height:64px}}

.shell:has(.sidebar.open) .touch-actions{display:none}
@media(orientation:landscape) and (max-height:520px){
 .shell .duelist{min-height:174px}
 .shell .sidebar{width:min(640px,calc(100vw - 32px));top:48px;bottom:8px}
 .shell .panel-content{padding:10px;max-height:none}
 .shell .inspector-card{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px 15px;padding:12px}
 .shell .inspector-head{grid-column:1/-1}
 .shell .inspector-card h2{grid-column:2;margin:0}
 .shell .inspector-stats{grid-column:2}
 .shell .inspector-art{grid-column:1;grid-row:2/5;margin:0}
 .shell .inspector-art img{width:100%;max-width:100%;height:auto}
 .shell .card-text{grid-column:2;margin:0;padding-top:8px}
}

.music-page{display:flex;flex-direction:column}.music-controls{width:min(920px,100%);margin:20px auto 0;min-height:0;overflow:auto;padding:18px 24px;background:#07172de8;border:1px solid #718bad66;scrollbar-color:#d6b26b #11223a}.music-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.music-heading h2,.music-playlist-heading h2{font:24px Georgia,serif;color:#f5d89e;margin:0 0 5px}.music-heading p,.music-playlist-heading p{color:#adc3d7;font:12px/1.4 Arial;margin:0}.music-switch{display:flex;align-items:center;gap:10px;background:#173d52;padding:12px 16px;border:1px solid #6aafc7;color:#f1f9ff;font:700 13px Arial;min-height:48px}.music-switch input,.music-track input{width:22px;height:22px;accent-color:#88e2c7;flex:none}.volume-control{display:grid;grid-template-columns:1fr auto;gap:10px;color:#d3e5f3;font:12px Arial;margin:20px 0}.volume-control input{grid-column:1/-1;width:100%;height:32px;accent-color:#7dc9e8}.now-playing{display:grid;grid-template-columns:1fr auto;gap:4px 12px;background:#133049b8;padding:12px;border-left:3px solid #94d4ee}.now-playing>span{font:9px Arial;letter-spacing:.15em;color:#a3bfd4}.now-playing strong{grid-column:1;font:14px Arial;color:#e6f5ff}.now-playing button{grid-column:2;grid-row:1/3;min-height:44px;font-size:11px}.music-playlist-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:22px 0 10px}.music-playlist-heading h2{font-size:20px}.music-track-list{display:grid;grid-template-columns:1fr 1fr;gap:9px}.music-track{display:flex;align-items:center;gap:10px;background:#102840e0;border:1px solid #5b809b6b;padding:11px;min-height:68px}.music-track label{display:flex;align-items:center;gap:11px;flex:1;min-width:0;cursor:pointer}.music-track strong{font:700 13px/1.3 Arial;color:#e1f0fa;display:block}.music-track small{font:9px/1.4 Arial;color:#95b3cd;display:block;margin-top:4px}.music-track button{min-height:44px;padding:6px 10px;background:#284d63;border:1px solid #92bfd7;color:#e7f7ff;font:10px Arial;cursor:pointer}.music-track button:disabled{opacity:.45;cursor:default}.music-note{font:11px/1.5 Arial;color:#b7c7d5;margin:16px 0 0}.music-page button:focus-visible,.music-page input:focus-visible{outline:3px solid #f8da95;outline-offset:3px}#open-music{white-space:nowrap}
@media(max-width:640px){.music-page{padding:12px}.music-controls{padding:14px;margin-top:12px}.music-heading h2{font-size:20px}.music-switch{padding:9px;font-size:11px}.music-heading p{font-size:9px}.music-track-list{grid-template-columns:1fr}.music-track{min-height:67px;padding:9px}.music-playlist-heading{display:block}.music-playlist-heading p{font-size:10px}.music-track strong{font-size:12px}.music-note{font-size:10px}.now-playing strong{font-size:12px}.volume-control{margin:14px 0}.shell #open-music{font-size:7px;padding:4px}.shell .status{padding-inline:5px}}
@media(max-height:520px){.music-controls{margin-top:8px;padding:12px}.music-heading h2{font-size:19px}.music-track-list{grid-template-columns:1fr 1fr}.volume-control{margin:12px 0}.music-playlist-heading{margin-top:14px}}

.duel-word-overlay{position:absolute;inset:0;z-index:44;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.2rem;background:radial-gradient(ellipse at center,rgba(6,18,31,.18),rgba(4,12,22,.48));cursor:pointer;overflow:hidden;text-align:center}
.duel-word-overlay strong{display:block;max-width:96%;font-family:Impact,'Arial Black',sans-serif;font-size:clamp(4rem,13vw,10rem);line-height:.94;letter-spacing:.075em;white-space:nowrap;color:#f9e7b6;-webkit-text-stroke:clamp(2px,.45vw,5px) #422125;paint-order:stroke fill;text-shadow:0 .035em #fff4,0 .085em #a64a2d,0 .15em #632622,0 .21em #161b30,0 .26em 12px #000c,0 0 .2em #ffbd54;animation:duel-word-enter .42s cubic-bezier(.15,.75,.3,1.15) both,duel-word-shine 1.3s ease .4s both}
.duel-word-overlay.win strong{background:linear-gradient(#fff4db 0%,#ed9b65 37%,#bd4329 72%,#731c26);color:transparent;background-clip:text;-webkit-text-fill-color:transparent}
.duel-word-overlay.lose strong{color:#d7daec;text-shadow:0 .08em #625272,0 .16em #322640,0 .22em #12141b,0 .28em 12px #000b}
.duel-word-overlay.draw strong{color:#dee9f1;text-shadow:0 .08em #607e8f,0 .16em #29465b,0 .22em #111e30,0 .28em 12px #000b}
.duel-word-overlay small{font:600 clamp(.7rem,1vw,.95rem) Arial,sans-serif;letter-spacing:.18em;text-transform:uppercase;color:#e7dec8;text-shadow:0 2px 5px #000}
@keyframes duel-word-enter{from{opacity:0;transform:translateY(-22%) scale(1.6)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes duel-word-shine{0%{filter:brightness(1)}40%{filter:brightness(1.35)}100%{filter:brightness(1)}}
@media(max-width:600px){.duel-word-overlay strong{font-size:clamp(3.2rem,15vw,5rem);letter-spacing:.01em}}
@media(prefers-reduced-motion:reduce){.duel-word-overlay strong{animation:none}}
.audio-debug{position:absolute;z-index:60;left:8px;bottom:7px;padding:3px 6px;background:#071219dd;border:1px solid #7ba7b0;color:#e6f7fa;font:10px/1.3 monospace;pointer-events:none}

.city-page{--city-ink:#172943;--city-paper:#fff0c8;--city-blue:#4cb5d5;--city-gold:#ffd265;min-height:0;height:100dvh;overflow:hidden;display:flex;align-items:center;flex-direction:column;background:radial-gradient(ellipse at center,#263d61,#0c182d);color:var(--city-paper);font:13px/1.5 Consolas,'Courier New',monospace;padding:12px 16px 8px;gap:8px}
.city-page button{font:700 12px/1.3 Consolas,'Courier New',monospace;cursor:pointer;color:var(--city-paper);background:#1d3552;border:2px solid #638fae;border-radius:0;box-shadow:2px 2px 0 #0008;padding:10px 14px;min-height:44px;touch-action:manipulation}
.city-page button:focus-visible{outline:3px solid var(--city-gold);outline-offset:3px}.city-page button:hover{border-color:var(--city-gold);background:#324a60}
.city-header{display:flex;width:min(1100px,100%);justify-content:space-between;align-items:center;gap:12px;flex:none}.city-header>div{text-align:center}.city-header small{font-size:10px;letter-spacing:2px;color:#b9d5e0}.city-header h1{font-size:27px;letter-spacing:4px;line-height:1.1;margin:4px 0;color:#ffdb80;text-shadow:2px 2px #000}
.city-map-frame{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;width:100%}.city-map{aspect-ratio:3/2;height:100%;width:auto;max-width:100%;max-height:calc((100vw - 36px)*2/3);position:relative;border:4px solid #98bdce;outline:2px solid #081024;box-shadow:inset 0 0 0 2px #faf0cb,0 8px 0 #030e20,0 12px 24px #0007;overflow:hidden;container-type:inline-size;background:#72b6c2;image-rendering:pixelated}
.city-map-art{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.city-location,.city-locators{position:absolute;top:8px;z-index:2;background:#132942e8;border:2px solid #b5d7d1;box-shadow:2px 2px #0007;padding:5px 8px;pointer-events:none}.city-location{left:8px}.city-location span{display:block;font-weight:bold;letter-spacing:1px;color:#ffeead}.city-location small{display:block;font-size:8px;color:#c5dfdd}.city-locators{right:8px;text-align:center}.city-locators>span{font-size:9px;letter-spacing:1px}.city-locators>div{display:flex;gap:3px}.city-locators i{font-style:normal;font-size:12px;display:grid;place-items:center;width:18px;height:25px;color:#6f8ca1;border:1px solid #668095;background:#283b53}.city-locators i.earned{background:#f4d682;color:#233856;border-color:#fff0b5;box-shadow:1px 1px #090e25}.city-locators>small{font-size:9px}
.city-sprite{display:block;flex:none;width:64px;height:64px;background-repeat:no-repeat;background-size:600% 100%;background-position:calc(var(--sprite)*20%) center;image-rendering:pixelated;filter:drop-shadow(1px 2px 0 #15263b66)}
.city-page .city-duelist{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-60%);display:flex;flex-direction:column;align-items:center;padding:0;width:72px;height:88px;background:transparent;border:0;box-shadow:none;z-index:3;overflow:visible;min-height:44px}
.city-page .city-duelist:hover,.city-page .city-duelist.active{background:transparent;border:0}.city-duelist .city-talk-icon{background:#fff1b2;color:#303b4c;border:2px solid #263246;box-shadow:1px 1px #ffffff;width:20px;height:21px;font-size:13px;line-height:17px;position:absolute;top:0;left:44px;z-index:2}.city-duelist .city-sprite{position:absolute;top:10px}.city-npc-label{position:absolute;top:70px;white-space:nowrap;background:#182b43ed;border:1px solid #b7c9d1;padding:1px 5px;font-size:11px;line-height:16px;color:#fff5d3;box-shadow:1px 1px #0007}.city-duelist.active .city-npc-label,.city-duelist:hover .city-npc-label{background:#ffe398;color:#263144;border-color:#fff6d4}.city-duelist.defeated .city-talk-icon{background:#b7ecc1}
.city-player{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);z-index:1;display:grid;justify-items:center;pointer-events:none}.city-player>span:last-child{font-size:8px;line-height:10px;background:#13233c;color:#bce1ef;padding:0 4px}.city-shop-sign,.city-plaza-sign{position:absolute;color:#fff8d3;background:#20354cde;border:1px solid #bfcfab;padding:1px 5px;font-size:9px;pointer-events:none}.city-shop-sign{top:20%;left:12%}.city-plaza-sign{right:8%;bottom:9%}
.city-dialogue{flex:none;display:flex;align-items:center;gap:16px;width:min(1100px,100%);padding:12px 16px;min-height:126px;background:#14263e;border:3px solid #aac2c8;box-shadow:inset 0 0 0 2px #425878,3px 3px #070e1d}.city-dialogue-copy{flex:1;min-width:0}.city-speaker{font-size:16px;font-weight:700;letter-spacing:.3px;color:#ffe298}.city-speaker small{font-weight:400;margin-left:14px;font-size:10px;color:#9bcadd}.city-dialogue p{font-size:13px;margin:6px 0;max-width:780px;line-height:1.55}.city-opponent-deck{font-size:10px;color:#acd3df}.city-portrait{display:grid;place-items:center;width:86px;height:86px;flex:none;background:#2b4559;border:2px solid #6b97af}.city-portrait .city-sprite{transform:scale(1.4)}.city-dialogue-actions{display:flex;gap:7px;flex-direction:column;min-width:150px}.city-page .city-primary{background:#ead078;color:#18283f;border-color:#fff3bb}.city-page .city-primary:hover{background:#fff0b0}.city-footer{width:min(1100px,100%);display:flex;align-items:center;justify-content:space-between;color:#9fb8d3;gap:12px;flex:none;font-size:10px}.city-footer small{font-size:9px}
.city-sheet-shade{position:fixed;z-index:30;inset:0;background:#071123e8;display:grid;place-items:center;padding:16px}.city-deck-sheet{width:min(560px,100%);max-height:85dvh;display:flex;flex-direction:column;background:#152a43;border:3px solid #aed4df;padding:16px;box-shadow:5px 5px #000}.city-deck-sheet header{display:flex;justify-content:space-between;align-items:center;gap:12px}.city-deck-sheet header small{font-size:10px;color:#adcade}.city-deck-sheet h2{color:#ffe19e;font-size:21px;margin:2px 0}.city-deck-sheet p{font-size:12px;color:#b6cfdc}.city-deck-list{min-height:0;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:4px}.city-deck-list button{display:flex;align-items:center;gap:12px;text-align:left;min-height:64px}.city-deck-list button>span{width:37px;height:44px;background:var(--deck-color);border:2px solid #dce7d7;display:grid;place-items:center;color:#102139;font-weight:bold;box-shadow:3px 2px #0006;flex:none}.city-deck-list button>div{flex:1}.city-deck-list small{display:block;color:#b7d9e4;font-size:10px;padding-top:5px}.city-deck-list button.active{border-color:#ffe196;background:#3c4c60}.city-deck-list b{font-size:18px;color:#ffe398}
@media(max-width:640px){.city-page{padding:8px;gap:10px}.city-header{gap:5px}.city-header button{font-size:9px;padding:8px}.city-header small{font-size:7px;letter-spacing:1px}.city-header h1{font-size:20px;letter-spacing:1px}.city-map{width:100%;height:auto;max-height:100%;border-width:3px}.city-map-frame{flex:1;align-items:center}.city-location{left:4px;top:4px;padding:3px 5px}.city-location span{font-size:9px}.city-location small{font-size:6px}.city-locators{right:4px;top:4px;padding:3px}.city-locators>span{font-size:6px}.city-locators i{width:12px;height:17px;font-size:9px}.city-locators>small{font-size:7px}.city-map .city-sprite{width:44px;height:44px}.city-page .city-duelist{width:58px;height:67px;transform:translate(-50%,-60%)}.city-duelist .city-talk-icon{width:16px;height:17px;line-height:13px;font-size:10px;left:34px;top:4px}.city-duelist .city-sprite{top:12px}.city-npc-label{top:53px;font-size:9px;line-height:12px;padding:1px 3px}.city-player>span:last-child{font-size:6px}.city-shop-sign,.city-plaza-sign{font-size:6px;padding:0 2px}.city-dialogue{padding:12px;gap:9px;flex-wrap:wrap;min-height:154px}.city-dialogue-copy{flex:1}.city-dialogue p{font-size:12px;margin:6px 0}.city-speaker{font-size:14px}.city-speaker small{display:block;font-size:9px;margin:3px 0 0}.city-portrait{width:55px;height:64px}.city-portrait .city-sprite{transform:none}.city-dialogue-actions{width:100%;flex-direction:row;min-width:0}.city-dialogue-actions button{flex:1;font-size:10px;padding:9px 6px}.city-footer{flex-direction:column;align-items:flex-start;gap:1px;font-size:9px}.city-footer small{font-size:7px}.city-opponent-deck{font-size:9px}}
@media(max-height:500px) and (min-width:640px){.city-page{padding:5px 12px;gap:5px}.city-header h1{font-size:18px;letter-spacing:2px}.city-header small{font-size:7px}.city-header button{min-height:36px;padding:6px 10px;font-size:9px}.city-dialogue{min-height:75px;padding:7px 10px;gap:9px}.city-dialogue p{font-size:10px;margin:2px 0}.city-speaker{font-size:12px}.city-speaker small{font-size:8px}.city-portrait{width:55px;height:55px}.city-portrait .city-sprite{transform:none;width:48px;height:48px}.city-dialogue-actions{flex-direction:row}.city-dialogue-actions button{min-height:36px;font-size:9px;padding:6px 8px}.city-footer{font-size:8px}.city-footer small{font-size:7px}.city-map .city-sprite{width:40px;height:40px}.city-page .city-duelist{width:50px;height:56px}.city-duelist .city-sprite{top:6px}.city-talk-icon{display:none}.city-npc-label{top:44px;font-size:8px;line-height:10px}.city-location{padding:2px 4px}.city-location span{font-size:8px}.city-location small{font-size:6px}.city-locators{padding:2px 4px}.city-locators>span{font-size:6px}.city-locators i{width:10px;height:14px;font-size:8px}.city-locators>small{font-size:6px}.city-shop-sign,.city-plaza-sign{font-size:5px}}

@media(max-width:640px) and (min-height:550px){
 .city-map-frame{flex:none;margin-top:auto}
 .city-map{aspect-ratio:1;height:auto;width:100%;max-height:calc(100dvh - 300px)}
 .city-footer{margin-top:auto}
 .city-shop-sign,.city-plaza-sign{display:none}
}
.rpg-page{height:100dvh;display:flex;flex-direction:column;background:#172943;color:#fff0c8;font-family:Consolas,monospace;overflow:hidden}.rpg-header{display:flex;align-items:center;gap:12px;padding:10px 18px;border-bottom:3px solid #cbab66;flex-wrap:wrap}.rpg-header>div{flex:1}.rpg-header h1{font-size:18px;margin:0}.rpg-header small{color:#d9b967}.rpg-page button,.rpg-page input,.rpg-page select{font:inherit;color:#fff0c8;background:#263e59;border:2px solid #647e8c;border-radius:3px;padding:9px;min-height:42px}.rpg-page button{cursor:pointer}.rpg-page button:hover,.rpg-page button[aria-pressed=true]{border-color:#ffd265;background:#375979}.rpg-page button:disabled{opacity:.4;cursor:not-allowed}.rpg-page button:focus-visible{outline:3px solid #ffd265;outline-offset:2px}.rpg-world{flex:1;min-height:0;position:relative}.rpg-world canvas{width:100%;height:100%;display:block;image-rendering:pixelated;touch-action:none}.rpg-page footer{font-size:11px;padding:8px 16px;display:flex;gap:18px;justify-content:space-between;background:#172943}.rpg-shade{position:fixed;inset:0;background:#091728bb;z-index:55;display:grid;place-items:center;padding:20px}.rpg-sheet{width:min(1150px,100%);max-height:92dvh;overflow:auto;border:3px solid #d1b779;box-shadow:0 8px 0 #091526;background:#172943;padding:20px;overscroll-behavior:contain}.rpg-sheet>header{display:flex;justify-content:space-between;align-items:center;gap:20px;position:sticky;top:-20px;background:#172943;padding:10px 0;z-index:2}.rpg-sheet h2{font-size:22px;margin:0}.rpg-sheet p{line-height:1.5}.rpg-starters{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.rpg-starters button{padding:20px;text-align:left;border-bottom-width:8px}.rpg-starters strong{font-size:20px;color:#ffd265}.rpg-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px;margin:12px 0}.rpg-card{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;font-size:10px!important;padding:6px!important}.rpg-card img{width:100%;max-width:94px;aspect-ratio:59/86;object-fit:contain}.rpg-card span{overflow-wrap:anywhere}.rpg-card small{color:#ffd265}.rpg-card-detail{display:flex;gap:20px;padding:15px;background:#233950;align-items:flex-start;white-space:pre-line}.rpg-card-detail>img{width:160px;max-width:30%}.rpg-primary{background:#72592f!important;border-color:#ffd265!important;margin-top:14px}.rpg-editor{display:grid;grid-template-columns:1fr 1fr;gap:24px}.rpg-packs{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.rpg-packs button{min-height:190px;display:flex;flex-direction:column;gap:16px;justify-content:center;background:linear-gradient(135deg,hsl(var(--pack-hue),40%,28%),#15283f);border-color:#c7a875}.rpg-packs b{font-size:36px;color:#ffd265}.rpg-packs span{font-size:12px}.rpg-sheet details{margin-top:15px}.rpg-sheet summary{cursor:pointer;padding:10px}.rpg-sheet input{max-width:100%}.rpg-sheet label{display:inline-flex;gap:8px;align-items:center;margin-bottom:10px}
@media(max-width:720px){.rpg-header{padding:6px;gap:6px}.rpg-header h1{font-size:13px}.rpg-header button,.rpg-header select{font-size:11px;padding:5px}.rpg-header>span{font-size:12px}.rpg-header label{font-size:11px}.rpg-page footer{font-size:9px}.rpg-page footer>span{max-width:50%}.rpg-shade{padding:6px}.rpg-sheet{padding:10px;max-height:97dvh}.rpg-sheet>header{top:-10px}.rpg-sheet h2{font-size:17px}.rpg-starters{grid-template-columns:1fr}.rpg-starters button{padding:10px}.rpg-starters p{margin:5px 0}.rpg-editor{grid-template-columns:1fr}.rpg-packs{grid-template-columns:repeat(2,1fr)}.rpg-cards{grid-template-columns:repeat(auto-fill,minmax(78px,1fr))}.rpg-card-detail{gap:10px;padding:8px;font-size:12px}}
.rpg-card.selected{outline:3px solid #ffd265;background:#3b5267}.rpg-card[aria-pressed=true]::after{content:"Selected";color:#ffe29b;font-weight:bold}
.shop-status{display:flex;flex-wrap:wrap;gap:12px;align-items:center;border-bottom:2px solid #d5bd78;padding:10px 0;color:#ffe49b}.shop-status strong{font-size:24px}
.shop-shelf{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;padding:12px 8px 20px;border-bottom:8px ridge #7e674c;background:linear-gradient(#101e3280,#493d3160)}
.shop-product{display:flex;flex-direction:column;gap:8px;min-width:0;text-align:center}.rpg-page .shop-box{padding:8px;display:flex;flex-direction:column;align-items:center;gap:7px;min-height:265px;width:100%;background:linear-gradient(125deg,hsl(var(--pack-hue) 45% 17%),hsl(var(--pack-hue) 55% 34%),#10213c);border:3px ridge #d5bf82;box-shadow:6px 5px 0 #080e20;position:relative;overflow:hidden}.shop-box:before,.shop-box:after{content:'';height:8px;width:100%;background:repeating-linear-gradient(90deg,#b9b9a680 0 2px,#38392b 2px 4px)}.shop-box img{height:155px;max-width:100%;object-fit:contain;filter:drop-shadow(3px 4px 3px #000a)}.shop-box strong{font-size:15px;line-height:1.25}.shop-box small{font-size:8px;letter-spacing:1px}.shop-box span{font-size:10px}
.shop-singles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.shop-singles article{display:flex;flex-direction:column;align-items:stretch;gap:5px}.shop-singles .rpg-card{width:100%;min-height:195px}.shop-singles .rpg-card img{height:115px;object-fit:contain}.shop-pool{margin-top:20px;border:2px solid #899dba;padding:12px}.shop-pool summary{cursor:pointer;padding:10px;color:#ffe49b;font-weight:bold}.shop-reward-breakdown{max-width:640px;border:2px solid #d5bd78;padding:12px;margin-bottom:14px}.shop-reward-breakdown p{display:flex;justify-content:space-between;gap:12px}.shop-reward-breakdown .shop-total{border-top:2px solid #d5bd78;padding-top:10px;color:#ffe49b;font-size:18px}.shop-reveal>div{animation:shop-unseal .3s both;animation-delay:calc(var(--reveal-index)*.1s)}.shop-reveal.skip>div{animation:none}@keyframes shop-unseal{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media(max-width:750px){.shop-shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.shop-singles{grid-template-columns:repeat(2,minmax(0,1fr))}.rpg-page .shop-box{min-height:250px}.shop-box img{height:140px}.shop-status{font-size:11px}.shop-status strong{font-size:20px}}
@media(prefers-reduced-motion:reduce){.shop-reveal>div{animation:none}}
.rpg-sheet button,.rpg-sheet summary,.shop-pool{scroll-margin-top:80px;scroll-margin-bottom:24px}
.shop-reward-breakdown b{white-space:nowrap;flex-shrink:0}.shop-product>.shop-box{height:290px}

.rpg-day-badge{position:absolute;right:14px;top:12px;z-index:1;pointer-events:none;display:flex;align-items:center;gap:10px;padding:9px 15px;background:linear-gradient(130deg,#223d55ee,#102239ed);border:2px solid #d9bd7d;box-shadow:3px 4px 0 #08172a99,inset 0 0 0 2px #344b63;border-radius:3px;color:#fff0c8}
.rpg-day-sun{font:32px Georgia,serif;color:#ffda85;text-shadow:0 0 12px #eabc6755}.rpg-day-badge small{display:block;font-size:9px;letter-spacing:1px;color:#d0bf9c}.rpg-day-badge strong{display:block;font-size:23px;letter-spacing:2px;margin-top:3px}.rpg-card-detail{font-size:16px;line-height:1.6}
@media(max-width:720px){.rpg-day-badge{right:8px;top:8px;padding:6px 9px;gap:7px}.rpg-day-badge strong{font-size:18px}.rpg-day-badge small{font-size:8px}.rpg-day-sun{font-size:26px}.rpg-card-detail{font-size:15px}}

.rpg-deck-sort,.rpg-search-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:end;margin:12px 0}.rpg-search-toolbar label,.rpg-deck-sort label,.rpg-search-filters label{display:grid;gap:5px;font-size:12px;min-width:0;max-width:100%;margin:0}.rpg-search-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border:1px solid #8ba1ac;background:#11283d}.rpg-search-filters select,.rpg-search-toolbar select{max-width:100%;min-width:0;width:100%}.rpg-search-filters .rpg-support-toggle{display:flex;align-items:center;grid-column:1/-1}.rpg-editor>section{min-width:0}.rpg-search-toolbar label{flex:1 1 150px}.rpg-search-filters input{min-height:24px}.rpg-deck-sort select{max-width:100%}@media(max-width:420px){.rpg-search-filters{grid-template-columns:1fr}}

/* Local OFL typography: ornamental titles, readable dialogue; embedded offline. */
@font-face{font-family:CityCinzel;src:url("./assets/f4d83d34d1f6c741193e4acf4b3dff9531e5a67b6aa65228d00a7db72a4e0f34.ttf") format('truetype');font-weight:400 900;font-display:swap}
@font-face{font-family:CityAlegreya;src:url("./assets/ba5564634b93a8f8ba57b48cd4f1ae7417d2b4656fbac779028679b00de3cf12.ttf") format('truetype');font-weight:400 900;font-display:swap}
.rpg-page{font-family:CityAlegreya,Georgia,serif;font-size:18px}
.rpg-header h1,.rpg-sheet h2,.rpg-sheet h3,.rpg-day-badge strong,.deck-page h1,.deck-page h2{font-family:CityCinzel,Georgia,serif;font-weight:700;letter-spacing:.035em}
.rpg-page button,.rpg-page select,.rpg-page input{font-family:CityAlegreya,Georgia,serif;font-size:17px}
.rpg-header button,.rpg-header select{font-size:16px}.rpg-sheet h2{color:#ffe0a0;text-shadow:0 2px 0 #050e1e}
.rpg-conversation{margin:20px 0 14px;padding:18px 24px;border:1px solid #ba9959;border-left:4px solid #e1c17e;background:linear-gradient(110deg,#203b55,#14273e);box-shadow:inset 0 0 0 4px #0a1c3055}
.rpg-conversation-kicker{font:600 11px CityCinzel,Georgia,serif;letter-spacing:.16em;color:#d1b67d}
.rpg-dialogue-line{font:500 22px/1.55 CityAlegreya,Georgia,serif;white-space:pre-line;max-width:64ch;margin:12px 0 2px;color:#fff4dc;text-shadow:0 1px 1px #07101c}
.rpg-locator-note{font-size:16px;color:#b9d6e4;border-top:1px solid #50657b;padding-top:10px}
.rpg-editor-card{min-width:0;display:flex;flex-direction:column}.rpg-editor-card>.rpg-card{width:100%;flex:1;font-size:12px!important}
.rpg-card-count{display:grid;grid-template-columns:minmax(36px,1fr) auto minmax(36px,1fr);align-items:center;gap:2px;background:#0d2136;text-align:center;margin-top:3px}
.rpg-card-count button{font:700 24px/1 Arial,sans-serif;min-height:44px;padding:3px;border-color:#ad915d;color:#ffe0a0}
.rpg-card-count b{min-width:15px;font:600 13px Arial,sans-serif}
.rpg-editor .rpg-cards{grid-template-columns:repeat(auto-fill,minmax(104px,1fr))}
.rpg-editor-card>.rpg-card::after{content:'Selected';font-weight:bold;visibility:hidden;color:#ffe29b}
.rpg-editor-card>.rpg-card[aria-pressed=true]::after{visibility:visible}
@media(max-width:720px){.rpg-header button,.rpg-header select{font-size:13px}.rpg-page footer{font-size:10px}.rpg-conversation{padding:14px}.rpg-dialogue-line{font-size:20px}.rpg-sheet h2{font-size:19px}.rpg-editor .rpg-cards{grid-template-columns:repeat(auto-fill,minmax(96px,1fr))}}

.rpg-scene-fade{position:fixed;inset:0;z-index:100000;background:#080e18;opacity:0;pointer-events:all;touch-action:none;cursor:wait;}

.coin-page{display:grid;place-items:center;min-height:100dvh;padding:20px;background:radial-gradient(ellipse at 50% 35%,#243650,#080d1a 75%)}
.coin-panel{width:min(620px,100%);text-align:center;color:#fff;padding:clamp(20px,4vw,45px);border:1px solid #b89548;border-radius:18px;background:linear-gradient(140deg,#17253be8,#090f20f2);box-shadow:0 20px 90px #0009,inset 0 0 40px #cca1480c}
.coin-eyebrow{font-size:11px;letter-spacing:.25em;color:#dfc883}.coin-panel h1{font-size:clamp(22px,5vw,36px);letter-spacing:.05em;margin:10px 0}.coin-panel h2{font-size:24px}.coin-panel p{color:#b6c6df}.coin-panel strong{display:block;color:#f8dc89;font-size:24px}.coin-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;min-height:48px;margin-top:25px}.coin-actions button{padding:14px 22px;font-size:16px}
.duel-coin{display:grid;place-items:center;width:112px;height:112px;margin:28px auto;border-radius:50%;border:6px double #ffe4a0;background:radial-gradient(circle at 30% 25%,#fff1b9,#c49332 65%,#79501c);box-shadow:0 8px 0 #624522,0 15px 25px #0008;color:#5d4016;font-size:58px;font-weight:900}.duel-coin.spinning{animation:duel-coin-flip .85s ease-out both}@keyframes duel-coin-flip{0%{transform:rotateY(0deg) translateY(0)}40%{transform:rotateY(540deg) translateY(-26px)}100%{transform:rotateY(1080deg) translateY(0)}}@media(prefers-reduced-motion:reduce){.duel-coin.spinning{animation:none}}@media(max-height:530px){.coin-panel{padding:12px}.duel-coin{height:64px;width:64px;font-size:32px;margin:12px auto}.coin-panel h1,.coin-panel h2{font-size:20px;margin:8px}.coin-actions{margin-top:10px}}
.coin-actions button:not(.primary){color:#e5edf8;background:#17283e;border:1px solid #768eac;border-radius:3px}.coin-actions button:focus-visible{outline:3px solid #ffe3a0;outline-offset:4px}

.duel-coin .coin-puzzle{display:block;width:88%;height:88%;filter:drop-shadow(0 2px 1px #68420b66)}
