@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{font-family:'DM Sans',sans-serif;color:#ededef;background:#111216;font-synthesis:none;color-scheme:dark;--line:#303138;--muted:#9698a4;--accent:#c5f277;--panel:#1b1c22}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{outline-offset:4px}button{border:1px solid #393a43;background:#24252c;color:#e6e6e9;border-radius:7px;padding:10px 15px;cursor:pointer;font-size:14px;font-weight:500;white-space:nowrap;transition:background .15s,transform .15s}button:hover{background:#34363e}button:active{transform:translateY(1px)}button:disabled{opacity:.35;cursor:not-allowed}button.primary{background:var(--accent);border-color:var(--accent);color:#202916;font-weight:700}button.primary:hover{background:#d4ff91}.app-header{height:78px;border-bottom:1px solid var(--line);padding:0 36px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px;color:white;text-decoration:none;font-family:'Space Grotesk',sans-serif;font-size:30px;font-weight:600;letter-spacing:-1px}.brand-mark{color:var(--accent);font-size:42px;line-height:1;transform:rotate(-10deg)}.brand-divider{height:23px;width:1px;background:#41424c;margin:0 12px}.brand-sub{font-family:'DM Sans',sans-serif;font-size:12px;font-weight:500;letter-spacing:2px;color:#a7a9b4}.header-actions,.project-actions{display:flex;align-items:center;gap:10px}.save-status{font-size:12px;color:var(--muted);margin-right:12px}main{max-width:1700px;margin:auto;padding:30px 36px 18px}.project-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.eyebrow{font-size:12px;letter-spacing:1.7px;color:var(--accent);font-weight:600;margin-bottom:10px}#sequence-title{font-family:'Space Grotesk',sans-serif;font-size:clamp(24px,2.5vw,34px);font-weight:500;letter-spacing:-1px;color:#f4f4f5;background:transparent;border:0;width:min(720px,58vw);padding:0;border-bottom:1px solid transparent}#sequence-title:focus{border-color:var(--accent);outline:none}.project-heading p{color:var(--muted);font-size:14px;margin:9px 0 0}.studio{display:grid;grid-template-columns:282px minmax(0,1fr);gap:18px}.panel{border:1px solid var(--line);border-radius:12px;background:var(--panel);overflow:hidden}.library{padding:20px 17px 12px;display:flex;flex-direction:column;height:538px}.panel-title,.stage-toolbar,.stage-title{display:flex;align-items:center;justify-content:space-between;gap:10px}h2{font-family:'Space Grotesk',sans-serif;font-size:16px;font-weight:500;margin:0}.tiny-label{font-size:10px;letter-spacing:1.5px;color:#747782}.search-wrap{display:flex;align-items:center;gap:8px;border:1px solid #3b3d47;border-radius:7px;background:#14151a;margin:19px 0 14px;padding:0 9px}.search-wrap>span{font-size:25px;color:#afb0b9}.search-wrap input{width:100%;min-width:0;padding:12px 0;background:none;border:0;color:white;font-size:14px;outline:none}.search-wrap button{padding:2px 5px;background:transparent;border:0;color:var(--muted)}.library-caption{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:14px}.library-caption span:first-child{color:#ddd}#search-status{font-size:13px;color:var(--accent)}#search-status:not(:empty){padding-bottom:10px}.card-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px 12px;overflow:auto;align-content:start;padding:2px 3px 8px;flex:1}.library-card{padding:0;background:transparent;border:0;text-align:left;white-space:normal}.library-card:hover{background:transparent}.card-face{position:relative;aspect-ratio:488/680;border-radius:8px;border:4px solid #0c0c0e;background:linear-gradient(145deg,#445146,#1d2522);overflow:hidden;box-shadow:0 4px 10px #0005;display:flex;flex-direction:column;justify-content:space-between;padding:9px;color:#efe9d5}.card-face img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1}.fallback-name{font-family:Georgia,serif;font-weight:bold;font-size:13px;line-height:1.3}.fallback-type{font-size:10px}.library-card .card-face{transition:transform .18s}.library-card:hover .card-face{transform:translateY(-3px)}.library-card .card-name{display:block;margin-top:7px;font-size:12px;color:#c9cbd2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scryfall-credit{color:#777a88;font-size:11px;text-decoration:none;margin-top:10px}.stage-panel{display:flex;flex-direction:column}.stage-toolbar{height:57px;padding:0 20px;border-bottom:1px solid var(--line)}.stage-title{justify-content:flex-start}.live-dot{width:6px;height:6px;border-radius:100%;background:var(--accent)}.badge{color:#a3a5b0;background:#2b2d35;border-radius:4px;font-size:11px;padding:3px 7px}.small{font-size:12px;padding:7px 10px;background:transparent}.stage-toolbar>div:last-child{display:flex;gap:8px}.battlefield{height:410px;position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 50% 60%,#24352c80,transparent 70%),radial-gradient(#ffffff09 1px,transparent 1px),#171d1c;background-size:auto,22px 22px,auto}.battlefield.drag-over{box-shadow:inset 0 0 0 2px var(--accent)}.zone-label{position:absolute;top:20px;left:21px;font-size:10px;letter-spacing:2px;color:#727f78}.board-watermark{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:85px;letter-spacing:16px;color:#b2c4b505;pointer-events:none}.board-watermark span{font-size:9px;letter-spacing:5px}.empty-board{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.empty-board>span{width:52px;height:52px;display:grid;place-items:center;border:1px dashed #566255;border-radius:50%;color:var(--accent);font-size:26px}.empty-board h3{font-family:'Space Grotesk',sans-serif;font-size:19px;margin:15px 0 6px;font-weight:500}.empty-board p{font-size:14px;color:#929c95;margin:0}.board-bottom{position:absolute;bottom:14px;left:20px;right:20px;display:flex;gap:18px;align-items:center;color:#7f8c84;font-size:11px;pointer-events:none}kbd{font:10px 'DM Sans',sans-serif;border:1px solid #48534c;border-radius:3px;padding:2px 4px;margin-right:4px}.board-bottom span:last-child{margin-left:auto}.board-card{position:absolute;width:91px;padding:0;border:0;background:transparent;transform:translate(-50%,-50%);touch-action:none;user-select:none;transition:left .45s ease,top .45s ease;z-index:2}.board-card:hover{background:transparent}.board-card .card-face{transition:transform .4s,box-shadow .2s;width:100%}.board-card.tapped .card-face{transform:rotate(90deg)}.board-card.selected .card-face{box-shadow:0 0 0 2px var(--accent),0 7px 18px #0009}.board-card.dragging{transition:none;z-index:10}.board-card.dragging .card-face{box-shadow:0 15px 25px #0009}.step-editor{min-height:70px;display:flex;align-items:center;gap:12px;padding:12px 17px;border-top:1px solid var(--line)}.step-symbol{color:var(--muted);font-size:22px}.step-editor>input{border:0;background:transparent;min-width:0;flex:1;font-size:14px;color:#ddd;padding:8px 0}.duration-control{display:flex;align-items:center;color:#979ba5;font-size:12px;gap:4px}.duration-control input{width:48px;border:1px solid #3e404a;border-radius:5px;padding:6px 4px;background:#22232a;color:#eee;font-size:13px}.record-dot{display:inline-block;background:#364720;border:2px solid #364720;border-radius:50%;width:9px;height:9px;margin-right:6px}.timeline{margin-top:19px}.timeline-heading{padding:17px 20px 13px;display:flex;align-items:center;justify-content:space-between}.timeline-heading>div{display:flex;align-items:center;gap:14px}.timeline-heading span{font-size:12px;color:var(--muted)}.text-button{background:transparent;border:0;color:var(--accent);font-size:12px;padding:6px}.timeline-steps{display:flex;gap:9px;overflow:auto;padding:0 20px 16px;min-height:88px}.step-tile{flex:0 0 168px;min-width:0;background:#23252c;border:1px solid #373a43;padding:10px 12px;border-radius:7px;text-align:left;white-space:normal;position:relative}.step-tile.active{border-color:#a8c979;background:#30392c}.step-tile span{display:block;font-size:11px;color:#a7abae;margin-bottom:7px}.step-tile strong{display:block;font-size:12px;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.step-tile em{position:absolute;right:10px;top:10px;font-style:normal;color:#8e9594;font-size:11px}.timeline-empty{font-size:14px;color:var(--muted);padding:19px 0}.player{border-top:1px solid var(--line);background:#18191f;display:flex;align-items:center;gap:22px;padding:12px 20px}.transport{display:flex;align-items:center;gap:8px}.transport button{border:0;background:none;padding:3px 7px;color:#adadb9;font-size:19px}.transport .play-button{border-radius:50%;background:var(--accent);color:#202916;width:36px;height:36px;font-size:14px}.transport #play-time{font-size:12px;color:#a2a4b0;margin-left:7px;white-space:nowrap;font-variant-numeric:tabular-nums}#scrubber{flex:1;min-width:40px;height:4px;accent-color:var(--accent)}#speed{background:#25262e;border:1px solid #373944;border-radius:5px;padding:6px;color:#c9cbd2;font-size:12px}#mode-label{font-size:10px;letter-spacing:1.5px;color:#8d919b}.play-caption{font-size:14px;color:var(--accent);text-align:center;background:#20251e}.play-caption:not(:empty){padding:10px 20px}footer{display:flex;justify-content:space-between;color:#777a86;font-size:11px;margin-top:21px;gap:16px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:12px 20px;border:1px solid #546a3f;border-radius:8px;background:#27331f;color:#e8f7d5;font-size:14px;z-index:50;box-shadow:0 10px 40px #0008;display:none}dialog{background:#202128;color:#eee;border:1px solid #454852;border-radius:16px;max-width:510px;width:calc(100% - 32px);padding:30px;box-shadow:0 20px 100px #0008}dialog::backdrop{background:#000a;backdrop-filter:blur(5px)}dialog h2{font-size:25px;margin-top:18px}dialog p{font-size:14px;line-height:1.6;color:#a8abb6}.dialog-close{float:right;padding:0;border:0;background:none;font-size:25px;color:#aaa}.dialog-actions{display:flex;gap:10px;margin-top:15px}#share-url{width:100%;border:1px solid #444650;border-radius:6px;background:#14151a;color:#dce2d6;padding:12px;font-size:13px}.dialog-hint{font-size:12px!important;margin-bottom:0}[hidden]{display:none!important}
@media(min-width:1500px){.library{height:610px}.battlefield{height:482px}.studio{grid-template-columns:310px minmax(0,1fr)}.board-card{width:106px}}
@media(max-width:1000px){main{padding:25px 20px}.app-header{padding:0 20px}.studio{grid-template-columns:230px minmax(0,1fr)}.step-editor{gap:8px;padding:12px}.step-editor .primary{font-size:12px;padding:10px}.step-symbol{display:none}.stage-toolbar{padding:0 12px}.stage-toolbar .small{font-size:11px;padding:6px}.board-bottom span:last-child{display:none}.board-card{width:76px}.timeline-heading span{display:none}.brand-sub{display:none}.brand-divider{display:none}.save-status{display:none}}
@media(max-width:700px){.app-header{height:66px;padding:0 15px}.brand{font-size:27px}.header-actions{gap:7px}.header-actions button{font-size:12px;padding:9px 11px}main{padding:23px 13px}.eyebrow{font-size:10px}.project-heading{display:block;margin-bottom:18px}#sequence-title{width:100%;font-size:25px;letter-spacing:-.7px}.project-heading p{font-size:13px}.project-actions{margin-top:17px}.project-actions button{padding:7px 11px;font-size:12px}.studio{display:flex;flex-direction:column;gap:12px}.library{height:auto;padding:13px}.panel-title h2{font-size:15px}.search-wrap{margin:12px 0}.library-caption{margin-bottom:10px}.card-grid{display:flex;gap:12px;max-height:175px;min-height:130px}.library-card{flex:0 0 85px}.library-card .card-name{max-width:85px;font-size:11px}.scryfall-credit{font-size:10px}.battlefield{height:365px}.board-card{width:65px}.stage-title h2{font-size:14px}.badge{font-size:10px}.stage-toolbar{height:50px}.stage-toolbar>div:last-child{gap:3px}.stage-toolbar .small{padding:5px;font-size:10px}.step-editor{flex-wrap:wrap;min-height:90px}.step-editor>input{flex-basis:65%;font-size:13px}.step-editor .primary{margin-left:auto}.timeline-heading{padding:15px 13px;gap:10px}.timeline-heading h2{font-size:14px}.timeline-heading>div{gap:5px}.timeline-actions button{font-size:11px;padding:5px}.timeline-steps{padding:0 13px 13px}.player{padding:11px 12px;gap:10px;flex-wrap:wrap}.transport{gap:4px}.transport #play-time{font-size:11px}.player #mode-label{display:none}#scrubber{order:4;flex-basis:100%}#speed{margin-left:auto}.empty-board p{max-width:240px;text-align:center;line-height:1.6}footer{font-size:10px;line-height:1.5}footer span:first-child{max-width:60%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(max-width:700px){.stage-toolbar{height:auto;min-height:66px;padding:10px 12px;flex-wrap:wrap}.stage-toolbar>div:last-child{margin-left:auto}.stage-toolbar .small{font-size:12px;padding:6px 8px}}
.background-settings{padding:14px 18px;margin-bottom:18px;overflow:visible}.background-options{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.background-options>label{font-size:14px;font-weight:600}.background-options select,.background-options input[type=text]{background:#14151a;border:1px solid #454852;border-radius:6px;color:#eee;padding:9px;font-size:14px}.background-options select{min-width:160px}#custom-background{display:flex;align-items:center;gap:8px}#background-color{width:40px;height:36px;padding:2px;border:1px solid #454852;border-radius:5px;background:transparent;cursor:pointer}#background-hex{width:96px;font-family:monospace}#capture-button{margin-left:auto}.background-settings p{font-size:13px;color:var(--muted);margin:9px 0 0;line-height:1.5}.battlefield[data-background=solid]{background:var(--battlefield-color,#00ff00)}.battlefield[data-background=transparent]{background:repeating-conic-gradient(#303138 0% 25%,#41434b 0% 50%) 0 0/24px 24px}.battlefield:not([data-background=tabletop]) .board-watermark,.battlefield:not([data-background=tabletop]) .zone-label,.battlefield:not([data-background=tabletop]) .board-bottom,.battlefield:not([data-background=tabletop]) .empty-board{display:none}.battlefield:not([data-background=tabletop]) .card-face{box-shadow:none}.battlefield:not([data-background=tabletop]) .selected .card-face{outline:2px solid #c5f277;outline-offset:2px}.capture-link{display:inline-block;border-radius:7px;padding:10px 14px;background:var(--accent);color:#202916;text-decoration:none;font-size:14px;font-weight:700}#capture-url{width:100%;padding:12px;border:1px solid #454852;border-radius:6px;background:#14151a;color:#eee;font-size:13px}
html.capture-view,html.capture-view body{background:transparent!important;margin:0!important;padding:0!important;width:100%;height:100%;overflow:hidden}.capture-view .app-header,.capture-view .project-heading,.capture-view .background-settings,.capture-view .library,.capture-view .stage-toolbar,.capture-view .step-editor,.capture-view .timeline,.capture-view footer,.capture-view dialog,.capture-view #toast{display:none!important}.capture-view main,.capture-view .studio,.capture-view .stage-panel{display:block;position:static;margin:0;padding:0;width:100%;height:100%;max-width:none;background:transparent;border:0;border-radius:0;box-shadow:none}.capture-view .battlefield{width:100%;height:100%;border:0;border-radius:0;box-shadow:none;pointer-events:none}.capture-view .battlefield[data-background=transparent]{background:transparent!important}.capture-view .board-watermark,.capture-view .zone-label,.capture-view .board-bottom,.capture-view .empty-board{display:none!important}.capture-view .board-card{width:10.5%;outline:none!important}.capture-view .board-card .card-face{outline:none!important;box-shadow:none!important}.capture-view .board-card:focus{outline:none!important}
@media(max-width:700px){.background-settings{padding:12px}.background-options{gap:8px}.background-options select{min-width:0;flex:1}#capture-button{margin-left:0}.dialog-actions{flex-wrap:wrap}}
.play-area{display:flex;position:relative;min-width:0;background:#171d1c}.play-area>.battlefield{flex:1;min-width:0}.graveyard{flex:0 0 42px;width:42px;max-height:410px;position:relative;border-right:1px solid #3d4240;background:#181b1d;z-index:3;overflow:hidden}.graveyard.expanded{flex-basis:142px;width:142px}.graveyard .zone-toggle{display:flex;align-items:center;gap:8px;width:100%;padding:13px 8px;border:0;border-radius:0;background:transparent;font-size:13px}.graveyard:not(.expanded) .zone-toggle{flex-direction:column;height:100%;justify-content:flex-start}.graveyard:not(.expanded) .graveyard-label{writing-mode:vertical-rl;letter-spacing:1px;margin:6px 0}.graveyard.expanded .graveyard-chevron{transform:rotate(180deg)}.graveyard-chevron{font-size:21px;line-height:1;color:#c5f277}.graveyard-label{font-weight:600}.zone-count{background:#33383b;color:#e5e7e9;min-width:20px;padding:2px 5px;border-radius:4px;font-size:12px}.zone-content{height:calc(100% - 49px);max-height:361px;overflow-y:auto;padding:0 14px 14px}.zone-empty{color:#949b9a;font-size:12px;text-align:center;margin-top:20px}.zone-cards{display:flex;flex-direction:column;gap:13px;align-items:center}.graveyard-card{width:86px;flex:none}.graveyard-card-name{display:block;color:#c9cbd2;font-size:11px;margin-top:5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sacrifice-button{display:inline-flex;align-items:center;gap:5px;color:#ffdc55}.sacrifice-button img{width:21px;height:21px}.stage-toolbar{flex-wrap:wrap;height:auto;min-height:57px;padding-top:7px;padding-bottom:7px;gap:7px}.stage-toolbar>div:last-child{flex-wrap:wrap}.battlefield.has-sacrifice{overflow:visible;z-index:4}.board-card.sacrifice-animating{z-index:20;pointer-events:none;transition:none}.sacrifice-emoji{position:absolute;left:50%;top:50%;width:82px;height:82px;transform:translate(-50%,-50%) rotate(-12deg);z-index:5;filter:drop-shadow(0 4px 2px #0008);pointer-events:none}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.play-area[data-background=solid],.play-area[data-background=solid] .graveyard{background:var(--battlefield-color)}.play-area[data-background=transparent]{background:repeating-conic-gradient(#303138 0% 25%,#41434b 0% 50%) 0 0/24px 24px}.play-area[data-background=transparent] .graveyard{background:transparent}.play-area:not([data-background=tabletop]) .graveyard-card .card-face{box-shadow:none}.play-area:not([data-background=tabletop]) .zone-toggle{background:#1b1c22;color:#ededef}.play-area:not([data-background=tabletop]) .sacrifice-emoji{filter:none}
.capture-view .play-area{display:flex;width:100%;height:100%;background:transparent;border:0}.capture-view .play-area[data-background=solid]{background:var(--battlefield-color)}.capture-view .graveyard{max-height:none;height:100%;border:0;background:transparent;flex-basis:0;width:0}.capture-view .graveyard.expanded{flex-basis:18%;width:18%}.capture-view .zone-toggle,.capture-view .zone-empty,.capture-view .graveyard-card-name{display:none!important}.capture-view .zone-content{height:100%;max-height:none;padding:24px 14px;scrollbar-width:none}.capture-view .graveyard-card{width:65%;max-width:160px}.capture-view .graveyard-card .card-face{box-shadow:none!important}.capture-view .play-area>.battlefield{width:auto}.capture-view .sacrifice-emoji{width:90%;height:auto;filter:none}
@media(min-width:1500px){.graveyard{max-height:482px}.zone-content{max-height:433px}}
@media(max-width:700px){.graveyard{max-height:365px;flex-basis:33px;width:33px}.graveyard.expanded{flex-basis:105px;width:105px}.graveyard .zone-toggle{padding:10px 5px;gap:4px;font-size:11px}.zone-content{max-height:320px;padding:0 10px 10px}.graveyard-card{width:67px}.stage-toolbar>div:last-child{margin-left:0}.stage-toolbar .small{font-size:11px;padding:6px}.sacrifice-button img{width:18px;height:18px}.sacrifice-emoji{width:64px;height:64px}}
.graveyard-card[draggable=true]{cursor:grab;touch-action:none;user-select:none;border-radius:8px}.graveyard-card[draggable=true]:active{cursor:grabbing}.graveyard-card:focus-visible{outline:2px solid var(--accent);outline-offset:4px}.graveyard-help{font-size:11px;line-height:1.4;color:#a4aaa7;margin:0 0 12px;text-align:center}.sacrifice-emoji[data-effect=reanimate]{height:98px;object-fit:contain;filter:none}.capture-view .graveyard-help{display:none}.capture-view .sacrifice-emoji[data-effect=reanimate]{height:auto;width:90%}.graveyard-drag-ghost{position:fixed;width:86px;pointer-events:none;z-index:100;transform:translate(-50%,-50%)}

.exile-button{display:inline-flex;align-items:center;gap:5px;color:#d4a5ff}.exile-button img{width:21px;height:21px}.exile .graveyard-chevron{color:#c88dff}.sacrifice-emoji[data-effect=exile]{top:-5px;width:75px;height:60px;object-fit:contain;filter:none}.card-menu{position:fixed;z-index:200;width:245px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow:auto;padding:6px;border:1px solid #53505e;border-radius:10px;background:#24232b;box-shadow:0 12px 40px #0009}.card-menu-title{padding:8px 10px;color:#b5b2bf;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-menu button{display:flex;flex-wrap:wrap;align-items:center;gap:7px;width:100%;text-align:left;border:0;background:transparent;padding:9px 10px;font-size:13px;white-space:normal}.card-menu button:hover,.card-menu button:focus-visible{background:#403746;outline:1px solid #bd8bed;outline-offset:-1px}.card-menu button img{width:21px;height:21px;object-fit:contain}.card-menu button small{display:block;flex-basis:100%;font-size:11px;color:#b4a9c2}.card-menu button:disabled{opacity:.55}.capture-view .card-menu{display:none!important}.capture-view .graveyard{pointer-events:none}.capture-view .sacrifice-emoji[data-effect=exile]{width:85%;height:auto}.capture-view .graveyard.expanded{flex-basis:15%;width:15%}@media(max-width:700px){.graveyard.expanded{flex-basis:88px;width:88px}.graveyard-card{width:60px}.zone-content{padding:0 7px 10px}.graveyard.expanded .zone-toggle{flex-wrap:wrap;gap:3px}.graveyard-help{font-size:10px}.sacrifice-emoji[data-effect=exile]{width:60px;height:48px}}

.tap-button{display:inline-flex;align-items:center;gap:5px}.tap-button img{width:20px;height:20px}.snap-grid{position:absolute;inset:0;pointer-events:none;z-index:1}.snap-point{position:absolute;width:14px;height:14px;border:1px solid #d6f7a8;border-radius:50%;background:#17231ccc;transform:translate(-50%,-50%);box-shadow:0 0 0 3px #0c100d55}.snap-point::before,.snap-point::after{content:"";position:absolute;background:#c5f27788;left:50%;top:50%;transform:translate(-50%,-50%)}.snap-point::before{width:24px;height:1px}.snap-point::after{width:1px;height:24px}.snap-point.snap-target{width:40px;height:40px;background:#c5f27755;border:2px solid #e1ffb8;box-shadow:0 0 0 5px #131f16cc}.capture-view .snap-grid{display:none!important}

.piece-tray{flex:0 0 38px;width:38px;max-height:410px;background:#1c1c25;border-left:1px solid #45414d;overflow:hidden}.piece-tray.expanded{flex-basis:190px;width:190px}#piece-tray-toggle{display:flex;align-items:center;gap:8px;width:100%;padding:13px 9px;border:0;border-radius:0;background:transparent;font-size:12px}.piece-tray:not(.expanded) #piece-tray-toggle{flex-direction:column;height:100%;justify-content:flex-start}.piece-tray:not(.expanded) .piece-tray-label{writing-mode:vertical-rl;letter-spacing:1px}.piece-tray-chevron{color:#c5f277}.piece-tray.expanded .piece-tray-chevron{transform:rotate(180deg)}#piece-tray-content{height:calc(100% - 45px);overflow-y:auto;padding:0 10px 12px}.piece-help{font-size:11px;line-height:1.5;color:#aca8b5;margin:2px 0 12px}.piece-preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}#piece-presets h3{font-size:12px;font-weight:600;margin:16px 0 9px;color:#dbd5e7}.piece-preset{padding:0;border:0;background:none;white-space:normal;cursor:grab;touch-action:none}.piece-face{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:54px;height:54px;padding:4px;border:2px solid #bfb0d2;border-radius:50%;background:#4a355e;color:#fff;box-shadow:0 3px 5px #0007;line-height:1.05}.piece-symbol{font-size:10px;font-weight:700;overflow-wrap:anywhere;max-width:100%;text-align:center}.piece-face strong{font-size:20px;line-height:1}.piece-face.dice{border-radius:9px;background:#eee8dc;border-color:#a5a0aa;color:#24202b}.piece-face.mana[data-color=W]{background:#f4e6bb;border-color:#fff9df;color:#443411}.piece-face.mana[data-color=U]{background:#3287cb;border-color:#a2ddff;color:#fff}.piece-face.mana[data-color=B]{background:#2b2631;border-color:#a99fb6;color:#fff}.piece-face.mana[data-color=R]{background:#c54b3f;border-color:#ffb2a2;color:#fff}.piece-face.mana[data-color=G]{background:#287443;border-color:#98e8ac;color:#fff}.piece-face.mana[data-color=C]{background:#787e86;border-color:#e1e6ee;color:#fff}.piece-face.mana .piece-symbol{font-size:13px}.piece-preset .piece-face{width:100%;height:auto;aspect-ratio:1;box-shadow:none}.piece-layer{position:absolute;inset:0;z-index:300;pointer-events:none}.battlefield-piece{position:absolute;transform:translate(-50%,-50%);padding:0;background:none!important;border:0;pointer-events:auto;touch-action:none;user-select:none}.battlefield-piece.selected .piece-face{outline:2px solid #c5f277;outline-offset:3px}.battlefield-piece:focus-visible{outline:2px solid #c5f277}.piece-menu{z-index:600}#piece-inspector{border:1px solid #5b4b6d;border-radius:8px;padding:8px;margin:8px 0;background:#292330}#piece-inspector strong{font-size:12px;display:block;margin-bottom:8px}#piece-inspector label{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:11px;margin:7px 0}#piece-inspector input{min-width:0;width:90px;padding:5px;background:#15131b;color:#fff;border:1px solid #665773;border-radius:4px}.piece-editor-actions{display:flex;flex-wrap:wrap;gap:4px}.piece-editor-actions button{font-size:11px;padding:5px 7px}.piece-drag-ghost{position:fixed;z-index:700;pointer-events:none;transform:translate(-50%,-50%)}.capture-view .piece-tray,.capture-view .piece-menu{display:none!important}.capture-view .battlefield-piece{pointer-events:none}.capture-view .battlefield-piece .piece-face{outline:none;box-shadow:none}.play-area:not([data-background=tabletop]) .battlefield-piece .piece-face{box-shadow:none}@media(min-width:1500px){.piece-tray{max-height:482px}}@media(max-width:700px){.piece-tray{max-height:365px;flex-basis:30px;width:30px}.piece-tray.expanded{flex-basis:155px;width:155px}#piece-tray-toggle{font-size:11px;padding:10px 5px;gap:5px}.piece-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.battlefield-piece .piece-face{width:44px;height:44px}.battlefield-piece .piece-symbol{font-size:9px}.battlefield-piece strong{font-size:17px}}
.piece-preset-grid.counter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.piece-preset .counter{border-radius:9px;aspect-ratio:auto;min-height:50px}.piece-preset .counter .piece-symbol{overflow-wrap:normal;font-size:10px}@media(max-width:700px){.piece-tray.expanded{position:absolute;right:0;top:0;height:100%;z-index:400;box-shadow:-5px 0 18px #0008}}
.board-watermark,.board-watermark *{-webkit-user-select:none;user-select:none}
.board-watermark{font-size:clamp(28px,5vw,72px);letter-spacing:8px}.board-watermark span{max-width:90%;text-align:center;letter-spacing:2px;line-height:1.8}

.sequence-title-row{display:flex;align-items:center;gap:8px;max-width:100%}.sequence-title-row #sequence-title{min-width:0}.sequence-title-row.untitled #sequence-title{width:280px;max-width:calc(100% - 44px)}.edit-title-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;padding:6px;border:1px dashed #778958;color:var(--accent);background:transparent}.edit-title-button:hover{background:#c5f27718;border-color:var(--accent)}

.graveyard.zone-drop-target{box-shadow:inset 0 0 0 3px #c5f277;background:#30412b}.graveyard.exile.zone-drop-target{box-shadow:inset 0 0 0 3px #d6a2ff;background:#3a274d}.battlefield.zone-dragging{overflow:visible;z-index:4}.board-card.dragging{pointer-events:none}

.sacrifice-emoji>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.sacrifice-emoji[data-effect=reanimate]{overflow:hidden}.sacrifice-emoji[data-effect=sacrifice]>img:last-child{transform-origin:57% 69%}.capture-view .sacrifice-emoji{aspect-ratio:1;height:auto}.capture-view .sacrifice-emoji[data-effect=reanimate]{aspect-ratio:5/6}.capture-view .sacrifice-emoji[data-effect=exile]{aspect-ratio:5/4}.card-menu [aria-checked=true]::after{content:"✓";margin-left:auto;color:var(--accent)}

#media-dialog{max-width:720px}#media-preview{display:block;width:100%;height:auto;margin-top:18px;border:1px solid var(--line);border-radius:8px}#media-progress{width:100%;margin-top:14px;accent-color:var(--accent)}.media-check{display:flex;gap:9px;align-items:center;font-size:14px}#media-result{display:inline-block;margin-top:8px}.header-actions{flex-wrap:wrap}.app-header{min-height:76px;height:auto;padding-top:12px;padding-bottom:12px}

@media(min-width:1001px){.app-header{position:sticky;top:0;z-index:150;background:#111216;box-shadow:0 5px 18px #0003}}

.coffee-link{display:inline-flex;align-items:center;gap:7px;padding:5px 10px;border:1px solid #806c2b;border-radius:7px;color:#ffda28;text-decoration:none;font-size:14px;font-weight:600;white-space:nowrap}.coffee-link img{flex:none;transform:rotate(-8deg)}.coffee-link:hover{background:#342e1b;border-color:#ffda28}.coffee-link:focus-visible{outline:2px solid #ffda28;outline-offset:3px}.app-header{gap:18px}.header-actions{justify-content:flex-end}@media(max-width:1250px){.coffee-link span{display:none}.coffee-link{padding:4px 7px}}@media(max-width:700px){.app-header{flex-wrap:wrap}.header-actions{justify-content:flex-start;width:100%}}

/* Keep background selection beside the battlefield title. */
.stage-title{justify-content:flex-start;flex-wrap:wrap;min-width:0}.stage-title h2,.stage-title .badge{white-space:nowrap}.stage-title .background-options{gap:7px;margin-left:8px}.stage-title .background-options>label{font-size:12px;color:var(--muted);font-weight:500}.stage-title .background-options select{min-width:0;max-width:175px;padding:6px 8px;font-size:12px}.stage-title #background-color{width:30px;height:29px}.stage-title #background-hex{width:80px;padding:6px;font-size:12px}@media(max-width:700px){.stage-title{width:100%;gap:8px}.stage-title .background-options{margin-left:0;flex-wrap:wrap}.stage-title .background-options select{flex:none}}

#embed-code{display:block;width:100%;margin-top:12px;padding:10px;background:#14151a;color:#c9cbd2;border:1px solid #444650;border-radius:6px;resize:vertical;font-size:12px}
#embed-overlay{position:fixed;inset:0;z-index:100;pointer-events:none}.embed-controls{position:absolute;top:14px;left:14px;right:14px;display:flex;gap:8px;align-items:center;opacity:0;transition:opacity .2s;pointer-events:auto}.embed-view body:hover .embed-controls,.embed-controls:focus-within{opacity:1}.embed-controls a{margin-left:auto;background:#17181ded;color:#c5f277;padding:10px 14px;border:1px solid #52613b;border-radius:7px;text-decoration:none;font-size:13px}.embed-controls button{background:#17181ded}.embed-view .play-area{pointer-events:none}#embed-caption{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);max-width:85%;margin:0;padding:9px 14px;background:#111216db;border-radius:7px;color:#c5f277;text-align:center;font-size:14px}#embed-caption:empty{display:none}#embed-message{position:absolute;inset:35% 10%;text-align:center;color:#eee;background:#17181d;padding:20px;border-radius:12px}.embed-view .board-card{max-width:140px}@media(hover:none){.embed-controls{opacity:1}}@media(max-width:480px){.embed-controls{top:7px;left:7px;right:7px;gap:5px}.embed-controls button,.embed-controls a{padding:7px 9px;font-size:11px}#embed-caption{font-size:12px;bottom:8px}}

.brand-copy{display:flex;flex-direction:column;gap:5px;max-width:305px;min-width:0}.brand-copy .brand-sub{display:block}.brand-tagline{font-family:DM Sans,sans-serif;font-size:11px;font-weight:400;letter-spacing:0;line-height:1.45;color:var(--muted)}.app-header .brand{min-width:0}.brand-divider{flex-shrink:0}.app-header{height:auto;min-height:78px;padding-top:12px;padding-bottom:12px}.header-actions{flex-wrap:wrap}@media(max-width:1000px){.brand-copy{max-width:230px}.brand-copy .brand-sub{font-size:10px;letter-spacing:1.5px}.brand-tagline{font-size:10px}}@media(max-width:700px){.brand-copy{max-width:240px}.app-header .brand{width:100%;font-size:25px;gap:9px}.brand-copy .brand-sub{font-size:10px}.brand-tagline{font-size:10px}}

/* Shared players keep a wide stage in portrait and reserve space for touch controls. */
.embed-bottom{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));display:grid;grid-template-columns:1fr auto;gap:6px 12px;align-items:center;pointer-events:auto}.embed-bottom #embed-caption{position:static;transform:none;grid-column:1/-1;justify-self:center;max-width:100%;max-height:4.5em;overflow:auto;font-size:13px}.embed-bottom input{width:100%;min-width:0;height:28px;margin:0;accent-color:#c5f277}.embed-bottom #embed-time{font-size:12px;padding:5px 8px;border-radius:5px;background:#17181ded;color:#eee;font-variant-numeric:tabular-nums}.embed-controls{top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}.embed-controls button,.embed-controls a{min-height:44px;display:inline-flex;align-items:center;justify-content:center;touch-action:manipulation}.embed-view .battlefield{container-type:inline-size}.embed-view .battlefield-piece .piece-face{width:clamp(22px,5cqw,54px);height:clamp(22px,5cqw,54px);padding:2px;border-width:1px}.embed-view .battlefield-piece .piece-symbol{font-size:clamp(5px,1cqw,10px)}.embed-view .battlefield-piece strong{font-size:clamp(9px,2cqw,20px)}
@media(max-width:900px),(pointer:coarse){html.embed-view,html.embed-view body{height:100dvh;background:#111216!important}.embed-view main{height:100%!important;padding:64px 0 112px!important;display:flex!important;align-items:center;justify-content:center}.embed-view .studio{width:100%;height:auto!important;max-height:100%;aspect-ratio:16/10}.embed-view .stage-panel{height:100%!important}.embed-view .play-area{height:100%;min-height:0}.embed-view .board-card{width:13%;max-width:none}.embed-view .card-face{border-width:2px;border-radius:5px;padding:3px}.embed-view .graveyard.expanded{flex-basis:14%;width:14%}.embed-view .zone-content{padding:8px 3px}.embed-view .graveyard-card{width:90%}.embed-view .zone-cards{gap:7px}.embed-controls{opacity:1}.embed-controls button,.embed-controls a{font-size:12px;padding:8px 10px}.embed-bottom input{height:36px}.embed-bottom #embed-caption{font-size:13px;line-height:1.4}}
@media(max-height:500px) and (orientation:landscape){.embed-view main{padding-top:54px!important;padding-bottom:70px!important}.embed-view .studio{height:100%!important;width:auto!important;max-width:100%;aspect-ratio:16/9}.embed-bottom{bottom:4px;gap:0 8px}.embed-bottom input{height:24px}.embed-bottom #embed-caption{padding:3px 8px;font-size:11px;max-height:2.8em}.embed-controls{top:4px}.embed-controls button,.embed-controls a{min-height:40px}}

.studio-sidebar{min-width:0}.capture-view .studio-sidebar{display:none!important}
@media(min-width:1001px){html:not(.capture-view) .studio{--desktop-board-height:clamp(480px,calc(100dvh - 280px),720px);align-items:stretch}html:not(.capture-view) .studio-sidebar{display:flex;flex-direction:column;gap:18px}html:not(.capture-view) .project-heading{margin:0;min-width:0;display:block}html:not(.capture-view) .project-heading .eyebrow{font-size:10px;line-height:1.5;letter-spacing:1px;margin-bottom:9px}html:not(.capture-view) .project-heading>div{min-width:0}html:not(.capture-view) #sequence-title{width:100%;font-size:25px;letter-spacing:-.7px}html:not(.capture-view) .sequence-title-row.untitled #sequence-title{width:100%;max-width:calc(100% - 44px)}html:not(.capture-view) .project-actions{display:none}html:not(.capture-view) .library{flex:1;height:0;min-height:380px}html:not(.capture-view) .battlefield{height:var(--desktop-board-height)}html:not(.capture-view) .graveyard,html:not(.capture-view) .piece-tray{height:var(--desktop-board-height);max-height:none}html:not(.capture-view) .zone-content{max-height:none}html:not(.capture-view) .stage-toolbar{min-height:57px}html:not(.capture-view) .stage-title #new-button{font-size:12px;padding:7px 10px;margin-left:4px}html:not(.capture-view) .step-editor{flex:1}}
@media(max-width:1000px){html:not(.capture-view) .studio-sidebar{display:contents}html:not(.capture-view) .project-heading{grid-column:1/-1;margin-bottom:0}}

/* Allocate desktop height to the board AND timeline; scroll cards inside the database. */
@media(min-width:1001px){
html:not(.capture-view) main{height:calc(100dvh - var(--app-header-height,78px));min-height:560px;padding-top:16px;padding-bottom:12px;display:grid;grid-template-rows:minmax(280px,1fr) auto auto;gap:12px}
html:not(.capture-view) .studio{height:100%;min-height:0}
html:not(.capture-view) .studio-sidebar{height:100%;min-height:0;gap:12px}
html:not(.capture-view) .project-heading{flex:none}
html:not(.capture-view) .library{height:auto;min-height:0;flex:1;overflow:hidden}
html:not(.capture-view) .card-grid{min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));overflow-y:scroll;overflow-x:hidden;scrollbar-gutter:stable;scrollbar-color:#777a86 #24252c;scrollbar-width:auto}
html:not(.capture-view) .library-card{min-width:0}
html:not(.capture-view) .stage-panel{height:100%;min-height:0}
html:not(.capture-view) .stage-toolbar{flex:none}
html:not(.capture-view) .play-area{flex:1;min-height:0}
html:not(.capture-view) .battlefield,html:not(.capture-view) .graveyard,html:not(.capture-view) .piece-tray{height:100%;max-height:none;min-height:0}
html:not(.capture-view) .step-editor{flex:none;min-height:54px;padding-top:8px;padding-bottom:8px}
html:not(.capture-view) .timeline{margin:0;min-width:0}
html:not(.capture-view) .timeline-heading{padding:10px 16px 8px}
html:not(.capture-view) .timeline-steps{min-height:72px;padding:0 16px 10px}
html:not(.capture-view) .player{padding:8px 16px}
html:not(.capture-view) .play-caption:not(:empty){padding:5px 16px;max-height:46px;overflow:auto}
html:not(.capture-view) footer{margin:0}
}
@media(min-width:701px){.app-header .header-actions{flex:0 0 auto;flex-wrap:nowrap}.app-header .brand{flex:1 1 0;white-space:nowrap}.app-header .brand-copy{flex:0 1 305px;white-space:normal}.app-header .save-status{white-space:nowrap}}@media(min-width:701px) and (max-width:900px){.app-header{gap:12px}.app-header .brand{font-size:25px;gap:8px}.app-header .brand-copy{max-width:190px}.header-actions{gap:7px}.header-actions button{font-size:12px;padding:9px 11px}}

#database-content{display:flex;flex-direction:column;flex:1;min-height:0}#database-toggle{flex:none;width:28px;height:28px;padding:0;font-size:23px;line-height:1;background:transparent;color:var(--accent)}.library .panel-title{flex:none}.database-collapsed .library{padding:8px}.database-collapsed .library .panel-title{justify-content:center}
@media(min-width:1001px){html:not(.capture-view) .studio.database-collapsed{grid-template-columns:44px minmax(0,1fr)}.database-collapsed .library .panel-title{flex-direction:column-reverse;gap:14px}.database-collapsed .library h2{writing-mode:vertical-rl;font-size:13px;letter-spacing:.5px}.database-collapsed .stage-title>.project-heading{width:180px;padding:0 12px 0 0;border-right:1px solid var(--line)}.database-collapsed .stage-title>.project-heading .eyebrow{display:none}.database-collapsed .stage-title>.project-heading #sequence-title{font-size:20px}.database-collapsed .stage-title>.project-heading .sequence-title-row{max-width:420px}}
@media(max-width:1000px){.database-collapsed .library{height:auto;min-height:0;align-self:start}.database-collapsed .library .panel-title{justify-content:space-between}}@media(max-width:700px){.database-collapsed .library{width:100%}}
@media(max-width:1000px){html:not(.capture-view) .studio.database-collapsed{display:grid;grid-template-columns:40px minmax(0,1fr);gap:12px}html:not(.capture-view) .studio.database-collapsed .studio-sidebar{display:contents}.database-collapsed #database-content{display:none!important}html:not(.capture-view) .studio.database-collapsed .library{grid-column:1;width:40px;height:100%;min-height:0;align-self:stretch;padding:6px 4px}html:not(.capture-view) .studio.database-collapsed .stage-panel{grid-column:2;min-width:0}.database-collapsed .library .panel-title{flex-direction:column-reverse;justify-content:flex-start;gap:14px}.database-collapsed .library h2{writing-mode:vertical-rl;font-size:12px;letter-spacing:.5px}.database-collapsed .project-heading{grid-column:1/-1}}

#battlefield-layout{font-family:'Space Grotesk',sans-serif;font-size:14px;font-weight:500;color:#ededef;background:#24252c;border:1px solid #454852;border-radius:6px;padding:6px 24px 6px 8px;max-width:245px;cursor:pointer}.combat-area{position:absolute;inset:0 0 auto;height:33.333%;background:linear-gradient(180deg,#c43e4c44,#c43e4c28);border-bottom:1px dashed #ed6f7d99;pointer-events:none;z-index:0}.combat-area span{position:absolute;top:12px;left:20px;color:#f3a7ad;font-size:10px;letter-spacing:2px;font-weight:600}.with-combat .zone-label{top:calc(33.333% + 12px)}@media(max-width:700px){#battlefield-layout{font-size:12px;max-width:220px}.combat-area span{top:8px;left:10px;font-size:9px}}

/* Separate combat row; normal card coordinates remain relative to the main area. */
.with-combat{container-type:size}.with-combat .combat-area{height:35%;background:#612f36;border-bottom:2px solid #ac5560;box-shadow:inset 0 -5px 12px #0003}.with-combat .zone-label{top:calc(35% + 10px)}.with-combat .board-card{width:min(91px,22cqh)!important;max-width:none}.with-combat .board-watermark,.with-combat .empty-board{top:35%}.with-combat .card-face{border-width:2px}.with-combat .combat-area span{top:5px;font-size:9px}.with-combat .battlefield-piece .piece-face{width:min(44px,16cqh);height:min(44px,16cqh)}

#media-preview{background:repeating-conic-gradient(#24242a 0% 25%,#383840 0% 50%) 0 / 20px 20px}

#media-dialog .dialog-actions{flex-wrap:wrap}

/* The hand opens over the lower board without moving existing cards. */
.hand-zone{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:104px;height:52px;z-index:210;isolation:isolate}
#hand-toggle{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:104px;height:52px;border-radius:104px 104px 0 0;border:1px solid #899f60;border-bottom:0;background:#242e20;color:#d4f89a;font-size:13px;padding:18px 6px 4px;white-space:nowrap}
#hand-count{display:inline-block;margin-left:4px;font-variant-numeric:tabular-nums}
.hand-zone.expanded{width:min(92%,var(--hand-width,680px));height:min(210px,65%);background:none;border:0;pointer-events:none}
#hand-content,#hand-cards{position:absolute;inset:0}
.hand-zone .hand-card{position:absolute;left:50%;top:auto;bottom:calc(58px - var(--hand-card-width)*1.4);width:var(--hand-card-width);max-width:none;margin:0;transform:translateX(-50%) translate(var(--fan-x),var(--fan-y)) rotate(var(--fan-angle));transform-origin:50% 100%;touch-action:none;cursor:grab;transition:transform .16s ease}
.hand-card .graveyard-card-name{display:none}.hand-card.selected,.hand-card:focus-visible{z-index:100!important;transform:translateX(-50%) translate(var(--fan-x),calc(var(--fan-y) - 18px)) rotate(var(--fan-angle));outline:2px solid #c5f277;border-radius:8px}
.hand-zone.zone-drop-target #hand-toggle{background:#3c502d;box-shadow:0 0 0 2px #c5f277}
.capture-view .hand-zone{pointer-events:none}.capture-view .hand-zone:not(.expanded){display:none}
.embed-view .hand-zone.expanded{height:42%;width:min(85%,680px)}.embed-view .hand-card{top:auto;bottom:calc(40px - var(--hand-card-width)*1.4)}.embed-view #hand-toggle{height:28px;width:80px;padding:5px 3px 0;font-size:10px}

.hand-zone #hand-toggle,.hand-zone .hand-card{pointer-events:auto}

.hand-zone.expanded #hand-toggle{height:26px;width:80px;padding:5px 3px 0;font-size:11px;z-index:200}
@media(hover:hover){.hand-card:hover{z-index:100!important;transform:translateX(-50%) translate(var(--fan-x),calc(var(--fan-y) - 18px)) rotate(var(--fan-angle))}}
@media(max-width:700px){.hand-zone .hand-card{bottom:calc(68px - var(--hand-card-width)*1.4)}.embed-view .hand-card{bottom:calc(40px - var(--hand-card-width)*1.4)}}
@media(prefers-reduced-motion:reduce){.hand-zone .hand-card{transition:none}}
.hand-zone.expanded{overflow:clip}

.opponent-area{position:absolute;inset:0 0 auto;height:30%;background:#28323d;border-bottom:2px solid #596a7d;pointer-events:none}.opponent-area span{position:absolute;top:5px;left:20px;color:#b5c9e1;font-size:9px;letter-spacing:2px}.with-opponent .combat-area{top:30%;height:25%}.with-opponent .zone-label{top:calc(55% + 10px)}.with-opponent .board-watermark,.with-opponent .empty-board{top:55%}.with-opponent .board-card{width:min(78px,17cqh)!important}.board-card.opponent-card .card-face{transform:rotate(180deg)}.board-card.opponent-card.tapped .card-face{transform:rotate(270deg)}

#welcome-dialog{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:32px;border:1px solid #697c43;border-top:4px solid var(--accent);border-radius:12px;background:#1b1c22;color:#ededef;box-shadow:0 24px 90px #0009}#welcome-dialog::backdrop{background:#080a0dd9}#welcome-dialog .welcome-kicker{font-size:11px;letter-spacing:1.8px;color:var(--accent);font-weight:700}#welcome-dialog h2{font-size:32px;letter-spacing:-1px;margin:12px 0 20px}#welcome-dialog p{font-size:16px;line-height:1.6;color:#c6c8d0;margin:0 0 18px}#welcome-dialog button{margin-top:8px}@media(max-width:480px){#welcome-dialog{padding:24px}#welcome-dialog h2{font-size:28px}#welcome-dialog button{width:100%}}
