/* Pebbie 베타 랜딩. :root의 토큰은 DESIGN.md(_bmad-output/initiative-mori/ux-mori/DESIGN.md) 앞머리를 이름 그대로 옮긴 것이고 원본은 DESIGN.md다.
   --type-display-*, --shadow-*, --scrim*, --wave-tile만 랜딩 전용으로 더했다(앱 화면에는 없는 큰 제목·떠 있는 면).
   아래 규칙은 이 변수만 쓴다(test/design.test.ts가 :root 밖의 hex와 변수 밖의 글자 크기를 막는다). */
:root {
  --color-room-base: #E5D8C7;
  --color-surface-paper: #FCFAF5;
  --color-surface-panel: #FFFCF1;
  --color-surface-card: #F4F5E6;
  --color-surface-tag: #E2EACE;
  --color-surface-icon: #E0EBE2;
  --color-surface-glass: #FFFDF3BF;
  --color-line: #DDDCD1;
  --color-field-border: #8D8C82;
  --color-ink-primary: #34443C;
  --color-ink-secondary: #6B7167;
  --color-action: #526E5B;
  --color-on-action: #FFFDF7;
  --color-chat-user: #526F5E;
  --color-on-chat-user: #FFFDF6;
  --color-chat-mori: #FFFEF6;
  --color-on-chat-mori: #34473B;
  --color-end-surface: #E1DBD0;
  --color-end-ink: #656158;
  --color-mic-on-surface: #FFFDF3;
  --color-mic-on-ink: #506455;
  --color-mic-off-surface: #F2E2D9;
  --color-mic-off-ink: #87564B;
  --color-badge-chat: #7D5947;
  --color-badge-count: #587360;
  --color-on-badge: #FFFDF4;
  --color-focus: #557D63;
  --color-danger: #A75F53;

  /* 글꼴은 두 가족뿐이라 가족만 둘로 둔다(DESIGN typography의 ui·record-body). */
  --type-ui-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --type-record-body-family: "Gowun Dodum", "Apple SD Gothic Neo", sans-serif;
  --type-ui-size: 15px; --type-ui-weight: 400; --type-ui-line: 1.6;
  --type-record-title-size: 21px; --type-record-title-weight: 650; --type-record-title-line: 1.42;
  --type-record-body-size: 18px; --type-record-body-weight: 400; --type-record-body-line: 1.8;
  --type-panel-heading-size: 18px; --type-panel-heading-weight: 650; --type-panel-heading-line: 1.4;
  --type-speech-size: 17px; --type-speech-weight: 450; --type-speech-line: 1.6;
  --type-list-sentence-size: 18px; --type-list-sentence-weight: 400; --type-list-sentence-line: 1.65;
  --type-chat-size: 15px; --type-chat-weight: 400; --type-chat-line: 1.7;
  --type-label-size: 16px; --type-label-weight: 600; --type-label-line: 1.4;
  --type-secondary-size: 14px; --type-secondary-weight: 400; --type-secondary-line: 1.6;
  --type-timestamp-size: 12px; --type-timestamp-weight: 400; --type-timestamp-line: 1.4;
  --type-badge-size: 12px; --type-badge-weight: 700; --type-badge-line: 1;

  /* 웹 전용 표시 크기(DESIGN typography 밖). 390px에서 아래 끝, 1280px에서 위 끝 가까이에 닿는다. */
  --type-display-weight: 700;
  --type-display-hero-size: clamp(36px, 3.3vw + 23px, 68px); --type-display-hero-line: 1.2;
  --type-display-section-size: clamp(29px, 1.8vw + 22px, 46px); --type-display-section-line: 1.28;
  --type-display-statement-size: clamp(23px, 0.9vw + 19.5px, 31px); --type-display-statement-line: 1.35;
  --type-display-lede-size: clamp(18px, 0.4vw + 16.5px, 21px); --type-display-lede-line: 1.7;
  --type-display-card-size: clamp(21px, 0.4vw + 19.5px, 25px); --type-display-card-line: 1.4;

  --radius-tag: 7px;
  --radius-field: 13px;
  --radius-card: 20px;
  --radius-speech: 26px;
  --radius-panel: 30px;
  --radius-full: 9999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-gutter: 16px;
  --space-touch: 44px;
  --space-voice-height: 54px;
  --space-voice-height-short: 48px;
  --space-voice-start-width: 160px;
  --space-voice-start-width-narrow: 144px;
  --space-home-mic: 48px;
  --space-call-bar-height: 50px;
  --space-canvas-hero: 76px;
  --space-canvas-head: 52px;
  /* 랜딩 전용: 섹션 사이 숨 */
  --space-band: clamp(64px, 5vw + 44px, 128px);

  /* DESIGN Elevation: V14 시트 그림자 */
  --shadow-sheet: 0 -5px 35px #4B412B1A;
  /* 랜딩 전용: 바탕에서 뜬 면 */
  --shadow-lift: 0 18px 50px #4B412B26;
  --shadow-soft: 0 6px 22px #4B412B1F;
  --scrim: #2B352FA6;
  /* 랜딩 전용: 그림 위 음성 자막 바탕(밝은 그림 위에서도 글자 대비 4.5:1 이상), 소리 물결 무늬 */
  --scrim-caption: #2B352FE0;
  --wave-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='24'%3E%3Cg fill='black'%3E%3Crect x='2' y='9' width='3' height='6' rx='1.5'/%3E%3Crect x='9' y='5' width='3' height='14' rx='1.5'/%3E%3Crect x='16' y='1' width='3' height='22' rx='1.5'/%3E%3Crect x='23' y='7' width='3' height='10' rx='1.5'/%3E%3Crect x='30' y='3' width='3' height='18' rx='1.5'/%3E%3Crect x='37' y='8' width='3' height='8' rx='1.5'/%3E%3Crect x='44' y='2' width='3' height='20' rx='1.5'/%3E%3Crect x='51' y='6' width='3' height='12' rx='1.5'/%3E%3C/g%3E%3C/svg%3E");
}

@font-face {
  font-family: "Gowun Dodum";
  src: url("/assets/gowun-dodum-subset.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(.signup-dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--color-room-base);
  color: var(--color-ink-primary);
  font-family: var(--type-ui-family);
  font-size: var(--type-speech-size);
  font-weight: var(--type-ui-weight);
  line-height: var(--type-list-sentence-line);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img { max-width: 100%; }
a { color: var(--color-action); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--space-gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 머리 */
.site-head { position: relative; z-index: 5; padding: var(--space-3) 0; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--space-touch); }
.wordmark {
  display: inline-flex;
  align-items: baseline;
  min-height: var(--space-touch);
  gap: var(--space-2);
  color: var(--color-ink-primary);
  font-size: var(--type-display-card-size);
  font-weight: var(--type-display-weight);
  line-height: var(--space-touch);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark-ko { font-size: var(--type-secondary-size); font-weight: var(--type-label-weight); letter-spacing: 0; }
.site-head .head-cta { display: none; }

/* 버튼: 대화하기와 같은 세이지 알약 */
.button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--space-voice-height);
  min-width: var(--space-voice-start-width);
  padding: var(--space-2) var(--space-6);
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-action);
  color: var(--color-on-action);
  font: inherit;
  font-size: var(--type-speech-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-label-line);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.button:hover { box-shadow: var(--shadow-soft); }
.button:active { transform: scale(0.98); }
.button:disabled { cursor: progress; opacity: 0.75; }
.button-large { min-height: 60px; padding: var(--space-3) 40px; font-size: var(--type-list-sentence-size); }
/* 신청 버튼은 JS가 hidden을 풀 때만 보인다(.button의 display보다 앞서야 한다). */
[data-open-signup][hidden] { display: none; }
.button-quiet {
  min-height: var(--space-touch);
  min-width: 0;
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--color-action);
  background: var(--color-surface-paper);
  color: var(--color-ink-primary);
  font-size: var(--type-label-size);
}
/* 소리 물결: 목소리라는 표식. 움직이지 않는다(반복 강조는 후광 하나). */
.sprite { position: absolute; width: 0; height: 0; }
.wave, .wave-strip {
  display: block;
  flex: none;
  height: 24px;
  background: currentColor;
  -webkit-mask: var(--wave-tile) left center repeat-x;
  mask: var(--wave-tile) left center repeat-x;
}
.wave { width: 28px; height: 18px; -webkit-mask-size: auto 18px; mask-size: auto 18px; }

/* 후광은 한 화면에 하나뿐인 반복 강조(DESIGN Motion): 첫 화면의 신청 버튼에만 단다. 받기 표식은 누를 수 없는 그림이라 달지 않는다. */
.halo::after {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid color-mix(in srgb, var(--color-action) 35%, transparent);
  background: color-mix(in srgb, var(--color-action) 8%, transparent);
  pointer-events: none;
  animation: halo 3.4s ease-in-out infinite;
}
@keyframes halo {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.03, 1.08); }
}

/* 말풍선: 앱 채팅과 같은 색(chat-user, chat-mori). 글로 남기는 길을 소개하는 한 곳(.chat-mini)에만 쓴다. */
.say {
  position: relative;
  width: fit-content;
  max-width: min(86%, 22em);
  padding: var(--space-3) 18px;
  border-radius: var(--radius-speech);
  font-size: var(--type-speech-size);
  font-weight: var(--type-speech-weight);
  line-height: var(--type-speech-line);
}
.say-pebbie {
  background: var(--color-chat-mori);
  color: var(--color-on-chat-mori);
  border-bottom-left-radius: var(--radius-tag);
  box-shadow: var(--shadow-soft);
}
.say-me {
  align-self: flex-end;
  background: var(--color-chat-user);
  color: var(--color-on-chat-user);
  border-bottom-right-radius: var(--radius-tag);
}
/* 페비 말풍선 옆 얼굴 */
.say-pebbie { margin-left: 46px; }
.say-pebbie::before {
  content: "";
  position: absolute;
  left: -46px;
  bottom: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--color-room-base) url("/assets/pebbie-face.webp") center / cover;
}

/* 첫 화면 */
.hero { position: relative; overflow: hidden; }
.hero-copy { position: relative; z-index: 2; padding-top: var(--space-3); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-glass);
  font-size: var(--type-secondary-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-label-line);
}
.eyebrow .wave { color: var(--color-action); }
.hero h1 {
  font-size: var(--type-display-hero-size);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-hero-line);
  letter-spacing: -0.03em;
}
.lede {
  max-width: 25em;
  margin-top: var(--space-4);
  font-size: var(--type-display-lede-size);
  line-height: var(--type-display-lede-line);
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin-top: var(--space-5); }
.hero-note { font-size: var(--type-secondary-size); font-weight: var(--type-label-weight); line-height: var(--type-secondary-line); }
.noscript {
  max-width: 34em;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-field);
  background: var(--color-surface-paper);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-secondary-line);
}
/* 그림은 테두리 없이 방 색으로 스며든다: 페비가 상자 안이 아니라 같은 방에 있는 것처럼. */
.hero-stage { position: relative; margin-top: calc(-1 * var(--space-4)); }
.hero-media {
  display: grid;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 24%);
  mask-image: linear-gradient(to bottom, transparent 0, black 24%);
}
.hero-media img, .hero-media video { grid-area: 1 / 1; display: block; width: 100%; height: auto; }
/* 걸려 온 전화: 누르는 것이 아니라 그림이다. 앱의 통화 조작 색(세이지 받기, 회갈색 끊기)을 쓴다. */
.ring {
  position: absolute;
  top: 5%;
  right: var(--space-gutter);
  left: var(--space-gutter);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 420px;
  padding: var(--space-3);
  border-radius: var(--radius-panel);
  background: var(--color-chat-mori);
  color: var(--color-on-chat-mori);
  box-shadow: var(--shadow-lift);
  animation: ring-in 0.7s 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes ring-in {
  from { opacity: 0; transform: translateY(-14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.ring-face, .callcard-face {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-room-base) url("/assets/pebbie-face.webp") center / cover;
}
.ring-text { display: grid; flex: 1; min-width: 0; }
.ring-name { font-size: var(--type-list-sentence-size); font-weight: var(--type-display-weight); line-height: var(--type-label-line); }
.ring-state { font-size: var(--type-secondary-size); font-weight: var(--type-label-weight); line-height: var(--type-label-line); }
.ring-btn {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
}
.ring-btn svg, .call-icon svg, .callbar-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ring-decline { background: var(--color-end-surface); color: var(--color-end-ink); }
.ring-decline svg { transform: rotate(135deg); }
.ring-accept { margin-left: var(--space-1); margin-right: var(--space-1); background: var(--color-action); color: var(--color-on-action); }

/* 그림 위 음성 자막: 페비가 소리 내어 한 말 */
.voice-cap {
  position: absolute;
  left: 50%;
  bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: max-content;
  max-width: calc(100% - 2 * var(--space-4));
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-field);
  background: var(--scrim-caption);
  color: var(--color-on-action);
  font-size: var(--type-speech-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-speech-line);
  transform: translateX(-50%);
}

/* 띠 */
.band { padding: var(--space-band) 0; }
.band-paper { background: var(--color-surface-paper); }
.band-room { background: var(--color-room-base); }
.band-deep { background: var(--color-action); color: var(--color-on-action); }
.band-sheet {
  position: relative;
  z-index: 3;
  margin-top: calc(-1 * var(--radius-panel));
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  box-shadow: var(--shadow-sheet);
}
.band-day { padding-top: 0; }
.section-head { max-width: 30em; margin-bottom: var(--space-6); }
.section-head h2, .faq-wrap h2, .closing h2 {
  font-size: var(--type-display-section-size);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-section-line);
  letter-spacing: -0.025em;
}
.section-head p { margin-top: var(--space-3); font-size: var(--type-display-lede-size); line-height: var(--type-display-lede-line); }

/* 페비는 이런 친구예요: 그림 칸과 대화 칸을 번갈아 둔다 */
.traits { display: grid; gap: var(--space-4); }
.trait {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-panel);
  background: var(--color-surface-card);
}
.trait-sage { background: var(--color-surface-tag); }
.trait-media { position: relative; }
.trait-media img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.trait-body { padding: var(--space-5); }
.trait-num {
  margin-bottom: var(--space-2);
  color: var(--color-mic-on-ink);
  font-size: var(--type-secondary-size);
  font-weight: var(--type-badge-weight);
  line-height: var(--type-label-line);
  letter-spacing: 0.08em;
}
.trait h3, .moment h3, .keeps h3 {
  font-size: var(--type-display-card-size);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-card-line);
  letter-spacing: -0.015em;
}
.trait-body p:last-child { margin-top: var(--space-2); font-size: var(--type-list-sentence-size); line-height: var(--type-list-sentence-line); }
/* 통화 기록: 말풍선이 아니라 통화 머리(전화 표식·길이) + 소리 물결 + 받아 적은 말 */
.calls { display: grid; gap: var(--space-3); margin-top: auto; padding: 0 var(--space-4) var(--space-4); }
.call { padding: var(--space-4); border-radius: var(--radius-card); background: var(--color-surface-paper); }
.call-head, .callcard-cap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--type-secondary-size);
  font-weight: var(--type-badge-weight);
  line-height: var(--type-label-line);
}
.call-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--color-action);
  color: var(--color-on-action);
}
.call-icon svg { width: 15px; height: 15px; }
.call-len {
  margin-left: auto;
  padding-left: var(--space-2);
  color: var(--color-ink-secondary);
  font-size: var(--type-timestamp-size);
  font-weight: var(--type-label-weight);
  white-space: nowrap;
}
.call .wave-strip { margin: var(--space-3) 0 var(--space-1); color: color-mix(in srgb, var(--color-action) 55%, transparent); }
.line {
  display: grid;
  grid-template-columns: 2.6em 1fr;
  gap: var(--space-2);
  align-items: baseline;
  margin-top: var(--space-2);
  font-size: var(--type-speech-size);
  line-height: var(--type-speech-line);
}
.who { color: var(--color-ink-secondary); font-size: var(--type-secondary-size); font-weight: var(--type-badge-weight); }
.line-pebbie { font-weight: var(--type-label-weight); }
.line-pebbie .who { color: var(--color-action); }
.sample-note { margin-top: var(--space-4); font-size: var(--type-secondary-size); line-height: var(--type-secondary-line); color: var(--color-ink-secondary); }

/* 페비와 보내는 하루 */
.timeline { display: grid; gap: 44px; }
.moment-media { position: relative; overflow: hidden; border-radius: var(--radius-panel); }
.moment-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.moment-time {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: 6px var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-surface-paper);
  font-size: var(--type-label-size);
  font-weight: var(--type-badge-weight);
  line-height: var(--type-label-line);
}
.moment-body { padding: var(--space-4) var(--space-2) 0; }
.moment-body > p { margin-top: var(--space-2); font-size: var(--type-list-sentence-size); line-height: var(--type-list-sentence-line); }
/* 글 말풍선은 여기 한 곳: 통화하기 어려울 때 글로 남기는 길 */
.chat-mini { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--radius-card); background: var(--color-surface-card); }
.chat-mini figcaption { margin-bottom: var(--space-1); font-size: var(--type-secondary-size); font-weight: var(--type-label-weight); line-height: var(--type-label-line); }
.chat-mini .say-pebbie { border: 1px solid var(--color-line); box-shadow: none; }
/* 기록 느낌의 글(일기·편지)만 고운돋움 */
.note {
  position: relative;
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5) var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--space-1) var(--radius-card) var(--radius-card) var(--radius-card);
  background: var(--color-surface-panel);
  box-shadow: var(--shadow-soft);
  transform: rotate(-0.6deg);
}
.note-label { color: var(--color-ink-secondary); font-size: var(--type-secondary-size); font-weight: var(--type-label-weight); line-height: var(--type-label-line); }
.record { margin-top: var(--space-2); font-family: var(--type-record-body-family); font-size: var(--type-record-body-size); line-height: var(--type-record-body-line); }

/* 말로, 쉽게: 짙은 세이지 띠에 큰 약속 넷 */
.easy-grid { display: grid; gap: var(--space-6); }
.promises li { padding: var(--space-5) 0; border-top: 1px solid color-mix(in srgb, var(--color-on-action) 30%, transparent); }
.promises li:last-child { padding-bottom: 0; }
.promises h3 {
  font-size: var(--type-display-statement-size);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-statement-line);
  letter-spacing: -0.02em;
}
.promises p { margin-top: var(--space-1); font-size: var(--type-list-sentence-size); line-height: var(--type-list-sentence-line); }
/* 통화 중 화면: 앱의 call-bar(불빛 점·'페비와 대화 중'·마이크·회갈색 X)를 그림으로 옮겼다. */
.callcard {
  padding: var(--space-4) var(--space-4) var(--space-5);
  border-radius: var(--radius-panel);
  background: var(--color-surface-paper);
  color: var(--color-ink-primary);
  box-shadow: var(--shadow-lift);
}
.callbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--space-call-bar-height);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-full);
  background: var(--color-surface-panel);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-label-line);
}
.callbar-dot { flex: none; width: 9px; height: 9px; border-radius: var(--radius-full); background: var(--color-action); }
.callbar-time { margin-right: auto; color: var(--color-ink-secondary); font-size: var(--type-secondary-size); font-variant-numeric: tabular-nums; }
.callbar-btn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--radius-full); }
.callbar-btn svg { width: 20px; height: 20px; }
.callbar-mic { border: 1px solid var(--color-line); background: var(--color-mic-on-surface); color: var(--color-mic-on-ink); }
.callbar-end { background: var(--color-end-surface); color: var(--color-end-ink); }
.callcard-voice { display: flex; align-items: center; gap: var(--space-4); margin: var(--space-5) var(--space-1) var(--space-4); }
.callcard-face { width: 64px; height: 64px; }
.callcard-wave { display: grid; flex: 1; gap: var(--space-2); min-width: 0; color: var(--color-action); }
.callcard-label { font-size: var(--type-secondary-size); font-weight: var(--type-badge-weight); line-height: var(--type-label-line); }
.callcard-wave .wave-strip { height: 30px; -webkit-mask-size: auto 30px; mask-size: auto 30px; }
.callcard-cap {
  width: fit-content;
  margin: 0 var(--space-1) var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-card);
}
.callcard .line { margin: var(--space-3) var(--space-1) 0; }

/* 내 이야기는 나만 */
.mine-grid { display: grid; gap: var(--space-6); align-items: center; }
.mine-media { display: block; width: 100%; height: auto; border-radius: var(--radius-panel); box-shadow: var(--shadow-lift); }
.keeps { display: grid; gap: var(--space-5); }
.keeps li { display: flex; gap: var(--space-4); align-items: flex-start; }
.keeps p { margin-top: var(--space-1); font-size: var(--type-list-sentence-size); line-height: var(--type-list-sentence-line); }
.keep-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-surface-paper);
}
.keep-icon svg, .dialog-close svg { width: 24px; height: 24px; fill: none; stroke: var(--color-action); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 자주 묻는 질문 */
.faq-wrap { max-width: 800px; }
.faq { margin-top: var(--space-5); border-top: 1px solid var(--color-line); }
.faq details { border-bottom: 1px solid var(--color-line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 68px;
  padding: var(--space-3) var(--space-1);
  font-size: var(--type-display-lede-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-label-line);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  margin: 0 var(--space-2) var(--space-1);
  border-right: 2px solid var(--color-ink-primary);
  border-bottom: 2px solid var(--color-ink-primary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { margin-bottom: -6px; transform: rotate(225deg); }
.faq details p { max-width: 34em; padding: 0 var(--space-1) var(--space-5); font-size: var(--type-list-sentence-size); line-height: var(--type-list-sentence-line); }

/* 뜻 단위로만 줄을 바꾼다 */
.nw { white-space: nowrap; }

/* 마지막 신청 띠: 그림의 빈 벽이 글 자리 */
.closing { position: relative; display: flex; flex-direction: column-reverse; overflow: hidden; background: var(--color-room-base); }
.closing-copy { position: relative; z-index: 1; padding-top: var(--space-band); padding-bottom: 0; text-align: center; }
.closing-copy p { margin-top: var(--space-3); font-size: var(--type-display-lede-size); line-height: var(--type-display-lede-line); }
.closing-copy .button { margin-top: var(--space-5); }
.closing-copy .noscript { margin-inline: auto; }
.closing-media {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 30%);
  mask-image: linear-gradient(to bottom, transparent 0, black 30%);
  margin-top: -28vw; /* 그림 위쪽 빈 벽을 글 밑으로 겹쳐 페비가 버튼 가까이 오게 */
}
.closing-media img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 84% 50%; }

/* 신청 폼 */
.form { display: grid; gap: var(--space-5); }
.field { display: grid; gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.label, legend {
  padding: 0;
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-label-line);
}
fieldset.field legend { margin-bottom: var(--space-2); }
.req, .opt {
  display: inline-block;
  margin-left: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-tag);
  font-size: var(--type-badge-size);
  font-weight: var(--type-badge-weight);
  line-height: var(--type-timestamp-line);
  vertical-align: 2px;
}
.req { background: var(--color-mic-off-surface); color: var(--color-mic-off-ink); }
.opt { background: var(--color-surface-card); color: var(--color-ink-secondary); }
.hint { color: var(--color-ink-secondary); font-size: var(--type-secondary-size); line-height: var(--type-secondary-line); }
.count { justify-self: end; }
.input {
  width: 100%;
  min-height: var(--space-voice-height);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-field);
  background: var(--color-surface-panel);
  color: var(--color-ink-primary);
  font: inherit;
  font-size: var(--type-speech-size);
  line-height: var(--type-speech-line);
}
.input::placeholder { color: var(--color-ink-secondary); }
.input:focus-visible { border-color: var(--color-action); }
.textarea { display: block; min-height: 84px; resize: vertical; }

.choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choices-two { display: grid; grid-template-columns: 1fr 1fr; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--space-voice-height-short);
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-3);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-full);
  background: var(--color-surface-panel);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  cursor: pointer;
}
.choices-two .choice { justify-content: center; min-height: var(--space-voice-height); border-radius: var(--radius-field); font-weight: var(--type-label-weight); }
/* 고른 것은 색만이 아니라 표시(체크·점)와 굵은 테두리로도 보인다. */
.choice:has(input:checked) { border-color: var(--color-action); background: var(--color-surface-tag); box-shadow: inset 0 0 0 1px var(--color-action); }
.choice:has(input:focus-visible), .consent:has(input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.choice input, .consent input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--color-field-border);
  border-radius: var(--radius-tag);
  background: var(--color-surface-paper);
  cursor: pointer;
}
.choice input[type="radio"] { border-radius: var(--radius-full); }
.choice input:focus-visible, .consent input:focus-visible { outline: none; }
.choice input:checked, .consent input:checked { border-color: var(--color-action); background: var(--color-action); }
.choice input[type="checkbox"]:checked::before, .consent input:checked::before {
  content: "";
  width: 11px;
  height: 6px;
  margin-top: -3px;
  border-left: 2.5px solid var(--color-on-action);
  border-bottom: 2.5px solid var(--color-on-action);
  transform: rotate(-45deg);
}
.choice input[type="radio"]:checked::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-on-action); }

.consent {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--color-surface-card);
  cursor: pointer;
}
.consent input { width: 26px; height: 26px; margin-top: 1px; }
.consent input:checked::before { width: 13px; height: 7px; }
.consent-text { font-size: var(--type-secondary-size); line-height: var(--type-secondary-line); }
.consent-text strong { display: block; margin-bottom: var(--space-1); font-size: var(--type-label-size); font-weight: var(--type-label-weight); line-height: var(--type-ui-line); }
.consent-text a { display: inline-block; padding: var(--space-1) 0; font-weight: var(--type-label-weight); }

.input[aria-invalid="true"] { border-color: var(--color-danger); border-width: 2px; }
fieldset[aria-invalid="true"] .choice { border-color: var(--color-danger); border-width: 2px; }
.consent:has(input[aria-invalid="true"]) { box-shadow: inset 0 0 0 2px var(--color-danger); }
.error {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  color: var(--color-danger);
  font-size: var(--type-secondary-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-secondary-line);
}
.error[hidden] { display: none; }
.error-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: var(--radius-full);
  background: var(--color-danger);
  color: var(--color-on-action);
  font-size: var(--type-badge-size);
  font-weight: var(--type-badge-weight);
  line-height: var(--type-badge-line);
}
.submit { width: 100%; }

/* 봇 거르기 칸: 화면·스크린리더에서 숨김 */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* 신청 창: 모바일은 아래에서 올라온 시트, 넓은 화면은 가운데 창 */
.signup-dialog {
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  background: var(--color-surface-paper);
  color: var(--color-ink-primary);
  box-shadow: var(--shadow-lift);
  overscroll-behavior: contain;
}
.signup-dialog[open] { animation: sheet-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}
.signup-dialog::backdrop { background: var(--scrim); }
.dialog-inner { position: relative; padding: var(--space-5) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom)); }
.dialog-close {
  position: sticky;
  top: var(--space-3);
  z-index: 1;
  float: right;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-2)) 0 var(--space-3);
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-end-surface);
  cursor: pointer;
}
.dialog-close svg { stroke: var(--color-end-ink); stroke-width: 2.2; }
.signup-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-5); }
.signup-face { flex: none; width: 64px; height: 64px; border-radius: var(--radius-full); object-fit: cover; }
.signup-head h2 { font-size: var(--type-display-card-size); font-weight: var(--type-display-weight); line-height: var(--type-display-card-line); letter-spacing: -0.015em; }
.signup-intro { margin-top: 2px; font-size: var(--type-label-size); line-height: var(--type-ui-line); }
/* 성공 화면에는 자체 닫기 버튼이 있다. 떠 있는 X가 가운데 정렬을 밀지 않게 숨긴다. */
.dialog-inner:has(.success) .dialog-close { display: none; }
.success { display: grid; justify-items: center; gap: var(--space-4); padding: var(--space-5) 0 var(--space-2); text-align: center; }
.success img { width: 148px; height: 148px; object-fit: cover; border-radius: var(--radius-full); box-shadow: var(--shadow-soft); }
.success h2 { font-size: var(--type-display-section-size); font-weight: var(--type-display-weight); line-height: var(--type-display-section-line); letter-spacing: -0.02em; }
.success p { max-width: 17em; font-size: var(--type-list-sentence-size); line-height: var(--type-list-sentence-line); }
.success .button { margin-top: var(--space-2); }

/* 모바일 아래 고정 신청 버튼 */
.signup-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  padding: var(--space-3) var(--space-gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: var(--color-surface-glass);
  border-top: 1px solid var(--color-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s ease, visibility 0.25s;
}
.signup-bar .button { width: 100%; }
.signup-bar[data-away] { transform: translateY(110%); visibility: hidden; }
body:has(.signup-dialog[open]) .signup-bar { display: none; }

.site-foot {
  /* 고정 신청 버튼에 가리지 않게 그 높이만큼 더 비운다. */
  padding: var(--space-5) 0 calc(var(--space-5) + 80px + env(safe-area-inset-bottom));
  background: var(--color-surface-paper);
  font-size: var(--type-secondary-size);
  line-height: var(--type-secondary-line);
}
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.site-foot a { display: inline-flex; align-items: center; min-height: var(--space-touch); color: var(--color-ink-primary); }

/* 처리방침 */
.sheet {
  min-height: 80vh;
  background: var(--color-surface-paper);
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  box-shadow: var(--shadow-sheet);
  padding: var(--space-band) 0;
}
.doc { max-width: 720px; }
.doc h1 {
  font-size: var(--type-display-section-size);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-section-line);
  letter-spacing: -0.025em;
}
.doc h2 {
  margin-top: 40px;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-line);
  font-size: var(--type-display-card-size);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-card-line);
}
.doc p, .doc ul { margin-top: var(--space-3); font-size: var(--type-list-sentence-size); line-height: var(--type-list-sentence-line); }
.doc ul { padding-left: 1.2em; list-style: disc; }
.doc li + li { margin-top: var(--space-2); }
.doc .meta { color: var(--color-ink-secondary); font-size: var(--type-label-size); line-height: var(--type-ui-line); }
.doc .meta a { display: inline-flex; align-items: center; min-height: var(--space-touch); margin-top: var(--space-5); font-weight: var(--type-label-weight); }
.doc .draft {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--color-surface-card);
  font-size: var(--type-label-size);
  line-height: var(--type-ui-line);
}

/* 스크롤하면 한 번 떠오른다. hero.js가 html에 .js를 달 때만 숨겨 두므로 JS가 없어도 다 보인다. */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (min-width: 720px) {
  .wrap { padding: 0 var(--space-6); }
  .traits { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); gap: 48px var(--space-6); }
  .ring { left: 12%; right: auto; width: 400px; }
  .closing-media { margin-top: -20vw; }
  .closing-media img { aspect-ratio: 16 / 9; }
}

@media (min-width: 960px) {
  .site-head { position: absolute; top: 0; right: 0; left: 0; padding: var(--space-4) 0; }
  .site-head-plain { position: relative; }
  .site-head .head-cta:not([hidden]) { display: inline-flex; }

  /* 첫 화면: 그림이 화면 높이를 채우고 왼쪽으로 스며든다. */
  .hero { display: grid; align-items: center; min-height: clamp(620px, 100svh, 860px); padding: 96px 0 calc(var(--radius-panel) + 40px); }
  .hero-copy { padding-top: 0; }
  /* 글은 화면 왼쪽 절반을 넘지 않는다: 그림이 스며드는 구간과 겹치지 않게(1000–1100px에서 겹쳤다). */
  .hero-copy > * { max-width: min(560px, 50% - 56px); }
  .lede { max-width: min(22em, 50% - 56px); margin-top: var(--space-5); }
  .hero-actions { margin-top: 40px; }
  .hero-stage { position: absolute; top: 0; bottom: 0; left: calc(50% - 70px); aspect-ratio: 1; margin: 0; }
  .hero-media {
    height: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 26%, black 82%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 26%, black 82%, transparent 100%);
  }
  .hero-media img, .hero-media video { height: 100%; object-fit: cover; }
  /* 무대는 화면 가운데에서 70px 왼쪽에서 시작한다: 좁은 화면에서도 카드 오른쪽 끝이 화면 안에 남게 한다. */
  .ring { top: 13%; left: min(24%, 50vw - 362px); right: auto; width: 400px; padding: var(--space-4); gap: var(--space-4); }
  .ring-face { width: 60px; height: 60px; }
  .ring-btn { width: 54px; height: 54px; }
  .ring-state { font-size: var(--type-label-size); }

  .section-head { margin-bottom: 56px; }
  .traits { grid-template-columns: repeat(12, 1fr); gap: var(--space-5); }
  .trait { grid-column: span 5; }
  .trait-wide { grid-column: span 7; }
  .trait-media { flex: 1; min-height: 0; }
  .trait-body { padding: var(--space-6); }
  .trait-talk .trait-body { padding-bottom: var(--space-5); }
  .calls { padding: 0 var(--space-5) var(--space-5); }
  .voice-cap { bottom: var(--space-5); padding: var(--space-3) var(--space-5); font-size: var(--type-display-lede-size); }

  .timeline { gap: 72px 56px; }
  .moment:nth-child(even) { margin-top: 88px; }
  .moment:nth-child(odd) { margin-bottom: -88px; }
  .timeline { padding-bottom: 88px; }
  .moment-body { padding: var(--space-5) var(--space-3) 0; }
  .moment-time { top: var(--space-4); left: var(--space-4); }

  .easy-grid { grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; }
  .callcard { padding: var(--space-5) var(--space-5) var(--space-6); }

  .mine-grid { grid-template-columns: 1.1fr 0.9fr; gap: 72px; }
  .mine-copy .section-head { margin-bottom: var(--space-6); }

  .faq-wrap { max-width: 860px; }

  /* 마지막 띠: 그림이 띠 전체를 채우고 글은 왼쪽 빈 벽에 얹는다. */
  .closing { display: grid; align-items: center; min-height: min(52vw, 720px); }
  .closing-media { position: absolute; inset: 0; margin: 0; -webkit-mask-image: none; mask-image: none; }
  /* 띠 높이가 720px에서 멈춰 넓은 화면은 위아래가 잘린다. 페비가 그림 아래쪽(49–87%)이라 아래를 남긴다. */
  .closing-media img { width: 100%; height: 100%; aspect-ratio: auto; object-position: 50% 87%; }
  .closing-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, var(--color-room-base) 0, color-mix(in srgb, var(--color-room-base) 70%, transparent) 38%, transparent 62%); }
  .closing-copy { padding-top: var(--space-band); padding-bottom: var(--space-band); text-align: left; }
  .closing-copy .noscript { margin-inline: 0; }

  .signup-dialog { width: min(600px, calc(100% - 48px)); max-height: min(88dvh, 880px); margin: auto; border-radius: var(--radius-panel); }
  .dialog-inner { padding: var(--space-6) 40px 40px; }
  .signup-bar { display: none; }
  .site-foot { padding-bottom: var(--space-5); }
}

@media (prefers-reduced-motion: reduce) {
  .halo::after { animation: none; }
  .hero-media .hero-loop { display: none; }
  .signup-bar { transition: none; }
  .ring, .signup-dialog[open] { animation: none; }
  .button, .faq summary::after { transition: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
