:root {
  color-scheme: dark;
  --bg: #000000;
  --paper: #101010;
  --ink: #f5c518;
  --muted: #c9b65c;
  --line: #303030;
  --accent: #ffd84d;
  --accent-2: #f5c518;
  --soft: #181818;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #000;
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}

body.home-mode {
  background: #000;
  color: #f5c518;
}

body.home-mode .site-header {
  background: rgba(0, 0, 0, 0.96);
  border-bottom-color: #292929;
}

body.home-mode .brand,
body.home-mode .tab,
body.home-mode .main-view h1,
body.home-mode .main-view h2,
body.home-mode .main-view .eyebrow {
  color: #f5c518;
}

body.home-mode .brand-mark {
  background: #f5c518;
  color: #050505;
}

body.home-mode .tab:hover,
body.home-mode .tab:focus-visible {
  color: #ffe36a;
  outline: none;
}

body.home-mode .tab.is-active {
  border-color: #f5c518;
  background: #111;
  color: #f5c518;
}

body.home-mode .main-hero {
  border-bottom-color: #292929;
}

body.home-mode .main-copy,
body.home-mode .showcase-head p,
body.home-mode .slide-card .comic-meta {
  color: #d9c66b;
}

body.home-mode .hero-thumb {
  color: #ffe052;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.72);
}

body.home-mode .hero-thumb::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.78));
}

body.home-mode .hero-thumb::after {
  border-color: rgba(245, 197, 24, 0.66);
}

body.home-mode .showcase-section {
  background: #000;
  color: #f5c518;
  border-top: 1px solid #292929;
}

body.home-mode .slider-shell {
  border-bottom-color: #292929;
}

body.home-mode .slide-button {
  border-color: rgba(245, 197, 24, 0.72);
  background: rgba(0, 0, 0, 0.78);
  color: #f5c518;
}

body.home-mode .slide-card,
body.home-mode .slide-card .comic-title {
  color: #f5c518;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 42px);
  background: rgba(0, 0, 0, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: #050505;
  font-family: Georgia, serif;
  font-size: 20px;
}

.header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.social-links {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.social-link {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease, background 160ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.social-instagram {
  border-color: #e1306c;
  background: linear-gradient(135deg, #833ab4 0%, #e1306c 55%, #f77737 100%);
}

.social-instagram:hover,
.social-instagram:focus-visible {
  border-color: #f77737;
  background: linear-gradient(135deg, #9b51e0 0%, #ef3e80 55%, #ff8a3d 100%);
}

.social-youtube {
  border-color: #ff0000;
  background: #ff0000;
}

.social-youtube:hover,
.social-youtube:focus-visible {
  border-color: #ff3945;
  background: #ff3945;
}

.social-icon {
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.social-icon-dot,
.social-icon-play {
  fill: currentColor;
  stroke: none;
}

.tab {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.tab.is-active {
  border-color: var(--accent);
  background: #151515;
  color: var(--accent);
}

main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.main-view {
  padding: 28px 0 58px;
}

.main-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: center;
  min-height: 360px;
  padding: clamp(28px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.main-copy {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.visitor-counter {
  position: fixed;
  right: 6px;
  bottom: 4px;
  z-index: 50;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  padding: 3px 5px;
  border: 0;
  border-radius: 0;
  background: #000;
  color: #000;
  line-height: 1;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.visitor-counter-label,
.visitor-counter-unit {
  color: #000;
  font-size: 10px;
  font-weight: 400;
}

.visitor-counter-value {
  min-width: 0;
  color: #000;
  font-size: 10px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.hero-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-items: end;
}

.hero-thumb {
  display: grid;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  place-items: center;
  padding: 14px;
  border-radius: 7px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  background-position: center;
  background-size: cover;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hero-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42)),
    linear-gradient(160deg, rgba(20, 106, 91, 0.34), rgba(201, 53, 43, 0.34));
}

.hero-thumb::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
}

.hero-thumb:hover,
.hero-thumb:focus {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(20, 20, 20, 0.16);
  outline: none;
}

.hero-poetry {
  background-image: url("assets/hero/classic-poetry-card.png");
}

.hero-novel {
  background-image: url("assets/hero/classic-novel-card.png");
}

.hero-thumb:nth-child(2) {
  transform: translateY(-24px);
}

.hero-thumb:nth-child(2):hover,
.hero-thumb:nth-child(2):focus {
  transform: translateY(-28px);
}

.showcase-section {
  width: 100%;
  margin: 28px 0 0;
  padding: 34px 0 30px;
  background: #22241f;
  color: #fff;
}

.showcase-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding-inline: 54px;
}

.showcase-head h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.showcase-head p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.slide-button {
  display: grid;
  position: absolute;
  top: calc(50% - 18px);
  z-index: 5;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.slide-prev {
  left: 0;
}

.slide-next {
  right: 0;
}

.slider-shell {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  overflow: hidden;
  padding: 0 54px 36px;
}

.featured-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.featured-track::-webkit-scrollbar {
  display: none;
}

.slide-card {
  flex: 0 0 calc((100% - 48px) / 5);
  scroll-snap-align: start;
  color: #fff;
}

.slide-card .cover-frame {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  box-shadow: none;
}

.slide-card .comic-title {
  color: #fff;
  font-size: 16px;
}

.slide-card .comic-meta {
  color: rgba(255, 255, 255, 0.72);
}

.catalog-view {
  padding: 28px 0 56px;
}

.shorts-view {
  padding: 34px 0 64px;
}

.shorts-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.shorts-head h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.shorts-head p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.65;
}

.shorts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.shorts-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.shorts-player {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #050505;
}

.shorts-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.shorts-card h2 {
  margin: 0;
  padding: 14px 16px 16px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}

.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 42px);
}

h2 {
  font-size: 19px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 100%);
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 1280px) {
  .category-nav {
    position: fixed;
    top: 86px;
    right: 8px;
    z-index: 15;
    width: 176px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 8, 8, 0.97);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
  }
}

.category-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

@media (min-width: 1280px) {
  .category-chip {
    width: 100%;
    min-height: 25px;
    height: auto;
    padding: 5px 8px;
    font-size: 10px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
}

.category-chip:hover,
.category-chip:focus {
  border-color: var(--accent-2);
  color: var(--accent-2);
  outline: none;
}

#searchInput {
  min-width: 0;
  flex: 1 1 auto;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

#searchInput:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.18);
}

#searchInput::placeholder {
  color: #8e824d;
}

.index-button {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #080808;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 18px 12px;
}

.comic-grid.is-grouped {
  display: block;
}

.genre-section {
  scroll-margin-top: 86px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
}

.genre-section:first-child {
  padding-top: 4px;
  border-top: 0;
}

.genre-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.genre-section-head h2 {
  font-size: 22px;
}

.genre-section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.genre-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.comic-card {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.comic-card:focus-visible {
  border-radius: 7px;
  outline: 3px solid rgba(255, 216, 77, 0.7);
  outline-offset: 5px;
}

.comic-card.is-complete .cover-frame {
  background: #dff3e4;
  box-shadow: 0 10px 30px rgba(20, 106, 91, 0.18);
}

.comic-card.is-complete .cover-frame::after {
  content: "완료";
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  padding: 4px 7px;
  border-radius: 999px;
  background: #146a5b;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.cover-frame {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 3.75;
  overflow: hidden;
  border-radius: 5px;
  background: #dedbd2;
  box-shadow: var(--shadow);
}

.cover-frame img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.cover-frame img + .thumbnail-placeholder {
  display: none;
}

.thumbnail-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.08)),
    #1f1f1f;
  color: #fff;
}

.thumbnail-placeholder strong {
  font-size: 24px;
  line-height: 1.2;
  word-break: keep-all;
}

.thumbnail-placeholder span {
  font-size: 12px;
  line-height: 1.45;
}

.thumbnail-placeholder .thumb-menu {
  color: #b9f0dc;
  font-weight: 800;
}

.comic-card.is-complete .thumbnail-placeholder {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.08)),
    #146a5b;
}

.comic-card.is-complete .thumbnail-placeholder .thumb-menu {
  color: #d7fff0;
}

.comic-title {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comic-card.is-complete .comic-title {
  display: inline-block;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #dff3e4;
  color: #146a5b;
}

.comic-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.empty {
  grid-column: 1 / -1;
  padding: 50px 0;
  color: var(--muted);
  text-align: center;
}

.detail-view {
  padding: 22px 0 60px;
}

.detail-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.detail-heading {
  min-width: 0;
  flex: 0 1 auto;
}

.detail-resource-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 210px));
  flex: 0 1 auto;
  gap: 10px;
}

.detail-resource-actions .original-button {
  min-height: 42px;
  padding: 8px 16px;
  white-space: nowrap;
}

.catalog-head h2,
.detail-top h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.detail-top h2 {
  color: #fff;
}

.back-button {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
}

.detail-top-navigation {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: 0;
}

.detail-top-navigation-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
}

.detail-top-navigation-button::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: min(240px, calc(100vw - 36px));
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
  color: #f6f6f6;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease;
  visibility: hidden;
  white-space: normal;
}

.detail-top-navigation-button:hover::after,
.detail-top-navigation-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.detail-top-navigation-button:hover:not(:disabled),
.detail-top-navigation-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.detail-top-navigation-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 860px) minmax(340px, 380px);
  gap: 24px;
  align-items: start;
}

.reader-layout-wide {
  grid-template-columns: minmax(0, 860px);
}

.reader-column {
  min-width: 0;
}

.webtoon-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #0b0b0b;
  box-shadow: var(--shadow);
}

.empty-reader {
  padding: 80px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  text-align: center;
}

.text-reader {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.text-reader h2 {
  color: #fff;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.25;
}

.text-reader h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.text-reader-head p:last-child {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.text-toc,
.novel-cast,
.text-body {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.text-toc ol {
  margin: 0;
  padding-left: 22px;
}

.text-toc li {
  margin: 7px 0;
  line-height: 1.65;
}

.text-toc li {
  color: #fff;
  font-weight: 900;
}

.text-toc li::marker {
  color: #fff;
}

.novel-cast-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.novel-cast-head h3,
.novel-cast-head p {
  margin: 0;
}

.novel-cast-poster {
  position: relative;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #080808;
}

.novel-cast-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.novel-cast-poster figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.novel-cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
}

.novel-cast-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.novel-cast-portrait {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #171717;
}

.novel-cast-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.novel-cast-portrait.is-missing {
  display: grid;
  place-items: center;
  padding: 18px;
  color: #777;
  font-size: 12px;
  text-align: center;
}

.novel-cast-copy {
  padding: 14px;
}

.novel-cast-card h4 {
  margin: 2px 0 7px;
  color: #ffffff;
  font-size: 18px;
}

.novel-cast-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.novel-cast-card .novel-cast-role {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.text-summary-section {
  margin-top: 18px;
}

.text-summary-section h3 {
  color: #ffffff;
  font-size: 16px;
}

.story-heading {
  margin: 38px 0 14px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900 !important;
  line-height: 1.45;
}

.story-heading strong {
  font-weight: 900 !important;
}

.story-heading:first-of-type {
  margin-top: 0;
}

.text-body p {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.9;
  word-break: keep-all;
}

.story-illustration {
  width: 100%;
  margin: 26px 0 34px;
}

.story-illustration img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #080808;
}

.story-illustration figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.info-panel {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 10px;
  padding: 18px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

@media (min-width: 821px) {
  .info-panel {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}

.original-button {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #080808;
  cursor: pointer;
  font-weight: 900;
}

.original-button:hover,
.original-button:focus-visible {
  border-color: var(--accent-2);
  background: var(--accent-2);
  outline: none;
}

.info-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 14px;
}

.info-table th,
.info-table td {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.info-table th {
  width: 96px;
  color: var(--muted);
  font-weight: 800;
  text-align: left;
}

.info-table td {
  color: #f4f4f4;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.info-summary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.info-summary > h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.info-summary .text-summary-section {
  margin-top: 18px;
}

.info-summary .text-summary-section h3 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 15px;
}

.info-summary ul {
  margin: 0;
  padding-left: 20px;
}

.info-summary li {
  margin: 8px 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.65;
  word-break: keep-all;
}

.info-summary li::marker {
  color: var(--accent);
}

.info-detail-line {
  display: block;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.info-detail-line + .info-detail-line {
  margin-top: 0.28em;
}

.info-detail-keyword {
  margin-right: 0.08em;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.015em;
}

.work-navigation {
  display: grid;
  width: min(860px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.work-navigation-button {
  display: flex;
  min-width: 0;
  min-height: 82px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.work-navigation-button.is-next {
  align-items: flex-end;
  text-align: right;
}

.work-navigation-button:hover:not(:disabled),
.work-navigation-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent-2);
  outline: none;
}

.work-navigation-button:disabled {
  cursor: default;
  opacity: 0.46;
}

.work-navigation-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.work-navigation-title {
  max-width: 100%;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.index-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 23, 23, 0.45);
}

.original-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 23, 23, 0.48);
}

.original-dialog {
  width: min(980px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.work-info-dialog {
  width: min(720px, 100%);
}

.work-info-body {
  max-height: calc(min(820px, 100vh - 36px) - 84px);
  overflow: auto;
  padding: 22px clamp(18px, 4vw, 34px) 30px;
}

.work-info-body .info-table {
  margin-top: 0;
}

.contact-dialog {
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.contact-body {
  padding: 30px 24px 34px;
  text-align: center;
}

.contact-body p {
  margin: 0;
  color: #f4f4f4;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
  word-break: keep-all;
}

.contact-email {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent);
  font-size: clamp(19px, 4vw, 25px);
  font-weight: 900;
  text-decoration: none;
}

.original-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.original-body {
  max-height: calc(min(820px, 100vh - 36px) - 84px);
  overflow: auto;
  padding: 24px clamp(18px, 4vw, 42px) 34px;
}

.original-body p {
  margin: 0 0 18px;
  color: #f4f4f4;
  font-size: 17px;
  line-height: 1.95;
  word-break: keep-all;
}

.original-body .original-section-title {
  margin-bottom: 14px;
  color: #ffd84d;
  font-weight: 800;
}

.original-core-material {
  display: inline-block;
  border-bottom: 1px dotted var(--accent);
  color: #ffe36a;
  cursor: help;
  font-weight: 800;
  outline: none;
}

.original-term-tooltip {
  position: fixed;
  z-index: 80;
  width: 210px;
  max-width: calc(100vw - 24px);
  padding: 11px 13px;
  border: 1px solid #f5c518;
  border-radius: 7px;
  background: #191600;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  overflow-wrap: break-word;
  text-align: left;
  word-break: keep-all;
  white-space: normal;
  pointer-events: none;
}

.original-term-tooltip::before {
  content: "";
  position: absolute;
  top: var(--tooltip-arrow-top, 50%);
  left: -7px;
  border-top: 6px solid transparent;
  border-right: 7px solid #f5c518;
  border-bottom: 6px solid transparent;
  transform: translateY(-50%);
}

.original-term-tooltip.is-left::before {
  right: -7px;
  left: auto;
  border-right: 0;
  border-left: 7px solid #f5c518;
}

.original-core-material:focus-visible {
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.35);
}

.index-dialog {
  width: min(920px, 100%);
  max-height: min(780px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.index-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.index-close {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.index-list {
  max-height: calc(min(780px, 100vh - 36px) - 84px);
  overflow: auto;
  padding: 8px 20px 22px;
}

.index-section {
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
}

.index-section:first-child {
  border-top: 0;
}

.index-section h3 {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 15px;
}

.index-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 5px 18px;
}

.index-item {
  min-width: 0;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  word-break: keep-all;
}

.index-item:hover,
.index-item:focus {
  color: var(--accent);
  outline: none;
  text-decoration: underline;
}

@media (max-width: 820px) {
  .detail-top {
    flex-wrap: wrap;
  }

  .detail-heading {
    flex: 1 1 auto;
  }

  .detail-resource-actions {
    order: 2;
    width: calc(100% - 56px);
    margin-left: 56px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header,
  .catalog-head {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header {
    gap: 12px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .tabs {
    min-width: 0;
  }

  main {
    width: min(100% - 20px, 1180px);
  }

  .main-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
  }

  .hero-stack {
    max-width: 360px;
  }

  .comic-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 16px 10px;
  }

  .slider-shell {
    padding-inline: 48px;
  }

  .showcase-head {
    padding-inline: 48px;
  }

  .slide-card {
    flex-basis: calc((100% - 24px) / 3);
  }

  .reader-layout {
    display: block;
  }

  .info-panel {
    position: static;
    margin-top: 18px;
  }

  .search-wrap {
    width: 100%;
  }

  .shorts-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .shorts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-nav {
    position: sticky;
    top: 111px;
    z-index: 12;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 0 10px;
    background: var(--bg);
    scrollbar-width: none;
  }

  .category-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 440px) {
  .detail-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .detail-top-navigation {
    width: 100%;
    justify-content: flex-end;
    margin-left: 56px;
  }

  .search-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .index-button {
    width: 100%;
  }

  .comic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .slider-shell {
    padding-inline: 44px;
  }

  .showcase-head {
    padding-inline: 44px;
  }

  .slide-card {
    flex-basis: calc((100% - 12px) / 2);
  }

  .comic-title {
    font-size: 13px;
  }

  .comic-meta {
    font-size: 11px;
  }

  .index-items {
    grid-template-columns: 1fr;
  }

  .work-navigation {
    grid-template-columns: 1fr;
  }

  .shorts-grid {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 340px);
    margin-inline: auto;
  }
}
