/* Card library and builder share one studio; all scrolling stays inside panes. */
.catalog-search-line{display:flex;gap:8px}.catalog-search-line .catalog-search{flex:1;min-width:0}.catalog-title-select{display:flex;min-width:0;max-width:36%;width:190px}.catalog-title-select select{min-width:0;width:100%;border:1px solid #c5d0bb;border-radius:7px;background:#fff;color:var(--ink);font:12px 'Yu Gothic UI',sans-serif;padding:7px}.version-link{margin-left:auto;font-size:11px;white-space:nowrap;color:var(--red);padding:8px;text-decoration:none}.version-link:focus-visible{outline:2px solid var(--red)}
.setup-decks{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:8px;background:#edf0e6}.setup-decks .field-label:first-child{margin-top:0}.setup-decks select{width:100%;text-overflow:ellipsis}.setup-decks button{margin-top:8px;min-height:32px;padding:5px 10px;font-size:11px}.setup-decks p{margin:7px 0 0;font-size:11px;line-height:1.6;color:var(--muted)}
#setup-dialog{max-height:92dvh;overflow:auto}#deck-title{display:block;max-width:230px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.help-short{display:none}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
#deck-editor-dialog{width:min(1440px,98vw);max-width:1440px;height:min(950px,96dvh);max-height:96dvh;margin:auto;padding:0;overflow:hidden;background:var(--paper);border:1px solid #becab7;border-radius:12px;box-shadow:0 24px 90px #14231c55}
#deck-editor-dialog[open]{display:flex;flex-direction:column}#deck-editor-dialog::backdrop{background:#102119b0;backdrop-filter:blur(4px)}
.studio-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 22px;background:#fafaf6;border-bottom:1px solid var(--line);flex-shrink:0}.studio-head .eyebrow{font-size:9px;color:var(--red)}.studio-head h2{font-size:22px;margin:3px 0 0;font-weight:650}.studio-head p{font-size:10px;color:var(--muted);margin:4px 0 0}.studio-head-actions{display:flex;align-items:center;gap:18px;flex-shrink:0}.studio-head-actions strong{font:600 28px var(--mono);color:var(--red);white-space:nowrap}.studio-head-actions strong.is-ready{color:#52713a}.studio-head-actions button{font-size:12px;min-height:36px;padding:7px 11px}
.studio-nav{display:flex;align-items:center;gap:4px;padding:0 20px;background:#fafaf6;border-bottom:1px solid var(--line);flex-shrink:0}.studio-nav button{font-size:12px;border:0;border-radius:0;min-height:38px;padding:9px 18px;background:none;border-bottom:3px solid transparent}.studio-nav button[aria-pressed=true]{color:var(--red);border-bottom-color:var(--red);font-weight:700}.studio-nav>span{font-size:10px;color:var(--muted);margin-left:auto;letter-spacing:.5px}.studio-mobile-tabs,.mobile-deck-bar{display:none}
.studio-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 330px}.studio-catalog{min-width:0;min-height:0;display:flex;flex-direction:column;background:#f0f2e9}.catalog-filters{flex-shrink:0;padding:12px 16px 9px;background:#f9faf5;border-bottom:1px solid var(--line)}.catalog-search{display:flex;align-items:center;gap:9px;border:1px solid #c5d0bb;border-radius:7px;background:white;padding:0 12px}.catalog-search>span{color:#65765a;font-size:25px;line-height:1}.catalog-search input{min-width:0;width:100%;padding:10px 0;border:0;background:none;outline:none;font:12px 'Yu Gothic UI','Meiryo',sans-serif;color:var(--ink)}.catalog-search:focus-within{outline:2px solid #b3c59c;outline-offset:2px}.catalog-filter-buttons{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.catalog-filter-buttons button{min-height:29px;padding:5px 10px;font-size:11px;background:white}.catalog-filter-buttons .has-filter{color:#4b652e;border-color:#95ad77;background:#eaf1df}.catalog-filter-buttons #catalog-reset{margin-left:auto;font-size:10px;background:none}.catalog-active-filters{display:flex;flex-wrap:wrap;gap:4px}.catalog-active-filters:empty{display:none}.active-filter{padding:3px 7px;min-height:23px;font-size:10px;border-color:#bccca7;background:#e7efda;margin-top:6px}
.catalog-toolbar{display:flex;align-items:center;gap:9px;padding:7px 16px;flex-shrink:0;border-bottom:1px solid #e1e6d9}.catalog-toolbar>span{font:10px var(--mono);color:var(--muted);margin-right:auto;white-space:nowrap}.catalog-toolbar select,.adopted-heading select{font:10px 'Yu Gothic UI',sans-serif;border:1px solid var(--line);border-radius:5px;padding:5px;background:#fff;color:var(--ink);max-width:150px}.catalog-density{display:flex;gap:1px;background:#dce3d4;border:1px solid #c9d4bf;border-radius:5px;overflow:hidden}.catalog-density button{border:0;background:transparent;font-size:10px;min-height:27px;padding:4px 8px;border-radius:0}.catalog-density button[aria-pressed=true]{background:#fff;color:var(--red);font-weight:700}
.catalog-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px 16px}.deck-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.catalog-card{border:1px solid #d4ddca;border-radius:8px;background:#fff;overflow:hidden;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);position:relative}.catalog-card.is-in-deck{border-color:#9bb681;box-shadow:0 0 0 1px #9bb68130}.catalog-card-art{border:0;border-radius:0;background:linear-gradient(135deg,#e8eddf,#f9faf4);padding:6px;display:block;width:100%;height:clamp(90px,17dvh,170px);min-height:0;overflow:hidden}.catalog-card-art img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 3px #14231c20)}.art-fallback{display:grid;place-items:center;width:100%;height:100%;font-size:13px;color:#5b6e4c;text-align:center}.catalog-card-info{min-width:0;padding:6px 9px 3px;position:relative}.catalog-card-info>small{display:block;font:9px var(--mono);color:var(--muted)}.catalog-card-info>strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;margin:3px 0}.catalog-card-info>span:not(.catalog-trigger){font-size:9px;color:var(--muted);display:block}.catalog-trigger{position:absolute;top:5px;right:7px;font:7px var(--mono);padding:2px 4px;background:#edf1e5;border-radius:3px;color:#52683d}.catalog-trigger[data-trigger=none]{display:none}.catalog-trigger[data-trigger=final],.catalog-trigger[data-trigger=special]{background:#f5e7d8;color:#985929}
.deck-stepper{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:5px 8px 7px}.deck-stepper button{width:36px;min-width:30px;min-height:32px;height:32px;padding:0;font-size:19px;border-radius:5px;touch-action:manipulation}.deck-stepper output{font:600 17px var(--mono);min-width:20px;text-align:center}.deck-stepper .deck-plus{background:#eaf0e0;border-color:#b8cba2}.catalog-list{grid-template-columns:repeat(3,minmax(0,1fr))}.catalog-list .catalog-card{grid-template-columns:49px minmax(0,1fr);grid-template-rows:auto auto}.catalog-list .catalog-card-art{grid-row:1/3;width:49px;height:100%;min-height:84px;padding:3px}.catalog-list .catalog-card-info{padding:6px 6px 0}.catalog-list .catalog-card-info>small{font-size:8px}.catalog-list .catalog-trigger{display:none}.catalog-list .deck-stepper{padding:4px 6px 6px;gap:2px}.catalog-list .deck-stepper button{width:30px;min-height:29px;height:29px}.catalog-list .catalog-card-info>strong{font-size:11px}
.catalog-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 16px;border-top:1px solid var(--line);background:#f9faf5;flex-shrink:0;min-height:43px}.catalog-pagination p{font-size:10px;color:var(--muted);margin:0;line-height:1.5}.catalog-pagination>div{display:flex;align-items:center;gap:9px;flex-shrink:0}.catalog-pagination button{min-height:29px;height:29px;min-width:33px;padding:2px 7px;font-size:14px}.catalog-pagination span{font:11px var(--mono);white-space:nowrap}.catalog-empty{padding:30px 14px;text-align:center;color:var(--muted);font-size:12px;line-height:1.8}.catalog-empty strong{font-size:13px;color:#4e6240}.catalog-empty p{font-size:11px}.catalog-empty button{font-size:11px;min-height:34px}
.studio-deck{display:flex;flex-direction:column;min-width:0;min-height:0;border-left:1px solid #cdd7c2;background:#fffef8}.deck-settings{padding:12px 14px 8px;flex-shrink:0;border-bottom:1px solid var(--line)}.deck-settings-heading{display:flex;align-items:center;gap:5px;margin-bottom:8px}.deck-settings-heading .eyebrow{margin-right:auto;color:#596d46}.deck-settings-heading button{font-size:10px;min-height:28px;padding:4px 8px}.deck-settings>select,.deck-settings>input{width:100%;display:block;border:1px solid #cbd6bf;border-radius:5px;background:#fff;color:var(--ink);font:11px 'Yu Gothic UI',sans-serif;min-height:33px;padding:6px 8px}.deck-settings>input{margin-top:6px;font-size:12px}.deck-settings>input:focus-visible{outline:2px solid #a7bf8c;outline-offset:1px}.deck-settings>p{font-size:9px;color:var(--muted);margin:6px 0 0;line-height:1.6}.deck-settings progress{height:4px;width:100%;accent-color:#809e5d;display:block;margin:10px 0 6px}.deck-balance{font-size:10px;color:var(--muted);margin-top:6px}.deck-balance summary{cursor:pointer;min-height:22px;line-height:22px}.deck-balance p{font-size:9px;margin:6px 0 0}.deck-costs{display:flex;align-items:flex-end;gap:8px;padding:3px 0 0;max-height:65px}.cost-bar{flex:1;display:flex;align-items:center;flex-direction:column;justify-content:end;gap:3px;height:56px}.cost-bar small{font:9px var(--mono);color:#667858}.cost-bar i{display:block;width:100%;max-width:32px;background:#9eb57e;border-radius:3px 3px 0 0}.cost-bar span{font:9px var(--mono)}
.adopted-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 14px;background:#f6f7ef;flex-shrink:0;border-bottom:1px solid var(--line)}.adopted-heading h3{font-size:11px;margin:0}.adopted-heading small{font-size:9px;color:var(--muted);font-weight:400;margin-left:5px}.adopted-heading select{max-width:105px;font-size:9px;padding:4px}.adopted-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:4px 9px}.adopted-row{display:flex;align-items:center;gap:6px;border-bottom:1px solid #e8ecdf;min-width:0}.adopted-name{background:none;border:0;padding:5px;min-width:0;flex:1;min-height:36px;text-align:left;border-radius:3px;display:flex;align-items:center;gap:6px}.adopted-name small{font:8px var(--mono);color:#78886b;flex-shrink:0}.adopted-name strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}.adopted-row .deck-stepper{padding:3px 0;gap:2px;flex-shrink:0}.adopted-row .deck-stepper button{width:27px;min-width:27px;min-height:27px;height:27px;font-size:16px}.adopted-row .deck-stepper output{font-size:13px;min-width:18px}.deck-tools{display:flex;gap:5px;padding:8px 10px;border-top:1px solid var(--line);flex-shrink:0}.deck-tools button{font-size:9px;min-height:30px;padding:5px 7px;flex:1;white-space:nowrap}#delete-deck{color:var(--red);flex:0 0 auto}
.studio-notice{display:flex;align-items:center;gap:6px;background:#e7eedc;flex-shrink:0;padding:0 16px;min-height:0}.studio-notice:has(p:empty):not(:has(button:not([hidden]))){display:none}.studio-notice p{font-size:10px;color:#51683d;line-height:1.5;margin:5px 0;flex:1}.studio-notice button{font-size:10px;min-height:26px;padding:3px 7px}.studio-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-shrink:0;border-top:1px solid var(--line);background:#fafaf6;padding:10px 20px max(10px,env(safe-area-inset-bottom));min-height:64px}.studio-footer>div{min-width:0}.studio-footer strong{display:block;font-size:12px;font-weight:600}.studio-footer #deck-current-name{display:none}.studio-footer small{display:block;font-size:9px;color:var(--muted);margin-top:4px}.studio-footer .primary{font-size:12px;white-space:nowrap;min-height:38px;padding:8px 15px}
#deck-editor-dialog[data-view=catalog] .studio-body{grid-template-columns:minmax(0,1fr)}#deck-editor-dialog[data-view=catalog] .studio-deck,#deck-editor-dialog[data-view=catalog] .studio-footer,#deck-editor-dialog[data-view=catalog] #deck-total,#deck-editor-dialog[data-view=catalog] .studio-mobile-tabs,#deck-editor-dialog[data-view=catalog] .mobile-deck-bar,#deck-editor-dialog[data-view=catalog] .catalog-card>.deck-stepper{display:none}#deck-editor-dialog[data-view=catalog] .deck-card-grid:not(.catalog-list){grid-template-columns:repeat(6,minmax(0,1fr))}#deck-editor-dialog[data-view=catalog] .catalog-card-art{height:clamp(150px,32dvh,330px)}#deck-editor-dialog[data-view=catalog] .catalog-list .catalog-card-art{height:100%;min-height:84px}
.studio-small-dialog{max-height:92dvh;overflow:auto}.studio-small-dialog h2{font-size:20px;margin:10px 0}.studio-small-dialog .dialog-inner{padding:22px}.filter-option{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:6px;background:white;padding:10px 12px;margin-top:7px;cursor:pointer;font-size:13px;min-height:44px}.filter-option input{width:17px;height:17px;accent-color:var(--red)}.filter-option small{margin-left:auto;color:var(--muted);font-size:10px}.studio-small-dialog .dialog-buttons{flex-wrap:wrap}.studio-small-dialog .dialog-buttons button{font-size:11px;padding:8px 10px}
#catalog-detail-dialog{max-width:650px;width:calc(100% - 24px)}.catalog-detail-layout{display:grid;grid-template-columns:160px minmax(0,1fr);gap:18px;align-items:start}.catalog-detail-layout .art-preview{margin:0}.catalog-detail-layout .art-preview .card-art{height:220px}.catalog-detail-layout p{font-size:12px;line-height:1.9;margin:0 0 12px}#catalog-detail-numbers{padding:8px 10px;background:#edf1e5;border-radius:6px;font-size:11px}#catalog-detail-stepper{max-width:200px}#catalog-detail-stepper .deck-stepper{padding:0}#catalog-detail-stepper button{width:48px;min-height:40px;height:40px}#catalog-detail-stepper output{font-size:22px}#catalog-detail-edit{font-size:12px;min-height:38px}#deck-export-text{width:100%;resize:vertical;min-height:180px;max-height:55dvh;border:1px solid var(--line);border-radius:6px;padding:10px;font:12px var(--mono);background:#fff;color:var(--ink)}
@media(max-width:1050px){.studio-body{grid-template-columns:minmax(0,1fr) 290px}.catalog-list{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-list .catalog-card-info>strong{font-size:10px}.adopted-name{display:block}.adopted-name small{display:block;font-size:7px;margin-bottom:1px}.studio-head{padding:10px 16px}.catalog-filter-buttons button{padding:5px 8px}.studio-nav>span{display:none}}
@media(max-width:600px){
  #deck-editor-dialog{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}.studio-head{padding:9px 11px;gap:7px;min-height:60px}.studio-head .eyebrow{font-size:7px;letter-spacing:1px}.studio-head h2{font-size:18px}.studio-head p{font-size:9px;margin-top:3px}.studio-head-actions{gap:8px}.studio-head-actions strong{font-size:21px}.studio-head-actions button{font-size:10px;min-height:32px;padding:5px 8px}.studio-nav{padding:0 10px}.studio-nav button{min-height:34px;font-size:11px;padding:7px 16px}.studio-mobile-tabs{display:flex;padding:5px 10px;gap:6px;background:#eff2e7;border-bottom:1px solid var(--line);flex-shrink:0}.studio-mobile-tabs button{flex:1;font-size:10px;min-height:31px;padding:5px;background:transparent}.studio-mobile-tabs button[aria-pressed=true]{background:#fff;border-color:#9bb381;color:#4b6533;font-weight:700}.studio-mobile-tabs span{font:9px var(--mono);margin-left:4px}.studio-body{display:flex;flex-direction:column}.studio-catalog{flex:1}.studio-deck{flex:1;border-left:0}.mobile-deck-bar{display:flex;align-items:center;gap:5px;padding:5px 10px;border-bottom:1px solid var(--line);background:#fafaf5;flex-shrink:0}.mobile-deck-bar button{font-size:10px;min-height:29px;padding:4px 7px;white-space:nowrap}.mobile-deck-bar #mobile-deck-label{flex:1;min-width:0;border:0;background:none;text-align:left;font-size:10px;overflow:hidden;text-overflow:ellipsis;color:#5d714a}
  #deck-editor-dialog[data-view=editor][data-pane=search] .studio-deck{display:none}#deck-editor-dialog[data-view=editor][data-pane=deck] .studio-catalog{display:none}.catalog-filters{padding:7px 10px 6px}.catalog-search{padding:0 8px;gap:6px}.catalog-search input{padding:8px 0;font-size:11px}.catalog-search>span{font-size:21px}.catalog-filter-buttons{gap:4px;margin-top:6px}.catalog-filter-buttons button{font-size:9px;padding:4px 6px;min-height:27px}.catalog-filter-buttons #catalog-reset{font-size:9px;padding:4px 5px}.active-filter{font-size:9px;min-height:22px;padding:2px 5px;margin-top:4px}.catalog-toolbar{padding:5px 10px;gap:6px}.catalog-toolbar>span{font-size:9px}.catalog-toolbar select{font-size:9px;max-width:122px;padding:4px}.catalog-density button{font-size:9px;min-height:25px;padding:3px 6px}.catalog-scroll{padding:8px 10px}.deck-card-grid{gap:7px}.catalog-card{border-radius:6px}.catalog-card-art{padding:4px;height:clamp(76px,15dvh,135px)}.catalog-card-info{padding:4px 6px 2px}.catalog-card-info>small{font-size:7px}.catalog-card-info>strong{font-size:10px;margin:3px 0}.catalog-card-info>span:not(.catalog-trigger){font-size:8px}.catalog-trigger{font-size:6px;padding:1px 2px;top:3px;right:4px}.catalog-card>.deck-stepper{padding:3px 5px 5px;gap:3px}.deck-stepper button{width:32px;min-width:28px;min-height:36px;height:36px;font-size:18px}.deck-stepper output{font-size:15px;min-width:15px}.catalog-list{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-list .catalog-card{grid-template-columns:42px minmax(0,1fr)}.catalog-list .catalog-card-art{width:42px;min-height:82px}.catalog-list .catalog-card-info{padding:5px 4px 0}.catalog-list .deck-stepper{padding:3px 4px 5px;gap:1px}.catalog-list .deck-stepper button{width:27px;min-width:26px;min-height:31px;height:31px}.catalog-list .deck-stepper output{font-size:13px;min-width:15px}.catalog-pagination{padding:5px 10px;gap:6px;min-height:37px}.catalog-pagination p{font-size:9px}.catalog-pagination>div{gap:6px}.catalog-pagination button{min-height:29px;min-width:29px;height:29px}.catalog-pagination span{font-size:10px}
  .deck-settings{padding:9px 12px 7px}.deck-settings-heading{margin-bottom:6px}.deck-settings>select,.deck-settings>input{min-height:33px;font-size:12px}.deck-settings>p{font-size:10px}.deck-settings>input{margin-top:5px}.deck-settings-heading button{min-height:30px;padding:4px 9px;font-size:11px}.deck-settings progress{margin:8px 0 5px}.deck-balance{font-size:10px}.adopted-heading{padding:7px 12px}.adopted-heading h3{font-size:12px}.adopted-heading select{font-size:10px}.adopted-scroll{padding:4px 10px}.adopted-name{display:flex;gap:8px;padding:6px;min-height:41px}.adopted-name small{font-size:9px;margin:0}.adopted-name strong{font-size:12px}.adopted-row .deck-stepper{gap:5px;padding:4px 0}.adopted-row .deck-stepper button{width:35px;min-width:35px;min-height:35px;height:35px;font-size:20px}.adopted-row .deck-stepper output{font-size:16px;min-width:20px}.deck-tools button{font-size:10px;min-height:34px;padding:5px 9px}.studio-notice{padding:0 10px}.studio-notice p{font-size:9px;margin:4px 0}.studio-notice button{font-size:9px;min-height:24px;white-space:nowrap}.studio-footer{padding:8px 11px max(8px,env(safe-area-inset-bottom));min-height:60px;gap:8px}.studio-footer strong{font-size:10px}.studio-footer small{font-size:8px;line-height:1.5;max-width:210px}.studio-footer .primary{font-size:10px;min-height:36px;padding:7px 9px}.studio-footer #deck-current-name{font-size:9px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:210px;color:var(--muted);margin-top:3px}.studio-footer small{display:none}
  #deck-editor-dialog[data-view=catalog] .deck-card-grid:not(.catalog-list){grid-template-columns:repeat(3,minmax(0,1fr))}#deck-editor-dialog[data-view=catalog] .catalog-card-art{height:clamp(118px,25dvh,215px)}#deck-editor-dialog[data-view=catalog] .catalog-list .catalog-card-art{height:100%;min-height:82px}.studio-small-dialog .dialog-inner{padding:17px}.studio-small-dialog h2{font-size:18px}.catalog-detail-layout{grid-template-columns:112px minmax(0,1fr);gap:12px}.catalog-detail-layout .art-preview .card-art{height:160px}.catalog-detail-layout p{font-size:11px;line-height:1.8}#catalog-detail-numbers{font-size:10px;padding:7px}
  .compact-play .topbar{gap:4px}.compact-play .topbar button{padding:5px 6px;font-size:10px}.compact-play .brand{font-size:12px;gap:4px}.compact-play .brand-mark{width:23px;height:23px}.compact-play .help-full{display:none}.compact-play .help-short{display:inline}.compact-play #help-button{min-width:26px}
}
@media(min-width:601px) and (max-height:500px){
  #deck-editor-dialog{height:99dvh;max-height:99dvh}.studio-head{padding:6px 12px;min-height:42px}.studio-head .eyebrow{display:none}.studio-head h2{font-size:17px;margin:0}.studio-head p{font-size:9px;margin-top:2px}.studio-head-actions strong{font-size:22px}.studio-head-actions button{min-height:30px;font-size:10px;padding:4px 8px}.studio-nav{padding:0 10px}.studio-nav button{min-height:30px;padding:6px 12px;font-size:10px}.studio-body{grid-template-columns:minmax(0,1fr) 260px}.catalog-filters{padding:7px 10px}.catalog-search input{padding:7px 0;font-size:10px}.catalog-filter-buttons{gap:4px;margin-top:5px}.catalog-filter-buttons button{font-size:9px;min-height:25px;padding:3px 6px}.catalog-toolbar{padding:5px 10px}.catalog-scroll{padding:7px 10px}.catalog-card-art{height:67px;padding:3px}.catalog-card-info{padding:4px 6px 1px}.catalog-card-info>strong{font-size:10px;margin:2px 0}.catalog-card-info>small{font-size:7px}.catalog-card-info>span:not(.catalog-trigger){font-size:8px}.catalog-trigger{display:none}.catalog-card>.deck-stepper{padding:3px 6px 5px}.deck-stepper button{height:28px;min-height:28px;width:30px}.catalog-pagination{min-height:33px;padding:4px 10px}.catalog-pagination p{font-size:9px}.catalog-pagination button{height:25px;min-height:25px}.studio-footer{padding:6px 12px;min-height:48px}.studio-footer strong{font-size:10px}.studio-footer small{font-size:8px}.studio-footer .primary{min-height:31px;font-size:11px;padding:5px 10px}.deck-settings{padding:7px 10px}.deck-settings-heading{margin-bottom:5px}.deck-settings-heading button{min-height:24px;font-size:9px;padding:3px 6px}.deck-settings>select,.deck-settings>input{min-height:27px;font-size:10px;padding:4px 6px}.deck-settings>p{font-size:8px}.deck-balance{display:none}.deck-settings progress{margin:6px 0 4px}.adopted-heading{padding:5px 10px}.adopted-name{min-height:31px;padding:4px}.adopted-name small{font-size:7px}.adopted-name strong{font-size:9px}.deck-tools{padding:5px 7px;gap:4px}.deck-tools button{font-size:8px;min-height:26px;padding:4px}.studio-notice p{font-size:9px;margin:3px 0}#deck-editor-dialog[data-view=catalog] .catalog-card-art{height:clamp(100px,32dvh,155px)}.compact-play .help-full{display:none}.compact-play .help-short{display:inline}
}

/* Builder tiles keep art and controls together; the library keeps large images. */
#deck-editor-dialog[data-view=editor] .catalog-card{grid-template-columns:76px minmax(0,1fr);grid-template-rows:auto auto}
#deck-editor-dialog[data-view=editor] .catalog-card-art{grid-row:1/3;width:76px;height:100%;min-height:106px;padding:4px}
#deck-editor-dialog[data-view=editor] .catalog-card-info{padding:8px 7px 0}
#deck-editor-dialog[data-view=editor] .catalog-trigger{position:static;display:inline-block;width:max-content;margin-top:3px;font-size:7px}
#deck-editor-dialog[data-view=editor] .catalog-trigger[data-trigger=none]{display:none}
#deck-editor-dialog[data-view=editor] .catalog-card>.deck-stepper{padding:5px 7px 7px}
#deck-editor-dialog[data-view=editor] .catalog-list .catalog-card{grid-template-columns:43px minmax(0,1fr)}
#deck-editor-dialog[data-view=editor] .catalog-list .catalog-card-art{width:43px;min-height:84px}
#deck-editor-dialog[data-view=editor] .catalog-list .catalog-trigger{display:none}
.studio-head{padding-top:9px;padding-bottom:9px}.studio-head h2{line-height:1.2}.studio-head p{line-height:1.4}.studio-head>div:first-child{line-height:1.2}
@media(max-width:1050px) and (min-width:601px){#deck-editor-dialog[data-view=editor] .deck-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#deck-editor-dialog[data-view=editor] .deck-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#deck-editor-dialog[data-view=editor] .catalog-card{grid-template-columns:46px minmax(0,1fr)}#deck-editor-dialog[data-view=editor] .catalog-card-art{width:46px;min-height:100px;padding:2px}#deck-editor-dialog[data-view=editor] .catalog-card-info{padding:5px 5px 0}#deck-editor-dialog[data-view=editor] .catalog-card-info>strong{font-size:10px}#deck-editor-dialog[data-view=editor] .catalog-card-info>small{font-size:7px}#deck-editor-dialog[data-view=editor] .catalog-trigger{font-size:6px;margin-top:2px}#deck-editor-dialog[data-view=editor] .catalog-card>.deck-stepper{padding:3px 4px 5px;gap:2px}#deck-editor-dialog[data-view=editor] .catalog-card>.deck-stepper button{width:29px;min-width:28px}#deck-editor-dialog[data-view=editor] .catalog-list .catalog-card{grid-template-columns:35px minmax(0,1fr)}#deck-editor-dialog[data-view=editor] .catalog-list .catalog-card-art{width:35px;min-height:83px}.studio-head{padding-top:8px;padding-bottom:8px}}
@media(min-width:601px) and (max-height:500px){#deck-editor-dialog[data-view=editor] .deck-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#deck-editor-dialog[data-view=editor] .catalog-card{grid-template-columns:44px minmax(0,1fr)}#deck-editor-dialog[data-view=editor] .catalog-card-art{width:44px;min-height:90px;padding:2px}#deck-editor-dialog[data-view=editor] .catalog-card-info{padding:5px 5px 0}#deck-editor-dialog[data-view=editor] .catalog-trigger{display:none}.studio-head{padding-top:5px;padding-bottom:5px}}

.studio-footer #deck-save-status.error{display:block;color:var(--red);max-width:100%;line-height:1.5}
