/* choc.co.kr 홈 — 2026-10 개편 '스티커 앨범' (design C1·C2·C3)
 * 토큰과 대비는 design_response.md 4장. 그림자 대신 1.5–2px 초코색 선.
 * 예전 css/style.css 는 지우지 않았고 이 파일만 index.html 이 읽는다.
 */
:root {
  --bg: #FCF4F7;       /* 시안 #FBF4E8 → detect cream-palette 회피, 로즈 쪽으로 옮김 */
  --surface: #FFFFFF;
  --ink: #3A2A20;      /* 제목·외곽선 12.54 */
  --ink-2: #5E4A3C;    /* 본문 7.62, 캐릭터 타일 위 6.64~7.41 */
  --ink-3: #76604F;    /* 보조·플레이스홀더 5.40 (흰 입력칸 5.90) */
  --rose: #C2255C;     /* 주 버튼(흰 글자 5.66), 강조 글자 5.17 */
  --rose-soft: #FBE3EA;
  --tape: #F2C14E;     /* 장식 전용, 글자 올리지 않음 */
  --band: #3A2A20;
  --band-text: #FBF4E8;
  --band-body: #E9DCCB;
  --band-point: #F7B9CB;
  --error: #B42318;
  --ok: #1D6B43;
  --ok-bg: #E6F2EA;
  --busy: #8E3A57;
  --line: #E6D9C6;     /* 장식 구분선 */
  --font-title: 'Gaegu', 'Pretendard Variable', Pretendard, cursive;
  --font-body: 'Pretendard Variable', Pretendard, system-ui, -apple-system, sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink-2);
  font-family: var(--font-body); font-size: 17px; line-height: 1.7;
  word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
/* 페이지 폭은 390 고정. 넘침은 프렌즈 띠 안에서만 생긴다. */
html, body { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; }

/* 포커스: 키보드에서만. 2px 로즈 + 3px 로즈 소프트 링 */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; box-shadow: 0 0 0 5px var(--rose-soft); border-radius: 4px; }
.notify :focus-visible { outline-color: var(--band-point); box-shadow: none; }
.form-card :focus-visible { outline-color: var(--rose); box-shadow: 0 0 0 5px var(--rose-soft); }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-200%);
  background: var(--ink); color: var(--bg); padding: 12px 16px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { transform: none; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

.display { font-family: var(--font-title); font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.25; }
.kicker { font-size: 15px; font-weight: 700; color: var(--rose); }

/* ── 버튼 ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 28px; font-weight: 700;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-sm { font-size: 16px; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 18px; }
.btn-block { width: 100%; min-height: 56px; border-radius: 6px; font-size: 18px; }
.btn-rose { background: var(--rose); color: #fff; }
.btn-rose:hover { background: #A51E4E; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--surface); }
.text-link, .inline-link { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }
.text-link:hover, .inline-link:hover { color: var(--rose); }
/* 문장 속 링크: 줄 높이는 그대로 두고 누를 수 있는 영역만 위아래로 넓혀 44px 를 맞춘다. */
.inline-link, .credit a, .footer-meta a { display: inline-block; padding: 11px 0; margin: -11px 0; }

/* ── 헤더 ─────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.logo { display: inline-flex; align-items: baseline; gap: 6px; min-height: 44px; align-items: center;
  font-family: var(--font-title); font-weight: 700; font-size: 30px; color: var(--ink); text-decoration: none; }
.logo small { font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); }
.gnb { margin-left: auto; }
.gnb ul { display: flex; gap: 4px; }
.gnb a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-size: 16px; }
.gnb a:hover { color: var(--rose); text-decoration: underline; text-underline-offset: 4px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.show-phone { display: none; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1.5px solid var(--ink); border-radius: 6px; background: transparent; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 11px; width: 19px; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── 첫 화면 ───────────────────────────── */
.hero { padding: 72px 0 96px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; align-items: center; }
.date-chip { display: inline-block; padding: 6px 18px; border: 1.5px solid var(--ink); border-radius: 20px; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 700; }
.hero h1 { margin-top: 24px; font-size: clamp(40px, 5.3vw, 76px); line-height: 1.18; }
.hero h1 em { font-style: normal; color: var(--rose); }
.hero-sub { margin-top: 24px; font-size: 19px; line-height: 1.75; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; margin-bottom: 12px; }

.photo-card { position: relative; background: var(--rose-soft); border: 2px solid var(--ink); border-radius: 6px; padding: 28px 28px 20px; }
.hero-photo { transform: rotate(-1.5deg); }
.photo-card img { width: 100%; }
.photo-card figcaption { margin-top: 12px; font-size: 17px; font-weight: 700; color: var(--ink); }
.tape { position: absolute; top: -16px; left: 50%; width: 120px; height: 30px; margin-left: -60px; background: var(--tape); opacity: .92; transform: rotate(2deg); }

/* ── 둘만 소개 + 사용법 ─────────────────── */
.about { padding: 0 0 96px; }
.about-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 64px; border-top: 1.5px solid var(--ink); padding-top: 64px; }
.about h2 { margin-top: 12px; }
.point-list { margin-top: 40px; display: grid; gap: 28px; }
.point-list .num { display: block; font-size: 14px; font-weight: 700; color: var(--rose); }
.point-list h3 { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.point-list p { font-size: 17px; margin-top: 4px; max-width: 30em; }

.guide-title { font-size: 20px; font-weight: 700; color: var(--ink); }
.guide-title span { font-size: 15px; font-weight: 500; color: var(--ink-3); }
.guide-body { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 28px; margin-top: 16px; align-items: start; }
.guide-player { border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--ink); }
.guide-video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; background: var(--ink); }
/* 영상을 못 트는 브라우저에서만 보이는 안내문. 어두운 바탕이라 밝은 글자로. */
.guide-video p { padding: 16px; color: var(--band-text); }
.guide-video p a { color: var(--band-point); }
.guide-hint { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.chapter-list { margin-top: 8px; border-top: 1px solid var(--line); }
.chapter-list li { border-bottom: 1px solid var(--line); }
.chapter-list button {
  display: flex; width: 100%; min-height: 48px; align-items: center; gap: 12px; padding: 4px 8px;
  background: transparent; border: 0; text-align: left; color: var(--ink); font-size: 16px; line-height: 1.4; cursor: pointer;
}
.chapter-list button:hover { background: var(--surface); }
.chapter-list button[aria-current="true"] { background: var(--rose-soft); font-weight: 700; }
.chapter-list .t { flex: none; width: 3.2em; font-size: 15px; font-weight: 700; color: var(--rose); font-variant-numeric: tabular-nums; }
.credit { margin-top: 16px; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
/* 문장 속 인라인 링크: WCAG 2.2 target-size 의 인라인 예외. 두 링크가 줄바꿈으로 겹치지 않게 패딩·음수 마진을 쓰지 않는다. */
.credit a { color: inherit; display: inline; padding: 0; margin: 0; }

/* ── 프렌즈 ───────────────────────────── */
.friends { background: var(--surface); padding: 96px 0; }
.friends-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 20px; align-items: start; }
.friends-intro { grid-column: 5 / 7; grid-row: 1; position: relative; z-index: 1; }
.friends-intro h2 { margin-top: 12px; }
.friends-desc { margin-top: 20px; font-size: 17px; }
.sns-line { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 16px; }
.sns-line a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; text-underline-offset: 4px; }
.friend-list { grid-column: 1 / -1; grid-row: 1 / 3; display: grid; grid-template-columns: subgrid; gap: 56px 20px; pointer-events: none; }
.friend-list:focus-visible { box-shadow: none; outline-offset: 6px; }
.friend { pointer-events: auto; background: var(--tile, var(--bg)); border-radius: 6px; padding: 16px 16px 20px; }
.friend img { width: auto; height: 140px; margin: 0 auto 12px; }
.friend:nth-child(even) { margin-top: 20px; }
.friend-big { grid-row: 1; border: 2px solid var(--ink); padding: 24px 24px 24px; }
.friend-big:nth-child(1) { grid-column: 1 / 3; }
.friend-big:nth-child(2) { grid-column: 3 / 5; margin-top: 36px; }
.friend-big img { height: 220px; }
.friend:not(.friend-big) { grid-row: 2; }
.friend-name { font-family: var(--font-title); font-size: 26px; line-height: 1.2; color: var(--ink); }
.friend-big .friend-name { font-size: 32px; }
.friend-type { font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--ink-2); }
.friend:not(.friend-big) .friend-type { display: block; margin-top: 2px; }
.friend-desc { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.friend-big .friend-desc { font-size: 16px; }
.friend-pager { display: none; }

.more { margin-top: 48px; border-top: 1px solid var(--line); }
.more summary { display: flex; align-items: center; gap: 10px; min-height: 56px; cursor: pointer; font-weight: 700; color: var(--ink); font-size: 17px; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: '+'; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%; font-size: 18px; line-height: 1; color: var(--rose); }
.more[open] summary::before { content: '−'; }
.more-body { padding: 8px 0 24px; }
.more-title { font-size: 20px; color: var(--ink); margin-top: 24px; }
.more-desc { font-size: 15px; margin-top: 4px; }
.moment-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 16px; }
.moment-list img { border: 1.5px solid var(--ink); border-radius: 6px; background: var(--rose-soft); }
.moment-list p { margin-top: 8px; font-size: 15px; line-height: 1.5; }
.moment-list b { color: var(--ink); }
.emoticon-list { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.emoticon-list li { aspect-ratio: 1; display: grid; place-items: center; background: var(--bg); border-radius: 6px; }
.emoticon-list picture { display: contents; }
.emoticon-list img { max-height: 100%; }
@media (prefers-reduced-motion: reduce) { .emoticon-list img { max-height: 78%; } }

/* ── 다음 이야기 ─────────────────────────── */
.next { padding: 72px 0; }
.next-list { margin-top: 16px; display: grid; gap: 8px; font-size: 18px; }
.next-list b { font-size: 22px; color: var(--ink); }

/* ── 알림 신청 ───────────────────────────── */
.notify { background: var(--band); color: var(--band-body); padding: 96px 0; }
.notify-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 64px; align-items: start; }
.kicker-on-dark { color: var(--band-point); }
.notify h2 { color: var(--band-text); margin-top: 12px; }
.notify-desc { margin-top: 24px; font-size: 18px; color: var(--band-body); }
.notify-count { margin-top: 8px; font-size: 17px; font-weight: 700; color: var(--band-point); }
.form-card { background: var(--surface); border-radius: 6px; padding: 36px 40px; color: var(--ink-2); }
.notify-form { display: grid; gap: 14px; }
.notify-form label { font-size: 16px; font-weight: 700; color: var(--ink); }
.notify-form input {
  width: 100%; min-height: 56px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: 6px;
  background: #fff; color: var(--ink); font-size: 17px; margin-top: -6px;
}
.notify-form input::placeholder { color: var(--ink-3); opacity: 1; }
.notify-form.has-error input { border: 2px solid var(--error); }
.notify-form.is-busy .btn-rose, .notify-form .btn-rose:disabled { background: var(--busy); cursor: progress; }
.form-msg { min-height: 0; margin-top: 12px; font-size: 16px; font-weight: 700; }
.form-msg:empty { margin-top: 0; }
.form-msg.err { color: var(--error); }
.form-msg.err::before { content: '⚠ '; }
.form-msg.ok { color: var(--ok); background: var(--ok-bg); padding: 12px 14px; border-radius: 6px; }
.form-note { margin-top: 16px; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.follow-line { margin-top: 20px; font-size: 15px; color: var(--band-body); }
.follow-line a { display: inline-flex; align-items: center; min-height: 44px; color: var(--band-text); font-weight: 700; text-underline-offset: 3px; }

/* ── 푸터 ─────────────────────────────── */
.site-footer { padding: 56px 0 64px; font-size: 15px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; }
.footer-logo { font-family: var(--font-title); font-weight: 700; font-size: 26px; color: var(--ink); }
.footer-logo span { font-family: var(--font-body); font-size: 15px; }
.footer-meta { margin-top: 6px; line-height: 1.7; }
.footer-meta a { color: var(--ink); text-underline-offset: 3px; }
.sns { display: flex; gap: 0 16px; flex-wrap: wrap; }
.sns a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; text-underline-offset: 3px; }

/* ── 태블릿 ───────────────────────────── */
@media (max-width: 1080px) {
  .hero-inner, .about-inner, .notify-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-photo { max-width: 560px; }
  .friends-grid { display: block; }
  .friends-intro { margin-bottom: 32px; }
  .friend-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; pointer-events: auto; }
  .friend-big:nth-child(n) { grid-column: span 2; grid-row: auto; margin-top: 0; }
  .friend:not(.friend-big) { grid-row: auto; }
}

/* ── 폰 ───────────────────────────────── */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 48px); }
  .header-inner { min-height: 64px; gap: 8px; }
  .logo { font-size: 26px; margin-right: auto; }
  .hide-phone { display: none; }
  .show-phone { display: inline; }
  .btn-sm { padding: 0 16px; font-size: 15px; }
  .menu-toggle { display: inline-block; }
  .gnb { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1.5px solid var(--ink); display: none; margin: 0; }
  .gnb.open { display: block; }
  .gnb ul { flex-direction: column; padding: 8px 24px 16px; gap: 0; }
  .gnb a { min-height: 52px; width: 100%; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--line); }

  .hero { padding: 24px 0 64px; }
  .hero-inner { gap: 32px; }
  .hero-photo { order: -1; transform: none; padding: 20px 20px 14px; margin-top: 12px; }
  .hero h1 { margin-top: 16px; }
  .hero-sub { font-size: 17px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-actions .btn { width: 100%; }

  .about { padding-bottom: 64px; }
  .about-inner { padding-top: 48px; gap: 48px; }
  .guide-body { grid-template-columns: 1fr; }
  .guide-player { width: min(100%, 300px); }

  .friends { padding: 64px 0; }
  .friend-list {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: -24px; padding: 4px 24px 12px; scroll-padding-inline: 24px; scrollbar-width: thin;
  }
  .friend, .friend-big:nth-child(n) { flex: 0 0 260px; scroll-snap-align: start; margin-top: 0; border: 2px solid var(--ink); }
  .friend img, .friend-big img { height: 170px; }
  .friend-big .friend-name { font-size: 28px; }
  .friend-pager { display: block; margin-top: 8px; font-size: 15px; color: var(--ink-2); }
  .friend-pager b { color: var(--ink); }
  .moment-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emoticon-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .next { padding: 56px 0; }
  .next-list { font-size: 16px; }
  .next-list b { font-size: 20px; }

  .notify { padding: 64px 0; }
  .notify-inner { gap: 32px; }
  .form-card { padding: 24px 20px; }

  .footer-inner { flex-direction: column; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
