* {
  box-sizing: border-box;
}

:root {
  --ink: #171717;
  --paper: #f4efe3;
  --paper-deep: #e7ddca;
  --red: #a91f24;
  --line: rgba(23, 23, 23, 0.28);
  --muted: #6f6a61;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,.08), transparent 35%),
    linear-gradient(135deg, #151515, #2a2927);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 28px 18px 80px;
}

.hero {
  color: #fff;
  text-align: center;
  padding: 44px 16px 38px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: .12em;
  opacity: .7;
}

.hero-copy {
  margin: 10px 0 14px;
  font-size: 18px;
  line-height: 1.9;
  opacity: .92;
  word-break: keep-all;
}

.book-title {
  display: inline-block;
  border-bottom: 1px solid rgba(255,255,255,.45);
  padding: 0 2px 5px;
  font-weight: 800;
}

.form-card,
.result-wrap {
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
}

.form-card {
  padding: 28px 22px;
}

.section-heading,
.form-card > div:first-child + div {
  display: contents;
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

h2 {
  margin: 0 0 8px;
  font-size: 25px;
}

.form-card > div p,
.section-heading p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.field {
  display: block;
  margin-top: 18px;
}

.field > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 800;
}

.field em,
.field strong {
  font-size: 11px;
  font-style: normal;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
}

.field strong {
  color: var(--red);
  border-color: rgba(169,31,36,.35);
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(23,23,23,.4);
  background: rgba(255,255,255,.42);
  color: var(--ink);
  border-radius: 0;
  padding: 14px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(23,23,23,.08);
}

textarea {
  resize: vertical;
  min-height: 112px;
  line-height: 1.55;
}

.field small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  text-align: right;
}

.primary-btn,
.secondary-btn {
  width: 100%;
  min-height: 52px;
  border: 0;
  padding: 13px 18px;
  font-weight: 900;
}

.primary-btn {
  margin-top: 22px;
  color: #fff;
  background: var(--ink);
}

.secondary-btn {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.privacy-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.result-wrap {
  margin-top: 22px;
  padding: 28px 18px 34px;
}

.is-hidden {
  display: none;
}

.document-preview {
  background: #c7bba6;
  padding: 12px;
  overflow: hidden;
}

.doc-frame {
  position: relative;
  min-height: 760px;
  padding: 34px 26px 28px;
  border: 1px solid #565149;
  background:
    linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)),
    repeating-linear-gradient(0deg, rgba(0,0,0,.016), rgba(0,0,0,.016) 1px, transparent 1px, transparent 3px),
    var(--paper);
  font-family: "Batang", "Times New Roman", serif;
}

.doc-frame h3 {
  margin: 8px 0 9px;
  font-size: clamp(30px, 7vw, 45px);
  letter-spacing: .34em;
  text-indent: .34em;
  text-align: center;
  font-weight: 500;
}

.doc-rule {
  width: 62%;
  height: 1px;
  margin: 0 auto 32px;
  background: #6c665c;
}

.doc-meta,
.doc-result {
  margin: 0;
}

.doc-meta > div,
.doc-result > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

dt {
  font-weight: 700;
}

dd {
  margin: 0;
}

.doc-body {
  margin: 46px 0 20px;
  line-height: 1.9;
  text-align: center;
}

blockquote {
  margin: 18px 0 32px;
  padding: 20px 14px;
  border-top: 1px solid #797268;
  border-bottom: 1px solid #797268;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
  word-break: keep-all;
}

.doc-result {
  margin-top: 30px;
}

.doc-date {
  margin: 40px 0 0;
  text-align: center;
}

.stamp {
  position: absolute;
  right: 26px;
  bottom: 170px;
  width: 92px;
  height: 92px;
  border: 5px double var(--red);
  border-radius: 50%;
  color: var(--red);
  display: grid;
  place-items: center;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-weight: 1000;
  line-height: 1.05;
  text-align: center;
  transform: rotate(-10deg);
  opacity: .84;
}

.doc-footer {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 24px;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid #797268;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.doc-footer strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

.doc-footer p {
  margin: 0 0 4px;
  font-size: 13px;
}

.doc-footer span {
  color: #645f56;
  font-size: 11px;
}

.mini-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.1);
}

.mini-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.actions .primary-btn {
  margin-top: 0;
}

.text-btn,
.restart-btn {
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 10px;
}

.share-feedback {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(23, 23, 23, .25);
  background: rgba(255, 255, 255, .35);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.event-note {
  margin-top: 26px;
  padding: 20px;
  border: 1px solid var(--ink);
}

.event-note h3 {
  margin: 0 0 10px;
}

.event-note p {
  margin: 0;
  line-height: 1.65;
}

.hashtags {
  margin-top: 10px !important;
  color: var(--red);
  font-weight: 800;
}

.restart-btn {
  display: block;
  margin: 18px auto 0;
}

@media (min-width: 700px) {
  .page-shell {
    padding-top: 46px;
  }

  .form-card,
  .result-wrap {
    padding: 38px 42px;
  }

  .document-preview {
    padding: 20px;
  }

  .doc-frame {
    min-height: 820px;
    padding: 42px 48px 34px;
  }

  .doc-footer {
    left: 48px;
    right: 48px;
  }

  .stamp {
    right: 48px;
  }

  .actions {
    grid-template-columns: 1.4fr 1fr;
  }

  .actions .text-btn {
    grid-column: 1 / -1;
  }
}
