/** DM Graphite — a full-width graphite gallery with restrained red accents. */
:root {
 --gl-bg:#191d1e; --gl-header:#343434; --gl-panel:#222627; --gl-panel-2:#343434;
 --gl-ink:#efefef; --gl-muted:#b3b6b9; --gl-line:#393d3f; --gl-accent:#cf0019;
 --gl-accent-2:#f25261; --gl-green:#7ccf96; --gl-width:100%;
 --blue:var(--gl-accent); --bg:var(--gl-bg); --text:var(--gl-ink);
 --muted:var(--gl-muted); --line:var(--gl-line); --container:var(--gl-width);
}
html { min-height:100%; scroll-behavior:smooth; background:var(--gl-bg); }
body { margin:0; color:var(--gl-ink); background:var(--gl-bg); font-family:Arial,"Helvetica Neue","PingFang SC","Microsoft YaHei",sans-serif; }
body.graphite-menu-open,body.no-scroll { overflow:hidden; }
a { color:inherit; transition:color .18s,background-color .18s; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible { outline:2px solid #ff6d7e; outline-offset:3px; }
.container { width:100%; max-width:none; padding-inline:18px; margin-inline:auto; }
.button { color:#fff; background:var(--gl-panel-2); border:1px solid var(--gl-line); border-radius:2px; }
.button:hover,.button--primary { background:var(--gl-accent); border-color:var(--gl-accent); }
.empty-state { min-height:200px; display:grid; align-content:center; gap:8px; padding:30px; color:var(--gl-muted); border:1px solid var(--gl-line); text-align:center; }
.empty-state p { margin:0; }

/* Search stays in its own column, leaving long three-word brands room to wrap. */
.graphite-header { position:relative; z-index:100; color:#fff; background:var(--gl-header); }
.graphite-topbar { min-height:104px; display:grid; grid-template-columns:minmax(230px,1.4fr) minmax(320px,2.8fr) minmax(180px,2.9fr); align-items:start; gap:32px; padding:15px 40px 16px; }
.graphite-brand { min-width:0; display:block; padding-top:2px; color:#fff; font-size:26px; font-weight:500; line-height:1.25; overflow-wrap:anywhere; }
.graphite-brand:hover { color:#ddd; }
.graphite-search-area { min-width:0; }
.graphite-search { height:38px; display:flex; width:100%; margin:0; }
.graphite-search input[type="search"] { width:100%; min-width:0; height:100%; padding:0 14px; color:#242424; background:#fff; border:1px solid #ddd; border-right:0; border-radius:0; font-size:14px; }
.graphite-search button { flex:0 0 44px; display:grid; place-items:center; padding:0; color:white; background:var(--gl-accent); border:0; border-radius:0; cursor:pointer; }
.graphite-search button:hover { background:#ed1831; }
.graphite-search svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2.5; }
.graphite-sort { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; margin-top:8px; color:#ddd; font-size:11px; text-transform:uppercase; }
.graphite-sort span { color:#bfc1c4; }
.graphite-sort a { padding-bottom:2px; border-bottom:2px solid transparent; }
.graphite-sort a:hover,.graphite-sort a[aria-current="page"] { color:#fff; border-color:#e60020; }
.graphite-account { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:10px; }
.graphite-account > a { min-height:38px; display:flex; align-items:center; justify-content:center; padding:0 15px; color:white; background:var(--gl-accent); font-size:12px; text-transform:uppercase; }
.graphite-account > a:hover { background:#ed1831; }
.graphite-account .language-switcher > button { height:32px; color:#ddd; background:transparent; border-color:#555; }
.graphite-account .language-switcher__menu { top:40px; right:0; background:#252829; border-color:#505457; }
.graphite-account .language-switcher__menu a { color:#ddd; }
.graphite-navrow { color:#c9c9c9; background:#222; border-bottom:1px solid #0f1112; }
.graphite-navrow > .container { display:flex; align-items:center; min-height:42px; }
.graphite-desktop-nav ul { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0; padding:0; list-style:none; }
.graphite-desktop-nav a { height:42px; display:flex; align-items:center; padding:0 15px; border-bottom:2px solid transparent; font-size:11px; text-transform:uppercase; }
.graphite-desktop-nav svg { width:17px; height:17px; stroke:#fff; }
.graphite-desktop-nav a:hover { color:#fff; background:#303030; }
.graphite-desktop-nav a[aria-current="page"] { color:#fff; border-color:var(--gl-accent); }
.graphite-menu-toggle { display:none; }
.graphite-navigation { position:fixed; z-index:1200; inset:0 auto 0 0; width:min(350px,88vw); overflow:auto; color:#fff; background:#1c2021; box-shadow:24px 0 72px #0008; transform:translateX(-112%); transition:transform .24s; }
.graphite-navigation.is-open { transform:translateX(0); }
.graphite-navigation__head { min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 20px; border-bottom:3px solid var(--gl-accent); }
.graphite-navigation__head strong { overflow-wrap:anywhere; font-size:18px; }
.graphite-navigation__head button { width:38px; height:38px; flex:0 0 38px; color:#fff; background:#343434; border:0; font-size:25px; cursor:pointer; }
.graphite-navigation ul { padding:12px 0; margin:0; list-style:none; }
.graphite-navigation a { min-height:52px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:0 20px; color:#ddd; border-bottom:1px solid #343738; }
.graphite-navigation a:hover,.graphite-navigation a[aria-current="page"] { color:#fff; background:var(--gl-accent); }
.graphite-mobile-language { padding:15px 20px; }
.graphite-mobile-language .language-switcher__menu { position:static; background:#222; border-color:#444; }

/* All six columns fill the viewport. No empty advert slots or invented records. */
.graphite-home { min-height:420px; padding-top:20px; }
.graphite-tag-rail { display:flex; flex-wrap:wrap; justify-content:center; gap:8px 9px; margin:0 0 22px; padding:0 10px; }
.graphite-tag-rail a { max-width:100%; padding:3px 8px; color:#f7f7f7; background:#606570; font-size:12px; line-height:1.4; overflow-wrap:anywhere; text-transform:uppercase; }
.graphite-tag-rail a:hover { color:#fff; background:var(--gl-accent); }
.graphite-home-description { margin:0 0 20px; color:#c3c7c9; font-size:13px; line-height:1.6; text-align:left; }
.graphite-gallery-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:20px 28px; }
.graphite-card { min-width:0; margin:0; padding:0; color:#fff; background:transparent; border:0; border-radius:0; box-shadow:none; }
.graphite-card__cover { position:relative; display:block; aspect-ratio:15/13; overflow:hidden; background:#222627; }
.graphite-card__cover img { width:100%; height:100%; display:block; object-fit:cover; transition:opacity .2s; }
.graphite-card:hover img { opacity:.82; }
.graphite-card h3 { position:absolute; right:0; bottom:0; left:0; display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; margin:0; padding:9px 8px; color:#fff; background:#000c; font-size:13px; font-weight:500; line-height:1.35; text-align:center; overflow-wrap:anywhere; }
.graphite-home-about { width:100%; margin:30px 0 0; padding:21px 0; border-block:1px solid var(--gl-line); }
.graphite-home-about header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:10px; }
.graphite-home-about h2 { min-width:0; margin:0; color:#eee; font-size:20px; line-height:1.4; overflow-wrap:anywhere; }
.graphite-home-about header a { flex:0 0 auto; color:#f27684; font-size:12px; }
.graphite-home-about header a:hover { color:#fff; }
.graphite-home-about p { margin:0; color:#adb3b6; font-size:13px; line-height:1.75; text-align:left; overflow-wrap:anywhere; }
.graphite-pagination { display:flex; justify-content:center; padding:28px 0 12px; }
.graphite-pagination ul { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:0; margin:0; padding:0; list-style:none; }
.graphite-pagination a,.graphite-pagination span { min-width:42px; height:42px; display:grid; place-items:center; padding:0 13px; color:#eee; background:#343434; border:0; border-radius:0; font-size:13px; }
.graphite-pagination .dots { min-width:25px; padding-inline:6px; }
.graphite-pagination a:hover,.graphite-pagination .current { color:#fff; background:var(--gl-accent); }

/* Archives, rankings and categories */
.graphite-catalogue, .graphite-categories, main.graphite-taxonomy, .graphite-top, .directory-page, .generic-archive .section, .author-page, .dashboard-page, .prose-page, .not-found { min-height: 620px; color: var(--gl-ink); background: var(--gl-bg); }
.graphite-catalogue, .graphite-categories, main.graphite-taxonomy, .graphite-top { padding: 34px 0 46px; }
.graphite-catalogue > .container, .graphite-categories > .container, main.graphite-taxonomy > .container, .graphite-top > .container, .directory-page > .container, .not-found > .container { max-width: var(--gl-width); background: transparent; }
.graphite-page-title, .graphite-section__head h1, .directory-hero h1 { margin: 0 0 26px; color: #fff; font-size: clamp(23px,2vw,34px); font-weight: 900; letter-spacing: -.025em; }
.graphite-page-title::first-letter { color: var(--gl-accent); }
.graphite-filter-bar { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)) minmax(120px,.7fr) auto; gap: 14px; align-items: end; padding: 18px; margin-bottom: 26px; background: var(--gl-panel); border: 1px solid var(--gl-line); border-left: 4px solid var(--gl-accent); }
.graphite-filter-bar label { display: grid; gap: 7px; color: #bbb; font-size: 11px; }
.graphite-filter-bar select, .graphite-filter-bar input { width: 100%; min-width: 0; height: 41px; padding: 0 11px; color: #eee; background: #1b1b1b; border: 1px solid #444; }
.graphite-filter-bar button { height: 41px; padding: 0 20px; color: #fff; background: var(--gl-accent); border: 0; cursor: pointer; }
.graphite-series-grid, .graphite-grid, .graphite-grid--ranking, .comic-grid, .latest-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.graphite-range-tabs { width: max-content; max-width: 100%; display: flex; margin: 0 auto 28px; overflow: hidden; background: var(--gl-panel); border: 1px solid var(--gl-line); }
.graphite-range-tabs a { min-width: 105px; padding: 14px 20px; color: #c6c9cf; text-align: center; }
.graphite-range-tabs a:hover, .graphite-range-tabs .is-current { color: #fff; background: var(--gl-accent); }
.graphite-ranked { position: relative; }
.graphite-ranked > span { position: absolute; z-index: 5; top: 9px; left: 9px; min-width: 34px; padding: 7px; color: #fff; background: var(--gl-accent); font-size: 11px; text-align: center; }
.graphite-category-search, .graphite-taxonomy__head { padding: 18px; margin-bottom: 26px; background: var(--gl-panel); border: 1px solid var(--gl-line); border-left: 4px solid var(--gl-accent); }
.graphite-category-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.graphite-category-card { position: relative; aspect-ratio: 16/9; display: grid; place-items: center; overflow: hidden; color: #fff; background: var(--gl-panel); border: 1px solid var(--gl-line); isolation: isolate; }
.graphite-category-card img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.graphite-category-card::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(rgba(0,0,0,.08),rgba(0,0,0,.78)); content: ""; }
.graphite-category-card:hover { border-color: var(--gl-accent); }
.graphite-category-card:hover img { transform: scale(1.04); }
.graphite-category-card span { font-size: clamp(18px,1.8vw,30px); font-weight: 900; text-align: center; }
.graphite-category-card small { position: absolute; right: 10px; bottom: 8px; color: #ddd; font-size: 10px; }

/* Series dossier */
.graphite-detail { padding-bottom: 44px; color: var(--gl-ink); background: var(--gl-bg); }
.graphite-detail-hero { position: relative; min-height: 430px; overflow: hidden; border-bottom: 3px solid var(--gl-accent); isolation: isolate; }
.graphite-detail-hero::before { position: absolute; z-index: -2; inset: 0; background-image: linear-gradient(90deg,rgba(18,20,24,.98) 0%,rgba(18,20,24,.88) 42%,rgba(18,20,24,.22) 78%), var(--graphite-cover); background-position: center, 78% 24%; background-size: cover; content: ""; filter: saturate(.78); }
.graphite-detail-hero::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg,var(--gl-bg),transparent 42%); content: ""; }
.graphite-detail-hero .container { min-height: 430px; display: flex; flex-direction: column; justify-content: space-between; padding-top: 22px; padding-bottom: 58px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: #b0b4bd; font-size: 11px; }
.breadcrumbs a:hover { color: var(--gl-accent-2); }
.graphite-detail-hero__copy { max-width: 840px; }
.graphite-kicker, .graphite-summary > span, .graphite-chapters header span { color: var(--gl-accent-2); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.graphite-detail-hero h1 { margin: 9px 0 8px; color: #fff; font-size: clamp(40px,5.5vw,82px); font-weight: 950; letter-spacing: -.045em; line-height: .98; }
.graphite-detail-hero__copy > p { margin: 0 0 14px; color: #c8cbd1; }
.graphite-hero-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.graphite-hero-tags a { padding: 6px 10px; color: #fff; background: rgba(43,47,56,.9); border: 1px solid #4b515d; font-size: 10px; }
.graphite-detail-body { display: grid; grid-template-columns: minmax(230px,330px) minmax(0,1fr); gap: 34px; margin-top: -34px; }
.graphite-media-card { position: relative; z-index: 3; align-self: start; overflow: hidden; background: var(--gl-panel); border: 1px solid var(--gl-line); box-shadow: 0 20px 55px rgba(0,0,0,.42); }
.graphite-media-card > img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.graphite-media-card__stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--gl-line); }
.graphite-media-card__stats span { display: grid; gap: 3px; padding: 12px; color: var(--gl-muted); font-size: 9px; text-align: center; text-transform: uppercase; }
.graphite-media-card__stats span + span { border-left: 1px solid var(--gl-line); }
.graphite-media-card__stats strong { color: #fff; font-size: 19px; }
.graphite-actions { display: grid; gap: 8px; padding: 12px; }
.graphite-read, .bookshelf-button, .share-button { min-height: 43px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; background: var(--gl-accent); border: 1px solid var(--gl-accent); font-weight: 850; cursor: pointer; }
.bookshelf-button, .share-button { background: #30343c; border-color: #424752; }
.graphite-read:hover, .bookshelf-button:hover, .share-button:hover, .bookshelf-button.is-added { background: var(--gl-accent-2); border-color: var(--gl-accent-2); }
.graphite-dossier { min-width: 0; padding-top: 62px; }
.graphite-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 28px; border-top: 1px solid var(--gl-line); border-left: 1px solid var(--gl-line); }
.graphite-facts > div { min-width: 0; display: grid; gap: 5px; padding: 15px; border-right: 1px solid var(--gl-line); border-bottom: 1px solid var(--gl-line); }
.graphite-facts span { color: var(--gl-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.graphite-facts strong { overflow: hidden; color: #fff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.graphite-summary { padding: 28px; background: var(--gl-panel); border: 1px solid var(--gl-line); }
.graphite-summary h2 { margin: 7px 0 14px; color: #fff; font-size: 25px; }
.graphite-summary .prose { color: #bdc1c9; font-size: 14px; line-height: 1.8; }
.graphite-taxonomy { padding-top: 22px; }
.graphite-taxonomy h2 { margin: 0 0 10px; font-size: 13px; }
.graphite-taxonomy > div { display: flex; flex-wrap: wrap; gap: 7px; }
.graphite-taxonomy a { padding: 7px 9px; color: #b9bdc5; background: #282c34; border: 1px solid #393e48; font-size: 10px; }
.graphite-taxonomy a:hover { color: #fff; border-color: var(--gl-accent); }
.graphite-chapters { padding: 40px 0; margin-top: 40px; background: #181a1f; border-block: 1px solid #2b2f37; }
.graphite-chapters header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.graphite-chapters h2 { margin: 5px 0 0; font-size: 25px; }
.graphite-chapter-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--gl-line); }
.graphite-chapter-list a { display: grid; grid-template-columns: 50px minmax(0,1fr) 30px; align-items: center; min-height: 70px; color: #ddd; border-right: 1px solid var(--gl-line); border-bottom: 1px solid var(--gl-line); }
.graphite-chapter-list a:hover { color: #fff; background: var(--gl-panel); }
.graphite-chapter-list a > b { color: var(--gl-accent-2); text-align: center; }
.graphite-chapter-list a > span { display: grid; gap: 3px; }
.graphite-chapter-list small { color: var(--gl-muted); }
.graphite-chapter-list i { color: var(--gl-accent); font-style: normal; }

/* Reader and secondary screens */
.inkwave-reader-page, .reader { color: #eee; background: #0d0f12; }
.reader-toolbar { color: #eee; background: #171717; border-top: 3px solid var(--gl-accent); border-bottom-color: #393939; }
.reader-toolbar__back:hover, .reader-tool:hover, .reader-settings button.is-active, .reader-progress span { color: #fff; background: var(--gl-accent); }
.reader-settings { color: #ddd; background: #222; border-color: #444; }
.reader-page { background: #111; }
.reader-chapter-nav { background: #222; border-color: #444; }
.reader-chapter-nav a:hover { color: #fff; background: #303030; }
.reader-chapter-nav__catalog { background: var(--gl-accent) !important; }
.reader-end { color: #ddd; }
.dashboard-hero, .author-profile, .profile-card, .settings-card, .login-card, .text-card, .guest-shelf, .history-list, .prose-page article { color: #ddd; background: var(--gl-panel); border-color: var(--gl-line); }
.dashboard-layout, .account-wrap, .author-page > .container { padding: 34px clamp(18px,3.1vw,64px); background: var(--gl-bg); }
.dashboard-nav { background: #242424; border-color: var(--gl-line); }
.dashboard-nav a { color: #ddd; border-color: var(--gl-line); }
.dashboard-nav a:hover, .dashboard-nav a.is-active { color: #fff; background: var(--gl-accent); }
.profile-form input, .profile-form textarea, .profile-form select { color: #eee; background: #1b1b1b; border-color: #444; }
.prose-page { padding: 38px clamp(18px,3.1vw,64px) 55px; background: var(--gl-bg); }
.recommendations { color: #eee; background: #171717; border-color: var(--gl-line); }


/* Compact, local legal links and dynamic copyright complete the gallery. */
.graphite-footer { width:100%; margin:26px 0 0; padding:23px 0 24px; color:#a3aaae; background:var(--gl-bg); border-top:1px solid #303637; text-align:center; }
.graphite-footer__nav,.graphite-footer__nav .site-footer__menu { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:10px 22px; margin:0; padding:0; list-style:none; }
.graphite-footer__nav a { color:#ddd; font-size:12px; font-weight:500; text-transform:uppercase; }
.graphite-footer__nav a:hover { color:var(--gl-accent-2); }
.graphite-footer__notice { margin:17px auto 9px; color:#9da4a8; font-size:11px; line-height:1.7; }
.graphite-footer__notice a { color:inherit; text-decoration:underline; }
.graphite-footer small { color:#81898e; font-size:11px; }
@media(min-width:2200px) { .graphite-gallery-grid { gap:24px 32px; } .graphite-card h3 { font-size:15px; } }
@media(max-width:1200px) {
 .graphite-topbar { grid-template-columns:minmax(170px,1fr) minmax(300px,2fr) auto; gap:24px; padding-inline:24px; }
 .graphite-account .language-switcher { display:none; }
 .graphite-gallery-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
 .graphite-filter-bar { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .graphite-category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:800px) {
 .graphite-topbar { grid-template-columns:minmax(0,1fr) auto; gap:16px; padding:18px 18px 14px; }
 .graphite-brand { align-self:center; font-size:24px; }
 .graphite-search-area { grid-column:1/-1; grid-row:2; }
 .graphite-account { grid-column:2; grid-row:1; }
 .graphite-sort { gap:6px 17px; }
 .graphite-navrow > .container { min-height:40px; }
 .graphite-desktop-nav { display:none; }
 .graphite-menu-toggle { width:32px; height:40px; display:grid; align-content:center; gap:5px; padding:0 5px; color:#fff; background:transparent; border:0; cursor:pointer; }
 .graphite-menu-toggle > span { height:2px; background:currentColor; }
 .graphite-gallery-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
 .graphite-tag-rail { padding:0; justify-content:flex-start; gap:7px; }
 .graphite-tag-rail a { font-size:11px; }
 .graphite-detail-body { grid-template-columns:230px minmax(0,1fr); }
 .graphite-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:540px) {
 .container { padding-inline:12px; }
 .graphite-topbar { padding:15px 12px 13px; gap:14px; }
 .graphite-brand { font-size:23px; }
 .graphite-account > a { min-height:34px; padding-inline:12px; font-size:11px; }
 .graphite-home { padding-top:15px; }
 .graphite-tag-rail { gap:6px; margin-bottom:17px; }
 .graphite-tag-rail a { font-size:10px; padding:3px 6px; }
 .graphite-home-description { font-size:12px; }
 .graphite-gallery-grid,.graphite-series-grid,.graphite-grid,.graphite-grid--ranking,.comic-grid,.latest-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 12px; }
 .graphite-card h3 { padding:7px 5px; font-size:11px; }
 .graphite-home-about { margin-top:24px; padding-block:18px; }
 .graphite-home-about header { align-items:flex-start; gap:14px; }
 .graphite-home-about h2 { font-size:18px; }
 .graphite-home-about p { font-size:12px; line-height:1.75; }
 .graphite-pagination a,.graphite-pagination span { min-width:36px; height:36px; padding-inline:10px; font-size:12px; }
 .graphite-filter-bar { grid-template-columns:1fr; }
 .graphite-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .graphite-detail-body { display:block; }
 .graphite-media-card { width:min(78%,310px); margin:-14px auto 24px; }
 .graphite-dossier { padding-top:0; }
 .graphite-detail-hero h1 { font-size:40px; }
 .graphite-chapter-list { grid-template-columns:1fr; }
 .graphite-footer__nav,.graphite-footer__nav .site-footer__menu { gap:10px 18px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { transition:none!important; } }
