:root {
  color-scheme: dark;
  --ink: #080a0d;
  --panel: #101318;
  --panel-soft: #171b21;
  --paper: #eee9df;
  --muted: #8d9298;
  --line: rgba(238, 233, 223, 0.14);
  --red: #b32734;
  --red-bright: #df3e49;
  --header-h: 76px;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  background: var(--ink);
  color: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.site-header {
  height: var(--header-h);
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.wordmark { color: inherit; text-decoration: none; display: grid; gap: 2px; }
.wordmark__eyebrow { color: var(--red-bright); font: 700 10px/1.2 ui-monospace, monospace; letter-spacing: .24em; }
.wordmark__title { font: 800 18px/1.2 Georgia, "Noto Serif KR", serif; letter-spacing: -.03em; }
.site-header__actions { display: flex; align-items: center; gap: 20px; }
.site-header__status { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.site-header__status i { width: 7px; height: 7px; display: inline-block; margin-right: 8px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 12px var(--red); }
.gallery-return { padding: 9px 12px; color: #c8c4bc; text-decoration: none; border: 1px solid var(--line); background: rgba(8,10,13,.54); font-size: 12px; font-weight: 700; letter-spacing: .02em; transition: .2s ease; }
.gallery-return:hover { color: var(--paper); border-color: var(--red-bright); background: rgba(179,39,52,.14); }

.hero {
  min-height: min(670px, calc(100vh - var(--header-h)));
  padding: clamp(76px, 12vh, 130px) clamp(20px, 9vw, 140px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8,10,13,.98) 0%, rgba(8,10,13,.83) 52%, rgba(8,10,13,.58) 100%),
    radial-gradient(circle at 78% 28%, rgba(179,39,52,.28), transparent 36%),
    linear-gradient(135deg, #11161d 0%, #080a0d 70%);
}
.hero::after { content: "03:17:42"; position: absolute; right: 5vw; bottom: 3.5vw; color: rgba(238,233,223,.07); font: 700 clamp(60px, 12vw, 180px)/1 ui-monospace, monospace; letter-spacing: -.08em; }
.hero__kicker { margin: 0 0 24px; color: var(--red-bright); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.hero h1 { max-width: 920px; margin: 0; font: 800 clamp(48px, 7vw, 104px)/.98 Georgia, "Noto Serif KR", serif; letter-spacing: -.065em; position: relative; z-index: 1; }
.hero h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1px rgba(238,233,223,.62); }
.hero__copy { max-width: 520px; margin: 34px 0 0; color: #a9adb2; font-size: clamp(14px, 1.4vw, 17px); line-height: 1.8; }
.hero__cta { margin-top: 34px; padding: 15px 20px; color: var(--paper); text-decoration: none; border: 1px solid rgba(238,233,223,.27); background: rgba(8,10,13,.5); font-weight: 700; font-size: 13px; letter-spacing: .03em; transition: .2s ease; }
.hero__cta span { color: var(--red-bright); margin-left: 28px; }
.hero__cta:hover { border-color: var(--red-bright); background: rgba(179,39,52,.14); transform: translateY(-2px); }

.library { padding: 90px clamp(20px, 5vw, 72px) 120px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-heading p { margin: 0 0 8px; color: var(--red-bright); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .24em; }
.section-heading h2 { margin: 0; font: 800 clamp(30px, 4vw, 52px)/1 Georgia, "Noto Serif KR", serif; letter-spacing: -.04em; }
.section-heading > span { color: #4f555d; font: 700 13px/1 ui-monospace, monospace; }

.issue-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 36px) clamp(14px, 2vw, 28px); }
.issue-card { min-width: 0; }
.issue-card__action { display: block; width: 100%; padding: 0; color: inherit; text-align: left; border: 0; background: none; text-decoration: none; cursor: pointer; }
.issue-card__cover { position: relative; overflow: hidden; aspect-ratio: 2 / 3; background: var(--panel); box-shadow: 0 18px 35px rgba(0,0,0,.32); }
.issue-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease, filter .35s ease; }
.issue-card__number { position: absolute; left: 10px; top: 10px; padding: 5px 7px; color: #fff; background: rgba(8,10,13,.82); border-left: 3px solid var(--red-bright); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .08em; }
.issue-card__meta { padding: 14px 2px 0; }
.issue-card__meta strong { display: block; font: 700 16px/1.3 Georgia, "Noto Serif KR", serif; }
.issue-card__meta span { display: block; margin-top: 6px; color: var(--muted); font: 600 9px/1.2 ui-monospace, monospace; letter-spacing: .12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-card--available .issue-card__action:hover img { transform: scale(1.035); }
.issue-card--available .issue-card__action:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 5px; }
.issue-card--locked .issue-card__action { cursor: default; }
.issue-card--locked img { filter: grayscale(1) brightness(.34); }
.issue-card__lock { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, transparent, rgba(8,10,13,.5)); }
.issue-card__lock span { padding: 8px 11px; color: #b2b4b7; border: 1px solid rgba(238,233,223,.25); background: rgba(8,10,13,.76); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .16em; }

.reader { position: fixed; inset: 0; z-index: 30; background: #050608; display: grid; grid-template-rows: 64px minmax(0, 1fr) 70px; }
.reader[hidden] { display: none; }
.reader__header { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgba(8,10,13,.94); }
.icon-button { width: 42px; height: 42px; color: var(--paper); border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 20px; }
.icon-button:hover { border-color: var(--red-bright); }
.reader__identity { text-align: center; min-width: 0; }
.reader__identity span { display: block; color: var(--red-bright); font: 700 9px/1.2 ui-monospace, monospace; letter-spacing: .18em; }
.reader__identity strong { display: block; margin-top: 3px; font: 700 14px/1.2 Georgia, "Noto Serif KR", serif; }
.reader__stage { min-height: 0; display: grid; place-items: center; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 45%, #15181d, #050608 70%); }
.reader__page-wrap { position: absolute; inset: 0; min-width: 0; min-height: 0; margin: 0; padding: 0; overflow: hidden; }
.reader__page { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; display: block; opacity: 0; transition: opacity .18s ease; user-select: none; }
.reader__page.is-loaded { opacity: 1; }
.reader__loader { position: absolute; width: 28px; height: 28px; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--red-bright); border-radius: 50%; animation: spin .7s linear infinite; }
.reader__loader[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.reader__zone { position: absolute; z-index: 2; top: 0; bottom: 0; width: min(18vw, 180px); border: 0; background: transparent; cursor: pointer; }
.reader__zone--prev { left: 0; cursor: w-resize; }
.reader__zone--next { right: 0; cursor: e-resize; }
.reader__controls { display: grid; grid-template-columns: 90px minmax(0, 620px) 90px; justify-content: center; align-items: center; gap: 18px; padding: 0 20px; border-top: 1px solid var(--line); background: rgba(8,10,13,.96); }
.reader__controls button { color: var(--paper); border: 1px solid var(--line); background: transparent; padding: 10px 14px; cursor: pointer; font-size: 12px; }
.reader__controls button:disabled { opacity: .25; cursor: default; }
.reader__progress { display: grid; grid-template-columns: 1fr 72px; align-items: center; gap: 18px; }
.reader__progress input { width: 100%; accent-color: var(--red-bright); cursor: pointer; }
.reader__progress > span { color: var(--muted); font: 700 11px/1 ui-monospace, monospace; }
.reader__progress b { color: var(--paper); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body.is-reading { overflow: hidden; }

@media (max-width: 980px) {
  .issue-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  :root { --header-h: 64px; }
  .site-header__status { display: none; }
  .site-header__actions { gap: 0; }
  .gallery-return { padding: 8px 10px; font-size: 11px; }
  .hero { min-height: 580px; padding-top: 90px; padding-bottom: 90px; }
  .hero h1 { font-size: clamp(44px, 15vw, 68px); }
  .hero::after { bottom: 8vw; font-size: 24vw; }
  .library { padding-top: 66px; }
  .issue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .reader { grid-template-rows: 58px minmax(0, 1fr) 62px; }
  .reader__page-wrap { padding: 0; }
  .reader__zone { width: 17vw; }
  .reader__controls { grid-template-columns: 54px 1fr 54px; gap: 8px; padding: 0 8px; }
  .reader__controls button { padding: 9px 7px; font-size: 11px; }
  .reader__progress { grid-template-columns: 1fr 57px; gap: 8px; }
}

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