﻿main.category-explorer{max-width:1280px;margin:auto;padding:36px 24px 80px;color:var(--ink)}
.ce-heading{margin-bottom:32px}.ce-heading h1{font-size:32px;line-height:1.35;margin:8px 0 12px}.ce-heading p{margin:0;color:var(--muted)}.ce-heading>p:first-child{font-size:13px;color:var(--purple)}
.ce-section-title{display:flex;align-items:baseline;gap:16px;margin-bottom:16px}.ce-section-title h2{font-size:20px;margin:0}.ce-section-title>span{color:var(--muted);font-size:12px}
.ce-popular-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.ce-category-card{position:relative;isolation:isolate;height:192px;overflow:hidden;border:0;border-radius:16px;padding:18px;text-align:left;background:var(--soft);color:#fff;cursor:pointer}.ce-category-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 32%;z-index:-2}.ce-category-card:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.12),rgba(0,0,0,.15) 20%,rgba(0,0,0,.88));z-index:-1}.ce-rank{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#fff;color:#18221e;font-size:13px;font-weight:700}.ce-category-caption{position:absolute;bottom:18px;left:18px;right:12px;display:grid;gap:8px}.ce-category-caption strong{font-size:21px;color:#fff}.ce-category-caption>span{font-size:12px;color:#f4f4f4}.ce-category-card[aria-pressed=true]{box-shadow:0 0 0 3px var(--purple)}
.ce-library{margin-top:30px}.ce-pills{display:flex;flex-wrap:wrap;gap:8px;padding:4px 2px 22px}.ce-pills button,.ce-sort button,.ce-status button{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;margin:0;min-height:40px;padding:8px 15px;border-radius:999px;border:1px solid var(--line);background:var(--paper);color:var(--ink);font-size:13px;line-height:1.4}.ce-pills button[aria-pressed=true]{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.ce-filterbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:20px;border-bottom:1px solid var(--line)}.ce-status{display:flex;gap:4px;padding:4px;border-radius:999px;background:var(--pink)}.ce-status button{border:0;background:transparent;min-height:36px;padding:7px 12px}.ce-status button[aria-pressed=true]{background:var(--paper);box-shadow:0 1px 3px #0001}.ce-status button span{font-size:11px;color:var(--muted)}.ce-sort{display:flex;gap:6px}.ce-sort button{border:0;background:transparent;padding:8px 10px}.ce-sort button[aria-pressed=true]{background:var(--soft);color:var(--purple)}.ce-sort .icon{width:16px;height:16px}
.ce-result-heading{font-size:13px;color:var(--muted);margin:22px 0 18px;overflow-wrap:anywhere}.ce-book-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:28px 18px}.ce-book{min-width:0}.ce-cover-link{display:block;position:relative;aspect-ratio:3/4;overflow:hidden;border-radius:14px}.ce-cover-link .cover{width:100%;height:100%;aspect-ratio:auto;margin:0;border-radius:0}.ce-cover-link .cover img{width:100%;height:100%;object-fit:cover;display:block}.ce-cover-link:after{content:'';position:absolute;inset:60% 0 0;background:linear-gradient(transparent,#000b);pointer-events:none}.ce-book-status{position:absolute;top:9px;left:9px;padding:4px 8px;border-radius:6px;font-size:10px;font-weight:700;background:#b42336;color:#fff;z-index:2}.ce-book-status.is-complete{background:#167344}.ce-cover-meta{position:absolute;bottom:10px;left:10px;right:10px;display:flex;justify-content:space-between;gap:4px;color:#fff;z-index:2;font-size:10px}.ce-cover-meta>span,.ce-book-stats>span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.ce-cover-meta .icon{width:13px;height:13px}.ce-book h3{font-size:14px;line-height:1.65;margin:10px 0 4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ce-book h3 a{color:var(--ink);text-decoration:none}.ce-author{display:block;color:var(--muted);font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-decoration:none}.ce-book-stats{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin-top:8px;font-weight:600}.ce-book-stats .icon{width:14px;height:14px}.ce-cover-link .novel-discount-badge{left:auto;right:8px}.ce-empty{padding:60px 20px;text-align:center;background:var(--paper);border-radius:16px}.ce-empty p{color:var(--muted)}
@media(max-width:1100px){.ce-book-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){.ce-book-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ce-category-caption{left:12px}.ce-category-caption strong{font-size:18px}.ce-category-card{padding:12px}.ce-filterbar{gap:8px}.ce-sort button{font-size:12px;padding:8px}}
@media(max-width:600px){main.category-explorer{padding:24px 16px 100px}.ce-heading h1{font-size:27px}.ce-heading{margin-bottom:26px}.ce-section-title{display:block}.ce-section-title>span{display:block;margin-top:5px}.ce-popular-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ce-category-card{height:180px}.ce-book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 12px}.ce-pills{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding-bottom:16px}.ce-pills button{flex:0 0 auto}.ce-filterbar{align-items:flex-start;flex-direction:column;gap:12px}.ce-status{max-width:100%}.ce-status button{padding:8px 10px;font-size:12px;gap:5px}.ce-sort{align-self:flex-end}.ce-category-caption strong{font-size:20px}.ce-cover-meta{left:8px;right:8px}.ce-book-stats{gap:12px}}
/* Isolate discovery controls from shared header/button layout rules. */
.catalog-site main.category-explorer{max-width:1280px!important}
.catalog-site .category-explorer .ce-heading{display:block;position:static;background:transparent;border:0;padding:0;min-height:0;box-shadow:none}
.catalog-site .category-explorer .ce-category-card{display:block;border-radius:16px;min-width:0}
.category-explorer .ce-rank{position:absolute;top:12px;left:12px}
.catalog-site .category-explorer .ce-pills button{border-radius:999px}

/* Discovery shortcuts share the same genre and completion filters. */
.category-explorer .ce-collections{display:flex;gap:8px;overflow-x:auto;padding:4px 0 16px;margin-bottom:16px;border-bottom:1px solid var(--line);scrollbar-width:thin}
.catalog-site .category-explorer .ce-collections button{flex:0 0 auto;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);padding:10px 16px;min-height:42px;font-weight:600;white-space:nowrap}
.catalog-site .category-explorer .ce-collections button[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--paper)}

/* Keep sort labels separate from icon-font sizing and mobile button overrides. */
.catalog-site .category-explorer .ce-sort{display:flex;align-items:center;gap:8px;min-width:0}
.catalog-site .category-explorer .ce-sort button{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;width:auto;min-width:0;height:auto;min-height:44px;padding:10px 12px;line-height:1.5;white-space:nowrap;letter-spacing:normal}
.catalog-site .category-explorer .ce-sort button>span:not(.icon){display:block;position:static;flex:0 0 auto;font-size:13px;line-height:1.5;white-space:nowrap}
.catalog-site .category-explorer .ce-sort button>.icon{position:static;display:inline-flex;align-items:center;justify-content:center;flex:0 0 16px;width:16px;height:16px;margin:0;line-height:1;font-size:16px}
@media(max-width:600px){.catalog-site .category-explorer .ce-sort{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%;align-self:stretch}.catalog-site .category-explorer .ce-sort button{width:100%;border-radius:10px}}
