/* Compact card binder. All face rules are scoped to this gallery. */
.content:has(.toy-wall){padding-top:10px}
.content:has(.toy-wall)>.tabs{margin:0 0 8px}
.toy-wall{--black:#19151c;--blue:#1936ca;--paper:#fffdf5;color:var(--black);padding:0 0 12px}
.wall-head{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:3px solid var(--black);padding:6px 2px 10px}
.wall-head h2{font:950 clamp(27px,3vw,42px)/1.1 "Microsoft YaHei",sans-serif;letter-spacing:-.055em;margin:0}
.wall-head h2 span{display:inline-block;vertical-align:top;margin-left:6px;font-size:.56em;color:#111}
.wall-meter{position:relative;isolation:isolate;text-align:center;background:var(--paper);border:2.5px solid var(--black);border-radius:99px;box-shadow:3px 3px var(--black);width:clamp(120px,18vw,235px);padding:4px 8px;overflow:hidden}
.wall-meter:before{content:"";position:absolute;inset:0 auto 0 0;width:var(--lit);background:#ffdb23;z-index:-1}.wall-meter b{font-size:clamp(12px,1.1vw,17px)}
.wall-quick,.wall-extra>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.wall-filters{padding:10px 0 12px}.wall-quick i{height:14px;border-left:1px solid #b1aba2;margin-inline:2px}
.toy-wall .wall-pill,.toy-wall .wall-more,.toy-wall .wall-list{border:2px solid var(--black);color:var(--black);background:#fffdf7;border-radius:99px;box-shadow:2px 2px var(--black);padding:3px 12px;min-height:29px;font-size:13px;font-weight:850;line-height:1.2}
.toy-wall .wall-pill[aria-pressed=true]{background:var(--blue);color:white}.trade-wall{--blue:#7b26b6}.toy-wall .wall-more{margin-left:auto;box-shadow:none;background:transparent}.toy-wall .wall-list{background:#ffdf26;border-radius:8px;padding:8px 13px}
.wall-extra{background:#fffdf5;border:2px solid var(--black);border-radius:10px;padding:10px;margin:12px 0 0}.wall-extra>div+div{margin-top:8px}.wall-extra .wall-pill{font-size:12px}
.wall-grid{--tile:clamp(146px,calc((100dvh - 258px)/2),285px);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 14px;align-items:start}
.wall-grid>*{min-width:0;position:relative}.wall-grid>:has(.pop-card[data-face=back]){z-index:9}
.wall-grid .pop-wrap,.wall-grid .pop-card,.wall-grid .pop-tilt,.wall-grid .pop-rotor{height:var(--tile);min-height:0;grid-template-rows:minmax(0,1fr)}
.wall-grid .pop-card{--cast-x:3px;--cast-y:4px;--pop-depth:26px}
.wall-grid .pop-card .pop-face{min-height:0;height:100%;box-sizing:border-box;border-radius:12px;border-width:2.5px;box-shadow:3px 4px #19151c}
.wall-grid .pop-card .front{padding:6px;cursor:pointer}
.wall-grid .front .pop-topline{position:absolute;z-index:2;inset:5px 5px auto;min-height:0;padding:0;border:0;background:none;align-items:start}
.wall-grid .front .pop-category,.wall-grid .front .pop-rarity{font-size:clamp(9px,4.6cqw,13px);padding:2px 4px;border-width:1.5px}
.wall-grid .front .pop-serial{background:#fffdf5;border-radius:0 0 0 7px;padding:1px 2px 3px 4px;font-size:clamp(9px,4.4cqw,13px);gap:3px}
.wall-grid .front .pop-art-window{order:1;flex:1 1 0;min-height:0;margin:0 0 5px;border:2px solid var(--black);border-radius:7px}
.wall-grid .front .pop-character-layer{inset:9% 5% 0}
.wall-grid .front .pop-name-sticker{max-width:85%;bottom:2px;font-size:clamp(9px,4cqw,13px);border-width:1.5px;padding:1px 4px;line-height:1.12}
.wall-grid .pop-card .front .pop-question{order:2;display:block;flex:none;min-height:0;margin:0;padding:1px 1px 0;background:none;border:0;line-height:1.25;font-size:clamp(12px,7cqw,18px);letter-spacing:0}
.wall-grid .front .pop-flip-button{position:absolute;width:1px;height:1px;min-height:0;padding:0;overflow:hidden;clip-path:inset(50%)}.wall-grid .front .pop-flip-button:focus-visible{clip-path:none;width:auto;height:auto;inset:auto 6px 6px auto;background:white;padding:4px}
/* The slot owns the open height, so following rows and trade controls reflow together. */
.wall-grid .pop-wrap:has(.pop-card[data-face=back]){--tile:var(--draw-face-h)}
.wall-grid .pop-card[data-face=back]{--pop-lift:1;--pop-lift-back:1}
.wall-grid .back .pop-back-body>*{flex-shrink:0}
.wall-locked{height:var(--tile);border:2px solid #b9bdc4;border-radius:12px;padding:7px;box-sizing:border-box;display:flex;flex-direction:column;background:#f7f7f3;gap:5px;text-align:center}
.wall-frost{flex:1;min-height:0;display:grid;place-items:center;border:1.5px dashed #bac0c6;border-radius:7px;background:linear-gradient(130deg,#e2e4e8,#f3f4f4 49%,#e4e7e9)}
.wall-frost>*{grid-area:1/1}.wall-frost i{align-self:stretch;justify-self:stretch;margin:7px;background:#b9bfc7;}.wall-frost b{font:900 clamp(27px,4vw,53px)/1 sans-serif;color:#ebedf0;-webkit-text-stroke:1px #939da8}.wall-locked strong{font:800 13px/1.2 monospace}
.wall-grid .market-actions{display:flex;align-items:center;justify-content:space-between;gap:4px;margin:5px 0 0;font-size:11px;min-height:24px}.wall-grid .market-actions .btn{min-height:23px;border:1.5px solid #17151b;border-radius:6px;padding:3px 7px;background:#213dc6;color:#fff;font-weight:800;font-size:12px}
.wall-seller{display:flex;gap:5px;align-items:center;margin-top:7px;font-size:12px}.wall-seller .avatar{width:22px;height:22px;font-size:11px}.wall-grid .market-actions .btn:disabled{background:#d1d4d8;color:#444}
@media(max-width:760px){.wall-grid{grid-template-columns:repeat(2,minmax(0,1fr));--tile:clamp(160px,51vw,240px);gap:13px 10px}.wall-head h2{font-size:26px}.wall-quick{gap:5px}.toy-wall .wall-pill,.toy-wall .wall-more{font-size:12px;padding:3px 8px}}
@media(prefers-reduced-motion:reduce){.wall-grid .pop-card{transition:none}}

.wall-count{margin-left:auto;color:#504856;font-weight:750}.wall-head:has(.wall-count){justify-content:flex-start}
.wall-frost b{position:relative;z-index:1}
@media(min-width:761px){
 .workspace:has(.toy-wall)>.topbar{height:54px}
 .content:has(.toy-wall)>.tabs .btn{min-height:32px;padding-block:4px}
 .wall-grid{--tile:clamp(130px,calc((100dvh - 326px)/2),270px)}
 .trade-wall .wall-grid{--tile:clamp(126px,calc((100dvh - 364px)/2),256px)}
}

.store-banner{display:flex;align-items:center;gap:16px;min-height:74px;margin:12px 0 20px;padding:0 18px 0 0;overflow:hidden;border:1px solid #384554;border-radius:16px;background:linear-gradient(105deg,#101323,#21233c);color:#edffff;text-decoration:none}
.store-banner img{display:block;width:clamp(114px,20%,184px);height:74px;object-fit:cover;object-position:center 52%}
.store-banner strong{font-size:clamp(16px,2.3vw,23px);letter-spacing:.02em}.store-banner:hover strong,.store-banner:focus-visible strong{color:#86f3ff}
.wall-head .store-entry,.pagehead .store-entry{color:#c9fcff;background:#1b2433;border:1px solid #456273;white-space:nowrap;text-decoration:none}
.wall-grid article.store-picked:focus{outline:3px solid #546bb1;outline-offset:4px}
@media(max-width:650px){.wall-head:has(.store-entry){display:flex;flex-wrap:wrap}.wall-head:has(.store-entry) h2{flex-basis:100%}.pagehead:has(.store-entry){align-items:flex-start;flex-direction:column}}

/* All catalog filters share one shelf; its toggle stays in view. */
.catalog-filter-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start}
.catalog-filter-track{display:flex;gap:7px;align-items:center;min-width:0;overflow-x:auto;padding:3px 4px 7px;scrollbar-width:thin;scrollbar-color:#acb4d0 transparent;overscroll-behavior-x:contain}
.catalog-filter-track>*{flex:none;white-space:nowrap}
.catalog-filter-track i{height:14px;border-left:1px solid #b1aba2}
.catalog-filter-bar{position:relative;grid-template-rows:44px}
.catalog-filter-bar[data-expanded="true"]{z-index:10}
#catalog-filter-options:not([hidden]){
 position:absolute;right:0;top:calc(100% - 8px);box-sizing:border-box;
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px;
 width:min(21rem,100%);max-height:min(11rem,40dvh);overflow:auto;overscroll-behavior:contain;
 padding:12px;background:white;border:2px solid var(--black);border-radius:12px;box-shadow:3px 4px 0 var(--black);
}
#catalog-filter-options label{display:grid;gap:3px;min-width:0;color:#42495c;font-size:13px;font-weight:700}
#catalog-filter-options select{width:100%;min-width:0;min-height:34px;padding:4px 6px;border:1px solid #a7adc2;border-radius:7px;background:white;color:var(--black);font:inherit;font-size:14px}
#catalog-filter-options select:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.catalog-filter-bar .wall-more{margin-top:3px}
.wall-grid .pop-wrap:is([data-context="collection"],[data-context="catalog"]):has(.pop-card[data-face="back"]){--tile:clamp(242px,32vh,320px)}
.wall-grid .pop-wrap:is([data-context="collection"],[data-context="catalog"]) .pop-card .back .pop-actions{max-height:none}
.wall-grid .pop-wrap:is([data-context="collection"],[data-context="catalog"]) .pop-card .back .pop-back-question{font-size:clamp(13px,5.5cqw,18px);font-weight:800;line-height:1.4}
.card-reading-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.5}
.toy-wall .card-read-trigger{min-height:32px;padding:5px 10px;border:2px solid var(--black);border-radius:8px;background:var(--blue);color:white;font-weight:800}
#modal:has(.card-back-reader){width:min(38rem,calc(100% - 2rem))}
.card-back-reader{display:grid;gap:12px;line-height:1.6;overflow-wrap:anywhere}
.card-back-reader h3,.card-back-reader p,.card-back-reader ol{margin:0}
.card-back-reader h3{font-size:16px}
.card-back-reader .pop-back-question{font-size:clamp(17px,2.3vw,22px);font-weight:800;line-height:1.45}
.card-back-reader .pop-steps-list{display:grid;gap:7px;list-style:none;padding:0}
.card-back-reader .pop-steps-list li{display:grid;grid-template-columns:34px minmax(0,1fr);min-height:0;border:1px solid #d7dcec;border-radius:9px;overflow:hidden;background:#f6f7fb;font-size:15px}
.card-back-reader .pop-step-no{display:grid;place-items:center;background:#1835bd;color:white;font-size:13px}
.card-back-reader .pop-step-text{padding:9px 12px}
.card-back-reader .pop-recheck,.card-back-reader .pop-editor{font-size:14px;line-height:1.55}
.card-reader-notes{display:grid;gap:6px;border-top:1px solid #d7dcec;padding-top:14px;font-size:13px}
.card-reader-notes .skill-line{margin:0}
