.deck-page{max-width:1300px;margin:35px auto;padding:0 24px}.deck-page h1{font:36px/1.3 TurboBlock,sans-serif}.deck-layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:28px}.deck-page label{display:block;font-weight:700;margin-bottom:8px}.deck-page input{box-sizing:border-box;width:100%;padding:12px;border:2px solid #171916;border-radius:0;background:#fffaf0;min-height:46px}.deck-editor{background:var(--white);border:2px solid var(--black);border-top:6px solid var(--green);box-shadow:4px 4px 0 var(--black);padding:20px;align-self:start;position:sticky;top:20px;max-height:85vh;overflow:auto}.deck-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.deck-editor h2{font:18px/1.3 TurboBlock,sans-serif}.deck-editor button:not(.button),.catalog-card button{background:#eeeadd;border:1px solid #171916;padding:8px;cursor:pointer;color:#171916}.deck-editor button:disabled,.catalog-card button:disabled{opacity:.4;cursor:default}#catalog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:18px;margin-top:20px}.catalog-card{background:var(--white);border:2px solid var(--black);padding:10px;display:flex;flex-direction:column;gap:9px}.catalog-card canvas{width:100%;height:auto;aspect-ratio:5/7}.catalog-card strong{font-size:14px}.catalog-card button{margin-top:auto}.deck-row{display:grid;grid-template-columns:minmax(0,1fr) 30px 22px 30px;align-items:center;gap:6px;padding:9px 0;border-bottom:1px solid #d0cbb6}.deck-row span{overflow-wrap:anywhere}.deck-rule{font-size:12px;color:#5e604e}#deck-status{font-size:13px;line-height:1.5;white-space:pre-line}#saved-decks{display:grid;gap:8px}#saved-decks button{text-align:left}@media(max-width:760px){.deck-layout{grid-template-columns:1fr}.deck-editor{position:static;max-height:none}.deck-page{padding:0 16px}#catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.deck-editor label{margin-top:16px}.deck-editor #save-deck,.deck-editor #delete-deck{margin:8px 8px 8px 0}.deck-editor #saved-decks{margin-top:14px}.deck-editor button:not(.button),.catalog-card button{min-height:36px;border-radius:0}.catalog-card button{font-size:12px}.deck-row button{min-height:32px!important}.deck-editor #deck-count{font:14px/1.5 TurboBlock,sans-serif}.deck-layout>*,.catalog-card{min-width:0}

.deck-page .catalog-filter{display:flex;gap:8px;align-items:center;margin:12px 0}
.deck-page .catalog-filter input[type=checkbox]{flex:none;width:18px;height:18px;min-height:0;margin:0;padding:0;accent-color:var(--green)}
.catalog-card[hidden]{display:none}
.catalog-card canvas{display:block;background:var(--paper)}
.catalog-card .preview-unavailable{background:var(--paper) url('/assets/card-back.png') center/contain no-repeat}
.catalog-card strong,#saved-decks button{overflow-wrap:anywhere}
#catalog-status:empty{display:none}
.catalog-card .catalog-preview{padding:0;margin:0;border:0;background:none}
.catalog-preview.locked canvas{filter:brightness(.35) saturate(.35)}
.catalog-preview.locked .foil-frame::before,.catalog-preview.locked .foil-frame::after{display:none}
#card-preview{width:min(440px,92vw);max-height:90dvh}
:is(#card-preview,#deck-share-dialog) h2{margin:12px 0;overflow-wrap:anywhere}
#preview-art canvas{display:block;width:auto;height:auto;max-width:100%;max-height:65dvh;margin:auto}
#preview-status:empty{display:none}
:is(#card-preview,#deck-share-dialog) .preview-close{position:absolute;top:8px;right:8px}
:is(#card-preview,#deck-share-dialog) .preview-close button{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);background:var(--white);color:var(--ink);font-size:26px;line-height:1;cursor:pointer}
:is(#card-preview,#deck-share-dialog) h2{padding-right:36px}
#preview-expansion{font-weight:700;color:var(--muted);margin:0 0 12px}
#preview-expansion:empty,.catalog-card span:empty{display:none}

#deck-share-dialog{width:min(480px,92vw);max-height:85vh;max-height:85dvh;overflow:auto}
#deck-share-content input{display:block;width:100%;margin:0 0 .75rem}
#deck-share-content button{margin:0 .5rem .5rem 0}
