@font-face {
  font-family: "Gowun Batang";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/share/gowun-batang-korean-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Gowun Batang";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/share/gowun-batang-latin-400-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --canvas: #f9f9f7;
  --paper: #fffdf8;
  --ink: #111111;
  --muted: #65655f;
  --line: #d3d3ce;
  --ember: #c43a20;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  min-width: 280px;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: system-ui, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 10px 12px;
  transform: translateY(-160%);
  border: 1px solid var(--ink);
  background: var(--paper);
}

.skip-link:focus {
  transform: translateY(0);
}

.verse-hero {
  position: relative;
  display: grid;
  min-height: min(760px, 78svh);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper) url("/share/sacred-still-life.webp") center / cover no-repeat;
}

.verse-hero::before {
  position: absolute;
  inset: 0;
  background: rgba(249, 249, 247, 0.5);
  content: "";
}

.hero-header,
.verse-content {
  position: relative;
  z-index: 1;
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  align-self: start;
  padding: calc(18px + env(safe-area-inset-top)) clamp(20px, 5vw, 72px) 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--ember);
  color: #ffffff;
  font-weight: 800;
}

.shared-label,
.eyebrow,
.section-label {
  color: var(--ember);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.verse-content {
  width: min(860px, calc(100% - 40px));
  margin: auto auto clamp(46px, 8vh, 96px) clamp(20px, 8vw, 128px);
}

.eyebrow {
  margin: 0 0 22px;
}

.verse-content h1 {
  max-width: 720px;
  margin: 0;
  font-family: "Gowun Batang", "Noto Serif KR", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.28;
}

#verse-body {
  max-width: 820px;
  margin: 18px 0 0;
  font-family: "Gowun Batang", "Noto Serif KR", serif;
  font-size: 50px;
  font-weight: 400;
  line-height: 1.48;
  overflow-wrap: break-word;
  word-break: keep-all;
}

#verse-body[data-density="long"] {
  font-size: 40px;
}

#verse-body[data-density="dense"] {
  font-size: 32px;
}

.translation {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.reflection-band,
.source-band,
footer {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.reflection-band {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.section-label {
  margin: 0 0 12px;
}

.reflection-copy h2,
.source-band h2 {
  margin: 0;
  font-family: "Gowun Batang", "Noto Serif KR", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.35;
}

.reflection-copy > p:last-child,
.source-copy p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
  overflow-wrap: break-word;
  word-break: keep-all;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  background: var(--ink);
  color: #ffffff;
}

.secondary-button {
  background: var(--paper);
  color: var(--ink);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--ember);
  border-color: var(--ember);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--ember);
  color: var(--ember);
}

.source-band {
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
  gap: 56px;
  padding: 56px 0 72px;
}

.source-copy {
  min-width: 0;
}

.source-copy a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.error-state {
  max-width: 560px;
  margin-top: 20px;
}

.error-state p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

footer {
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 26px 0 calc(26px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .verse-hero {
    min-height: 74svh;
    background-position: 62% center;
  }

  .hero-header {
    padding-inline: 20px;
  }

  .shared-label {
    font-size: 11px;
  }

  .verse-content {
    width: calc(100% - 40px);
    margin: auto 20px 44px;
  }

  .verse-content h1 {
    font-size: 22px;
  }

  #verse-body {
    font-size: 32px;
    line-height: 1.5;
    word-break: normal;
  }

  #verse-body[data-density="long"] {
    font-size: 28px;
  }

  #verse-body[data-density="dense"] {
    font-size: 24px;
  }

  .reflection-band,
  .source-band {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 42px 0;
  }

  .actions {
    justify-content: stretch;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  footer {
    grid-template-columns: 1fr;
  }
}

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