/* Binder: rail + main on a laptop (1l), single column on a phone, with the
   Grid / Pages / List display styles the Me screen also exposes. 1m is the
   nine-pocket sleeve. Custom binders are deliberately not part of this. */
.binder{display:grid;grid-template-columns:248px minmax(0,1fr);flex:1;min-height:0}
.binder-rail{padding:22px 16px 22px 24px;display:flex;flex-direction:column;gap:6px;border-right:1px solid var(--edge);min-width:0}
.rail-label-gap{margin-top:22px}
.binder-main{padding:24px 28px 40px;min-width:0;display:flex;flex-direction:column}

.binder-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.binder-head h1{font-family:var(--font-display);font-weight:800;font-size:calc(26px*var(--scale));letter-spacing:-1px;color:var(--fg)}
.binder-head p{font-size:calc(13px*var(--scale));color:var(--fg-muted);margin-top:4px}

.binder-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:20px 0 18px}
.binder-main .search-box{display:flex;align-items:center;gap:10px;padding:0 14px;height:42px;border-radius:var(--r-md);background:var(--field);color:var(--fg-muted);flex:1;min-width:180px;max-width:320px;border:0}
.binder-main .search-box input{flex:1;min-width:0;border:0;background:none;color:var(--fg);font-size:calc(14px*var(--scale));outline:none}
.binder-main .search-box input::placeholder{color:var(--fg-muted)}
.chip-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.chip-row button{padding:8px 13px;border-radius:var(--r-pill);background:var(--surface-2);font-size:calc(12px*var(--scale));font-weight:600;color:var(--fg-2);white-space:nowrap}
.chip-row button.on{background:var(--on-nav);color:var(--on-nav-ink);font-weight:700}
.chip-row select{padding:8px 12px;border-radius:var(--r-pill);background:var(--surface-2);color:var(--fg-2);font-size:calc(12px*var(--scale));font-weight:600;border:0;outline:none}
.results-count{font-size:calc(12px*var(--scale));color:var(--fg-muted);margin-bottom:12px}

/* Grid keeps the existing card tiles, just on the night surface. */
.binder .collection-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:16px}

/* List (1l): one row per card, missing ones dimmed. */
.binder-list{display:flex;flex-direction:column;gap:6px}
.binder-row{display:flex;align-items:center;gap:12px;width:100%;padding:8px 12px;border-radius:var(--r-md);background:var(--surface);border:1px solid var(--edge);text-align:left}
.binder-row img{width:34px;height:auto;aspect-ratio:367/512;object-fit:cover;border-radius:3px;flex:none}
.binder-row.missing img{filter:var(--grey-out)}
.row-main{flex:1;min-width:0}
.row-main b{display:block;font-weight:700;font-size:calc(13px*var(--scale));color:var(--fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-main small{display:block;font-size:calc(11px*var(--scale));color:var(--fg-muted);margin-top:2px}
.row-fav{color:#f28aa8;flex:none}
.binder-row em{font-style:normal;font-size:calc(12px*var(--scale));font-weight:700;color:var(--fg-muted);flex:none}
.binder-row.missing em{color:var(--dim);font-weight:600}

/* Pages (1m): a nine-pocket sleeve with a spine. */
.sleeve{position:relative;padding:14px;border-radius:22px;background:linear-gradient(160deg,var(--surface-2),var(--surface));box-shadow:var(--shadow);border:1px solid var(--edge);max-width:560px;margin:0 auto;width:100%}
.spine{position:absolute;left:0;top:30px;bottom:30px;width:10px;border-radius:0 6px 6px 0;background:linear-gradient(90deg,var(--edge-3),var(--edge))}
.pockets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-left:10px}
.pocket{position:relative;border-radius:6px;background:var(--field);padding:4px;display:block;width:100%}
.pocket img{width:100%;height:auto;aspect-ratio:367/512;object-fit:cover;border-radius:4px;display:block}
.pocket.empty{display:grid;place-items:center;aspect-ratio:367/512;border:1px dashed var(--edge-3)}
.pocket.empty span{text-align:center;color:var(--fg-muted);font-size:calc(11px*var(--scale));font-weight:700;padding:2px}
.pocket.empty small{display:block;font-weight:500;font-size:calc(10px*var(--scale));margin-top:2px;overflow:hidden;text-overflow:ellipsis}
.pocket-fav{position:absolute;left:7px;top:7px;color:#f28aa8;font-size:calc(11px*var(--scale))}
.page-nav{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 0 10px;color:var(--fg-muted);font-size:calc(12px*var(--scale));gap:10px}
.page-nav b{font-weight:700;color:var(--fg)}
.page-nav button{color:var(--fg-muted);font-size:calc(12px*var(--scale));font-weight:600}
.page-nav button:disabled{opacity:.35}
.page-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;max-width:560px;margin:16px auto 0;padding:14px 16px;border-radius:var(--r-lg);background:var(--surface);border:1px solid var(--edge)}
.page-foot strong{display:block;font-weight:700;font-size:calc(14px*var(--scale));color:var(--fg)}
.page-foot small{display:block;font-size:calc(12px*var(--scale));color:var(--fg-muted);margin-top:2px}
.page-foot .link-btn{color:var(--accent-text);font-weight:700;flex:none}

@media(max-width:1000px){
 .binder{grid-template-columns:minmax(0,1fr)}
 .binder-rail{display:none}
 .binder-main{padding:18px 20px 40px}
}
@media(max-width:860px){
 .binder-main{padding:14px 20px 40px}
 .binder-head h1{font-size:calc(24px*var(--scale))}
 .binder-tools{margin:14px 0;gap:8px}
 .binder-main .search-box{max-width:none;flex:1 1 100%}
 .chip-row{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;width:100%}
 .chip-row::-webkit-scrollbar{display:none}
 .binder .collection-grid{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px}
 .pockets{gap:6px}
}

/* Kanto Pokédex (1o). */
.dex{padding:24px 28px 40px;max-width:1100px;margin:0 auto;width:100%}
.dex .binder-head{margin-bottom:16px}
.dex .eyebrow{font-size:calc(11px*var(--scale));letter-spacing:1.6px;font-weight:700;color:var(--dim)}
.dex-chips{margin-bottom:20px}
.dex-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}
.dex-slot{position:relative;border-radius:var(--r-sm);overflow:hidden;aspect-ratio:367/512;background:var(--field);display:block;width:100%;padding:0;border:0}
.dex-slot.owned img{width:100%;height:100%;object-fit:cover;display:block}
.dex-slot.missing{display:grid;place-items:center;text-align:center;border:1px dashed var(--edge-2);background:var(--surface)}
.dex-slot.missing span{font-size:calc(12px*var(--scale));font-weight:700;color:var(--fg-muted)}
.dex-slot.missing small{display:block;font-size:calc(10px*var(--scale));color:var(--dim);margin-top:3px;padding:0 4px;overflow:hidden;text-overflow:ellipsis}
.dex-num{position:absolute;left:5px;bottom:5px;padding:2px 6px;border-radius:4px;background:#0c1018cc;color:#eef2f7;font-size:calc(9px*var(--scale));font-weight:700}
@media(max-width:860px){
 .dex{padding:14px 20px 40px}
 .dex-grid{grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px}
 .dex-chips{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;width:100%}
 .dex-chips::-webkit-scrollbar{display:none}
}

/* Me screen additions for 1r. */
.me-edit{display:block;margin:-6px 0 18px;color:var(--accent-text);font-weight:700}
.me-card small{line-height:1.5}

/* Legacy components that sit inside overhauled views. Taking those views off the
   light island left these three still painting light panels, so their inherited
   text turned white-on-white. Measured, not guessed. */
.shell .copy-count{background:#0c1018dd;color:#eef2f7;box-shadow:none}
.shell .dex-slot.owned{background:var(--field)}
.shell .empty-state{background:var(--surface);border:1px solid var(--edge);border-radius:var(--r-lg);color:var(--fg)}
.shell .empty-state h2{color:var(--fg)}
.shell .empty-state p{color:var(--fg-muted)}
.shell .empty-state svg{color:var(--dim)}
/* These were darkened for the light island, then their views moved to the night
   palette. Tokens instead of fixed hexes, so they follow whichever surface they land on. */
.shell .card-meta,.shell .card-meta span{color:var(--fg-muted)}
.shell .eyebrow{color:var(--fg-muted)}
