/* Card-table editor: readable illustrations, a visual roster and visible save state. */
.cb-deck-editor{--deck-accent:#8fe2cf;color:#e9f4ff;min-width:0}
.cb-deck-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:0 0 22px}
.cb-deck-heading h2{font-size:30px;margin:7px 0}.cb-deck-heading p{font-size:13px;color:#bed0e2;margin:7px 0}
.cb-deck-status{display:grid;text-align:right;gap:7px}.cb-deck-status>span{font-size:11px;color:#b8dddc}.cb-deck-status .cb-deck-count{color:#97f0d9;font-size:34px}.cb-deck-status .cb-deck-count small{color:#bdd0e7;font-size:14px}
.cb-deck-library{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) auto;gap:14px;align-items:end;padding:18px;margin-bottom:22px;border:1px solid #507296;border-radius:13px;background:#1c314b}.cb-deck-library label{font-size:12px;color:#cfe2f5}
.cb-deck-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;align-items:start;min-width:0}.cb-deck-catalog{min-width:0}
.cb-deck-filterbar{padding:18px;border:1px solid #4c6d90;border-radius:14px;background:linear-gradient(130deg,#203a57,#182a42);margin-bottom:20px}
.cb-deck-searchline{display:grid;grid-template-columns:minmax(0,1fr) 130px 106px;gap:12px}.cb-deck-searchline label{color:#cfe1f4;font-size:11px}.cb-deck-searchline input,.cb-deck-searchline select{min-height:42px;font-size:12px}
.cb-deck-editor .cb-filters{margin:14px 0 0;gap:7px}.cb-deck-editor .cb-filters button{padding:8px 11px;font-size:11px;min-height:34px}.cb-deck-editor .cb-filters button.active{color:#0e2b36;background:#95e4d3;border-color:#baf7e9}
.cb-catalog-caption{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px;color:#acc7e0;font-size:11px}.cb-catalog-caption .cb-text-button{font-size:11px;padding:8px 0;color:#b5e7dd}
.cb-card-pages{display:flex;align-items:center;gap:10px}.cb-card-pages button{display:grid;place-items:center;border:1px solid #627e9c;background:#294562;color:#e2f3ff;border-radius:7px;font-size:24px;width:34px;height:34px}.cb-card-pages b{font-size:11px;font-weight:400;white-space:nowrap}
.cb-deck-catalog .cb-collection{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:20px 16px;align-items:start}
@media(min-width:901px){.cb-deck-catalog .cb-collection{max-height:calc(100dvh - 230px);min-height:440px;overflow-y:auto;padding:4px 10px 4px 4px;scrollbar-color:#7099b8 #162b43}.cb-root:has(.cb-deck-editor){overflow:clip}.cb-deck-roster{position:sticky;top:16px;max-height:calc(100dvh - 32px);overflow-y:auto;scrollbar-color:#7099b8 #162b43}}
.cb-deck-card{padding:8px;background:#172a42;border:1px solid #3c5875;border-radius:14px}.cb-deck-card.cb-in-deck{border-color:#69bea9;background:#1b334a}
.cb-deck-card .cb-card{width:100%;min-height:335px;padding:10px 9px;border-radius:12px}.cb-root .cb-deck-card .cb-card:disabled{opacity:1;cursor:default}.cb-deck-card .cb-card:not(:disabled):hover{transform:translateY(-3px);border-color:#8be4cf;box-shadow:0 6px 20px #07122288}
.cb-deck-card .cb-card-art{width:100%;height:170px;overflow:hidden;border-radius:8px;margin:7px auto}.cb-deck-card .cb-card-art .cb-illustration{height:100%;aspect-ratio:auto}.cb-deck-card .cb-card-name{font-size:14px;line-height:1.5;margin:4px 0}.cb-deck-card .cb-card>p{font-size:12px;line-height:1.6;min-height:40px;margin:5px 0 10px}.cb-deck-card .cb-card-bottom{font-size:10px}.cb-deck-card .cb-card-meta>span{font-size:10px}.cb-deck-card .cb-mana{width:30px;height:30px;font-size:17px}
.cb-deck-card-caption{display:flex;justify-content:space-between;gap:5px;font-size:11px;margin:11px 0;color:#b6cce2}.cb-deck-card-caption b{color:#9ce3d2;font-size:11px}.cb-deck-card .cb-card-controls{border-color:#557b99;background:#1c3550}.cb-deck-card .cb-card-controls button{min-width:42px;width:42px;height:38px;color:#e9f8ff;background:#2b4768;font-size:22px}.cb-deck-card .cb-card-controls b{font-size:12px}.cb-deck-card .cb-card-controls button:not(:disabled):hover{background:#3d6888}.cb-deck-card-status{display:block;text-align:center;margin:8px 0 2px;color:#b6cde0;font-size:10px}
.cb-deck-roster{min-width:0;border:1px solid #6a8eab;border-radius:16px;padding:16px;background:linear-gradient(155deg,#294461,#162940);box-shadow:0 6px 24px #07132244}
.cb-deck-commander{display:flex;gap:12px;align-items:center;padding-bottom:16px;border-bottom:1px solid #476683}.cb-deck-crest{width:57px;height:67px;border:1px solid #739cae;border-radius:14px;display:grid;place-items:center;flex-shrink:0;color:#a7efd9;background:linear-gradient(140deg,#32566b,#192f4d)}.cb-deck-crest svg{width:35px;height:35px}.cb-deck-commander>div{min-width:0}.cb-deck-commander small{font-size:10px;color:#9fdbc9}.cb-deck-commander strong{font-size:15px;display:block;margin:5px 0}.cb-deck-commander p{font-size:11px;color:#c4d9e9;margin:6px 0 0;line-height:1.6}.cb-deck-commander p b{display:block;color:#bcf1de}
.cb-deck-name-label{margin:16px 0 12px;color:#cddfef;font-size:11px}.cb-deck-name-label input{font-size:14px;font-weight:700}.cb-deck-progress{height:5px;background:#11273f;border-radius:5px;overflow:hidden}.cb-deck-progress>span{display:block;height:100%;background:#92e6ce}
.cb-deck-composition{display:flex;gap:9px;flex-wrap:wrap;align-items:center;padding:10px 0;color:#b6d0e4;font-size:10px}.cb-deck-composition>b{color:#b4f4e1;font-size:14px}
.cb-roster-details{margin-top:10px}.cb-roster-details>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;font-size:12px;font-weight:700;color:#e0edf8;min-height:38px;list-style:none}.cb-roster-details>summary::after{content:'＋';font-size:16px;color:#a0e1d2}.cb-roster-details[open]>summary::after{content:'−'}.cb-roster-details>summary>span{font-size:10px;font-weight:400;color:#abc7dc;flex:1;text-align:right}
.cb-mana-curve{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:7px;padding:10px 4px 14px;border-bottom:1px solid #45617d}.cb-mana-curve>div{display:grid;text-align:center;gap:5px;color:#bdd6e8;font-size:10px}.cb-mana-curve b{font-size:10px;font-weight:400}.cb-mana-curve span{display:flex;height:42px;align-items:end;background:#122a44;border-radius:3px;overflow:hidden}.cb-mana-curve i{display:block;width:100%;background:linear-gradient(#9fe5db,#4a9ba4);border-radius:3px 3px 0 0}.cb-mana-curve small{font-size:10px}
.cb-roster-caption{display:flex;justify-content:space-between;align-items:center;padding:14px 0 10px;color:#d7e7f4;font-size:11px}.cb-roster-caption span{color:#a9c6dd;font-size:10px}.cb-deck-rows{display:grid;gap:6px;max-height:430px;overflow-y:auto;padding:2px 4px 3px 0;scrollbar-color:#6e95b1 #162b43}
.cb-deck-row{display:flex;align-items:center;gap:8px;text-align:left;min-width:0;min-height:52px;padding:4px 7px 4px 4px;position:relative;background:#1b324b;border:1px solid #526c85;border-left-width:3px;border-radius:8px;color:#eff7ff}.cb-deck-row:not(:disabled):hover{border-color:#a6e9d6;background:#2a4b64}.cb-deck-row.cb-rarity-rare{border-left-color:#8abbff}.cb-deck-row.cb-rarity-epic{border-left-color:#cba0ff}.cb-deck-row.cb-rarity-legendary{border-left-color:#f6d28b}.cb-row-art{display:block;width:44px;height:44px;flex-shrink:0;overflow:hidden;border-radius:5px}.cb-row-art .cb-illustration{height:100%;aspect-ratio:auto}.cb-row-cost{display:grid;place-items:center;width:22px;height:25px;flex-shrink:0;color:#b8dffe;font-size:15px}.cb-row-name{flex:1;min-width:0}.cb-row-name strong{display:block;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.cb-row-name small{font-size:9px;color:#a6c3df;display:block;margin-top:3px}.cb-row-quantity{font-size:13px;white-space:nowrap;color:#e4f2fc}.cb-row-remove{font-size:17px;color:#c6d9e8}.cb-deck-row-gold{background:linear-gradient(100deg,#5a482a,#273950);border-color:#ae8c50}.cb-deck-row-gold .cb-row-name small{color:#f8dc8e}.cb-deck-empty{grid-column:1/-1;padding:28px 16px;text-align:center;color:#bfd6e8;font-size:12px}.cb-deck-empty strong{color:#e6f3ff}.cb-deck-empty p{font-size:12px}
.cb-deck-savebar{padding-top:15px;border-top:1px solid #53718a;margin-top:14px}.cb-deck-savebar>p{font-size:11px;line-height:1.6;color:#bfd9e8;margin:0 0 12px}.cb-deck-savebar>[data-cb="save-deck"]{width:100%;min-height:46px;font-size:14px}.cb-deck-extra-actions{display:flex;gap:8px;margin-top:8px}.cb-deck-extra-actions .cb-button{flex:1;min-width:0;padding:9px 6px;font-size:11px}.cb-deck-manage{margin-top:14px;font-size:11px;color:#b4cde0}.cb-deck-manage summary{cursor:pointer;min-height:28px}.cb-deck-manage p{font-size:10px}.cb-deck-manage .cb-text-button{padding:8px 0;margin-right:16px;font-size:11px}.cb-danger-text{color:#ffc4b8!important}.cb-deck-share-details{margin-top:24px;border:1px solid #587a9a;background:#1b314c;border-radius:12px}.cb-deck-share-details>summary{padding:17px;font-size:13px;font-weight:700;cursor:pointer;color:#d4ecf8}.cb-deck-share-details .cb-deck-sharing{border:0;background:transparent;margin:0;padding-top:0}
.cb-battle-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.cb-battle-tools>span{font-size:12px;color:#bdd3e4}.cb-root .cb-danger{background:#442e3d;border-color:#bd7f8d;color:#ffe1e5}.cb-root .cb-danger:not(:disabled):hover{background:#643747;border-color:#e99fad}.cb-battle-tools .cb-danger{min-height:38px;font-size:12px;padding:8px 16px}
.cb-forfeit-dialog{position:fixed;margin:auto;width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:30px;color:#e8f2ff;background:linear-gradient(145deg,#2c4362,#14283f);border:1px solid #8bb2c5;border-radius:20px;text-align:center;box-shadow:0 20px 90px #0009}.cb-forfeit-dialog::backdrop{background:#020919cc;backdrop-filter:blur(4px)}.cb-forfeit-icon{display:grid;place-items:center;margin:0 auto 15px;width:58px;height:64px;color:#a1daca;border:1px solid #76a9aa;border-radius:15px;background:#1c394e}.cb-forfeit-icon svg{width:32px}.cb-forfeit-dialog h2{font-size:23px;margin:10px 0 14px}.cb-forfeit-dialog p{font-size:13px;color:#c3d6e9;line-height:1.8;margin:0 0 24px}.cb-forfeit-actions{display:flex;gap:10px}.cb-forfeit-actions .cb-button{flex:1;font-size:12px;padding:12px 8px}
@media(min-width:1500px){.cb-deck-layout{grid-template-columns:minmax(0,1fr) 340px}.cb-deck-catalog .cb-collection{grid-template-columns:repeat(auto-fill,minmax(195px,1fr))}.cb-deck-card .cb-card-art{height:190px}.cb-deck-card .cb-card{min-height:355px}}
@media(max-width:1150px) and (min-width:901px){.cb-deck-layout{grid-template-columns:minmax(0,1fr) 280px;gap:16px}.cb-deck-catalog .cb-collection{grid-template-columns:repeat(2,minmax(0,1fr))}.cb-deck-searchline{grid-template-columns:1fr 1fr}.cb-card-search-label{grid-column:1/-1}.cb-deck-roster{padding:12px}.cb-deck-card .cb-card-art{height:150px}.cb-deck-card .cb-card>p{font-size:11px}}
@media(max-width:900px){.cb-deck-layout{grid-template-columns:1fr;gap:20px}.cb-deck-roster{grid-row:1}.cb-deck-roster .cb-deck-commander{align-items:start}.cb-deck-crest{width:50px;height:58px}.cb-deck-rows{max-height:290px}.cb-deck-savebar{margin-top:10px;padding-top:10px}.cb-deck-savebar>p{margin-bottom:8px}.cb-deck-name-label{margin:12px 0}.cb-deck-library{padding:14px;gap:12px}.cb-deck-catalog .cb-collection{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}}
@media(max-width:560px){.cb-deck-heading{align-items:start;gap:12px;margin-bottom:16px}.cb-deck-heading h2{font-size:25px}.cb-deck-heading p{font-size:11px;max-width:170px}.cb-deck-status>span{font-size:9px;max-width:110px;line-height:1.5}.cb-deck-status .cb-deck-count{font-size:29px}.cb-deck-status .cb-deck-count small{font-size:11px}.cb-deck-library{grid-template-columns:minmax(0,1fr) auto}.cb-deck-library>label:first-child{grid-column:1/-1}.cb-deck-library .cb-button{font-size:11px;padding:10px}.cb-deck-searchline{grid-template-columns:1fr 1fr}.cb-card-search-label{grid-column:1/-1}.cb-deck-filterbar{padding:12px}.cb-deck-editor .cb-filters{gap:6px;margin-top:10px}.cb-deck-editor .cb-filters button{padding:7px 10px;font-size:10px}.cb-deck-catalog .cb-collection{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 9px}.cb-deck-card{padding:5px;border-radius:11px}.cb-deck-card .cb-card{padding:7px 6px;min-height:292px}.cb-deck-card .cb-card-art{height:128px}.cb-deck-card .cb-card-name{font-size:12px}.cb-deck-card .cb-card>p{font-size:10px;line-height:1.6}.cb-deck-card .cb-card-meta>span{font-size:8px}.cb-deck-card .cb-card-bottom{font-size:9px}.cb-deck-card .cb-mana{width:25px;min-width:25px;height:25px;font-size:14px}.cb-deck-card-caption{font-size:9px;flex-wrap:wrap;gap:4px}.cb-deck-card-caption b{font-size:9px}.cb-deck-card-status{font-size:9px}.cb-deck-card .cb-card-controls button{width:36px;min-width:36px;min-height:38px}.cb-deck-share-details>summary{font-size:12px;padding:14px}.cb-forfeit-dialog{padding:23px 18px}.cb-forfeit-dialog h2{font-size:21px}.cb-forfeit-dialog p{font-size:12px}}
@media(max-width:360px){.cb-deck-card .cb-card{min-height:287px}.cb-deck-card .cb-card-art{height:104px}.cb-deck-card .cb-card-name{font-size:11px}.cb-deck-card .cb-card>p{font-size:10px}.cb-deck-card .cb-card-top{gap:2px}.cb-deck-card .cb-card-meta>span{font-size:7px}.cb-deck-card .cb-grade{font-size:8px}.cb-deck-card .cb-card-controls button{width:30px;min-width:30px}}

/* Class-based values work with the site Content Security Policy. */
.cb-deck-progress>.cb-progress-0{width:0.0%}
.cb-deck-progress>.cb-progress-1{width:3.333%}
.cb-deck-progress>.cb-progress-2{width:6.667%}
.cb-deck-progress>.cb-progress-3{width:10.0%}
.cb-deck-progress>.cb-progress-4{width:13.333%}
.cb-deck-progress>.cb-progress-5{width:16.667%}
.cb-deck-progress>.cb-progress-6{width:20.0%}
.cb-deck-progress>.cb-progress-7{width:23.333%}
.cb-deck-progress>.cb-progress-8{width:26.667%}
.cb-deck-progress>.cb-progress-9{width:30.0%}
.cb-deck-progress>.cb-progress-10{width:33.333%}
.cb-deck-progress>.cb-progress-11{width:36.667%}
.cb-deck-progress>.cb-progress-12{width:40.0%}
.cb-deck-progress>.cb-progress-13{width:43.333%}
.cb-deck-progress>.cb-progress-14{width:46.667%}
.cb-deck-progress>.cb-progress-15{width:50.0%}
.cb-deck-progress>.cb-progress-16{width:53.333%}
.cb-deck-progress>.cb-progress-17{width:56.667%}
.cb-deck-progress>.cb-progress-18{width:60.0%}
.cb-deck-progress>.cb-progress-19{width:63.333%}
.cb-deck-progress>.cb-progress-20{width:66.667%}
.cb-deck-progress>.cb-progress-21{width:70.0%}
.cb-deck-progress>.cb-progress-22{width:73.333%}
.cb-deck-progress>.cb-progress-23{width:76.667%}
.cb-deck-progress>.cb-progress-24{width:80.0%}
.cb-deck-progress>.cb-progress-25{width:83.333%}
.cb-deck-progress>.cb-progress-26{width:86.667%}
.cb-deck-progress>.cb-progress-27{width:90.0%}
.cb-deck-progress>.cb-progress-28{width:93.333%}
.cb-deck-progress>.cb-progress-29{width:96.667%}
.cb-deck-progress>.cb-progress-30{width:100.0%}
.cb-mana-curve .cb-curve-0{height:0px}
.cb-mana-curve .cb-curve-1{height:1px}
.cb-mana-curve .cb-curve-2{height:2px}
.cb-mana-curve .cb-curve-3{height:3px}
.cb-mana-curve .cb-curve-4{height:4px}
.cb-mana-curve .cb-curve-5{height:5px}
.cb-mana-curve .cb-curve-6{height:6px}
.cb-mana-curve .cb-curve-7{height:7px}
.cb-mana-curve .cb-curve-8{height:8px}
.cb-mana-curve .cb-curve-9{height:9px}
.cb-mana-curve .cb-curve-10{height:10px}
.cb-mana-curve .cb-curve-11{height:11px}
.cb-mana-curve .cb-curve-12{height:12px}
.cb-mana-curve .cb-curve-13{height:13px}
.cb-mana-curve .cb-curve-14{height:14px}
.cb-mana-curve .cb-curve-15{height:15px}
.cb-mana-curve .cb-curve-16{height:16px}
.cb-mana-curve .cb-curve-17{height:17px}
.cb-mana-curve .cb-curve-18{height:18px}
.cb-mana-curve .cb-curve-19{height:19px}
.cb-mana-curve .cb-curve-20{height:20px}
.cb-mana-curve .cb-curve-21{height:21px}
.cb-mana-curve .cb-curve-22{height:22px}
.cb-mana-curve .cb-curve-23{height:23px}
.cb-mana-curve .cb-curve-24{height:24px}
.cb-mana-curve .cb-curve-25{height:25px}
.cb-mana-curve .cb-curve-26{height:26px}
.cb-mana-curve .cb-curve-27{height:27px}
.cb-mana-curve .cb-curve-28{height:28px}
.cb-mana-curve .cb-curve-29{height:29px}
.cb-mana-curve .cb-curve-30{height:30px}
.cb-mana-curve .cb-curve-31{height:31px}
.cb-mana-curve .cb-curve-32{height:32px}
.cb-mana-curve .cb-curve-33{height:33px}
.cb-mana-curve .cb-curve-34{height:34px}
.cb-mana-curve .cb-curve-35{height:35px}
.cb-mana-curve .cb-curve-36{height:36px}
.cb-mana-curve .cb-curve-37{height:37px}
.cb-mana-curve .cb-curve-38{height:38px}
.cb-mana-curve .cb-curve-39{height:39px}
.cb-mana-curve .cb-curve-40{height:40px}
.cb-mana-curve .cb-curve-41{height:41px}
.cb-mana-curve .cb-curve-42{height:42px}

.cb-deck-identity{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;align-items:end;margin:-8px 0 22px;padding:16px 18px;border:1px solid #767659;border-radius:13px;background:#343b30}
.cb-deck-identity .cb-deck-name-label{margin:0;font-size:12px;color:#ddd6b9;min-width:0}
.cb-deck-identity-actions{display:flex;gap:8px;flex-wrap:wrap}
.cb-deck-identity>small{grid-column:1/-1;color:#c8c4ab;line-height:1.6;font-size:11px}
@media(max-width:560px){.cb-deck-identity{grid-template-columns:minmax(0,1fr);padding:14px}.cb-deck-identity-actions .cb-button{flex:1;padding:10px;font-size:12px}}

/* Deck editing uses the available content width, including beside the site sidebar. */
.cb-deck-editor{container:deck-editor / inline-size;min-width:0;max-width:100%;padding-bottom:16px}
.cb-root:has(.cb-deck-editor){overflow:visible}
.cb-deck-editor *{box-sizing:border-box}
.cb-deck-editor button,.cb-deck-editor input,.cb-deck-editor select,.cb-deck-editor textarea{font:inherit}
.cb-deck-editor button:focus-visible,.cb-deck-editor summary:focus-visible,.cb-deck-editor input:focus-visible,.cb-deck-editor select:focus-visible{outline:3px solid #b4f4e1;outline-offset:3px}
.cb-deck-editor .cb-button{min-height:44px;white-space:normal;line-height:1.45}
.cb-deck-editor input,.cb-deck-editor select,.cb-deck-editor textarea{width:100%;min-width:0;max-width:100%;min-height:44px;font-size:14px}
.cb-deck-editor label{display:grid;gap:7px;min-width:0;color:#cfe2f5;font-size:13px}
.cb-deck-heading{gap:20px;align-items:center;margin-bottom:18px;flex-wrap:wrap}
.cb-deck-heading h2{font-size:clamp(24px,3cqi,32px)}
.cb-deck-heading p{font-size:13px;line-height:1.6;max-width:none}
.cb-deck-saved-label{flex:0 1 300px}
.cb-deck-start{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.cb-deck-start>.cb-button{display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;padding:15px;border:1px solid #5b819e;background:#203a53;color:#ecf7ff;border-radius:12px}
.cb-deck-start>.cb-button[aria-expanded=true]{border-color:#a0ebd4;background:#2c5060}
.cb-deck-start strong{font-size:14px;line-height:1.6}
.cb-deck-start small{display:inline-block;font-size:10px;background:#a1e7ce;color:#173a38;border-radius:4px;padding:1px 5px;margin-left:3px}
.cb-deck-start span{font-size:12px;font-weight:400;color:#c1d7e8}
.cb-deck-start-panel{padding:16px;margin-bottom:16px;border:1px solid #6a8eab;border-radius:12px;background:#1b314b}
.cb-deck-start-panel p{font-size:12px;color:#bfd6e8;line-height:1.7}
.cb-deck-start-panel .cb-deck-sharing{margin:0;padding:0;border:0;background:transparent}
.cb-deck-start-panel .cb-section-top{flex-wrap:wrap;gap:10px}
.cb-deck-start-panel textarea{overflow-wrap:anywhere;resize:vertical;min-height:96px}
.cb-deck-identity{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);margin:0 0 16px;background:#1b314b;border-color:#537792;padding:14px}
.cb-deck-identity .cb-deck-name-label{color:#cfe2f5;font-size:13px}
.cb-deck-workbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px;background:#25465b;border:1px solid #76a89f;border-radius:12px}
.cb-deck-workbar>div:first-child{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.cb-deck-workbar strong{font-size:23px;color:#c2ffe9}
.cb-deck-workbar span{font-size:13px;color:#d3e6ef}
.cb-deck-edit-actions{display:flex;gap:8px}
.cb-deck-empty-button{border-color:#d7b88d!important;color:#ffe3bf!important;background:#463b34!important}
.cb-deck-notice{min-height:20px;color:#bfd9e8;font-size:12px;line-height:1.6;margin:8px 2px 16px;overflow-wrap:anywhere}
.cb-deck-layout{grid-template-columns:minmax(0,1fr) minmax(270px,32%);gap:18px}
.cb-deck-editor .cb-deck-catalog .cb-collection{grid-template-columns:repeat(auto-fill,minmax(min(100%,168px),1fr));gap:14px;max-height:none;min-height:0;overflow:visible;padding:0}
.cb-deck-filterbar{padding:14px;margin-bottom:16px}
.cb-deck-searchline{grid-template-columns:minmax(0,1fr) 110px}
.cb-card-search-label{grid-column:auto}
.cb-deck-editor .cb-filters button{font-size:12px;min-height:44px;padding:8px 12px}
.cb-deck-advanced{margin-top:12px;font-size:13px;color:#cde2ef}
.cb-deck-advanced summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
.cb-deck-advanced summary::after{content:'＋';margin-left:auto}
.cb-deck-advanced[open] summary::after{content:'−'}
.cb-deck-advanced label{max-width:240px}
.cb-catalog-caption{flex-wrap:wrap;font-size:12px;gap:8px}
.cb-card-pages button{width:44px;height:44px}
.cb-card-pages b{font-size:12px}
.cb-deck-editor .cb-deck-roster{position:sticky;top:16px;max-height:calc(100dvh - 150px);overflow-y:auto;grid-row:auto;padding:14px;scrollbar-color:#8b9b80 #283729}
.cb-deck-roster h3{display:flex;justify-content:space-between;gap:12px;margin:0 0 14px;font-size:17px}
.cb-deck-roster h3 span{color:#b4f4e1}
.cb-deck-commander{padding-bottom:10px}
.cb-deck-commander p{font-size:12px;line-height:1.65}
.cb-deck-composition{font-size:12px}
.cb-deck-editor .cb-deck-rows{max-height:none;overflow:visible;padding:0;gap:8px}
.cb-deck-row{display:flex;flex-wrap:wrap;padding:6px;gap:4px;min-height:60px}
.cb-row-inspect{display:flex;align-items:center;gap:6px;min-width:0;flex:1 1 135px;background:none;border:0;color:inherit;text-align:left;padding:2px;cursor:pointer}
.cb-row-art{width:34px;height:42px}
.cb-row-name strong{font-size:12px}
.cb-row-name small{font-size:10px;line-height:1.5}
.cb-row-cost{width:18px;font-size:14px}
.cb-row-controls{display:flex;align-items:center;gap:4px;margin-left:auto}
.cb-row-controls button{width:36px;min-height:44px;background:#2c4b67;border:1px solid #688aa5;border-radius:6px;font-size:21px;color:#eefaff;cursor:pointer}
.cb-row-controls b{min-width:12px;text-align:center;font-size:13px}
.cb-row-controls button:disabled{opacity:.4;cursor:default}
.cb-deck-editor .cb-deck-card .cb-card-controls button{min-width:44px;width:44px;min-height:44px}
.cb-deck-editor .cb-deck-card .cb-card{min-height:310px}
.cb-deck-editor .cb-deck-card .cb-card-art{height:145px}
.cb-deck-editor .cb-deck-card .cb-card>p{font-size:12px;line-height:1.65}
.cb-deck-card-caption,.cb-deck-card-caption b,.cb-deck-card-status{font-size:11px}
.cb-deck-rules{font-size:12px;color:#bdd6e8;line-height:1.7;margin-bottom:0}
.cb-deck-missing{background:#453d31;border:1px solid #b9a26d;padding:12px;border-radius:8px;font-size:12px;line-height:1.7;margin-bottom:12px;overflow-wrap:anywhere}
.cb-deck-missing ul{padding-left:18px}
.cb-deck-mobile-tabs{display:none}
.cb-deck-footer{position:sticky;bottom:12px;z-index:15;display:flex;align-items:center;justify-content:space-between;gap:14px;background:#132b40f5;border:1px solid #7ba8a8;border-radius:12px;padding:14px 16px;margin-top:20px;box-shadow:0 5px 22px #0007}
.cb-deck-footer .cb-deck-status{display:block;text-align:left;min-width:0}
.cb-deck-footer .cb-deck-status>span{font-size:12px;color:#b8dddc;max-width:none}
.cb-deck-save-hint{margin:5px 0 0;font-size:13px;color:#e2f4fa;line-height:1.5}
.cb-deck-footer>.cb-button{flex:0 0 auto;min-width:150px;min-height:48px;font-size:15px}
.cb-deck-manage{padding:12px 0;margin-top:4px;font-size:13px}
.cb-deck-manage summary{min-height:44px;cursor:pointer}
.cb-deck-extra-actions{flex-wrap:wrap}
.cb-deck-extra-actions .cb-button{flex:0 1 auto;min-width:130px;font-size:12px}
@container deck-editor (max-width:760px){
 .cb-deck-layout{grid-template-columns:minmax(0,1fr)}
 .cb-deck-editor .cb-deck-roster{position:static;max-height:none;overflow:visible}
 .cb-deck-mobile-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}
 .cb-deck-mobile-tabs button{min-height:46px;border:1px solid #6587a2;background:#20394f;color:#d4e7f5;border-radius:9px;font-size:14px;font-weight:700}
 .cb-deck-mobile-tabs button[aria-pressed=true]{background:#a1e7ce;color:#153b38;border-color:#b7f5df}
 .cb-deck-editor[data-deck-view=cards] .cb-deck-roster{display:none}
 .cb-deck-editor[data-deck-view=roster] .cb-deck-catalog{display:none}
 .cb-deck-heading{align-items:flex-start;gap:12px}
 .cb-deck-saved-label{flex-basis:100%}
 .cb-deck-start{gap:8px}
 .cb-deck-start>.cb-button{padding:12px}
 .cb-deck-start span{display:none}
 .cb-deck-start small{margin:3px 0 0;display:table}
 .cb-deck-editor .cb-deck-catalog .cb-collection{grid-template-columns:repeat(auto-fill,minmax(min(100%,160px),1fr))}
 .cb-deck-footer{bottom:8px}
}
@container deck-editor (max-width:440px){
 .cb-deck-start{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .cb-deck-start>.cb-button{min-height:56px;padding:8px;justify-content:center}
 .cb-deck-start strong{font-size:12px;word-break:keep-all}
 .cb-deck-start small{display:none}
 .cb-deck-identity{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:10px;gap:8px}
 .cb-deck-workbar{padding:12px;gap:8px}
 .cb-deck-edit-actions{width:100%}
 .cb-deck-edit-actions button{flex:1;padding:9px 5px;font-size:13px}
 .cb-deck-searchline{grid-template-columns:minmax(0,1fr) 90px;gap:8px}
 .cb-deck-editor input,.cb-deck-editor select,.cb-deck-editor textarea{font-size:16px}
 .cb-deck-editor .cb-deck-catalog .cb-collection{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .cb-deck-editor .cb-deck-card .cb-card{min-height:280px;padding:7px 6px}
 .cb-deck-editor .cb-deck-card .cb-card-art{height:105px}
 .cb-deck-editor .cb-deck-card .cb-card-name{font-size:12px}
 .cb-deck-editor .cb-deck-card .cb-card>p{font-size:11px}
 .cb-deck-card-caption{flex-wrap:wrap}
 .cb-deck-editor .cb-deck-card .cb-card-controls button{min-width:36px;width:36px}
 .cb-deck-footer{padding:10px;gap:8px;bottom:4px}
 .cb-deck-footer>.cb-button{min-width:105px;font-size:13px;padding:10px 8px}
 .cb-deck-footer .cb-deck-status>span{font-size:11px}
 .cb-deck-save-hint{font-size:12px}
}
@container deck-editor (max-width:290px){
 .cb-deck-editor .cb-deck-catalog .cb-collection{grid-template-columns:1fr}
 .cb-deck-searchline{grid-template-columns:1fr}
 .cb-deck-footer .cb-deck-status>span{display:none}
}
@media(prefers-reduced-motion:reduce){.cb-deck-editor *{scroll-behavior:auto!important;transition:none!important}}
@media(max-width:700px){.main .cb-deck-footer{bottom:calc(92px + env(safe-area-inset-bottom,0px))}}
