:root {
  --bg: #dddddd;
  --header: #31474b;
  --header-dark: #293d41;
  --text: #333333;
  --muted: #969696;
  --line: #c5c5c5;
  --blue: #3598db;
  --white: #ffffff;
  --black: #050505;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link { position: fixed; z-index: 9999; top: 8px; left: 8px; padding: 6px 12px; color: #fff; background: #111; transform: translateY(-140%); }
.skip-link:focus { transform: none; }

/* Header: narrow dark strip from the supplied reference. */
.site-header { height: 48px; color: #fff; background: var(--header); }
.site-header__inner { height: 48px; display: flex; align-items: center; }
.site-brand { flex: none; display: inline-flex; align-items: baseline; gap: 7px; margin-right: 32px; color: #d6d6d6; font-size: 25px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.site-brand em { color: var(--blue); font-style: normal; }
.site-nav { min-width: 0; align-self: stretch; }
.site-nav__list { height: 100%; display: flex; align-items: center; gap: 3px; padding: 0; margin: 0; list-style: none; }
.site-nav__list li { height: 100%; }
.site-nav a { position: relative; height: 100%; display: flex; align-items: center; padding: 0 14px; color: #e9eded; font-size: 13px; font-weight: 600; white-space: nowrap; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: #fff; background: var(--header-dark); }
.site-nav .current-menu-item > a::after { position: absolute; right: 14px; bottom: 0; left: 14px; height: 3px; background: var(--blue); content: ""; }
.site-nav .inkwave-popular-tag > a::before { margin-right: 3px; color: var(--blue); content: "#"; font-weight: 700; }
.site-actions { min-height: 24px; margin-left: auto; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.16); display: flex; align-items: center; gap: 15px; }
.bookshelf-link, .account-link { color: #f4f4f4; font-size: 12px; font-weight: 600; white-space: nowrap; }
.bookshelf-link { display: inline-flex; align-items: center; gap: 5px; }
.bookshelf-link svg { width: 15px; height: 15px; }
.bookshelf-link:hover, .account-link:hover { color: var(--blue); }
.language-switcher { position: relative; height: 100%; display: flex; align-items: center; }
.language-switcher > button { height: 34px; display: flex; align-items: center; gap: 5px; padding: 0; color: #f4f4f4; background: transparent; border: 0; font: inherit; cursor: pointer; }
.language-switcher > button span { color: var(--blue); font-size: 18px; }
.language-switcher > button b { max-width: 92px; overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.language-switcher > button i { font-style: normal; font-size: 9px; }
.language-switcher__menu { position: absolute; z-index: 100; top: 38px; right: 0; width: 164px; display: none; padding: 6px; background: #fff; border: 1px solid #bbb; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.language-switcher:hover .language-switcher__menu, .language-switcher:focus-within .language-switcher__menu, .language-switcher.is-open .language-switcher__menu { display: block; }
.language-switcher__menu a { display: block; padding: 8px 10px; color: #333; font-size: 12px; }
.language-switcher__menu a:hover, .language-switcher__menu a.is-current { color: #fff; background: var(--blue); }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 9px; margin-left: auto; background: transparent; border: 0; }
.nav-toggle > span:not(.screen-reader-text) { display: block; height: 2px; margin: 5px 0; background: #fff; }

/* Home catalog. */
.catalog-home { min-height: calc(100vh - 128px); padding: 20px 0 38px; }
.catalog-section { margin-bottom: 24px; }
.catalog-section__header { display: flex; align-items: center; justify-content: space-between; min-height: 49px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.catalog-section__header h1, .catalog-section__header h2 { margin: 0; color: #343434; font-size: 24px; font-weight: 500; line-height: 1.2; }
.catalog-section__header h1 a, .catalog-section__header h2 a { color: var(--blue); }
.more-link { font-size: 14px; font-weight: 600; }
.more-link:hover { color: var(--blue); }
.comic-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 14px; row-gap: 22px; }
.comic-card { min-width: 0; }
.comic-card__cover { display: block; overflow: hidden; background: #ccc; border-radius: 5px; }
.comic-card__cover img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; transition: opacity .18s; }
.comic-card__cover:hover img { opacity: .9; }
.comic-card h3 { min-height: 42px; margin: 10px 0 2px; color: #383838; font-size: 14px; font-weight: 500; line-height: 1.45; }
.comic-card h3 a:hover { color: var(--blue); }
.comic-card__meta { margin: 0; color: var(--muted); font-size: 11px; }
.comic-card__meta a { color: var(--blue); }
.home-about { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 28px; padding: 24px 0 2px; margin-top: 31px; border-top: 1px solid var(--line); }
.home-about__heading { padding-top: 2px; }
.home-about__heading span { display: block; margin-bottom: 3px; color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.home-about__heading h2 { margin: 0; font-size: 22px; font-weight: 500; }
.home-about__body { min-width: 0; }
.home-about__body p { margin: 0; color: #626262; font-size: 13px; line-height: 1.9; }
.home-about__body a { display: inline-block; margin-top: 9px; color: var(--blue); font-size: 11px; }
.home-about__body a:hover { color: #277da8; }

/* Shared plain controls. */
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 18px; background: #eee; border: 1px solid #aaa; border-radius: 2px; cursor: pointer; font-weight: 600; line-height: 1.2; }
.button:hover { color: #fff; background: #4c5d60; border-color: #4c5d60; }
.button svg { width: 17px; height: 17px; }
.button--primary { color: #fff; background: #348fbd; border-color: #348fbd; }
.button--primary:hover { background: #277da8; border-color: #277da8; }
.button--outline, .button--ghost { color: #333; background: transparent; border-color: #888; }
.button--large { min-height: 42px; padding-inline: 24px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; background: transparent; border: 0; border-radius: 2px; cursor: pointer; }
.icon-button svg { width: 19px; height: 19px; }
.icon-button--border { border: 1px solid #999; }
.eyebrow, .section-heading__kicker { display: none; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list span, .tag-list a { padding: 3px 8px; color: #555; background: #cfcfcf; font-size: 11px; }
.tag-list a:hover { color: var(--blue); }
.comic-taxonomy-lists { display: grid; gap: 7px; }
.tag-list--topics { align-items: center; }
.tag-list--topics .tag-list__label { padding-left: 0; color: #888; background: transparent; font-size: 9px; letter-spacing: .12em; }
.tag-list--topics a { color: #277da8; background: #d6e4eb; }

/* Archive and filters. */
.archive-page { min-height: calc(100vh - 128px); padding-bottom: 35px; }
.archive-hero { padding: 25px 0 10px; }
.archive-hero h1 { margin: 0 0 5px; font-size: 27px; font-weight: 500; }
.archive-hero p:last-child { margin: 0; color: #777; }
.filter-panel { margin: 13px 0 24px; background: #e6e6e6; border: 1px solid #c7c7c7; }
.filter-panel__fields { padding: 14px 18px 8px; }
.filter-panel fieldset { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 6px 0; margin: 0; border: 0; }
.filter-panel legend { float: left; width: 58px; padding: 4px 0; color: #777; font-size: 12px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 3px; }
.filter-options a { display: block; padding: 4px 9px; font-size: 12px; }
.filter-options a:hover { color: var(--blue); background: #d9d9d9; }
.filter-options a.is-active { color: #fff; background: var(--header); }
.filter-panel__footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 18px; background: #d4d4d4; border-top: 1px solid #c2c2c2; }
.filter-panel__footer label { display: flex; align-items: center; gap: 8px; color: #777; font-size: 12px; }
.filter-panel__footer select { padding: 6px 28px 6px 8px; background: #fff; border: 1px solid #bbb; }
.filter-panel__footer > div { display: flex; align-items: center; gap: 15px; }
.filter-panel__footer > div > a { color: #777; font-size: 12px; }
.filter-panel__footer .button { min-height: 32px; padding: 5px 14px; font-size: 12px; }
.filter-mobile-toggle { display: none; }
.archive-results-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.archive-results-head p { margin: 0; color: #777; font-size: 12px; }
.view-switch { display: flex; }
.view-switch button { width: 30px; height: 27px; padding: 0; background: #eee; border: 1px solid #bbb; cursor: pointer; }
.view-switch button.is-active { color: #fff; background: var(--header); }
.archive-grid { padding-bottom: 28px; }
.archive-grid.is-list { display: block; }
.archive-grid.is-list .comic-card { display: grid; grid-template-columns: 92px 1fr; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.archive-grid.is-list .comic-card h3 { min-height: 0; font-size: 17px; }
.pagination { padding: 15px 0 25px; }
.pagination ul { display: flex; justify-content: center; gap: 5px; padding: 0; margin: 0; list-style: none; }
.pagination a, .pagination span { width: 34px; height: 34px; display: grid; place-items: center; background: #eee; border: 1px solid #bbb; }
.pagination .current { color: #fff; background: var(--header); }
.empty-state { padding: 50px 24px; text-align: center; border: 1px solid #c1c1c1; }
.empty-state strong { display: block; font-size: 20px; font-weight: 500; }
.empty-state p { color: #777; }

/* Standalone tag, latest and popularity directories. */
.tag-directory-page, .directory-page { min-height: calc(100vh - 128px); padding-bottom: 44px; }
.tag-directory { padding-top: 16px; }
.tag-directory ul { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
.tag-directory a { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; background: #e7e7e7; border: 1px solid var(--line); }
.tag-directory a:hover { color: var(--blue); border-color: #aabec9; }
.tag-directory span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-directory small { flex: none; color: #999; }
.tag-archive-actions { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 15px; margin-bottom: 18px; border-bottom: 1px solid var(--line); color: #777; font-size: 12px; }
.tag-archive-actions a { color: var(--blue); }
.directory-hero { padding: 31px 0 26px; border-bottom: 1px solid var(--line); }
.directory-hero span { color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.directory-hero h1 { margin: 3px 0 4px; font-size: 30px; font-weight: 500; }
.directory-hero p { max-width: 720px; margin: 0; color: #777; }
.directory-results { padding-top: 25px; }
.ranked-comic, .latest-comic { position: relative; min-width: 0; }
.ranked-comic__number { position: absolute; z-index: 2; top: 7px; left: 7px; min-width: 32px; padding: 4px 6px; color: #fff; background: rgba(49,71,75,.92); border: 1px solid rgba(255,255,255,.45); font-size: 12px; font-weight: 700; text-align: center; }
.ranked-comic:nth-child(-n+3) .ranked-comic__number { color: #25383b; background: #f2c75f; border-color: #fff3bb; }
.ranked-comic > strong, .latest-comic > time { display: block; margin-top: 4px; color: #888; font-size: 10px; font-weight: 400; }

/* Native WordPress author archive: profile first, works second, no catalogue filters. */
.author-page { min-height: calc(100vh - 128px); padding-bottom: 45px; }
.author-profile { display: grid; grid-template-columns: 82px minmax(0,1fr) auto; gap: 20px; align-items: center; padding: 27px 30px; margin: 0 0 28px; background: #e7e7e7; border: 1px solid #c7c7c7; }
.author-profile__avatar { width: 82px; height: 82px; display: grid; place-items: center; color: #fff; background: var(--header); border-radius: 50%; font-size: 31px; }
.author-profile h1 { margin: 0 0 4px; font-size: 28px; font-weight: 500; }
.author-profile__copy > p:last-child { max-width: 680px; margin: 0; color: #777; }
.author-profile__count { min-width: 105px; padding-left: 28px; border-left: 1px solid var(--line); text-align: center; }
.author-profile__count strong { display: block; font-size: 26px; font-weight: 500; }
.author-profile__count span { color: #888; font-size: 11px; }
.author-works-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.author-works-heading > div { display: flex; align-items: center; gap: 9px; }
.author-works-heading span { color: var(--blue); font-size: 12px; }
.author-works-heading h2 { margin: 0; font-size: 22px; font-weight: 500; }
.author-works-heading > a { font-size: 12px; }
.author-works-heading > a:hover { color: var(--blue); }

/* Comic detail: compact two-column information page. */
.comic-detail { min-height: calc(100vh - 128px); }
.comic-detail__backdrop { display: none; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 14px; color: #888; font-size: 11px; }
.breadcrumbs a:hover { color: var(--blue); }
.comic-hero { display: grid; grid-template-columns: 245px minmax(0,1fr); gap: 32px; padding: 18px; background: #e7e7e7; border: 1px solid #c7c7c7; }
.comic-hero__cover { position: relative; align-self: start; }
.comic-hero__cover img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.comic-hero__rating { position: absolute; right: 6px; bottom: 6px; padding: 5px 8px; color: #fff; background: rgba(0,0,0,.72); }
.comic-hero__rating strong { font-size: 15px; }
.comic-hero__rating small { font-size: 10px; }
.comic-hero__content { padding: 2px 0; }
.comic-hero__tax { display: flex; flex-wrap: wrap; gap: 12px; color: #777; font-size: 12px; }
.comic-hero h1 { margin: 8px 0 0; font-size: 31px; font-weight: 500; }
.comic-hero__alias { margin: 1px 0 14px; color: #888; font-size: 13px; }
.comic-hero__credits { display: flex; gap: 45px; margin-bottom: 14px; }
.comic-hero__credits p { display: flex; flex-direction: column; margin: 0; }
.comic-hero__credits span { color: #888; font-size: 11px; }
.comic-hero__credits strong { font-size: 13px; font-weight: 500; }
.comic-hero__credits a:hover, .creator-card h2 a:hover { color: var(--blue); }
.comic-stats { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 620px; margin: 20px 0; padding: 12px 0; border-block: 1px solid #c8c8c8; }
.comic-stats div { padding: 0 16px; border-right: 1px solid #c5c5c5; }
.comic-stats div:first-child { padding-left: 0; }
.comic-stats div:last-child { border: 0; }
.comic-stats strong { display: block; font-size: 18px; font-weight: 500; }
.comic-stats span { color: #888; font-size: 10px; }
.comic-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.comic-actions .bookshelf-button.is-added { color: #fff; background: var(--header); }
.share-control { position: relative; }
.share-menu { position: absolute; z-index: 20; top: calc(100% + 9px); right: 0; width: 310px; padding: 14px; background: #f2f2f2; border: 1px solid #999; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.share-menu[hidden] { display: none; }
.share-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.share-menu__head strong { font-size: 13px; font-weight: 600; }
.share-menu__close { width: 27px; height: 27px; padding: 0; color: #666; background: transparent; border: 0; cursor: pointer; font-size: 22px; line-height: 1; }
.share-networks { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
.share-network { min-width: 0; display: flex; align-items: center; flex-direction: column; gap: 4px; color: #555; font-size: 9px; text-align: center; }
.share-network span { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: #111; border-radius: 50%; font-size: 16px; font-weight: 700; text-transform: uppercase; }
.share-network em { max-width: 100%; overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.share-network--facebook span { background: #1877f2; }
.share-network--reddit span { background: #ff4500; }
.share-network--telegram span { background: #229ed9; }
.share-network--whatsapp span { background: #25a858; }
.share-network:hover { color: var(--blue); }
.comic-update-note { margin: 13px 0 0; color: #888; font-size: 11px; }
.comic-update-note a { color: var(--blue); }
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 28px; padding: 28px 0 45px; }
.detail-section { margin-bottom: 22px; padding: 20px; background: #e7e7e7; border: 1px solid #c8c8c8; }
.detail-section__heading { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; padding-bottom: 9px; border-bottom: 1px solid #c5c5c5; }
.detail-section__heading > span, .detail-section__heading > div > span { color: var(--blue); font-size: 12px; }
.detail-section__heading h2 { margin: 0; font-size: 20px; font-weight: 500; }
.detail-section__heading small { margin-left: 5px; color: #888; font-size: 10px; }
.detail-section__heading--row { justify-content: space-between; }
.detail-section__heading--row > div { display: flex; align-items: center; gap: 7px; }
.prose { color: #4e4e4e; font-size: 13px; line-height: 1.9; }
.prose p:first-child { margin-top: 0; }
.chapter-order { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; color: #666; background: #eee; border: 1px solid #bbb; cursor: pointer; font-size: 11px; }
.chapter-order svg { width: 15px; height: 15px; }
.chapter-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid #c7c7c7; }
.chapter-list a { display: grid; grid-template-columns: 27px minmax(0,1fr) auto; gap: 8px; align-items: center; min-height: 44px; padding: 5px 9px 5px 0; border-bottom: 1px solid #c7c7c7; }
.chapter-list a:nth-child(odd) { border-right: 1px solid #c7c7c7; }
.chapter-list a:nth-child(even) { padding-left: 9px; }
.chapter-list a:hover { color: var(--blue); background: #ddd; }
.chapter-list a > span { color: var(--blue); font-size: 11px; }
.chapter-list strong { overflow: hidden; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.chapter-list time { color: #999; font-size: 9px; }
.chapter-section > .chapter-list { margin-top: 18px; }
.detail-sidebar > div { margin-bottom: 15px; padding: 18px; background: #e7e7e7; border: 1px solid #c8c8c8; }
.creator-card { text-align: center; }
.creator-card__avatar { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 9px; color: #fff; background: var(--header); border-radius: 50%; font-size: 22px; }
.creator-card h2 { margin: 0; font-size: 17px; font-weight: 500; }
.creator-card > p:not(.section-heading__kicker) { margin: 2px 0 11px; color: #888; font-size: 11px; }
.creator-card > a { color: var(--blue); font-size: 11px; }
.info-card h2 { margin: 0 0 10px; font-size: 17px; font-weight: 500; }
.info-card dl { margin: 0; }
.info-card dl div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid #c9c9c9; font-size: 11px; }
.info-card dt { color: #888; }
.info-card dd { margin: 0; text-align: right; }
.recommendations { padding: 25px 0 38px; border-top: 1px solid #c5c5c5; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 22px; font-weight: 500; }
.section-heading > a { color: #555; font-size: 12px; }
.section-heading > a:hover { color: var(--blue); }

/* Bookshelf and account. */
.dashboard-page { min-height: calc(100vh - 128px); }
.dashboard-hero { padding: 24px 0 13px; border-bottom: 1px solid var(--line); }
.dashboard-hero h1 { margin: 0; font-size: 28px; font-weight: 500; }
.dashboard-hero p:last-child { margin: 4px 0 0; color: #777; }
.dashboard-layout { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 25px; padding: 25px 0 45px; }
.dashboard-nav { display: flex; flex-direction: column; align-self: start; background: #e8e8e8; border: 1px solid #c5c5c5; }
.dashboard-nav a { padding: 11px 14px; border-bottom: 1px solid #c5c5c5; font-size: 12px; }
.dashboard-nav a:last-child { border: 0; }
.dashboard-nav a:hover, .dashboard-nav a.is-active { color: #fff; background: var(--header); }
.section-heading--compact { margin-bottom: 15px; }
.section-heading--compact h2 { font-size: 21px; }
.section-heading--compact > span { color: #888; font-size: 11px; }
.dashboard-section { margin-top: 42px; }
.history-list { background: #e7e7e7; border: 1px solid #c5c5c5; }
.history-list > a { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 10px 13px; border-bottom: 1px solid #c5c5c5; }
.history-list > a:last-child { border: 0; }
.history-list img { width: 48px; height: 62px; object-fit: cover; }
.history-list > a > span { display: flex; flex-direction: column; min-width: 0; }
.history-list strong { font-size: 13px; font-weight: 500; }
.history-list small { color: #888; font-size: 10px; }
.history-list i { width: min(300px,100%); height: 3px; margin-top: 7px; background: #c5c5c5; }
.history-list i b { height: 100%; display: block; background: var(--blue); }
.history-list em { color: var(--blue); font-size: 11px; font-style: normal; }
.muted-note { padding: 18px; color: #777; border: 1px dashed #aaa; }
.account-wrap { padding: 28px 0 48px; }
.login-card { display: grid; grid-template-columns: 170px 1fr; gap: 30px; max-width: 760px; margin: auto; padding: 25px; background: #e7e7e7; border: 1px solid #c5c5c5; }
.login-card__art { width: 150px; height: 150px; display: grid; place-items: center; color: #fff; background: var(--header); font-size: 55px; }
.login-card h2 { margin: 0; font-size: 25px; font-weight: 500; }
.login-card p:not(.section-heading__kicker) { color: #777; }
.login-card__actions { display: flex; gap: 8px; margin-top: 16px; }
.account-grid { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 24px; max-width: 900px; margin: auto; }
.profile-card, .settings-card { padding: 22px; background: #e7e7e7; border: 1px solid #c5c5c5; }
.profile-card { align-self: start; text-align: center; }
.profile-card img { width: 90px; height: 90px; margin: 0 auto 12px; object-fit: cover; border-radius: 50%; }
.profile-card h2 { margin: 0; font-size: 18px; font-weight: 500; }
.profile-card p, .profile-card > span { color: #888; font-size: 10px; }
.profile-card > span { display: block; margin: 12px 0; }
.profile-card > a { color: var(--blue); font-size: 11px; }
.profile-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.profile-form label { display: flex; flex-direction: column; gap: 5px; color: #777; font-size: 11px; }
.profile-form input { width: 100%; padding: 8px 10px; background: #fff; border: 1px solid #bbb; }
.profile-form label:nth-child(4), .profile-form__footer { grid-column: 1 / -1; }
.profile-form small { color: #999; }
.profile-form__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.profile-form__footer a { color: var(--blue); font-size: 11px; }
.form-notice { padding: 8px 10px; font-size: 11px; }
.form-notice.is-success { color: #246744; background: #dcebdd; }
.form-notice.is-error { color: #9c3324; background: #efd8d4; }

/* Reader keeps the requested tools but uses the same restrained visual language. */
.inkwave-reader-page { --reader-bg: #d8d8d8; --reader-paper: #fff; --reader-brightness: 1; background: var(--reader-bg); }
.inkwave-reader-page.is-night { --reader-bg: #121212; --reader-paper: #1d1d1d; color: #eee; }
.reader-toolbar { position: fixed; z-index: 100; top: 0; right: 0; left: 0; height: 48px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; color: #fff; background: var(--header); border-bottom: 1px solid #263a3d; transition: transform .2s; }
.reader-toolbar.is-hidden { transform: translateY(-100%); }
.reader-toolbar__back { height: 48px; display: grid; place-items: center; border-right: 1px solid rgba(255,255,255,.14); }
.reader-toolbar__back svg { width: 20px; height: 20px; }
.reader-toolbar__title { min-width: 0; display: flex; align-items: center; gap: 8px; padding-inline: 14px; font-size: 12px; }
.reader-toolbar__title a { color: #a9d8f6; }
.reader-toolbar__title span { color: rgba(255,255,255,.35); }
.reader-toolbar__title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-tools { height: 100%; display: flex; align-items: center; }
.reader-tool { height: 100%; display: flex; align-items: center; gap: 5px; padding: 0 12px; color: #eee; background: transparent; border: 0; border-left: 1px solid rgba(255,255,255,.13); cursor: pointer; font-size: 10px; }
.reader-tool svg { width: 17px; height: 17px; }
.brightness-control { display: flex; align-items: center; gap: 7px; padding: 0 12px; }
.brightness-control svg { width: 16px; }
.brightness-control input { width: 80px; accent-color: var(--blue); }
.reader-settings { position: fixed; z-index: 99; top: 58px; right: 10px; width: 260px; padding: 16px; color: #333; background: #eee; border: 1px solid #aaa; }
.reader-settings > strong { font-size: 12px; }
.reader-settings > div { display: grid; grid-template-columns: 1fr 1fr; margin: 9px 0 13px; }
.reader-settings button { padding: 7px; background: #fff; border: 1px solid #bbb; cursor: pointer; font-size: 10px; }
.reader-settings button.is-active { color: #fff; background: var(--header); }
.reader-settings label { display: flex; justify-content: space-between; color: #777; font-size: 10px; }
.reader-setting-value { display: flex; align-items: center; gap: 8px; }
.reader-setting-value output { min-width: 28px; color: #555; text-align: right; }
.reader-settings input { width: 105px; accent-color: var(--blue); }
.reader { min-height: 100vh; padding-top: 48px; background: var(--reader-bg); }
.reader-progress { position: fixed; z-index: 101; top: 47px; right: 0; left: 0; height: 1px; }
.reader-progress span { width: 0; height: 100%; display: block; background: var(--blue); }
.reader-pages { --page-gap: 8px; width: min(100%,900px); margin: 20px auto 0; filter: brightness(var(--reader-brightness)); }
.reader-page { position: relative; margin: 0 0 var(--page-gap); background: var(--reader-paper); }
.reader-page img { width: 100%; height: auto; min-height: 55vh; object-fit: cover; }
.reader-page figcaption { position: absolute; right: 6px; bottom: 5px; padding: 2px 5px; color: #ddd; background: rgba(0,0,0,.55); font-size: 8px; }
.reader-page figcaption a:hover { color: #fff; }
.reader-pages.is-paged { width: 100%; height: calc(100vh - 48px); display: flex; align-items: center; gap: var(--page-gap); margin: 0; overflow-x: auto; scroll-snap-type: x mandatory; }
.reader-pages.is-paged .reader-page { min-width: calc(100% - var(--page-gap)); height: calc(100% - var(--page-gap)); display: grid; place-items: center; margin: 0; scroll-snap-align: center; background: var(--reader-bg); }
.reader-pages.is-paged .reader-page img { width: auto; max-width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.reader-pages.is-paged ~ .reader-page-nav, .reader-pages.is-paged ~ .reader-chapter-nav, .reader-pages.is-paged ~ .reader-end { display: none; }
.reader-page-nav { width: min(calc(100% - 32px),900px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 20px auto 0; color: #ddd; background: #202020; border: 1px solid #444; font-size: 11px; text-align: center; }
.reader-page-nav > * { padding: 11px 14px; }
.reader-page-nav a:first-child { text-align: left; }
.reader-page-nav a:last-child { text-align: right; }
.reader-page-nav a:hover { color: #fff; background: #2e2e2e; }
.reader-chapter-nav { width: min(calc(100% - 32px),900px); display: grid; grid-template-columns: 1fr auto 1fr; margin: 28px auto 0; border: 1px solid #aaa; }
.reader-chapter-nav > a, .reader-chapter-nav > span { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 13px 16px; background: var(--reader-paper); }
.reader-chapter-nav .is-next { text-align: right; }
.reader-chapter-nav span span, .reader-chapter-nav a span { color: #888; font-size: 9px; }
.reader-chapter-nav strong { overflow: hidden; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.reader-chapter-nav .is-disabled { opacity: .45; }
.reader-chapter-nav__catalog { align-items: center; flex-direction: row !important; gap: 5px; color: #fff; background: var(--header) !important; font-size: 11px; }
.reader-chapter-nav__catalog svg { width: 16px; }
.reader-end { padding: 38px 20px 55px; text-align: center; }
.reader-end > span { color: var(--blue); font-size: 10px; }
.reader-end h1 { margin: 5px 0; font-size: 23px; font-weight: 500; }
.reader-end p { margin: 0 0 15px; color: #888; font-size: 10px; }

/* Footer and generic pages. */
.site-footer { padding: 22px 0 19px; color: #9b9b9b; background: var(--black); font-size: 11px; }
.site-footer p { margin: 0; }
.site-footer__notice { padding-bottom: 18px; border-bottom: 1px solid #242424; color: #aaa; line-height: 1.7; text-align: left; }
.site-footer__bottom { min-height: 44px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding-top: 15px; }
.site-footer__nav { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; }
.site-footer__menu { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 18px; padding: 0; margin: 0; list-style: none; }
.site-footer__menu a { color: #aaa; white-space: nowrap; }
.site-footer__menu a:hover { color: #fff; }
.generic-archive .section, .prose-page { min-height: 65vh; padding: 30px 0 45px; }
.text-card { padding: 18px; background: #e7e7e7; border: 1px solid #c5c5c5; }
.text-card h2 { margin-top: 0; font-size: 20px; font-weight: 500; }
.prose-page h1 { font-size: 30px; font-weight: 500; }
.not-found { min-height: calc(100vh - 128px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.not-found > span { color: #999; font-size: 70px; font-weight: 700; line-height: 1; }
.not-found h1 { margin: 5px 0; font-size: 28px; font-weight: 500; }
.inkwave-toast { position: fixed; z-index: 999; right: 18px; bottom: 18px; padding: 9px 14px; color: #fff; background: var(--header); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .18s; }
.inkwave-toast.is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .site-brand { margin-right: 15px; }
  .site-nav a { padding-inline: 11px; }
  .comic-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; z-index: 80; top: 48px; right: 0; bottom: 0; left: 0; display: none; background: var(--header); }
  .site-nav.is-open { display: block; }
  .site-nav__list { height: auto; display: block; padding: 12px 20px; }
  .site-nav__list li { height: auto; }
  .site-nav a { height: auto; padding: 11px 5px; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 15px; }
  .site-nav .current-menu-item > a::after { display: none; }
  .site-actions { padding-left: 12px; border-left: 0; }
  .comic-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .tag-directory ul { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .detail-sidebar > div { margin: 0; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 20px), var(--container)); }
  .site-brand { font-size: 21px; }
  .bookshelf-link span { display: none; }
  .account-link { font-size: 11px; }
  .language-switcher > button b { display: none; }
  .catalog-home { padding-top: 8px; }
  .catalog-section__header { min-height: 43px; margin-bottom: 10px; }
  .catalog-section__header h1, .catalog-section__header h2 { font-size: 20px; }
  .comic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 10px; row-gap: 19px; }
  .tag-directory ul { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .comic-card h3 { min-height: 39px; margin-top: 7px; font-size: 13px; }
  .comic-card__meta { font-size: 10px; }
  .home-about { grid-template-columns: 1fr; gap: 10px; padding-top: 20px; }
  .filter-mobile-toggle { width: 100%; display: flex; justify-content: space-between; padding: 11px 13px; background: #eee; border: 0; }
  .filter-panel__fields { display: none; }
  .filter-panel.is-open .filter-panel__fields { display: block; }
  .filter-panel fieldset { display: block; }
  .filter-panel legend { float: none; width: auto; }
  .filter-panel__footer { align-items: stretch; flex-direction: column; }
	.author-profile { grid-template-columns: 62px minmax(0,1fr); gap: 14px; padding: 20px 17px; }
	.author-profile__avatar { width: 62px; height: 62px; font-size: 24px; }
	.author-profile h1 { font-size: 23px; }
	.author-profile__count { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 13px 0 0; border-top: 1px solid var(--line); border-left: 0; }
	.author-profile__count strong { font-size: 20px; }
  .comic-hero { grid-template-columns: 1fr; }
  .comic-hero__cover { width: 210px; margin: auto; }
  .share-menu { position: fixed; top: 50%; right: 12px; left: 12px; width: auto; max-width: 360px; margin: auto; transform: translateY(-50%); }
  .comic-stats { grid-template-columns: repeat(3,1fr); }
  .chapter-list { grid-template-columns: 1fr; }
  .chapter-list a:nth-child(odd) { border-right: 0; }
  .chapter-list a:nth-child(even) { padding-left: 0; }
  .detail-sidebar { grid-template-columns: 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-nav { flex-direction: row; overflow-x: auto; }
  .dashboard-nav a { flex: none; border-right: 1px solid #c5c5c5; border-bottom: 0; }
  .account-grid, .login-card { grid-template-columns: 1fr; }
  .login-card__art { margin: auto; }
  .profile-form { grid-template-columns: 1fr; }
  .profile-form label:nth-child(4), .profile-form__footer { grid-column: auto; }
  .reader-toolbar { grid-template-columns: 43px minmax(0,1fr) auto; }
  .reader-toolbar__title a, .reader-toolbar__title span, .reader-tool span, .brightness-control { display: none; }
  .reader-tool { padding-inline: 9px; }
  .reader-chapter-nav { grid-template-columns: 1fr 48px 1fr; }
  .reader-chapter-nav__catalog { padding: 0 !important; font-size: 0; }
}

@media (max-width: 520px) {
  .site-footer__bottom { align-items: flex-start; flex-direction: column; gap: 12px; }
  .site-footer__nav { margin-left: 0; justify-content: flex-start; }
  .site-footer__menu { justify-content: flex-start; gap: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

