@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css");
@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,500..800&family=Noto+Serif+KR:wght@500;600;700&display=swap");

:root {
  --ink: #14120f;
  --muted: #706b62;
  --line: #ddd4c7;
  --paper: #fbf8f1;
  --canvas: #fffdf8;
  --soft: #efe6d8;
  --accent: #be3f32;
  --accent-dark: #873229;
  --sage: #627c61;
  --blue: #2f5369;
  --wine: #5f2632;
  --ochre: #b4773b;
  --shadow: 0 24px 70px rgba(37, 29, 20, 0.16);
  --font-sans: "Pretendard Variable", Pretendard, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-serif-kr: "Noto Serif KR", "Nanum Myeongjo", Georgia, serif;
  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(251, 248, 241, 0.96), rgba(246, 239, 229, 0.92) 46%, rgba(251, 248, 241, 1)),
    var(--paper);
  color: var(--ink);
  letter-spacing: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  object-fit: cover;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 13px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(20, 18, 15, 0.12);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--canvas);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.brand-logo {
  display: block;
  width: clamp(112px, 14vw, 168px);
  height: auto;
  max-height: 46px;
  object-fit: contain;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(20, 18, 15, 0.1);
  background: rgba(255, 253, 248, 0.72);
}

.topnav a,
.text-action {
  color: var(--muted);
  text-decoration: none;
}

.ai-disclosure,
.ai-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(20, 18, 15, 0.18);
  background: rgba(255, 253, 248, 0.86);
  color: var(--blue);
  font-weight: 820;
}

.ai-disclosure {
  gap: 8px;
  margin-top: 14px;
  padding: 9px 12px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.ai-badge {
  padding: 5px 8px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mag-card .ai-badge,
.candidate-card .ai-badge,
.admin-candidate-item .ai-badge {
  margin-bottom: 8px;
}

.ai-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 760;
}

.topnav a.is-active,
.topnav a:hover {
  color: var(--ink);
  background: #ebe0d0;
}

.primary-action,
.solid,
.ghost,
.text-action,
.tag-cloud button,
.album-strip button {
  min-height: 44px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.primary-action,
.solid {
  background: var(--ink);
  color: #fffdf9;
  border-color: var(--ink);
}

a.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-action,
.solid,
.ghost {
  padding: 10px 17px;
  font-weight: 760;
}

.ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(21, 21, 21, 0.2);
}

.text-action {
  background: transparent;
  border: 0;
  font-weight: 750;
}

.view {
  display: none;
  animation: page-in 260ms ease both;
}

.view.is-active {
  display: block;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-grid,
.content-band,
.persona-cover,
.album-cover,
.magazine-spread,
.studio-layout {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  padding: 34px 0 18px;
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(280px, 1fr);
  min-height: min(72vh, 680px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--canvas);
}

.feature-copy {
  align-self: end;
  padding: clamp(24px, 5vw, 56px);
  border-top: 4px solid var(--ink);
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 780;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.9;
  font-weight: 720;
  text-wrap: balance;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.12;
  font-weight: 800;
  text-wrap: balance;
}

h3 {
  line-height: 1.18;
  font-weight: 760;
}

p,
dd,
blockquote {
  text-wrap: pretty;
}

.line {
  display: block;
}

.nowrap {
  white-space: nowrap;
}

.feature-lead {
  max-width: 430px;
  color: #34312c;
  font-size: clamp(1.03rem, 1.7vw, 1.28rem);
  font-weight: 520;
  line-height: 1.72;
}

.meta-row,
.action-row,
.profile-actions,
.album-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.meta-row {
  margin: 26px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.meta-row span {
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.meta-row span:last-child {
  border-right: 0;
}

.feature-image-stack {
  position: relative;
  min-height: 480px;
  background:
    linear-gradient(135deg, rgba(98, 124, 97, 0.78), rgba(47, 83, 105, 0.82)),
    var(--sage);
}

.feature-image-stack img:first-child {
  width: 78%;
  height: 82%;
  margin: 44px 0 0 8%;
  box-shadow: var(--shadow);
}

.feature-image-stack img:last-child {
  position: absolute;
  right: 7%;
  bottom: 40px;
  width: 38%;
  aspect-ratio: 3 / 4;
  border: 10px solid #fffdf9;
  box-shadow: var(--shadow);
}

.feed-sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.sidebar-block {
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: 22px;
}

.sidebar-block h2 {
  font-size: 1.34rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud button {
  padding: 8px 11px;
  color: var(--ink);
  background: var(--soft);
  border-color: var(--line);
}

.stat-block {
  background: var(--blue);
  color: #fff;
}

.stat-block span,
.stat-block small {
  color: rgba(255, 255, 255, 0.72);
}

.stat-block strong {
  display: block;
  margin: 14px 0 4px;
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1;
  font-weight: 720;
}

.content-band {
  padding: clamp(32px, 5vw, 68px) 0;
  border-top: 1px solid rgba(21, 21, 21, 0.1);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

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

.mag-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--canvas);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 29, 20, 0.06);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.mag-card::before {
  content: attr(data-issue);
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  max-width: calc(100% - 24px);
  padding: 6px 8px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mag-card:hover,
.mag-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(37, 29, 20, 0.13);
  transform: translateY(-2px);
}

.mag-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.mag-card-body {
  padding: 18px 18px 20px;
}

.mag-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
}

.mag-card p {
  min-height: 62px;
  color: var(--muted);
  line-height: 1.58;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.magazine-library {
  padding-top: clamp(52px, 7vw, 82px);
  padding-bottom: clamp(26px, 4vw, 48px);
}

.album-library-grid {
  display: block;
}

.magazine-shelf {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 22px 16px;
  min-height: 360px;
  padding: 18px 18px 118px;
  border: 1px solid rgba(20, 18, 15, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(244, 238, 225, 0.78)),
    repeating-linear-gradient(90deg, rgba(20, 18, 15, 0.035) 0 1px, transparent 1px 78px);
}

.magazine-shelf::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 92px;
  left: 0;
  height: 18px;
  border-top: 1px solid rgba(79, 55, 36, 0.32);
  border-bottom: 1px solid rgba(79, 55, 36, 0.22);
  background: linear-gradient(180deg, #7b6046, #4a3525);
  box-shadow: 0 18px 24px rgba(37, 29, 20, 0.18);
}

.shelf-magazine {
  --tilt: 0deg;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 24px minmax(118px, 148px);
  align-items: stretch;
  min-height: 254px;
  color: var(--ink);
  cursor: pointer;
  transform: rotate(var(--tilt));
  transform-origin: 50% 100%;
  transition:
    transform 160ms ease,
    filter 160ms ease,
    opacity 160ms ease;
}

.shelf-magazine:nth-child(3n + 1) {
  --tilt: -1.4deg;
}

.shelf-magazine:nth-child(3n + 2) {
  --tilt: 1deg;
}

.shelf-magazine:hover,
.shelf-magazine.is-opening,
.shelf-magazine.is-selected {
  z-index: 2;
  filter: drop-shadow(0 16px 20px rgba(37, 29, 20, 0.18));
  transform: translateY(-8px) rotate(0deg);
}

.shelf-magazine.is-pressing {
  filter: drop-shadow(0 5px 8px rgba(37, 29, 20, 0.16));
  transform: translateY(3px) scale(0.985) rotate(var(--tilt));
}

.shelf-magazine.is-selected {
  z-index: 3;
  filter: drop-shadow(0 22px 28px rgba(37, 29, 20, 0.22));
  transform: translateY(-16px) rotate(0deg);
}

.shelf-magazine.is-selected::before {
  content: "열람 중";
  position: absolute;
  top: -32px;
  left: 24px;
  z-index: 4;
  border: 1px solid rgba(20, 18, 15, 0.18);
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf8;
  padding: 6px 9px;
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1;
}

.shelf-magazine-spine {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(20, 18, 15, 0.22);
  border-right: 0;
  background: linear-gradient(180deg, #1f2528, #111416);
  color: #fffdf8;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shelf-magazine-cover {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 18, 15, 0.2);
  background: var(--paper);
  box-shadow:
    inset 8px 0 12px rgba(20, 18, 15, 0.1),
    inset 0 0 0 0 rgba(138, 35, 42, 0);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.shelf-magazine.is-selected .shelf-magazine-cover {
  border-color: rgba(138, 35, 42, 0.62);
  box-shadow:
    inset 8px 0 12px rgba(20, 18, 15, 0.1),
    inset 0 0 0 4px rgba(138, 35, 42, 0.18);
}

.shelf-magazine.is-selected .shelf-magazine-spine {
  background: linear-gradient(180deg, #8a232a, #421116);
}

.shelf-magazine-cover img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.shelf-magazine-cover .ai-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(255, 253, 248, 0.88);
}

.shelf-magazine-caption {
  position: absolute;
  right: 0;
  bottom: -74px;
  left: 24px;
  min-height: 64px;
  padding-top: 10px;
}

.shelf-magazine-caption .kicker {
  margin-bottom: 3px;
}

.shelf-magazine-caption h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.05;
}

.shelf-magazine.is-selected .shelf-magazine-caption h3 {
  color: var(--wine);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.shelf-magazine-caption span {
  color: var(--muted);
  font-size: 0.78rem;
}

.split-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  align-items: start;
}

.vote-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: end;
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
  min-height: calc(72vh - 72px);
  padding: 48px 0 34px;
}

.vote-hero p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.72;
}

.vote-rules {
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: 22px;
}

.vote-rules strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 780;
}

.vote-rules p {
  margin-bottom: 0;
}

.vote-status {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 780;
}

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

.candidate-card {
  display: grid;
  border: 1px solid var(--line);
  background: var(--canvas);
}

.candidate-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
}

.candidate-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.candidate-body h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.candidate-body strong {
  display: block;
  margin-bottom: 8px;
  line-height: 1.42;
}

.candidate-body p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.58;
}

.candidate-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.candidate-tags span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.82rem;
}

.vote-meter {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--soft);
}

.vote-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.candidate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.pagination-bar span {
  min-width: 120px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
  text-align: center;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(18, 20, 22, 0.78);
  cursor: zoom-out;
}

.image-preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(92vw, 720px);
  max-height: 92vh;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--canvas);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.36);
}

.image-preview-dialog img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: #111;
}

.image-preview-close {
  justify-self: end;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 780;
  cursor: pointer;
}

.image-preview-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.image-preview-caption strong {
  color: var(--ink);
}

.candidate-actions span {
  color: var(--muted);
  font-weight: 780;
}

.workflow-list {
  display: grid;
  gap: 14px;
}

.workflow-list div {
  display: grid;
  grid-template-columns: 42px minmax(0, 140px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.workflow-list span {
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 900;
}

.workflow-list strong {
  line-height: 1.35;
}

.workflow-list p {
  margin: 0;
  color: var(--muted);
}

.persona-cover,
.album-cover {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(280px, 1fr);
  gap: clamp(24px, 6vw, 70px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 34px 0;
}

.album-cover {
  position: relative;
  padding-top: clamp(34px, 6vw, 76px);
}

.album-cover::before {
  content: "PERSONA MAGAZINE";
  position: absolute;
  top: 18px;
  left: 0;
  color: rgba(20, 18, 15, 0.18);
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 800;
  line-height: 0.78;
  pointer-events: none;
}

.album-cover > div {
  position: relative;
  z-index: 1;
  padding: clamp(18px, 3vw, 32px) 0;
  border-top: 4px solid var(--ink);
  border-bottom: 1px solid rgba(20, 18, 15, 0.18);
}

.persona-cover {
  background:
    linear-gradient(90deg, rgba(98, 124, 97, 0.1), transparent 46%),
    transparent;
}

.persona-portrait {
  width: min(100%, 500px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.persona-copy p,
.album-cover p,
.chapter p,
.profile-info dd,
.prompt-box p {
  color: var(--muted);
  line-height: 1.72;
}

blockquote {
  margin: 20px 0 28px;
  padding-left: 22px;
  border-left: 4px solid var(--accent);
  font-family: var(--font-serif-kr);
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.48;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
}

.profile-info,
.persona-albums,
.comments-panel,
.studio-panel,
.studio-preview {
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: clamp(20px, 3vw, 30px);
}

dl {
  margin: 0;
}

dl div {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

dt {
  margin-bottom: 6px;
  font-size: 0.86rem;
  font-weight: 760;
  color: #37332e;
}

dd {
  margin: 0;
}

.album-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.album-strip button {
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--soft);
  border-color: var(--line);
  text-align: left;
}

.album-strip img {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.album-strip span {
  display: block;
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 760;
  line-height: 1.35;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.comment-form input,
.studio-form input,
.studio-form select,
.studio-form textarea,
.candidate-form input,
.candidate-form select,
.candidate-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 12px;
}

.candidate-filter {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 10px 0 14px;
}

.candidate-filter select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 34px 8px 10px;
}

.sequel-issue-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.4fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.sequel-issue-form select,
.sequel-issue-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 12px;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.comment-item strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 760;
}

.comment-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.album-cover img {
  width: 100%;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}

.album-view {
  background:
    linear-gradient(180deg, #eadfce 0, rgba(251, 248, 241, 0.96) 34%, var(--paper) 68%),
    var(--paper);
}

.magazine-spread {
  display: grid;
  gap: clamp(56px, 8vw, 104px);
  padding-bottom: 92px;
}

.chapter {
  position: relative;
  border-top: 1px solid rgba(20, 18, 15, 0.18);
  padding-top: 32px;
}

.chapter-copy {
  max-width: 470px;
}

.chapter-number {
  display: block;
  margin-bottom: 20px;
  color: rgba(20, 18, 15, 0.16);
  font-family: var(--font-display);
  font-size: clamp(4.8rem, 10vw, 9rem);
  font-weight: 800;
  line-height: 0.72;
}

.chapter-copy h2,
.chapter-grid h2 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 5rem);
  line-height: 0.9;
  font-weight: 760;
}

.chapter-body {
  max-width: 34em;
  font-family: var(--font-serif-kr);
  font-size: clamp(1.03rem, 1.45vw, 1.2rem);
  font-weight: 500;
}

.chapter-grid > div {
  align-self: start;
}

.chapter-grid .kicker,
.chapter-copy .kicker {
  color: var(--blue);
}

.chapter-wide {
  display: grid;
  grid-template-columns: minmax(240px, 0.68fr) minmax(280px, 1fr);
  gap: clamp(22px, 4vw, 58px);
  align-items: center;
}

.chapter-wide.is-reversed {
  grid-template-columns: minmax(280px, 1fr) minmax(240px, 0.68fr);
}

.chapter-image {
  margin: 0;
}

.chapter-image img,
.chapter-wide img {
  width: 100%;
  aspect-ratio: 4 / 5;
  box-shadow: 0 18px 48px rgba(37, 29, 20, 0.14);
}

.chapter-image figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 680;
  line-height: 1.35;
}

.chapter-tone-1 .chapter-copy .kicker {
  color: var(--blue);
}

.chapter-tone-2 .chapter-copy .kicker {
  color: var(--wine);
}

.chapter-tone-3 .chapter-copy .kicker {
  color: var(--sage);
}

.chapter-tone-4 .chapter-copy .kicker {
  color: var(--ochre);
}

.chapter-grid {
  display: grid;
  grid-template-columns: 0.72fr 1fr 1fr;
  gap: 18px;
  align-items: end;
}

.chapter-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 24px;
  align-items: start;
  padding: 34px 0 72px;
}

.admin-page {
  padding-bottom: 72px;
}

.admin-page:not(.is-unlocked) .admin-dashboard,
.admin-page:not(.is-unlocked) .studio-form,
.admin-page:not(.is-unlocked) .studio-preview {
  display: none;
}

.admin-page:not(.is-unlocked) .studio-layout {
  grid-template-columns: minmax(280px, 640px);
  justify-content: center;
  padding-top: clamp(48px, 9vw, 96px);
}

.admin-page:not(.is-unlocked) .studio-panel {
  border: 1px solid var(--line);
  background: var(--canvas);
  padding: clamp(22px, 4vw, 40px);
}

.admin-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  width: min(1180px, calc(100% - 36px));
  margin: 34px auto 0;
}

.admin-tool-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fffdf9;
  padding: clamp(20px, 3vw, 30px);
}

.admin-tool-panel h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
}

.candidate-form {
  display: grid;
  gap: 14px;
}

.candidate-form label {
  display: grid;
  gap: 7px;
  color: #38342f;
  font-size: 0.94rem;
  font-weight: 720;
  line-height: 1.35;
}

.candidate-form textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-candidate-list {
  display: grid;
  gap: 12px;
}

.publish-winner-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(107, 143, 113, 0.45);
  background: rgba(107, 143, 113, 0.12);
}

.publish-winner-panel strong {
  font-weight: 780;
}

.publish-winner-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.generation-job-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.job-list-heading {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 780;
}

.generation-job-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.generation-job-item strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 780;
}

.generation-job-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.generation-job-item > span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 780;
  white-space: nowrap;
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.job-actions button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.review-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.review-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.review-item img {
  width: 92px;
  aspect-ratio: 4 / 5;
}

.review-item h3,
.review-item strong,
.review-item p {
  margin: 0;
}

.review-item strong {
  display: block;
  margin: 4px 0;
}

.review-item p:not(.kicker) {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.generation-job-item.is-done > span,
.generation-job-item.is-done button {
  color: var(--sage);
}

.generation-job-item.is-error {
  border-color: rgba(217, 79, 61, 0.5);
}

.job-error {
  color: var(--accent-dark) !important;
}

.admin-candidate-item {
  display: grid;
  grid-template-columns: 112px minmax(280px, 1fr) minmax(132px, auto);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.admin-candidate-item img {
  width: 112px;
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
}

.admin-candidate-item h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.admin-candidate-item strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.35;
}

.admin-candidate-item p:not(.kicker) {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.status-pill.is-live {
  border-color: rgba(57, 107, 82, 0.3);
  color: #396b52;
}

.candidate-admin-actions {
  display: grid;
  gap: 8px;
  min-width: 120px;
}

.studio-panel h1 {
  font-family: var(--font-serif-kr);
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.12;
}

.studio-form {
  display: grid;
  gap: 16px;
}

.admin-panel {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.admin-panel strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 760;
}

.admin-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-login input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf9;
  color: var(--ink);
  padding: 10px 12px;
}

#adminState {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fffdf9;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 780;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#imageProviderState {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fffdf9;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 780;
}

.admin-panel.is-unlocked {
  border-color: rgba(107, 143, 113, 0.45);
  background: rgba(107, 143, 113, 0.12);
}

.admin-panel.is-unlocked #adminState {
  color: var(--sage);
}

.studio-form label {
  display: grid;
  gap: 7px;
  color: #38342f;
  font-size: 0.94rem;
  font-weight: 720;
  line-height: 1.35;
}

.studio-form textarea {
  min-height: 118px;
  resize: vertical;
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.preview-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

#generationState {
  min-width: 72px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 780;
}

.generated-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed var(--line);
  background: var(--paper);
  color: var(--muted);
  padding: 24px;
  text-align: center;
  line-height: 1.6;
}

.generated-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--canvas);
}

.generated-tile img {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.generated-tile figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.generated-tile figcaption span {
  min-width: 0;
}

.generated-tile-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.generated-tile button {
  flex: 1 1 calc(50% - 6px);
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  background: rgba(21, 21, 21, 0.82);
  color: white;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 760;
}

.generated-tile [data-regenerate-index] {
  flex-basis: 100%;
  background: rgba(135, 50, 41, 0.9);
}

.generated-tile [data-identity-index] {
  background: rgba(47, 83, 105, 0.9);
}

.generated-tile figcaption small {
  color: var(--blue);
  font-weight: 820;
  white-space: nowrap;
}

.generated-tile.is-selected {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.prompt-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.prompt-box p {
  margin: 8px 0 0;
}

@media (max-width: 980px) {
  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .topnav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .home-grid,
  .feature-panel,
  .split-band,
  .vote-hero,
  .admin-dashboard,
  .persona-cover,
  .album-cover,
  .profile-layout,
  .studio-layout,
  .chapter-wide,
  .chapter-wide.is-reversed {
    grid-template-columns: 1fr;
  }

  .home-grid {
    padding-top: 18px;
  }

  .feature-panel,
  .persona-cover,
  .album-cover {
    min-height: auto;
  }

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

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

  .chapter-grid > div {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
    line-height: 1.58;
  }

  .topbar {
    gap: 6px 10px;
    min-height: auto;
    padding: 9px 12px 10px;
  }

  .brand-mark {
    width: 38px;
    height: 34px;
  }

  .topnav {
    gap: 4px;
    padding: 3px;
    border-radius: 7px;
    scrollbar-width: none;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .topnav a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 13px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .topbar .primary-action {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 0.9rem;
  }

  .primary-action,
  .solid,
  .ghost,
  .text-action,
  .tag-cloud button,
  .album-strip button {
    min-height: 44px;
  }

  .primary-action,
  .solid,
  .ghost {
    padding: 10px 13px;
  }

  .home-grid,
  .content-band,
  .vote-hero,
  .admin-dashboard,
  .persona-cover,
  .album-cover,
  .magazine-spread,
  .studio-layout {
    width: min(100% - 24px, 1180px);
  }

  .home-grid {
    gap: 16px;
    padding: 14px 0 12px;
  }

  .brand span:last-child {
    display: none;
  }

  .primary-action {
    padding-inline: 12px;
  }

  h1 {
    margin-bottom: 12px;
    font-size: clamp(2.35rem, 13vw, 3.35rem);
    line-height: 0.98;
  }

  h2 {
    margin-bottom: 12px;
    font-size: clamp(1.35rem, 8vw, 2rem);
    line-height: 1.14;
  }

  .kicker {
    margin-bottom: 9px;
  }

  .feature-panel {
    border-radius: 0;
  }

  .feature-copy {
    padding: 22px;
  }

  .feature-lead,
  .vote-hero p,
  .persona-copy p,
  .album-cover p,
  .chapter p,
  .profile-info dd,
  .prompt-box p {
    line-height: 1.64;
  }

  .meta-row {
    margin: 18px 0;
    gap: 8px;
  }

  .meta-row span {
    padding-right: 10px;
  }

  .action-row,
  .profile-actions,
  .album-actions,
  .studio-actions,
  .candidate-actions {
    gap: 8px;
  }

  .feature-image-stack {
    min-height: 300px;
    order: -1;
  }

  .feature-image-stack img:first-child {
    width: 72%;
    height: 78%;
    margin: 24px 0 0 8%;
  }

  .feature-image-stack img:last-child {
    right: 8%;
    bottom: 24px;
    width: 34%;
    border-width: 7px;
  }

  .sidebar-block,
  .mag-card-body,
  .candidate-body,
  .profile-info,
  .persona-albums,
  .comments-panel,
  .studio-panel,
  .studio-preview,
  .admin-tool-panel {
    padding: 18px;
  }

  .content-band {
    padding: 34px 0;
  }

  .section-heading {
    gap: 8px;
    margin-bottom: 16px;
  }

  .magazine-grid,
  .candidate-grid,
  .admin-candidate-list,
  .generated-grid,
  .workflow-list {
    gap: 12px;
  }

  .magazine-shelf {
    gap: 18px 12px;
    min-height: 320px;
    padding: 14px 12px 112px;
  }

  .shelf-magazine {
    grid-template-columns: 20px minmax(104px, 132px);
    min-height: 224px;
  }

  .shelf-magazine-caption {
    left: 20px;
    bottom: -72px;
  }

  .line {
    display: inline;
  }

  .feature-lead .line,
  blockquote .line {
    display: block;
  }

  .feed-sidebar,
  .magazine-grid,
  .candidate-grid,
  .admin-candidate-item,
  .album-strip,
  .chapter-grid,
  .generated-grid,
  .workflow-list div {
    grid-template-columns: 1fr;
  }

  .workflow-list div {
    gap: 6px;
    padding: 14px 0;
  }

  .admin-candidate-item img {
    width: 100%;
  }

  .section-heading,
  .preview-header {
    align-items: start;
    flex-direction: column;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .admin-login {
    grid-template-columns: 1fr;
  }

  .vote-hero {
    min-height: auto;
    gap: 16px;
    padding: 30px 0 28px;
  }

  .vote-rules {
    padding: 18px;
  }

  .candidate-body h3 {
    font-size: 1.72rem;
  }

  .candidate-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .candidate-actions .solid,
  .candidate-actions .ghost,
  .comment-form .solid,
  .studio-actions .solid,
  .studio-actions .ghost {
    width: 100%;
  }

  .persona-cover,
  .album-cover {
    gap: 22px;
    min-height: auto;
    padding: 22px 0 28px;
  }

  .persona-copy,
  .album-cover > div {
    order: -1;
  }

  .persona-portrait {
    justify-self: center;
    width: min(82vw, 330px);
  }

  .album-cover img {
    max-height: 44vh;
  }

  .album-cover::before {
    top: 4px;
    font-size: clamp(2.35rem, 14vw, 4.2rem);
  }

  .album-cover > div {
    padding-top: 18px;
  }

  blockquote {
    margin: 16px 0 22px;
    padding-left: 16px;
    font-size: clamp(1.15rem, 6vw, 1.55rem);
    line-height: 1.48;
  }

  .album-strip {
    gap: 10px;
  }

  .magazine-spread {
    gap: 54px;
    padding-bottom: 52px;
  }

  .chapter {
    padding-top: 22px;
  }

  .chapter-copy {
    max-width: none;
  }

  .chapter-copy h2,
  .chapter-grid h2 {
    font-size: clamp(2.2rem, 13vw, 3.35rem);
    line-height: 0.92;
  }

  .chapter-number {
    margin-bottom: 14px;
    font-size: clamp(4rem, 22vw, 6.8rem);
  }

  .chapter-wide,
  .chapter-wide.is-reversed,
  .chapter-grid {
    gap: 14px;
  }

  .chapter-image img,
  .chapter-wide img {
    aspect-ratio: 4 / 5;
  }

  .admin-page {
    display: flex;
    flex-direction: column;
    padding-bottom: 48px;
  }

  .admin-dashboard {
    gap: 14px;
    margin-top: 18px;
    order: 2;
  }

  .studio-layout {
    gap: 14px;
    order: 1;
    padding: 18px 0 48px;
  }

  .studio-panel h1 {
    font-size: clamp(2rem, 11vw, 2.9rem);
  }

  .admin-panel {
    margin: 14px 0 18px;
    padding: 14px;
  }

  .candidate-form,
  .studio-form {
    gap: 12px;
  }

  .comment-form input,
  .studio-form input,
  .studio-form select,
  .studio-form textarea,
  .candidate-form input,
  .candidate-form select,
  .candidate-form textarea,
  .admin-login input {
    min-height: 46px;
    font-size: 16px;
  }

  .studio-form textarea,
  .candidate-form textarea {
    min-height: 130px;
  }

  .admin-candidate-item {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
  }

  .admin-candidate-item img {
    width: 84px;
  }

  .candidate-admin-actions {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .publish-winner-panel {
    margin-bottom: 14px;
    padding: 14px;
  }

  .publish-winner-panel button {
    width: 100%;
  }

  .generation-job-item {
    grid-template-columns: 1fr;
  }

  .generation-job-item button,
  .generation-job-item > span {
    width: 100%;
    text-align: center;
  }

  .admin-candidate-item button {
    width: 100%;
  }

  .sequel-issue-form {
    grid-template-columns: 1fr;
  }

  .sequel-issue-form button {
    width: 100%;
  }

  .preview-header {
    gap: 8px;
  }

  #generationState,
  #adminState,
  #imageProviderState {
    min-width: 0;
    width: fit-content;
  }

  .generated-tile button {
    right: 8px;
    bottom: 8px;
  }

  .prompt-box {
    margin-top: 14px;
    padding: 14px;
  }
}
