/* 모아북 웹사이트 공통 스타일
   색은 앱 Colors.xcassets(background · secondaryBackground · label · secondaryLabel · primary1 · theme<캐릭터>)와
   처음 실행 대화창(FirstRunPalette, PixelFrame)에서 가져왔습니다. 한 칸(--u)은 4px 픽셀입니다. */

:root {
  color-scheme: light dark;
  --u: 4px;

  --bg: #ffffff;
  --page: #f2f3f8;
  --box: #ffffff;
  --text: #000000;
  --text-2: rgba(60, 60, 67, 0.72);
  --outline: #2c3048;
  --inner: #e4e7f1;
  --ink: #26283a;

  --primary1: #007aff;
  --primary2: #ff3b30;
  --pink: #ff6b9a;
  --yellow: #ffc93c;
  --mint: #2fb58f;

  --moa: #007aff;
  --chalkak: #5e5ce6;
  --pola: #1d9bd8;
  --rolly: #e07800;
  --nyang: #12a58a;

  --tint: 12%;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", system-ui, sans-serif;
  --wrap: min(1080px, 100% - 32px);
}

/* 한중일 글꼴은 언어마다 그 나라 글자 모양으로(한국어 글꼴로 한자 · 가나를 그리지 않게).
   일본어 · 중국어는 띄어쓰기가 없어 낱말 단위 줄바꿈(keep-all)을 풀고 금칙 처리를 따릅니다. */
:root:lang(ja) { --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, system-ui, sans-serif; }
:root:lang(zh-Hans) { --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
:root:lang(zh-Hant) { --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; }
:lang(ja) body, :lang(zh) body { word-break: normal; line-break: strict; }
/* 제목은 되는 브라우저에서 구절 단위로 끊음(Chrome 119+, 나머지는 위 규칙) */
:lang(ja) :is(h1, h2, h3), :lang(zh) :is(h1, h2, h3) { word-break: auto-phrase; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --page: #1c1c1e;
    --box: #1c1c1e;
    --text: #ffffff;
    --text-2: rgba(235, 235, 245, 0.7);
    --outline: #ffffff;
    --inner: rgba(255, 255, 255, 0.18);
    --primary1: #0a84ff;
    --primary2: #ff453a;
    --pink: #ff7faa;
    --yellow: #ffd25a;
    --mint: #3ccb9f;
    --moa: #0a84ff;
    --chalkak: #7d7aff;
    --tint: 22%;
  }
}

/* 기본 ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary1); text-underline-offset: 0.2em; }

:focus-visible {
  outline: 3px solid var(--primary1);
  outline-offset: 3px;
}

.wrap { width: var(--wrap); margin-inline: auto; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 12px;
  background: var(--box);
  z-index: 10;
}
.skip:focus { top: 12px; }

/* 캐릭터 자리: main.js가 SVG로 채웁니다. 자바스크립트가 꺼지면 비어 있습니다. */
.char {
  --k: 1;
  width: calc(var(--size, 84px) * var(--k));
  height: calc(var(--size, 84px) * var(--k));
  display: inline-block;
  vertical-align: bottom;
  line-height: 0;
  flex: none;
}
.char svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* 누르면 표정이 바뀌는 캐릭터 */
.char-btn {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}
.char-btn:active .char { transform: translateY(var(--u)); }

/* 픽셀 테두리 ------------------------------------------------------------
   앱 PixelFrame의 '계단 모서리': 바깥 테두리 칸(모서리 한 칸은 비움) → 안쪽 밝은 선 → 바탕.
   네 변을 box-shadow 한 칸으로 그려 모서리 칸이 비게 합니다. */

.pixel, .bubble, .bubble .who, .store, .button {
  --frame-fill: var(--box);
  --frame-line: var(--outline);
  --frame-inner: var(--inner);
}
.pixel, .bubble, .bubble .who, .store, .button {
  background: var(--frame-fill);
  box-shadow:
    0 calc(var(--u) * -1) 0 0 var(--frame-line),
    0 var(--u) 0 0 var(--frame-line),
    calc(var(--u) * -1) 0 0 0 var(--frame-line),
    var(--u) 0 0 0 var(--frame-line),
    inset 0 0 0 var(--u) var(--frame-inner);
}

/* 말풍선 ------------------------------------------------------------------ */

.bubble {
  position: relative;
  display: block;
  max-width: 34ch;
  padding: 18px 20px 16px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text);
  margin: calc(var(--u) * 4) var(--u) calc(var(--u) * 4);
  transform-origin: var(--origin, 24px 110%);
  --tail-down:
    0 calc(var(--u) * -1) 0 0 var(--frame-fill),
    var(--u) calc(var(--u) * -1) 0 0 var(--frame-fill),
    calc(var(--u) * 2) calc(var(--u) * -1) 0 0 var(--frame-fill),
    var(--u) 0 0 0 var(--frame-fill),
    calc(var(--u) * 2) 0 0 0 var(--frame-fill),
    calc(var(--u) * 3) 0 0 0 var(--frame-line),
    calc(var(--u) * -1) var(--u) 0 0 var(--frame-line),
    0 var(--u) 0 0 var(--frame-fill),
    var(--u) var(--u) 0 0 var(--frame-fill),
    calc(var(--u) * 2) var(--u) 0 0 var(--frame-line),
    calc(var(--u) * -1) calc(var(--u) * 2) 0 0 var(--frame-line),
    0 calc(var(--u) * 2) 0 0 var(--frame-fill),
    var(--u) calc(var(--u) * 2) 0 0 var(--frame-line),
    calc(var(--u) * -1) calc(var(--u) * 3) 0 0 var(--frame-line),
    0 calc(var(--u) * 3) 0 0 var(--frame-line);
  --tail-left-cells:
    var(--u) 0 0 0 var(--frame-fill),
    var(--u) var(--u) 0 0 var(--frame-fill),
    var(--u) calc(var(--u) * 2) 0 0 var(--frame-fill),
    0 var(--u) 0 0 var(--frame-fill),
    0 calc(var(--u) * 2) 0 0 var(--frame-fill),
    0 calc(var(--u) * 3) 0 0 var(--frame-line),
    calc(var(--u) * -1) calc(var(--u) * -1) 0 0 var(--frame-line),
    calc(var(--u) * -1) 0 0 0 var(--frame-fill),
    calc(var(--u) * -1) var(--u) 0 0 var(--frame-fill),
    calc(var(--u) * -1) calc(var(--u) * 2) 0 0 var(--frame-line),
    calc(var(--u) * -2) calc(var(--u) * -1) 0 0 var(--frame-line),
    calc(var(--u) * -2) 0 0 0 var(--frame-fill),
    calc(var(--u) * -2) var(--u) 0 0 var(--frame-line),
    calc(var(--u) * -3) calc(var(--u) * -1) 0 0 var(--frame-line),
    calc(var(--u) * -3) 0 0 0 var(--frame-line);
  --tail-right-cells:
    calc(var(--u) * -1) 0 0 0 var(--frame-fill),
    calc(var(--u) * -1) var(--u) 0 0 var(--frame-fill),
    calc(var(--u) * -1) calc(var(--u) * 2) 0 0 var(--frame-fill),
    0 var(--u) 0 0 var(--frame-fill),
    0 calc(var(--u) * 2) 0 0 var(--frame-fill),
    0 calc(var(--u) * 3) 0 0 var(--frame-line),
    var(--u) calc(var(--u) * -1) 0 0 var(--frame-line),
    var(--u) 0 0 0 var(--frame-fill),
    var(--u) var(--u) 0 0 var(--frame-fill),
    var(--u) calc(var(--u) * 2) 0 0 var(--frame-line),
    calc(var(--u) * 2) calc(var(--u) * -1) 0 0 var(--frame-line),
    calc(var(--u) * 2) 0 0 0 var(--frame-fill),
    calc(var(--u) * 2) var(--u) 0 0 var(--frame-line),
    calc(var(--u) * 3) calc(var(--u) * -1) 0 0 var(--frame-line),
    calc(var(--u) * 3) 0 0 0 var(--frame-line);
}

/* 꼬리: 4px 칸을 box-shadow로 찍습니다. 테두리 · 안쪽 선 칸을 바탕색으로 덮고 둘레에 선 칸을 둡니다. */
.bubble::after {
  content: "";
  position: absolute;
  width: var(--u);
  height: var(--u);
  background: var(--frame-fill);
}

/* 아래를 가리키는 꼬리(말하는 친구가 아래에 있을 때) */
.bubble:not(.tail-left):not(.tail-right):not(.tail-none)::after {
  left: var(--tail, 28px);
  top: 100%;
  box-shadow:
    var(--tail-down);
}
.bubble.flip::after { left: auto; right: var(--tail, 28px); transform: scaleX(-1); }

/* 왼쪽을 가리키는 꼬리(말하는 친구가 왼쪽에 있을 때) */
.bubble.tail-left::after {
  left: calc(var(--u) * -1);
  top: var(--tail, 22px);
  box-shadow:
    var(--tail-left-cells);
}

/* 오른쪽을 가리키는 꼬리 */
.bubble.tail-right::after {
  left: 100%;
  top: var(--tail, 22px);
  box-shadow:
    var(--tail-right-cells);
}
.bubble.tail-none::after { display: none; }

/* 위를 가리키는 꼬리: 아래 꼬리를 뒤집습니다. */
.bubble.tail-up::after,
.bubble.tail-up:not(.tail-left):not(.tail-right):not(.tail-none)::after {
  left: var(--tail, 28px);
  top: calc(var(--u) * -1);
  transform: scaleY(-1);
  box-shadow: var(--tail-down);
}

/* 말하는 친구 이름표(앱 대화창처럼 위쪽 테두리에 걸침) */
.bubble .who {
  position: absolute;
  left: 14px;
  top: -15px;
  padding: 1px 10px 2px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  color: #fff;
  --frame-fill: var(--theme, var(--moa));
  --frame-inner: transparent;
  --u: 3px;
}

/* 자바스크립트가 있으면 화면에 들어올 때 계단식으로 튀어나옵니다(main.js가 .is-in을 붙임). */
.js .bubble[data-pop] {
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.28s steps(4, end), opacity 0.12s steps(2, end);
}
.js .bubble[data-pop].is-in { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .bubble[data-pop] { transform: none; opacity: 1; transition: none; }
  .char-btn:active .char { transform: none; }
}

/* App Store 버튼 ---------------------------------------------------------- */

.store {
  --frame-fill: var(--theme, var(--primary1));
  --frame-line: var(--outline);
  --frame-inner: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: var(--u);
  padding: 14px 22px 14px 18px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform 0.08s steps(1, end);
}
.store:hover { filter: brightness(1.06); }
.store:active { transform: translateY(var(--u)); }
.store small { display: block; font-size: 12px; font-weight: 600; opacity: 0.86; letter-spacing: 0; }
/* 아래로 받는 픽셀 화살표 */
.store .get {
  width: 20px;
  height: 22px;
  flex: none;
  background:
    linear-gradient(#fff 0 0) 8px 0 / 4px 14px no-repeat,
    linear-gradient(#fff 0 0) 4px 10px / 12px 4px no-repeat,
    linear-gradient(#fff 0 0) 0 6px / 4px 4px no-repeat,
    linear-gradient(#fff 0 0) 16px 6px / 4px 4px no-repeat,
    linear-gradient(#fff 0 0) 0 18px / 20px 4px no-repeat;
}

/* 보조 버튼(문의 등) */
.button {
  --frame-fill: var(--box);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: var(--u);
  padding: 12px 20px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.button:active { transform: translateY(var(--u)); }

/* 머리글 ------------------------------------------------------------------ */

.site-head {
  position: relative;
  z-index: 2;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand .char { --size: 28px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.site-nav a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.site-nav a[aria-current="page"] { background: color-mix(in srgb, var(--text) 9%, transparent); }

/* 바닥글 ------------------------------------------------------------------ */

.site-foot {
  padding: 40px 0 48px;
  color: var(--text-2);
  font-size: 14px;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-foot a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }
.site-foot .marks { display: flex; align-items: flex-end; gap: 6px; }
.site-foot .langs { flex-basis: 100%; gap: 4px 16px; font-size: 13px; }
.site-foot .langs a { font-weight: 500; }
.site-foot .langs a[aria-current] { color: var(--text); }
.site-foot .marks .char { --size: 28px; }

/* 둥근 카드 ---------------------------------------------------------------- */

.card {
  background: var(--box);
  border-radius: 24px;
  padding: 24px;
}

/* 문서 페이지(처리방침 · 지원) ---------------------------------------------- */

.doc {
  background: var(--page);
  padding: 24px 0 64px;
}
.doc .wrap { max-width: 720px; }
.doc-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 24px 0 28px;
}
.doc-head h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 800; }
.doc-head p { color: var(--text-2); margin-top: 6px; font-size: 15px; }
.doc-head .char { margin-bottom: 4px; }
.doc h2 { font-size: 20px; font-weight: 800; margin: 0 0 8px; }
.doc .card + .card { margin-top: 12px; }
.doc .card p + p, .doc .card ul { margin-top: 8px; }
.doc ul { padding-left: 1.2em; margin: 0; }
.doc li + li { margin-top: 4px; }
.doc .note { color: var(--text-2); font-size: 15px; }

/* ======================================================================
   소개 페이지
   ====================================================================== */

.home .site-head { background: var(--page); }

/* 바닥 타일: 캐릭터가 서 있는 픽셀 바닥 */
.floor {
  height: 28px;
  background:
    linear-gradient(var(--outline) 0 var(--u), transparent var(--u)),
    repeating-conic-gradient(var(--floor-a) 0 25%, var(--floor-b) 0 50%) 0 var(--u) / 16px 16px;
  --floor-a: color-mix(in srgb, var(--moa) 16%, var(--page));
  --floor-b: color-mix(in srgb, var(--moa) 7%, var(--page));
}

/* 띠: 위쪽 가장자리를 픽셀 성벽 모양으로 */
.band {
  --band: color-mix(in srgb, var(--theme, var(--page)) var(--tint), var(--bg));
  position: relative;
  background: var(--band);
}
.band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
  background: linear-gradient(90deg, var(--band) 50%, transparent 0) 0 0 / 16px 8px;
}

/* 1. 첫 화면 -------------------------------------------------------------- */

.hero { background: var(--page); text-align: center; }
.hero-grid { padding-top: clamp(20px, 5vw, 64px); }
.hero h1 {
  font-size: clamp(42px, 10.5vw, 96px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  word-spacing: 0.12em;
}
.hero .lead {
  margin: 18px auto 0;
  max-width: 32em;
  text-wrap: balance;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-2);
}
.hero .store { margin-top: 26px; }
@media (min-width: 720px) { .narrow { display: none; } }

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(28px, 5vw, 48px);
}
.hero-bubble { --tail: calc(50% - 6px); margin-bottom: 18px; }
.crew {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}
.crew .char { --k: 0.54; }
@media (min-width: 380px) { .crew .char { --k: 0.6; } }
@media (min-width: 520px) { .crew .char { --k: 0.86; } .crew { gap: 14px; } }
@media (min-width: 900px) { .crew .char { --k: 1.3; } .crew { gap: 28px; } }
/* 캐릭터 발이 바닥 선에 닿게 */
.crew .char-btn { margin-bottom: -2px; }

/* 2. 문제 공감 ------------------------------------------------------------ */

.worry { --theme: var(--bg); background: var(--bg); padding: 72px 0 88px; }
.worry::before { display: none; }
.worry-grid { display: grid; gap: 36px; align-items: center; }
.pile {
  position: relative;
  height: 300px;
  max-width: 440px;
  width: 100%;
  margin-inline: auto;
}
/* 픽셀 폴라로이드(main.js가 scenes.js로 그림). 20×19칸 틀이라 한 칸이 4px쯤 되게 너비를 잡습니다. */
.pile .snap {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: 20 / 19;
  line-height: 0;
  transform: translate(-30%, 0) rotate(var(--r));
}
.snap svg { display: block; width: 100%; height: 100%; }
.pile .char {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  z-index: 1;
}
.worry-copy p { margin-top: 18px; max-width: 32em; color: var(--text-2); font-size: 18px; }
.worry-copy .turn { color: var(--text); font-weight: 700; font-size: 20px; }
.bubble.big {
  font-size: clamp(24px, 4.4vw, 34px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  word-spacing: 0.08em;
  max-width: 16em;
  padding: 26px 26px 22px;
}
@media (max-width: 819px) {
  /* 쌓인 사진이 위에 있으므로 꼬리를 위로 */
  .worry .bubble.tail-left::after {
    left: calc(50% - 6px);
    top: calc(var(--u) * -1);
    transform: scaleY(-1);
    box-shadow: var(--tail-down);
  }
}
@media (min-width: 820px) {
  .worry-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .worry .bubble.big { --tail: 40px; }
}

/* 3. 기능 ------------------------------------------------------------------ */

.features-head { padding: 24px 0 48px; }
.features-head h2 { font-size: clamp(30px, 5.4vw, 48px); font-weight: 800; letter-spacing: -0.035em; }
.features-head p { margin-top: 8px; color: var(--text-2); }

.feature { padding: 64px 0 72px; }
.feature + .feature { margin-top: 0; }
.feature-grid { display: grid; gap: 36px; align-items: center; }
.feature-copy { max-width: 34em; }
@media (max-width: 819px) { .feature .phone { order: 2; } }
.speaker { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 18px; }
.speaker .char { --k: 0.7; }
.speaker .bubble { margin-top: 10px; flex: 0 1 auto; min-width: 0; }
.feature h3 {
  font-size: clamp(28px, 4.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.feature .problem { margin-top: 14px; color: var(--text-2); font-size: 18px; }
/* 문제 → 해 주는 일: 대표 색 픽셀 화살표로 잇습니다 */
.feature .answer { margin-top: 10px; font-size: 18px; font-weight: 500; }
.feature .more { margin-top: 12px; font-size: 17px; color: var(--text-2); }
.feature .answer::before {
  content: "";
  display: block;
  width: 20px;
  height: 12px;
  margin: 4px 0 12px;
  background:
    linear-gradient(var(--theme) 0 0) 0 0 / 4px 4px no-repeat,
    linear-gradient(var(--theme) 0 0) 16px 0 / 4px 4px no-repeat,
    linear-gradient(var(--theme) 0 0) 4px 4px / 4px 4px no-repeat,
    linear-gradient(var(--theme) 0 0) 12px 4px / 4px 4px no-repeat,
    linear-gradient(var(--theme) 0 0) 8px 8px / 4px 4px no-repeat;
}

.phone {
  margin: 0 auto;
  width: min(280px, 72vw);
  position: relative;
  transform: rotate(-2deg);
}
.phone img {
  width: 100%;
  aspect-ratio: 1206 / 2622;
  object-fit: cover;
  border-radius: 40px;
  border: 7px solid #1d1e2b;
  background: var(--box);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme) 40%, transparent), 10px 12px 0 color-mix(in srgb, var(--theme) 28%, transparent);
}
/* 사진첩에 붙인 마스킹 테이프 */
.phone::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -14px;
  left: 50%;
  width: 96px;
  height: 26px;
  transform: translateX(-50%) rotate(4deg);
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--theme) 55%, #fff) 0 8px, color-mix(in srgb, var(--theme) 40%, #fff) 8px 16px);
  opacity: 0.85;
}
.feature.flip .phone, .feature.flip-end .phone { transform: rotate(2deg); }

@media (min-width: 820px) {
  .feature { padding: 88px 0 96px; }
  .feature-grid { grid-template-columns: 320px 1fr; gap: 72px; }
  .feature.flip .feature-grid { grid-template-columns: 1fr 320px; }
  .feature.flip .phone { order: 2; }
  .phone { width: 300px; }
  .speaker .char { --k: 1; }
  .speaker .bubble { margin-top: 18px; }
}

/* 3-1. 더 할 수 있는 일 ------------------------------------------------------
   작은 카드 세 장. 넓은 화면에서는 한 줄, 좁은 화면에서는 가로로 넘겨 봅니다(페이지는 옆으로 밀리지 않음). */

.extras { --band: var(--bg); padding: 64px 0 72px; }
.extras h2 { font-size: clamp(26px, 4.4vw, 38px); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 28px; }
.extras-row {
  list-style: none;
  margin: 0 auto;
  padding: 8px 16px 20px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(80%, 300px);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  overscroll-behavior-x: contain;
}
.extras-row:focus-visible { outline: 3px solid var(--primary1); outline-offset: -3px; }
.extra {
  --frame-fill: color-mix(in srgb, var(--theme) 9%, var(--box));
  margin: var(--u);
  padding: 30px 22px 24px;
  scroll-snap-align: start;
}
.extra-scene { position: relative; padding: 6px 0 0; }
.extra .phone { width: 176px; }
.extra .phone img { border-width: 5px; border-radius: 28px; }
.extra:nth-child(2) .phone { transform: rotate(2deg); }
.extra-scene .char { position: absolute; right: 0; bottom: -2px; }
.extra h3 { margin-top: 26px; font-size: 21px; font-weight: 800; line-height: 1.35; letter-spacing: -0.03em; text-wrap: balance; }
.extra p { margin-top: 8px; font-size: 16px; color: var(--text-2); }

@media (min-width: 820px) {
  .extras { padding: 80px 0 96px; }
  .extras-row {
    width: var(--wrap);
    padding: 8px 0 0;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-columns: auto;
    gap: 28px;
    overflow: visible;
  }
}
/* 카드 네 장: 넓으면 한 줄, 중간 폭은 두 장씩 */
@media (min-width: 1100px) {
  .extras-row { grid-template-columns: repeat(4, 1fr); }
}
.extra:nth-child(4) .phone { transform: rotate(-2deg); }
@media (prefers-color-scheme: dark) {
  .extra { --frame-fill: color-mix(in srgb, var(--theme) 14%, var(--box)); }
}

/* 4. 안심 ------------------------------------------------------------------ */

.safe {
  --safe-bg: #26283a;
  background: var(--safe-bg);
  color: #fff;
  padding: 88px 0;
  position: relative;
}
.safe::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
  background: linear-gradient(90deg, var(--safe-bg) 50%, transparent 0) 0 0 / 16px 8px;
}
@media (prefers-color-scheme: dark) { .safe { --safe-bg: #1c1c1e; } }
.safe-grid { display: grid; gap: 40px; align-items: center; }
.device {
  width: 200px;
  height: 360px;
  margin: 0 auto;
  border-radius: 40px;
  border: 8px solid #fff;
  padding: 10px;
  position: relative;
}
.device::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 56px;
  height: 16px;
  border-radius: 10px;
  transform: translateX(-50%);
  background: #fff;
}
.device-screen {
  height: 100%;
  border-radius: 26px;
  background: var(--page);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px 12px 28px;
  background-image:
    linear-gradient(var(--outline) 0 0),
    repeating-conic-gradient(color-mix(in srgb, var(--mint) 22%, var(--page)) 0 25%, color-mix(in srgb, var(--mint) 10%, var(--page)) 0 50%);
  background-size: 100% 4px, 12px 12px;
  background-position: 0 calc(100% - 24px), 0 calc(100% - 4px);
  background-repeat: no-repeat, repeat-x;
}
.safe h2 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -0.035em; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; max-width: 34em; }
.facts li { position: relative; padding-left: 34px; color: rgba(255, 255, 255, 0.86); font-size: 17px; }
/* 픽셀 체크 표시 */
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 20px;
  height: 16px;
  background:
    linear-gradient(var(--mint) 0 0) 0 8px / 4px 4px no-repeat,
    linear-gradient(var(--mint) 0 0) 4px 12px / 4px 4px no-repeat,
    linear-gradient(var(--mint) 0 0) 8px 8px / 4px 4px no-repeat,
    linear-gradient(var(--mint) 0 0) 12px 4px / 4px 4px no-repeat,
    linear-gradient(var(--mint) 0 0) 16px 0 / 4px 4px no-repeat;
}
.safe-link { margin-top: 24px; }
.safe a { color: #fff; font-weight: 700; }
@media (min-width: 820px) {
  .safe-grid { grid-template-columns: 300px 1fr; gap: 72px; }
}

/* 6. 마무리 ---------------------------------------------------------------- */

.finale { background: var(--page); padding: 80px 0 64px; text-align: center; position: relative; }
.finale::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
  background: linear-gradient(90deg, var(--page) 50%, transparent 0) 0 0 / 16px 8px;
}
.finale h2 { font-size: clamp(32px, 6vw, 56px); font-weight: 800; letter-spacing: -0.04em; }
.finale-sub { margin-top: 10px; color: var(--text-2); }
.pick-stage { margin: 40px auto 28px; max-width: 720px; }
.pick-bubble { text-align: left; margin: 0 auto 28px; max-width: 30em; min-height: 92px; }
.pick-row { display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 10px;
  border-radius: 16px;
  line-height: 1.2;
}
.pick .char { --k: 0.56; transition: transform 0.2s steps(3, end); }
.pick-name {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  padding: 3px 10px;
  border-radius: 999px;
}
.pick[aria-pressed="true"] .char { transform: translateY(-8px); }
/* 가타카나 이름(ローリー 등)은 한글 두 글자보다 길어 360 폭에서 끝 이름이 잘리지 않게 줄임 */
:lang(ja) .pick-name { font-size: 13px; padding: 3px 7px; }
.pick[aria-pressed="true"] .pick-name { background: var(--theme); color: #fff; }
.pick-stage .floor { margin-top: -4px; }
@media (min-width: 380px) { .pick .char { --k: 0.62; } }
@media (min-width: 560px) { .pick .char { --k: 0.9; } .pick-row { gap: 16px; } }
.store.big { font-size: 20px; padding: 16px 26px 16px 20px; }
.store.nudge { animation: nudge 0.36s steps(3, end); }
@keyframes nudge {
  0%, 100% { transform: none; }
  50% { transform: translateY(calc(var(--u) * -2)); }
}
@media (prefers-reduced-motion: reduce) {
  .store.nudge { animation: none; }
  .pick .char { transition: none; }
}

/* 첫 화면 스크린샷(마무리) */
.first-run { display: none; }
.first-run figcaption { margin-top: 16px; font-size: 14px; color: var(--text-2); transform: rotate(2deg); }
.first-run img { border-color: #1d1e2b; }
@media (min-width: 960px) {
  .finale .wrap { display: grid; grid-template-columns: 1fr 260px; column-gap: 64px; align-items: center; }
  .finale .wrap > :not(.first-run) { grid-column: 1; }
  .first-run { display: block; grid-column: 2; grid-row: 1 / span 4; width: 260px; transform: rotate(3deg); }
}

/* 다크에서는 스크린샷 테두리를 밝게 */
@media (prefers-color-scheme: dark) {
  .phone img { border-color: #3a3a3c; }
}
.finale .store { justify-self: center; }

.device-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.device-photos .snap { aspect-ratio: 14 / 11; line-height: 0; border-radius: 2px; overflow: hidden; }
.device-crew { display: flex; justify-content: center; align-items: flex-end; gap: 4px; }

/* ======================================================================
   처리방침 · 지원
   ====================================================================== */

.doc-page .site-head { background: var(--page); }
.doc .summary { background: transparent; padding: 8px 0 8px; box-shadow: none; margin-bottom: 20px; }
.doc .summary .bubble { max-width: none; font-size: 18px; }
.doc .card { border-radius: 24px; }
.doc .card .button, .doc .card .store { margin-top: 8px; }

.faqs { display: grid; gap: 20px; margin: 8px 4px 32px; }
.faq { padding: 0; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 56px 18px 20px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
/* 픽셀 +, 열리면 − */
.faq summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background:
    linear-gradient(var(--text) 0 0) 0 6px / 16px 4px no-repeat,
    linear-gradient(var(--text) 0 0) 6px 0 / 4px 16px no-repeat;
}
.faq[open] summary::after { background: linear-gradient(var(--text) 0 0) 0 6px / 16px 4px no-repeat; }
.faq-body { padding: 0 20px 20px; color: var(--text-2); }
.faq-body p + p { margin-top: 8px; }

.contact { display: flex; gap: 16px; align-items: flex-start; }
.contact .char { margin-top: 4px; }
@media (max-width: 459px) { .contact { flex-direction: column; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .doc-page { --page: var(--bg); }
}

/* 자바스크립트가 꺼지면 캐릭터 · 픽셀 사진 자리와 캐릭터 안내를 비우지 않고 숨깁니다. */
html:not(.js) .char, html:not(.js) .snap, html:not(.js) .js-only { display: none; }
