@import url("https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=Noto+Serif+KR:wght@600;700&display=swap");

:root {
  --paper: #fbfaf7;
  --paper-deep: #f0e8db;
  --ink: #182521;
  --muted: #68716d;
  --line: #ded5c7;
  --forest: #153f39;
  --forest-2: #245e55;
  --berry: #a84238;
  --gold: #c68d2f;
  --sky: #365c86;
  --kakao: #fee500;
  --shadow: 0 18px 48px rgba(24, 37, 33, 0.13);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(21, 63, 57, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, var(--paper) 0%, #f6f1e9 100%);
  background-size: 42px 42px, auto;
  font-family: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
textarea,
input {
  font: inherit;
}

.site-header {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--forest);
  border-radius: 50%;
  color: var(--paper);
  background: var(--forest);
  font-size: 0.78rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Noto Serif KR", serif;
  font-size: 1.18rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.82rem;
}

main {
  width: 100%;
}

.hero-shell,
.narrow-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 164px);
  padding: 46px 0 70px;
}

.hero-copy h1,
.section-heading h1 {
  margin: 0;
  font-family: "Noto Serif KR", serif;
  font-weight: 700;
  line-height: 1.16;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
  text-wrap: balance;
}

.hero-copy h1 {
  max-width: 680px;
  font-size: 3.18rem;
}

.hero-title span {
  display: block;
}

.section-heading h1 {
  font-size: 2.15rem;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: var(--berry);
  font-size: 0.94rem;
  font-weight: 700;
}

.lead {
  max-width: 560px;
  margin: 24px 0 34px;
  color: #3b4844;
  font-size: 1.18rem;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: normal;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--forest);
  border-radius: 6px;
  padding: 0 20px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(24, 37, 33, 0.12);
}

.button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.button.primary {
  color: #fff;
  background: var(--forest);
}

.button.secondary {
  color: #fff;
  background: var(--sky);
  border-color: var(--sky);
}

.button.ghost {
  color: var(--forest);
  background: transparent;
}

.button.kakao {
  color: #181600;
  background: var(--kakao);
  border-color: #e2c900;
}

.button.large {
  min-width: 164px;
  min-height: 54px;
  font-size: 1.04rem;
}

.voice-panel {
  position: relative;
  display: grid;
  gap: 28px;
  align-content: center;
  min-height: 480px;
  padding: 40px 30px;
  border: 1px solid rgba(21, 63, 57, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(240, 232, 219, 0.64)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(21, 63, 57, 0.08) 28px);
  box-shadow: var(--shadow);
}

.voice-panel::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(166, 66, 56, 0.35);
  border-radius: 8px;
  pointer-events: none;
}

.voice-note {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 18px;
  background: #fffdf8;
  box-shadow: 0 10px 24px rgba(24, 37, 33, 0.08);
}

.voice-note.to {
  justify-self: end;
  border-color: rgba(54, 92, 134, 0.35);
}

.waveform {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
}

.waveform span {
  display: block;
  width: 9px;
  border-radius: 6px;
  background: var(--forest);
}

.waveform span:nth-child(1),
.waveform span:nth-child(11) {
  height: 36px;
  background: var(--gold);
}

.waveform span:nth-child(2),
.waveform span:nth-child(10) {
  height: 72px;
}

.waveform span:nth-child(3),
.waveform span:nth-child(9) {
  height: 104px;
  background: var(--sky);
}

.waveform span:nth-child(4),
.waveform span:nth-child(8) {
  height: 132px;
}

.waveform span:nth-child(5),
.waveform span:nth-child(7) {
  height: 92px;
  background: var(--berry);
}

.waveform span:nth-child(6) {
  height: 148px;
}

.narrow-shell {
  max-width: 820px;
  padding: 54px 0 72px;
}

.section-heading {
  margin-bottom: 28px;
}

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

.relation-form {
  min-width: 0;
}

.relation-button {
  display: grid;
  width: 100%;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.92);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.relation-button:hover {
  border-color: var(--forest);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(24, 37, 33, 0.1);
}

.relation-label {
  font-family: "Noto Serif KR", serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.relation-description {
  align-self: end;
  color: var(--muted);
  line-height: 1.5;
}

.suggested-question,
.share-preview,
.custom-question,
.question-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 12px 30px rgba(24, 37, 33, 0.08);
}

.suggested-question,
.share-preview,
.custom-question {
  padding: 24px;
}

.suggested-question h2,
.custom-question h2,
.question-group h2 {
  margin: 0 0 18px;
  font-family: "Noto Serif KR", serif;
  font-size: 1.35rem;
  line-height: 1.45;
}

.suggested-question h2 {
  max-width: 620px;
  font-size: 1.7rem;
}

.question-details {
  margin-top: 18px;
  overflow: hidden;
}

.question-details summary {
  padding: 19px 22px;
  cursor: pointer;
  color: var(--forest);
  font-weight: 700;
}

.question-groups {
  display: grid;
  gap: 22px;
  padding: 6px 22px 24px;
}

.question-list {
  display: grid;
  gap: 8px;
}

.question-row button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  width: 100%;
  min-height: 54px;
  border: 1px solid #e7dfd2;
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fffdf8;
  cursor: pointer;
  text-align: left;
}

.question-row button:hover {
  border-color: var(--forest-2);
}

.question-number {
  color: var(--berry);
  font-weight: 700;
}

.custom-question {
  margin-top: 18px;
}

.custom-question label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  color: var(--ink);
  background: #fffdf8;
  line-height: 1.7;
}

textarea:focus {
  outline: 3px solid rgba(36, 94, 85, 0.2);
  border-color: var(--forest);
}

.custom-question .button {
  margin-top: 14px;
}

.share-preview {
  margin-bottom: 18px;
}

.share-message {
  margin: 0 0 20px;
  font-family: "Noto Serif KR", serif;
  font-size: 1.55rem;
  line-height: 1.55;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dl div {
  display: grid;
  gap: 5px;
}

dt {
  color: var(--muted);
  font-size: 0.92rem;
}

dd {
  margin: 0;
  line-height: 1.65;
}

.share-url {
  overflow-wrap: anywhere;
  color: var(--sky);
}

.toggle-line {
  display: grid;
  gap: 6px;
  min-height: 48px;
  margin-bottom: 16px;
  color: var(--muted);
}

.toggle-line label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toggle-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--forest);
}

.toggle-help {
  margin: 0 0 0 28px;
  color: #59645f;
  font-size: 0.94rem;
  line-height: 1.55;
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.status-text {
  flex-basis: 100%;
  min-height: 26px;
  margin: 2px 0 0;
  color: var(--muted);
}

.answer-shell {
  padding-top: 48px;
}

.answer-card,
.recorder-panel,
.reply-question-panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 30px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 14px 34px rgba(24, 37, 33, 0.08);
}

.answer-card h2,
.reply-question-panel h2 {
  margin: 0 0 14px;
  font-family: "Noto Serif KR", serif;
  font-size: 1.55rem;
  line-height: 1.45;
  word-break: keep-all;
}

.answer-listen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.recorder-panel {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.recorder-meter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(100%, 280px);
  min-height: 92px;
}

.recorder-meter span {
  display: block;
  width: 10px;
  border-radius: 99px;
  background: var(--forest);
  opacity: 0.9;
}

.recorder-meter span:nth-child(1),
.recorder-meter span:nth-child(5) {
  height: 34px;
  background: var(--gold);
}

.recorder-meter span:nth-child(2),
.recorder-meter span:nth-child(4) {
  height: 62px;
  background: var(--sky);
}

.recorder-meter span:nth-child(3) {
  height: 86px;
  background: var(--berry);
}

.recording-time {
  margin: 0;
  font-family: "Noto Serif KR", serif;
  font-size: 2.2rem;
  line-height: 1;
}

.recording-preview {
  width: min(100%, 520px);
}

.device-warning {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 37, 33, 0.44);
}

.device-warning div {
  width: min(420px, 100%);
  border-radius: 8px;
  padding: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.device-warning strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Noto Serif KR", serif;
  font-size: 1.3rem;
}

.reply-options {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.reply-options details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(251, 250, 247, 0.72);
}

.reply-options summary {
  cursor: pointer;
  color: var(--forest);
  font-weight: 700;
}

.question-groups.compact {
  margin-top: 16px;
}

.question-groups.compact .question-group h3 {
  margin: 18px 0 10px;
  color: var(--berry);
  font-size: 0.98rem;
}

.quiet-copy {
  color: var(--muted);
  line-height: 1.7;
  word-break: keep-all;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.78);
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.footer-inner p {
  margin: 4px 0;
}

@media (max-width: 1080px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
  }

  .hero-copy h1 {
    max-width: 600px;
    font-size: 2.72rem;
  }

  .voice-panel {
    min-height: 420px;
    padding: 34px 26px;
  }
}

@media (max-width: 980px) {
  .hero-shell {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
    padding-top: 34px;
  }

  .hero-copy h1 {
    max-width: 620px;
    font-size: 2.35rem;
  }

  .voice-panel {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero-shell,
  .narrow-shell,
  .footer-inner {
    width: min(100% - 24px, 1120px);
  }

  .section-heading h1 {
    font-size: 1.78rem;
  }

  .hero-copy h1 {
    font-size: 1.95rem;
  }

  .relation-grid {
    grid-template-columns: 1fr;
  }

  .question-row button {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .share-message {
    font-size: 1.28rem;
  }

  .action-stack .button {
    width: 100%;
  }

  .answer-card,
  .recorder-panel,
  .reply-question-panel {
    padding: 22px 18px;
  }

  .answer-listen-row .button {
    width: 100%;
  }

  .recording-time {
    font-size: 1.9rem;
  }
}
