/* ============================================================
   그해 v2 — 생활기록부 문서형 디자인 시스템
   아이보리 종이 · 명조 제목 · 얇은 괘선 · 절제한 직인
   ============================================================ */
:root {
  --paper: #F8F6EF;
  --paper-raised: #FFFEFA;
  --paper-deep: #EFECE2;
  --ink: #24251F;
  --muted: #67685E;
  --faint: #8E8F84;
  --rule: #D6D2C6;
  --rule-strong: #A5A397;
  --accent: #B74332;
  --accent-hover: #963526;
  --accent-soft: #F4E8E3;
  --olive: #69705A;
  --olive-soft: #ECEEE6;
  --font-body: 'Pretendard Variable', Pretendard, 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-title: 'Noto Serif KR', 'Nanum Myeongjo', 'Batang', 'AppleMyungjo', serif;
  --radius: 4px;
  --touch: 44px;
  --btn-h: 52px;
  --gutter: 20px;
  --page-max: 680px;
  --wide-max: 1200px;
  --tab-h: 64px;
  --shadow-paper: 0 1px 0 rgb(36 37 31 / 4%), 0 14px 34px rgb(36 37 31 / 13%);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -.015em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.is-locked { overflow: hidden; }
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
svg { flex: 0 0 auto; }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

/* ---------- 레이아웃 ---------- */
.app { min-height: 100vh; }
.page {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: 0 var(--gutter) calc(var(--tab-h) + 40px + env(safe-area-inset-bottom, 0px));
}
.page--narrow { max-width: 560px; padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
.page--editor { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.wrap { width: min(calc(100% - var(--gutter) * 2), var(--wide-max)); margin-inline: auto; }

/* ---------- 타이포 ---------- */
.brand { font: 700 24px/1 var(--font-title); letter-spacing: -.04em; display: inline-flex; align-items: center; min-height: var(--touch); }
.brand--lg { font-size: 28px; }
.eyebrow { color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.eyebrow--en { font-family: var(--font-title); letter-spacing: .14em; font-size: 12px; }
.page-title { margin-top: 8px; font: 600 30px/1.35 var(--font-title); letter-spacing: -.045em; }
.sec-title { font: 600 26px/1.4 var(--font-title); letter-spacing: -.04em; }
.sec-desc { margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.sec-desc b { color: var(--ink); }
.help { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.help b { color: var(--ink); font-weight: 600; }
.help svg { width: 14px; height: 14px; vertical-align: -2px; }
.help--center { text-align: center; }

/* ---------- 버튼 ---------- */
.btn {
  min-height: var(--btn-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: #FFFEFA; }
.btn--outline { border-color: var(--rule-strong); background: transparent; color: var(--ink); }
.btn--quiet { background: transparent; color: var(--accent); padding-inline: 8px; }
.btn--danger { background: #8E2A1C; color: #FFFEFA; }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 17px; }
.btn--sm { min-height: var(--touch); padding: 8px 14px; font-size: 14px; gap: 6px; }
.btn--sm svg { width: 16px; height: 16px; }
.icon-btn { width: var(--touch); height: var(--touch); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 5px;
}
.link--center { display: flex; margin: 8px auto 0; }
.link--inline { display: inline; min-height: 0; font-size: inherit; color: var(--accent); }
.link--danger { color: #8E2A1C; font-size: 14px; }
@media (hover: hover) {
  .btn--primary:hover { background: var(--accent-hover); }
  .btn--outline:hover { background: var(--accent-soft); border-color: var(--accent); }
  .btn--quiet:hover { background: var(--accent-soft); }
  .icon-btn:hover { background: var(--paper-deep); }
  .link:hover { text-decoration-color: var(--accent); }
}

/* ---------- 상단 바 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 8px var(--gutter);
  background: rgb(248 246 239 / 92%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topbar__right { display: flex; align-items: center; gap: 8px; }
.topbar__title { font: 600 16px/1.3 var(--font-title); }
.topbar__text { min-height: var(--touch); padding: 0 6px; font-size: 15px; color: var(--muted); }

/* ---------- 하단 탭 ---------- */
.tabbar {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, var(--page-max));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgb(248 246 239 / 96%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--rule);
}
.tab {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 700; }

/* ---------- 직인 ---------- */
.seal {
  --s: 46px;
  display: inline-grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  flex: 0 0 var(--s);
  border: calc(var(--s) * .055) solid var(--accent);
  outline: 1px solid rgb(183 67 50 / 55%);
  outline-offset: calc(var(--s) * -.14);
  color: var(--accent);
  font: 700 calc(var(--s) * .25)/1 var(--font-title);
  transform: rotate(-4deg);
  opacity: .9;
  mix-blend-mode: multiply;
  background:
    radial-gradient(circle at 22% 30%, var(--paper) 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 70% 64%, var(--paper) 0 1px, transparent 1.4px),
    radial-gradient(circle at 46% 82%, var(--paper) 0 .8px, transparent 1.2px);
}
.seal__grid { display: grid; grid-template-rows: repeat(3, 1fr); grid-auto-flow: column; direction: rtl; gap: calc(var(--s) * .02) calc(var(--s) * .08); }
.seal__grid i { font-style: normal; direction: ltr; }
.seal--sm { --s: 40px; }
.seal--lg { --s: 92px; }
.seal--faded { opacity: .35; }
.seal-mini {
  position: absolute;
  top: 14px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font: 700 10px/1 var(--font-title);
  letter-spacing: .5px;
  transform: rotate(-6deg);
  opacity: .78;
}
.tag-sample { font-style: normal; border: 1px solid var(--rule-strong); padding: 1px 8px; border-radius: 2px; color: var(--muted); }

/* ---------- 표 공통 ---------- */
.meta-table { width: 100%; table-layout: fixed; border: 1px solid var(--rule-strong); }
.meta-table th, .meta-table td { border: 1px solid var(--rule); padding: 10px 12px; text-align: left; vertical-align: middle; }
.meta-table th { width: 64px; background: var(--paper-deep); color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; letter-spacing: .08em; }
.meta-table td { font: 500 16px/1.4 var(--font-title); }
.meta-table--home { margin-top: 18px; }
.meta-table--sm td { font-size: 15px; }

/* 기록표: 왼쪽 연도·나이, 오른쪽 기억 */
.rec { margin-top: 12px; border: 1px solid var(--rule-strong); background: var(--paper-raised); }
.rec__head {
  display: grid;
  grid-template-columns: 92px 1fr;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--rule-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
}
.rec__head span { padding: 9px 14px; }
.rec__head span:first-child { border-right: 1px solid var(--rule-strong); text-align: center; }
.rec__row {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  border-bottom: 1px solid var(--rule);
  min-height: 84px;
}
.rec__row:last-of-type { border-bottom: 0; }
.rec__when {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 14px 6px;
  border-right: 1px solid var(--rule-strong);
  text-align: center;
}
.rec__when b { font: 600 21px/1.2 var(--font-title); }
.rec__when span { color: var(--muted); font-size: 13px; }
.rec__when small { color: var(--faint); font-size: 11px; }
.rec__what { min-width: 0; padding: 16px 48px 16px 16px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.rec__line { font: 500 17px/1.6 var(--font-title); letter-spacing: -.03em; }
.rec__ask { color: var(--muted); font-size: 15px; }
.rec__note { font-size: 14px; color: var(--muted); }
.rec__note b { color: var(--accent); font-weight: 700; margin-right: 8px; font-size: 13px; }
.rec__clue { color: var(--faint); font-size: 13px; }
.rec__me { margin-top: 2px; display: inline-flex; align-self: flex-start; gap: 4px; padding: 3px 10px; background: var(--olive-soft); color: var(--olive); border-radius: 2px; font-size: 13px; }
.rec__me b { color: var(--ink); }
.rec__photo { width: 100%; max-width: 360px; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--rule); margin-top: 4px; }
.rec__plus { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--rule-strong); }
.rec__plus svg { width: 20px; height: 20px; }
.rec__row--link { transition: background-color .15s; }
.rec__row--empty .rec__when b { color: var(--faint); font-weight: 500; }
.rec__row--blank { display: flex; align-items: center; justify-content: center; min-height: 72px; color: var(--rule-strong); font: 500 14px/1 var(--font-title); letter-spacing: .3em; }
.rec__add {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  font-size: 15px;
}
.rec__add svg { width: 18px; height: 18px; color: var(--accent); }
@media (hover: hover) {
  .rec__row--link:hover, .rec__add:hover { background: var(--accent-soft); }
}
.rec__row.is-new { animation: row-glow 2.4s var(--ease); }
.rec__row.is-new .seal-mini { animation: seal-press .7s var(--ease) .25s both; }
@keyframes row-glow { 0%, 30% { background: var(--accent-soft); } 100% { background: transparent; } }
@keyframes seal-press {
  0% { opacity: 0; transform: rotate(-6deg) scale(2.2); }
  60% { opacity: 1; transform: rotate(-6deg) scale(.92); }
  100% { opacity: .78; transform: rotate(-6deg) scale(1); }
}

/* ---------- 문서(종이) ---------- */
.doc {
  position: relative;
  background:
    linear-gradient(rgb(255 254 250 / 70%), rgb(255 254 250 / 70%)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgb(36 37 31 / 1.2%) 3px 4px),
    var(--paper-raised);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-paper);
  padding: 10px;
}
.doc__inner { border: 2px solid var(--ink); outline: 1px solid var(--ink); outline-offset: -7px; padding: 22px 18px 20px; }
.doc__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.doc__top span:last-child { font-family: var(--font-title); }
.doc__title { margin-top: 18px; text-align: center; font: 700 30px/1.3 var(--font-title); letter-spacing: .32em; padding-left: .32em; }
.doc__sub { margin-top: 4px; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .3em; padding-left: .3em; }
.doc .meta-table { margin-top: 18px; }
.doc .meta-table th { width: 54px; font-size: 12px; padding: 8px 6px; }
.doc .meta-table td { font-size: 15px; padding: 8px 10px; }
.rec--doc { margin-top: 12px; box-shadow: none; background: transparent; }
.rec--doc .rec__head, .rec--doc .rec__row { grid-template-columns: 78px 1fr; }
.rec--doc .rec__what { padding-right: 14px; }
.rec--doc .rec__when b { font-size: 19px; }
.rec--doc .rec__line { font-size: 16px; }
.doc__opinion { margin-top: 12px; border: 1px solid var(--rule-strong); }
.doc__opinion h3 { padding: 8px 14px; background: var(--paper-deep); border-bottom: 1px solid var(--rule-strong); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .16em; }
.doc__opinion p { padding: 14px; font: 500 16px/1.75 var(--font-title); }
.doc__foot { margin-top: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.doc__foot p { font: 400 12px/1.6 var(--font-title); color: var(--muted); }
.doc__sign { display: flex; align-items: center; gap: 2px; font: 700 14px/1 var(--font-title); letter-spacing: .12em; white-space: nowrap; }
.doc__sign .seal { margin-left: -8px; }
.doc--tilt { transform: rotate(1.6deg); }
.doc--full { margin-top: 20px; }

/* ---------- 첫 화면 ---------- */
.landing { overflow-x: clip; }
.l-head { border-bottom: 1px solid var(--rule-strong); }
.l-head__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.l-head__links { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.l-head__link, .l-head__links a:not(.btn) { min-height: var(--touch); display: inline-flex; align-items: center; }
.hide-sm { display: none !important; }
.hero { display: grid; gap: 44px; padding-block: 36px 56px; }
.hero__title { margin-top: 14px; font: 700 44px/1.22 var(--font-title); letter-spacing: -.06em; }
.hero__title span { display: block; }
.hero__title span:last-child { color: var(--ink); }
.hero__desc { margin-top: 22px; font-size: 17px; line-height: 1.75; }
.hero__actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 30px; }
.hero__note { margin-top: 10px; color: var(--muted); font-size: 14px; text-align: center; }
.hero__doc { padding: 6px 4px 12px; animation: doc-in .8s var(--ease) both .1s; }
@keyframes doc-in { from { opacity: 0; transform: translateY(18px) rotate(0); } to { opacity: 1; transform: none; } }

.teaser { border-top: 1px solid var(--rule-strong); padding-block: 40px 48px; display: grid; gap: 24px; }
.teaser__body { display: grid; gap: 16px; }
.teaser__list { border: 1px solid var(--rule-strong); background: var(--paper-raised); }
.teaser__row { display: grid; grid-template-columns: 84px 1fr; border-bottom: 1px solid var(--rule); }
.teaser__row:last-child { border-bottom: 0; }
.teaser__when { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 6px; border-right: 1px solid var(--rule-strong); color: var(--muted); font-size: 13px; }
.teaser__when b { color: var(--ink); font: 600 19px/1.2 var(--font-title); }
.teaser__what { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.teaser__what b { color: var(--ink); font: 600 16px/1.45 var(--font-title); }
.teaser__price { color: var(--accent); font-size: 13px; }
.teaser__price-story { font: 500 16px/1.7 var(--font-title); text-align: center; min-height: 1.7em; }
.teaser__price-story b { color: var(--accent); }

.steps { border-top: 1px solid var(--rule-strong); padding-block: 28px 32px; }
.steps__intro { text-align: center; font: 500 17px/1.5 var(--font-title); }
.steps__list { display: grid; gap: 22px; margin-top: 26px; }
.steps__list li { display: flex; gap: 16px; align-items: flex-start; }
.steps__no { color: var(--rule-strong); font: 400 52px/1 var(--font-title); min-width: 64px; }
.steps__list h3 { font-size: 16px; margin-bottom: 4px; }
.steps__list p { font-size: 14px; color: var(--muted); }
.l-foot { padding: 16px 0 40px; color: var(--faint); font-size: 12px; text-align: center; }

/* ---------- 연도 입력 ---------- */
.stepper { display: grid; grid-template-columns: 52px 1fr 52px; border: 1px solid var(--rule-strong); background: var(--paper-raised); border-radius: var(--radius); }
.stepper__btn { min-height: 56px; font-size: 22px; color: var(--muted); }
.stepper__btn:first-child { border-right: 1px solid var(--rule); }
.stepper__btn:last-child { border-left: 1px solid var(--rule); }
.stepper__field { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.stepper__field input {
  width: 4.4ch;
  border: 0;
  background: transparent;
  text-align: center;
  font: 600 26px/1.2 var(--font-title);
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper__field input::-webkit-outer-spin-button, .stepper__field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__field input:focus { outline: none; }
.stepper:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.stepper__field span { color: var(--muted); font-size: 15px; }
@media (hover: hover) { .stepper__btn:hover { background: var(--accent-soft); color: var(--accent); } }

/* ---------- 입력 ---------- */
.input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
  font-size: 16px;
  line-height: 1.5;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--faint); }
.input--serif { font-family: var(--font-title); line-height: 1.75; resize: vertical; }
.input--mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
textarea.input { resize: vertical; }

/* ---------- 시작 정보 ---------- */
.start, .first { padding-top: 28px; }
.form-table { width: 100%; margin-top: 24px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-strong); }
.form-table th, .form-table td { border-bottom: 1px solid var(--rule); padding: 18px 0; vertical-align: top; text-align: left; }
.form-table tr:last-child th, .form-table tr:last-child td { border-bottom: 0; }
.form-table th { width: 68px; padding-top: 30px; font: 600 15px/1 var(--font-title); letter-spacing: .2em; color: var(--muted); }
.start__preview { margin: 24px 0 20px; display: grid; gap: 4px; padding: 16px 18px; border: 1px dashed var(--rule-strong); background: var(--paper-raised); }
.start__k { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.start__preview b { font: 600 20px/1.4 var(--font-title); }
.start__preview span:last-child { color: var(--muted); font-size: 14px; }

.pick-q { margin: 24px 0 16px; border-top: 2px solid var(--ink); }
.pick-q__item { width: 100%; display: grid; grid-template-columns: 76px 1fr 20px; align-items: center; gap: 12px; padding: 16px 4px; border-bottom: 1px solid var(--rule); text-align: left; }
.pick-q__item > svg { width: 18px; height: 18px; color: var(--rule-strong); }
.pick-q__when { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 13px; }
.pick-q__when b { color: var(--ink); font: 600 20px/1.2 var(--font-title); }
.pick-q__body { display: grid; gap: 2px; }
.pick-q__q { font: 500 17px/1.5 var(--font-title); }
.pick-q__clue { color: var(--faint); font-size: 13px; }
@media (hover: hover) { .pick-q__item:hover { background: var(--accent-soft); } .pick-q__item:hover > svg { color: var(--accent); } }

/* ---------- 나의 기록부 ---------- */
.home-head { padding-top: 26px; }
.q-card { margin-top: 20px; padding: 18px 18px 10px; border: 1px solid var(--accent); background: var(--paper-raised); position: relative; }
.q-card::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgb(183 67 50 / 22%); pointer-events: none; }
.q-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.q-card__k { color: var(--accent); font-weight: 600; }
.q-card__when { color: var(--muted); font-family: var(--font-title); }
.q-card__q { margin-top: 8px; font: 500 21px/1.5 var(--font-title); letter-spacing: -.04em; }
.q-card__actions { position: relative; display: flex; justify-content: space-between; align-items: center; margin-top: 6px; margin-inline: -8px; }
.q-card__go { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); padding: 0 8px; color: var(--accent); font-weight: 600; font-size: 15px; }
.q-card__go svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
@media (hover: hover) { .q-card__go:hover svg { transform: translateX(3px); } }

.periods { display: flex; gap: 4px; overflow-x: auto; margin-top: 26px; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.periods::-webkit-scrollbar { display: none; }
.periods button { flex: 0 0 auto; min-height: 48px; padding: 0 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 15px; color: var(--muted); }
.periods button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 700; }

.nudge { margin-top: 18px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--rule-strong); background: var(--paper-raised); animation: rise .5s var(--ease) both; }
.nudge .btn { grid-column: 1 / -1; }
.nudge__body { display: grid; gap: 2px; font-size: 14px; color: var(--muted); }
.nudge__body b { color: var(--ink); font: 600 17px/1.4 var(--font-title); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.issue-cta { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border: 2px solid var(--ink); outline: 1px solid var(--ink); outline-offset: -6px; background: var(--paper-raised); }
.issue-cta div { display: grid; gap: 2px; }
.issue-cta b { font: 600 18px/1.4 var(--font-title); }
.issue-cta span { color: var(--muted); font-size: 13px; }
.issue-cta .btn { flex: 0 0 auto; }
.local-note { margin-top: 22px; display: flex; gap: 6px; align-items: flex-start; justify-content: center; color: var(--faint); font-size: 13px; text-align: center; }
.local-note svg { width: 14px; height: 14px; margin-top: 3px; }

/* ---------- 한 해 기록하기 ---------- */
.ed-date { margin-top: 30px; text-align: center; }
.ed-date h1 { font: 500 60px/1.1 var(--font-title); letter-spacing: -.02em; }
.ed-date p { display: inline-block; margin-top: 10px; padding: 0 18px 8px; border-bottom: 1px solid var(--rule-strong); color: var(--muted); font-size: 14px; }
.ed-q { margin-top: 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ed-q__text { font: 600 24px/1.45 var(--font-title); letter-spacing: -.045em; }
.ed-q .btn { margin-left: -8px; }
.ed-q__actions { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.ed-q__actions .btn { min-height: 44px; }
.ed-q__actions [aria-pressed="true"] { background: var(--accent-soft); font-weight: 700; }
.ed-q__actions [aria-pressed="true"]::before { content: '✓'; }

.disclosure { margin-top: 16px; border: 1px solid var(--rule); background: var(--paper-raised); }
.disclosure summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 44px 12px 16px;
  position: relative;
  list-style: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 400 22px/1 var(--font-body); color: var(--muted); }
.disclosure[open] summary::after { content: '−'; }
.disclosure__hint { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 13px; font-weight: 400; }
.disclosure__body { padding: 0 16px 16px; display: grid; gap: 10px; }
.disclosure__body .example { margin-top: 0; }

.bg-rows { display: grid; border-top: 1px solid var(--rule); }
.bg-rows div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.bg-rows dt { color: var(--muted); }
.bg-rows dd { font-family: var(--font-title); }
.bg-scenes__k { margin-top: 6px; font-size: 14px; font-weight: 600; }
.bg-scenes__k span { color: var(--faint); font-weight: 400; font-size: 13px; }
.bg-scenes { display: flex; flex-wrap: wrap; gap: 8px; }
.scene { min-height: 40px; padding: 8px 12px; border: 1px solid var(--rule-strong); border-radius: 2px; font-size: 14px; text-align: left; line-height: 1.4; background: var(--paper); }
.scene[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.scene[aria-pressed="true"]::before { content: '✓ '; }
.bg-note, .bg-none { color: var(--faint); font-size: 13px; line-height: 1.6; }
.bg-none { padding: 20px 0; text-align: center; }

.lined { position: relative; margin-top: 20px; }
.lined__input {
  display: block;
  width: 100%;
  min-height: 168px;
  padding: 4px 4px 28px;
  border: 0;
  border-radius: 0;
  background: transparent repeating-linear-gradient(to bottom, transparent 0 39px, var(--rule-strong) 39px 40px);
  background-attachment: local;
  font: 500 19px/40px var(--font-title);
  letter-spacing: -.02em;
  resize: none;
}
.lined__input:focus { outline: none; background-image: repeating-linear-gradient(to bottom, transparent 0 39px, var(--accent) 39px 40px); }
.lined__input::placeholder { color: var(--faint); }
.counter { position: absolute; right: 2px; bottom: 6px; color: var(--faint); font-size: 12px; }

.ed-opts { margin-top: 18px; display: grid; gap: 0; }
.ed-opts .disclosure { margin-top: 12px; }
.opt-btn { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--rule-strong); background: var(--paper-raised); font-size: 15px; font-weight: 600; border-radius: var(--radius); }
.opt-btn svg { width: 20px; height: 20px; color: var(--muted); }
.opt-btn small { color: var(--faint); font-weight: 400; font-size: 12px; }
.ed-photo { display: grid; gap: 10px; }
.ed-photo__img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--rule); max-height: 360px; }
.ed-photo__actions { display: flex; gap: 8px; }
.example { margin-top: 8px; text-align: left; color: var(--muted); font-size: 14px; min-height: var(--touch); }
.example span { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 4px; }
.privacy { margin-top: 12px; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.privacy svg { width: 18px; height: 18px; margin-top: 3px; color: var(--olive); }
.privacy div { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.privacy b { color: var(--ink); font-size: 15px; }
.ed-save { margin-top: 24px; }
.ed-save .help { margin-top: 10px; }

/* ---------- 그해의 배경 ---------- */
.year-rail { display: flex; gap: 6px; overflow-x: auto; margin: 20px calc(var(--gutter) * -1) 0; padding: 4px var(--gutter) 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.year-chip { flex: 0 0 auto; scroll-snap-align: center; min-width: 68px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--rule); background: var(--paper-raised); border-radius: 2px; font-size: 12px; color: var(--muted); position: relative; }
.year-chip b { font: 600 16px/1.2 var(--font-title); color: var(--ink); }
.year-chip.is-filled::after { content: ''; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.year-chip[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.year-chip[aria-selected="true"] b { color: var(--paper); }
.bg-doc { margin-top: 12px; border: 1px solid var(--rule-strong); background: var(--paper-raised); }
.bg-doc__rows div { display: grid; grid-template-columns: 92px 1fr; border-bottom: 1px solid var(--rule); }
.bg-doc__rows dt { padding: 14px 10px; background: var(--paper-deep); border-right: 1px solid var(--rule-strong); color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.bg-doc__rows dd { padding: 14px 16px; font: 500 16px/1.7 var(--font-title); }
.word { display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: 14px; }
.price { font-size: 22px; color: var(--accent); }
.price__vs { display: block; color: var(--muted); font: 400 13px/1.5 var(--font-body); }
.bg-doc__scenes { padding: 16px; border-bottom: 1px solid var(--rule); }
.bg-doc__scenes h2 { font: 600 16px/1.4 var(--font-title); margin-bottom: 8px; }
.bg-doc__scenes li { border-bottom: 1px dashed var(--rule); }
.bg-doc__scenes li:last-child { border-bottom: 0; }
.bg-doc__scenes button, .bg-doc__scenes li > span { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; text-align: left; font-size: 15px; }
.bg-doc__scenes button svg { width: 16px; height: 16px; color: var(--rule-strong); }
@media (hover: hover) { .bg-doc__scenes button:hover { color: var(--accent); } }
.bg-doc .bg-note { padding: 12px 16px; }
.years-cta { margin-top: 20px; display: grid; gap: 10px; }
.years-cta__mine { display: grid; gap: 4px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--paper-raised); font: 500 16px/1.6 var(--font-title); }
.years-cta__mine b { font: 600 12px/1.4 var(--font-body); color: var(--accent); letter-spacing: .06em; }

/* ---------- 내 카드 ---------- */
.card-layout { margin-top: 20px; display: grid; gap: 24px; }
.card-stage { display: grid; gap: 14px; justify-items: center; }
.card-frame { width: 100%; display: flex; justify-content: center; }
.card-frame canvas { display: block; width: 100%; height: auto; box-shadow: var(--shadow-paper); background: var(--paper); }
.card-frame--story canvas { max-width: 340px; }
.card-frame--feed canvas { max-width: 440px; }
.card-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { min-height: var(--touch); padding: 0 16px; font-size: 14px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--rule-strong); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 600; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch); font-size: 14px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.switch--block { display: flex; margin-top: 8px; }
.card-actions { width: 100%; max-width: 440px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel { padding: 18px 0; border-top: 1px solid var(--rule-strong); }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.panel__head h2 { font: 600 18px/1.4 var(--font-title); }
.panel__head span { color: var(--muted); font-size: 13px; }
.panel__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.panel .input { margin-top: 10px; }
.panel--share .btn { margin-top: 12px; }
.picks { margin-top: 10px; display: grid; gap: 6px; }
.pick { width: 100%; display: grid; grid-template-columns: 24px 64px 1fr auto; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--rule); background: var(--paper-raised); border-radius: 2px; text-align: left; }
.pick__box { width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid var(--rule-strong); border-radius: 2px; color: transparent; }
.pick__box svg { width: 16px; height: 16px; }
.pick[aria-pressed="true"] { border-color: var(--accent); }
.pick[aria-pressed="true"] .pick__box { background: var(--accent); border-color: var(--accent); color: #fff; }
.pick__when { display: flex; flex-direction: column; color: var(--muted); font-size: 12px; line-height: 1.3; }
.pick__when b { color: var(--ink); font: 600 16px/1.2 var(--font-title); }
.pick__text { min-width: 0; font: 500 15px/1.45 var(--font-title); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick__thumb { width: 40px; height: 40px; object-fit: cover; border: 1px solid var(--rule); }

/* ---------- 받은 기록부 ---------- */
.shared-intro { padding-top: 26px; }
.compare { margin-top: 18px; padding: 16px; background: var(--olive-soft); border: 1px solid #D5D9CA; }
.compare__q { font: 600 17px/1.4 var(--font-title); }
.compare__row { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.compare__row .stepper__btn { min-height: 52px; }
.compare__result { margin-top: 12px; font-size: 15px; animation: rise .4s var(--ease) both; }
.compare__result b { color: var(--accent); }
.shared-cta { margin-top: 36px; padding: 28px 20px; text-align: center; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-strong); display: grid; gap: 10px; justify-items: center; }
.shared-cta .sec-desc { margin-top: 0; }
.shared-cta .btn { max-width: 420px; margin-top: 8px; }
.loading { padding: 120px 0; text-align: center; color: var(--muted); font-family: var(--font-title); }

.empty { padding: 64px 0 24px; display: grid; justify-items: center; gap: 12px; text-align: center; }
.empty .btn { margin-top: 12px; }

/* ---------- 설정 ---------- */
.set-group { margin-top: 28px; }
.set-group h2 { padding-bottom: 8px; border-bottom: 2px solid var(--ink); font: 600 15px/1.4 var(--font-title); letter-spacing: .12em; }
.set-row { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--rule); text-align: left; font-size: 15px; }
.set-row span { flex: 1; }
.set-row b { color: var(--muted); font-weight: 500; font-size: 14px; }
.set-row svg { width: 16px; height: 16px; color: var(--rule-strong); }
.set-row--static { cursor: default; }
.set-row--danger { color: #8E2A1C; }
.set-desc { margin-top: 10px; color: var(--faint); font-size: 13px; }
@media (hover: hover) { button.set-row:hover, a.set-row:hover { background: var(--accent-soft); } }

/* ---------- 연도 고르기 모달 ---------- */
.yp { max-height: min(62vh, 560px); overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.yp__h { margin: 16px 0 8px; font: 600 14px/1.4 var(--font-title); color: var(--muted); letter-spacing: .1em; }
.yp__h:first-child { margin-top: 4px; }
.yp__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.yp__cell { min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--rule); background: var(--paper-raised); border-radius: 2px; font-size: 12px; color: var(--muted); position: relative; }
.yp__cell b { font: 600 16px/1.2 var(--font-title); color: var(--ink); }
.yp__cell i { font-style: normal; color: var(--accent); font-size: 11px; font-weight: 600; }
.yp__cell.is-filled { border-color: var(--accent); }
@media (hover: hover) { .yp__cell:hover { background: var(--accent-soft); border-color: var(--accent); } }

/* ---------- 모달 · 토스트 ---------- */
.modal-root:empty { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgb(36 37 31 / 0%); transition: background-color .2s; }
.modal-backdrop.is-on { background: rgb(36 37 31 / 45%); }
.modal {
  width: min(100%, 480px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  border-top: 2px solid var(--ink);
  border-radius: 6px 6px 0 0;
  transform: translateY(16px);
  opacity: 0;
  transition: transform .25s var(--ease), opacity .2s;
}
.modal:focus { outline: none; }
.modal--wide { width: min(100%, 560px); }
.modal-backdrop.is-on .modal { transform: none; opacity: 1; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px -8px 10px 0; }
.modal__title { font: 600 21px/1.4 var(--font-title); letter-spacing: -.04em; }
.modal__body { margin-top: 10px; font-size: 15px; line-height: 1.7; }
.modal__body--muted { color: var(--muted); font-size: 14px; }
.modal__input { margin-top: 14px; }
.modal__actions { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal__actions--stack { grid-template-columns: 1fr; }
.process { margin-top: 14px; display: grid; gap: 8px; counter-reset: p; }
.process li { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule); font-size: 14px; }
.process span { color: var(--muted); }
.lp__k { margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.lp__list { margin-top: 8px; border: 1px solid var(--rule); max-height: 240px; overflow-y: auto; background: var(--paper-raised); }
.lp__list li { display: grid; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-size: 14px; }
.lp__list li:last-child { border-bottom: 0; }
.lp__list b { font: 600 13px/1.4 var(--font-title); color: var(--muted); }
.lp__list span { font-family: var(--font-title); }
.lp__list small { color: var(--accent); font-size: 12px; }
.lp__summary { margin-top: 6px; padding: 12px; border: 1px solid var(--rule); font: 500 14px/1.7 var(--font-title); background: var(--paper-raised); }
.modal .help { margin-top: 14px; }
.modal .meta-table { margin-top: 6px; }
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 프모아 푸터 ---------- */
.promo-foot { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--rule); }
.promo-foot__k { color: var(--faint); font-size: 11px; letter-spacing: .16em; text-align: center; }
.promo-foot__row { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.promo-foot__btn { min-height: 60px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 14px; border: 1px solid var(--rule); background: var(--paper-raised); border-radius: 2px; }
.promo-foot__btn span { color: var(--muted); font-size: 12px; }
.promo-foot__btn b { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; }
.promo-foot__btn svg { width: 14px; height: 14px; color: var(--faint); }
.promo-foot__credit { margin-top: 12px; text-align: center; color: var(--faint); font-size: 12px; }
.promo-foot__credit a { text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .promo-foot__btn:hover { border-color: var(--accent); } }

/* ---------- 담은 것 태그 (기록표) ---------- */
.rec__tags { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--ink); line-height: 1.5; }
.rec__tags b { flex: 0 0 auto; color: var(--olive); font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.rec__tags--song b { color: var(--accent); }
.rec__tags--dream b { color: #7A5B1E; }
.meta-table__dream { font-size: 14px !important; line-height: 1.6 !important; }
.meta-table th br { display: none; }

/* ---------- 그해 담기 ---------- */
.basket { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule-strong); }
.basket__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.basket__head h2 { font: 600 19px/1.4 var(--font-title); }
.basket__head span { color: var(--faint); font-size: 13px; }
.basket__tabs { display: flex; gap: 4px; overflow-x: auto; margin: 10px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter); border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.basket__tabs::-webkit-scrollbar { display: none; }
.basket__tabs button { flex: 0 0 auto; min-height: 44px; padding: 0 10px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.basket__tabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.basket__tabs i { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.basket__chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; }
.basket__none { color: var(--faint); font-size: 14px; padding: 4px 0; }
.chip-pick {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--paper-raised);
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
  transition: background-color .15s, border-color .15s, transform .15s var(--ease);
}
.chip-pick small { color: var(--faint); font-size: 11px; }
.chip-pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #FFFEFA; font-weight: 600; }
.chip-pick[aria-pressed="true"] small { color: rgb(255 254 250 / 75%); }
.chip-pick[aria-pressed="true"]::before { content: '✓'; font-size: 12px; }
.chip-pick--add { border-style: dashed; color: var(--muted); background: transparent; }
.chip-pick--sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.chip-pick.is-pop { animation: chip-pop .35s var(--ease); }
@keyframes chip-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12) rotate(-2deg); } 100% { transform: scale(1); } }
@media (hover: hover) { .chip-pick:not([aria-pressed="true"]):hover { border-color: var(--accent); color: var(--accent); } }
.chip-custom { display: inline-flex; align-items: center; border: 1px solid var(--accent); border-radius: 999px; background: var(--paper-raised); overflow: hidden; }
.chip-custom input { width: 150px; min-height: 40px; padding: 0 12px; border: 0; background: transparent; font-size: 14px; }
.chip-custom input:focus { outline: none; }
.chip-custom button { min-height: 40px; padding: 0 14px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; }
.basket__cheer { min-height: 22px; margin-top: 10px; color: var(--accent); font: 500 14px/1.5 var(--font-title); }
.basket__cheer:not(:empty) { animation: rise .3s var(--ease); }
.tray { margin-top: 8px; padding: 12px 14px; border: 1px dashed var(--rule-strong); background: var(--paper-raised); }
.tray__empty { color: var(--faint); font-size: 13px; }
.tray__k { font-size: 13px; color: var(--muted); }
.tray__k b { color: var(--accent); }
.tray__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tray__item { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); font-size: 13px; }
.tray__item span { color: var(--olive); font-size: 11px; font-weight: 700; }
.tray__item i { font-style: normal; color: var(--faint); font-size: 16px; padding: 0 4px; }
@media (hover: hover) { .tray__item:hover { border-color: var(--accent); } .tray__item:hover i { color: var(--accent); } }

.extra__k { margin-top: 4px; font-size: 14px; font-weight: 600; }
.extra__k span { color: var(--faint); font-weight: 400; font-size: 13px; margin-left: 4px; }
.extra__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; }
.dream-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.preview { margin-top: 20px; }
.preview__k { color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.rec--preview { margin-top: 6px; }
.rec--preview .rec__row { min-height: 72px; }
.ed-price { margin-top: 14px; padding: 12px 14px; background: var(--paper-deep); font-size: 14px; color: var(--muted); }
.ed-price b { color: var(--accent); }

/* ---------- 진로희망 변천사 ---------- */
.dream { display: block; width: 100%; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--rule-strong); background: var(--paper-raised); text-align: left; }
.dream__k { display: block; color: #7A5B1E; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.dream__line { display: block; margin-top: 4px; font: 500 17px/1.5 var(--font-title); color: var(--faint); }
.dream__cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--accent); font-size: 14px; font-weight: 600; }
.dream__cta svg { width: 16px; height: 16px; }
.dream__path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin-top: 8px; }
.dream__path li { display: inline-flex; align-items: baseline; gap: 4px; }
.dream__path li + li::before { content: '→'; color: var(--rule-strong); margin-right: 4px; }
.dream__path b { font: 600 17px/1.4 var(--font-title); }
.dream__path span { color: var(--faint); font-size: 12px; }
.dream__now button { display: inline-flex; align-items: baseline; gap: 4px; min-height: 32px; padding: 0 10px; border: 1px dashed var(--accent); border-radius: 999px; color: var(--accent); }
@media (hover: hover) { .dream--empty:hover { border-color: var(--accent); } }

/* ---------- 짜장면 퀴즈 ---------- */
.quiz { margin-top: 20px; padding: 18px; border: 2px solid var(--ink); background: var(--paper-raised); }
.quiz__k { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.quiz__q { margin-top: 6px; font: 500 19px/1.5 var(--font-title); }
.quiz__opts { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz__opt { min-height: 52px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper); font: 600 18px/1 var(--font-title); transition: transform .15s; }
.quiz__opt:disabled { cursor: default; }
.quiz__opt.is-right { border-color: var(--olive); background: var(--olive); color: #fff; }
.quiz__opt.is-wrong { border-color: var(--accent); color: var(--accent); text-decoration: line-through; }
.quiz__opt.is-dim { opacity: .45; }
@media (hover: hover) { .quiz__opt:not(:disabled):hover { border-color: var(--accent); transform: translateY(-1px); } }
.quiz__result { margin-top: 14px; display: flex; gap: 12px; align-items: center; font-size: 15px; line-height: 1.7; animation: rise .35s var(--ease); }
.quiz__result b { color: var(--accent); }

/* ---------- 그해의 배경 섹션 ---------- */
.ys { padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.ys__h { font: 600 15px/1.4 var(--font-title); margin-bottom: 4px; }
.ys__list li { border-bottom: 1px dashed var(--rule); }
.ys__list li:last-child { border-bottom: 0; }
.ys__list button, .ys__item { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; text-align: left; font-size: 15px; }
.ys__list small { margin-left: 6px; color: var(--faint); font-size: 12px; }
.ys__list em { flex: 0 0 auto; font-style: normal; color: var(--rule-strong); font-size: 13px; }
@media (hover: hover) { .ys__list button:hover { color: var(--accent); } .ys__list button:hover em { color: var(--accent); } }

/* ---------- 같은 나이, 다른 그해 ---------- */
.vs-box { margin-top: 32px; padding: 20px 18px; border: 1px solid var(--rule-strong); background: var(--olive-soft); }
.vs-box .sec-title { margin-top: 6px; }
.vs-form { margin: 16px 0 12px; display: grid; gap: 10px; }
.vs-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.vs-form .stepper__btn { min-height: 48px; }
.vs-form .stepper__field input { font-size: 22px; }
.vs-grid { margin-top: 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 6px; }
.vs-mark { align-self: center; font: 700 15px/1 var(--font-title); color: var(--accent); }
.vs-col { min-width: 0; padding: 14px 12px; border: 1px solid var(--rule-strong); background: var(--paper-raised); }
.vs-col__who { color: var(--muted); font-size: 12px; font-weight: 600; }
.vs-col__year { display: block; font: 600 30px/1.2 var(--font-title); }
.vs-col__school { color: var(--faint); font-size: 12px; }
.vs-col__sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.vs-col__sec h3 { font-size: 12px; color: var(--olive); margin-bottom: 4px; }
.vs-col__sec li { font: 500 14px/1.55 var(--font-title); }
.vs-col__price { margin-top: 12px; padding-top: 10px; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); }
.vs-col__price b { font: 600 18px/1 var(--font-title); color: var(--accent); }
.vs-col--future { opacity: .7; }
.vs-actions { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 768px) {
  .vs-form { grid-template-columns: 1fr 1fr 140px; align-items: end; }
  .vs-col { padding: 20px; }
  .vs-col__year { font-size: 40px; }
  .vs-grid { gap: 14px; }
}

/* ---------- 공유 시트 ---------- */
.share__msg { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--paper-raised); font: 500 14px/1.6 var(--font-title); }
.share-grid { margin: 14px 0 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.share-btn { min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-raised); font-size: 13px; font-weight: 600; }
.share-btn__ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-deep); font-size: 17px; font-weight: 700; }
.share-btn__ic svg { width: 18px; height: 18px; }
.share-btn--talk .share-btn__ic { background: #FEE500; }
@media (hover: hover) { .share-btn:hover { border-color: var(--accent); } }
.issue-cta__btns { display: flex; gap: 6px; flex: 0 0 auto; }
.share-pass { margin-top: 12px; }
.rec__tags--award b { color: #7A5B1E; }
@media (max-width: 480px) { .issue-cta { flex-direction: column; align-items: stretch; } .issue-cta__btns .btn { flex: 1; } }

/* ---------- 마이페이지 ---------- */
.page-stats { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 14px; background: var(--paper-deep); font-size: 13px; color: var(--muted); }
.page-stats b { color: var(--accent); }
.notes { margin-top: 28px; }
.notes__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.notes__head h2 { font: 600 19px/1.4 var(--font-title); }
.notes__head span { color: var(--muted); font-size: 13px; }
.notes__empty { padding: 24px 0; text-align: center; color: var(--faint); font-size: 14px; border-bottom: 1px solid var(--rule); }
.notes__list { border-bottom: 1px solid var(--rule-strong); }
.note { position: relative; display: grid; grid-template-columns: 64px 1fr; border-bottom: 1px solid var(--rule); background: var(--paper-raised); animation: rise .35s var(--ease) both; }
.note:last-child { border-bottom: 0; }
.note__when { display: grid; place-items: center; padding: 12px 4px; border-right: 1px solid var(--rule-strong); font: 600 14px/1.2 var(--font-title); color: var(--muted); }
.note__body { padding: 12px 40px 12px 14px; }
.note__text { font: 500 16px/1.6 var(--font-title); }
.note__award { display: inline-block; padding: 4px 10px; border: 1.5px solid #B8923C; border-radius: 2px; background: #FBF4E2; color: #7A5B1E; font: 700 15px/1.4 var(--font-title); }
.note__by { margin-top: 4px; color: var(--faint); font-size: 12px; }
.note__del { position: absolute; top: 8px; right: 6px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--faint); }
.note__del svg { width: 16px; height: 16px; }
.note-form { margin-top: 20px; padding: 18px; border: 2px dashed var(--rule-strong); background: var(--paper-raised); display: grid; gap: 12px; }
.note-form h2 { font: 600 17px/1.4 var(--font-title); }
.note-form .seg { justify-self: start; }
.note-form__row { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.note-form .example { margin-top: -4px; }
.owner-bar { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.mp-card { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 14px 16px; border: 1px solid var(--accent); background: var(--accent-soft); }
.mp-card b { font: 600 16px/1.3 var(--font-title); }
.mp-card span { grid-column: 1; color: var(--muted); font-size: 13px; }
.mp-card svg { grid-row: 1 / span 2; grid-column: 2; width: 18px; height: 18px; color: var(--accent); }
.panel--share .btn + .btn { margin-top: 8px; }

/* ---------- 반응형 ---------- */
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .hero__title { font-size: 38px; }
  .rec__head, .rec__row { grid-template-columns: 80px 1fr; }
  .card-actions { grid-template-columns: 1fr; }
}
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: 6px; border: 1px solid var(--rule-strong); border-top: 2px solid var(--ink); }
  .nudge { grid-template-columns: auto 1fr auto; }
  .nudge .btn { grid-column: auto; }
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .hide-sm { display: inline-flex !important; }
  .hero__title { font-size: 62px; }
  .hero__actions { flex-direction: row; align-items: center; gap: 24px; }
  .hero__note { text-align: left; }
  .teaser { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
  .steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps__list li + li { border-left: 1px solid var(--rule); padding-left: 20px; }
  .page-title { font-size: 36px; }
  .doc__inner { padding: 28px 26px 24px; }
  .doc__title { font-size: 34px; }
  .rec--doc .rec__head, .rec--doc .rec__row { grid-template-columns: 96px 1fr; }
  .rec__head, .rec__row { grid-template-columns: 108px 1fr; }
  .ed-date h1 { font-size: 72px; }
  .ed-q__text { font-size: 28px; }
  .card-frame--story canvas { max-width: 380px; }
}
@media (min-width: 1024px) {
  .l-head__in { min-height: 80px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; padding-block: 72px 80px; }
  .hero__title { font-size: clamp(62px, 5.6vw, 82px); line-height: 1.18; }
  .hero__desc { font-size: 19px; }
  .doc--tilt { transform: rotate(2deg); }
  .page--card { max-width: 1080px; }
  .page--card .tabbar { width: min(100%, var(--page-max)); }
  .card-layout { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 48px; align-items: start; }
  .card-stage { position: sticky; top: 84px; }
  .card-side .panel:first-child { border-top: 0; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .tabbar, .promo-foot, .shared-cta, .compare, .toast { display: none !important; }
  .doc { box-shadow: none; }
}

/* ---------- 찐친 테스트 ---------- */
.mosaic {
  display: inline-block;
  padding: 0 4px;
  border-radius: 2px;
  color: transparent;
  letter-spacing: -2px;
  background:
    repeating-conic-gradient(#C9C4B6 0 25%, #E4E0D4 0 50%) 0 0 / 8px 8px;
  filter: blur(.4px);
  user-select: none;
  vertical-align: middle;
  line-height: 1.3;
}
.fq { margin-top: 20px; padding: 18px; border: 2px solid var(--ink); background: var(--paper-raised); }
.fq__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fq__k { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.fq__dots { display: inline-flex; gap: 5px; flex: 0 0 auto; }
.fq__dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--rule-strong); }
.fq__dots i.is-now { border-color: var(--accent); }
.fq__dots i.is-right { background: var(--olive); border-color: var(--olive); }
.fq__dots i.is-wrong { background: var(--accent); border-color: var(--accent); }
.fq__q { margin-top: 10px; font: 600 21px/1.5 var(--font-title); letter-spacing: -.03em; }
.fq__opts { margin-top: 14px; display: grid; gap: 8px; }
.fq__opt { min-height: 52px; padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper); text-align: left; font: 500 16px/1.4 var(--font-title); transition: transform .12s; }
.fq__opt:disabled { cursor: default; }
.fq__opt.is-right { border-color: var(--olive); background: var(--olive); color: #fff; font-weight: 700; }
.fq__opt.is-right::after { content: ' ✓'; }
.fq__opt.is-wrong { border-color: var(--accent); color: var(--accent); text-decoration: line-through; }
.fq__opt.is-dim { opacity: .45; }
@media (hover: hover) { .fq__opt:not(:disabled):hover { border-color: var(--accent); transform: translateX(2px); } }
.fq__fb { margin: 12px 0; display: grid; gap: 2px; font-size: 14px; color: var(--muted); animation: rise .3s var(--ease); }
.fq__fb b { font: 700 17px/1.4 var(--font-title); }
.fq__fb.is-right b { color: var(--olive); }
.fq__fb.is-wrong b { color: var(--accent); }
.fq__result { display: grid; justify-items: center; gap: 4px; padding: 8px 0 2px; text-align: center; animation: rise .4s var(--ease); }
.fq__result .seal { margin-bottom: 6px; animation: seal-press .7s var(--ease) both; }
.fq__score { font: 700 44px/1 var(--font-title); }
.fq__score b { color: var(--accent); }
.fq__grade { font: 600 18px/1.4 var(--font-title); }
.fq__grade b { color: var(--accent); }
.fq__sub { color: var(--muted); font-size: 14px; }
.fq__actions { margin-top: 12px; width: 100%; display: grid; gap: 8px; }
.fq--own { border-style: dashed; }
.fq__preview { margin-top: 10px; display: grid; gap: 6px; counter-reset: q; }
.fq__preview li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--rule); background: var(--paper); font-size: 14px; counter-increment: q; }
.fq__preview li span::before { content: 'Q' counter(q) '. '; color: var(--accent); font-weight: 700; }
.fq__preview b { color: var(--olive); font-size: 13px; }

/* ---------- 편집 화면 v3: 질문과 답 중심 ---------- */
.ed-trend { margin: 14px auto 0; max-width: 420px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; border: 1px solid var(--rule); background: var(--paper-raised); font-size: 12px; }
.ed-trend div { display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; }
.ed-trend div + div { border-left: 1px solid var(--rule); }
.ed-trend dt { color: var(--faint); flex: 0 0 auto; }
.ed-trend dd { color: var(--ink); font-family: var(--font-title); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fq-check { margin-top: 14px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--rule); background: var(--paper-raised); cursor: pointer; }
.fq-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.fq-check span { display: grid; gap: 2px; }
.fq-check b { font-size: 15px; }
.fq-check small { color: var(--muted); font-size: 13px; }
.basket-box { margin-top: 12px; }
.basket-box .basket__tabs { margin-inline: 0; padding: 0; }
.rec__qa { color: var(--faint); font-size: 13px; line-height: 1.5; }

/* ---------- 예시 답변 ---------- */
.ed-ex { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ed-ex:empty { display: none; }
.ed-ex__k { color: var(--faint); font-size: 12px; margin-right: 2px; }
.ed-ex__btn { min-height: 36px; padding: 6px 12px; border: 1px dashed var(--rule-strong); border-radius: 999px; background: transparent; color: var(--muted); font: 500 13px/1.4 var(--font-title); text-align: left; }
@media (hover: hover) { .ed-ex__btn:hover { border-color: var(--accent); color: var(--accent); } }

/* ---------- 오늘 다시 만나기 ---------- */
.revisit { margin-top: 12px; display: grid; gap: 8px; }
.revisit__item { width: 100%; display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper-raised); text-align: left; }
.revisit__item small { color: var(--faint); font-size: 12px; }
.revisit__item b { font: 600 16px/1.4 var(--font-title); }
.revisit__item[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.revisit__memo { margin-top: 12px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.memo { margin-top: 16px; padding: 14px 16px 8px; background: #FBF4E2; border: 1px solid #E6D7AE; position: relative; transform: rotate(-.4deg); }
.memo__k { color: #7A5B1E; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.memo__text { margin-top: 4px; font: 600 19px/1.5 var(--font-title); }
.memo__from { color: var(--muted); font-size: 13px; }
.memo__actions { display: flex; gap: 4px; margin: 4px -8px 0; }

/* ---------- 친구가 기억하는 그해 ---------- */
.fmem { margin-top: 20px; border: 1px solid var(--olive); background: var(--paper-raised); }
.fmem__head { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; background: var(--olive-soft); border-bottom: 1px solid #D5D9CA; }
.fmem__head h2 { font: 600 16px/1.4 var(--font-title); color: var(--olive); }
.fmem__head span { color: var(--muted); font-size: 12px; }
.fmem__item { display: grid; grid-template-columns: 60px 1fr; border-bottom: 1px solid var(--rule); }
.fmem__item:last-child { border-bottom: 0; }
.fmem__item.is-new { animation: row-glow 3s var(--ease); }
.fmem__when { display: grid; place-items: center; border-right: 1px solid var(--rule); font: 600 14px/1.2 var(--font-title); color: var(--muted); }
.fmem__body { padding: 12px 14px; }
.fmem__body p { font: 500 16px/1.6 var(--font-title); }
.fmem__body small { color: var(--faint); font-size: 12px; }
.fmem__pub { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.fmem__pub input { width: 16px; height: 16px; accent-color: var(--olive); }
.rec__fmem { margin-top: 2px; padding: 6px 10px; border-left: 3px solid var(--olive); background: var(--olive-soft); font: 500 14px/1.55 var(--font-title); }
.rec__fmem b { display: block; color: var(--olive); font: 700 11px/1.4 var(--font-body); letter-spacing: .04em; }
.mem-form { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--rule-strong); width: 100%; display: grid; gap: 8px; text-align: left; }
.mem-form__q { font: 600 18px/1.5 var(--font-title); }
.mem-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mem-form__help { color: var(--faint); font-size: 12px; }
.mem-form--sent p { font: 500 15px/1.6 var(--font-title); }
.mem-form--sent small { color: var(--faint); font-size: 12px; }

/* ---------- 사용 환경 안내 ---------- */
.inapp { position: sticky; top: 0; z-index: 40; padding: 10px var(--gutter); background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.55; }
.inapp p { max-width: var(--page-max); margin: 0 auto; }
.inapp b { color: #FFD9A8; margin-right: 4px; }
.inapp__btns { max-width: var(--page-max); margin: 6px auto 0; display: flex; gap: 6px; }
.inapp .btn--quiet { color: var(--paper); }
.keep-note { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--rule-strong); border-left: 3px solid var(--accent); background: var(--paper-raised); }
.keep-note p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.keep-note b { display: block; color: var(--ink); font: 600 15px/1.4 var(--font-title); margin-bottom: 2px; }
.keep-note__btns { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.backup .set-group { display: grid; gap: 12px; }
.backup .set-group p, .backup-steps { line-height: 1.65; }
.backup-steps { padding-inline-start: 1.6em; list-style: decimal; }
.backup-steps li + li { margin-top: 4px; }
.backup .input { width: 100%; min-width: 0; }
.backup input[type=file] { height: auto; padding-block: 10px; }
.backup input::file-selector-button { margin-inline-end: 8px; }
#backupPreview:not(:empty) { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--rule-strong); background: var(--paper-raised); }
#backupPreview h3 { font: 600 18px/1.5 var(--font-title); }
#backupStatus { margin-block: 16px; line-height: 1.6; }
.l-foot { line-height: 1.7; }

/* First memories and friend entrances reuse the document palette. */
.first-picks { margin: 24px 0; }
.first-picks__choices { display: flex; flex-wrap: wrap; gap: 8px; }
.first-picks__choices .btn { white-space: normal; text-align: left; }
.first-picks__choices [aria-pressed="true"] { border-color: var(--accent, #B74332); color: #B74332; background: #f5e8df; }
#firstLine { margin: 12px 0 24px; min-height: 84px; }
#issueNick { margin-top: 10px; }
#issueSend { margin-top: 24px; }
#issueError { color: #B74332; line-height: 1.7; }
.friend-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; }
.friend-actions .btn { flex: 1 1 160px; }
.friend-actions .link { width: 100%; text-align: center; }
#memoryBox { scroll-margin-top: 20px; }
#memoryBox > label { display: block; margin: 12px 0 8px; }

/* Cohort questions retain the paper, serif and seal palette. */
.poll-card,.poll-return{margin:24px 0;padding:24px;border:1px solid var(--line,#c9bca6);background:var(--paper,#faf7ef)}
.poll-question{font-family:var(--serif,serif);font-size:1.3rem;line-height:1.6;margin:20px 0}
.poll-topics,.poll-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.poll-topics [aria-pressed=true]{color:var(--red,#9a332b);box-shadow:inset 0 -2px currentColor}
.poll-options{border:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:10px;min-width:0}
.poll-options label{display:flex;align-items:center;gap:10px;border:1px solid var(--line,#c9bca6);padding:13px;cursor:pointer}
.poll-options label:has(:checked){border-color:var(--red,#9a332b);color:var(--red,#9a332b);background:#9a332b08}
.poll-options input{accent-color:var(--red,#9a332b);flex-shrink:0}.poll-options label:focus-within{outline:2px solid var(--red,#9a332b);outline-offset:2px}
.poll-counts{list-style:none;padding:0}.poll-counts li{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line,#c9bca6)}
.poll-counts b{font-size:.75rem;color:var(--red,#9a332b)}.poll-counts strong{white-space:nowrap}.poll-birth{padding:16px;border:1px dashed var(--line,#c9bca6)}
@media(max-width:480px){.poll-card,.poll-return{padding:18px}.poll-options{grid-template-columns:1fr}.poll-actions .btn{flex:1 1 140px}}

/* A year marked by its author, independent of school, work or age. */
.special-year { margin: 22px 0; padding: 16px; border: 1px solid var(--rule); background: var(--paper-raised); }
.special-year > label { display: flex; align-items: center; gap: 10px; min-height: var(--touch); font-weight: 600; cursor: pointer; }
.special-year input[type="checkbox"] { width: 19px; height: 19px; flex: 0 0 auto; accent-color: var(--accent); }
.special-year__fields { margin-top: 12px; }
.special-year__fields[hidden] { display: none; }
.special-year__fields label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.special-year__choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.special-year__choices button { min-height: var(--touch); }
.year-stamp, .rec__when .year-stamp { display: inline-block; max-width: 100%; margin-top: 8px; padding: 5px 6px; border: 2px solid var(--accent); outline: 1px solid var(--accent); outline-offset: -4px; border-radius: 2px; color: var(--accent); font: 600 12px/1.4 var(--font-title); letter-spacing: .02em; overflow-wrap: anywhere; white-space: normal; transform: rotate(-5deg); }
.rec__when .year-stamp { max-width: 66px; }
@media (prefers-reduced-motion: no-preference) { .rec__row.is-new .year-stamp { animation: seal-press .55s var(--ease) both; } }

/* A visible YouTube player for the songs in this record. */
.memory-music { margin: 24px 0; padding: 18px; border: 1px solid var(--rule); background: var(--paper-raised); }
.memory-music__eyebrow { margin-bottom: 4px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.memory-music__title { font: 500 19px/1.5 var(--font-title); overflow-wrap: anywhere; }
.memory-music__select { display: block; width: 100%; min-height: var(--touch); margin: 12px 0; padding: 8px; border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); font: inherit; }
.memory-music__preview { margin-top: 14px; min-width: 0; }
.memory-music__thumbnail { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--rule); }
.memory-music__play { display: block; width: 100%; min-height: var(--touch); margin-top: 10px; padding: 12px; border: 1px solid var(--accent); background: var(--accent); color: white; font: inherit; font-weight: 600; cursor: pointer; }
.memory-music__frame { display: block; width: 100%; min-height: 200px; aspect-ratio: 16 / 9; border: 0; background: #171813; }
.memory-music__link { display: inline-flex; align-items: center; min-height: var(--touch); margin-top: 8px; color: var(--accent); text-underline-offset: 3px; }
.memory-music__help, .memory-music__empty { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 420px) { .memory-music { padding: 12px; } }
.memory-music__play[hidden], .memory-music__select[hidden] { display: none; }
.memory-music__frame { height: auto; }

/* Home preview, cohort discovery and same-age comparison. */
.teaser__head .steps__list { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
.teaser__head .steps__list li + li { border: 0; padding-left: 0; }
.teaser__head .steps__no { font-size: 40px; min-width: 48px; }
.home-discovery { border-top: 1px solid var(--rule-strong); padding-block: 32px; margin-top: 24px; }
.home-cohort { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.home-cohort input { width: 110px; }
.home-vote { padding: 20px; margin-top: 20px; border: 1px solid var(--rule); background: var(--paper-raised); }
.home-vote > p { font: 500 22px/1.6 var(--font-title); margin-bottom: 16px; }
.vs-form > div { display: grid; gap: 8px; min-width: 0; }
.home-explore { padding-bottom: 24px; }
/* Editorial home: the ballot and the paired time records have distinct covers. */
.home-explore { padding-top: 16px; }
.home-discovery { position: relative; padding: 38px; margin-top: 24px; border: 1px solid #d7c8b9; border-top: 4px solid var(--accent); border-radius: 4px; background: #f0e8dd; }
.explore-heading { margin-bottom: 28px; }
.explore-kicker { display: flex; gap: 12px; align-items: center; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; margin-bottom: 18px; }
.explore-kicker > span { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid currentColor; border-radius: 50%; font-family: var(--font-title); font-size: 14px; }
.explore-heading .sec-title { font: 600 clamp(28px, 3.5vw, 40px)/1.35 var(--font-title); letter-spacing: -.045em; margin: 0; text-wrap: balance; }
.explore-heading .sec-title em { font-style: normal; color: var(--accent); }
.explore-heading .sec-desc { font-size: 15px; line-height: 1.85; margin-top: 14px; color: #68645a; }
.home-cohort { margin-top: 0; gap: 8px; padding-top: 20px; border-top: 1px solid #d9cbbb; }
.home-cohort > label { font-size: 13px; font-weight: 600; margin-right: 4px; }
.home-cohort input { width: 98px; min-height: 44px; background: #fffdf8; border-color: #c9bcaa; font-size: 16px; }
.home-cohort .btn { min-height: 44px; padding: 10px 16px; font-size: 13px; }
.home-cohort input[readonly] { background: transparent; border-style: dashed; }
#homeBirthStatus { font-size: 12px; line-height: 1.65; margin-top: 10px; max-width: 640px; }
.home-vote { margin-top: 26px; padding: 30px; border: 1px solid #d9cebf; border-radius: 3px; background: #fffefb; box-shadow: 0 4px 0 #e3d8c9; }
.home-vote > .eyebrow { font: 600 11px/1.6 var(--font-body); color: var(--accent); letter-spacing: .09em; margin-bottom: 6px; }
.home-vote > .sec-title { font-size: clamp(22px, 2.4vw, 29px); line-height: 1.5; letter-spacing: -.035em; }
.home-vote > .help { font: 400 12px/1.75 var(--font-body); color: var(--muted); margin: 10px 0 0; }
.home-vote .poll-topics { gap: 4px; width: fit-content; padding: 4px; background: #f2efe8; border-radius: 5px; margin: 22px 0; }
.home-vote .poll-topics .btn { min-height: 40px; padding: 8px 22px; color: var(--muted); border-radius: 3px; }
.home-vote .poll-topics [aria-pressed=true] { color: var(--accent); background: #fffefb; box-shadow: 0 1px 4px #29251d18; }
.home-vote .poll-question { font: 600 clamp(19px, 2vw, 23px)/1.6 var(--font-title); margin: 24px 0 18px; }
.home-vote .poll-options { gap: 10px; }
.home-vote .poll-options label { padding: 16px; min-height: 58px; border: 1px solid #ded8cc; border-radius: 4px; background: #fffefb; font-size: 15px; transition: background .15s, border-color .15s; }
.home-vote .poll-options label:has(:checked) { background: #f9eee8; border-color: var(--accent); color: var(--accent); }
.home-vote .poll-options input { width: 17px; height: 17px; }
.home-vote .poll-actions { gap: 10px; margin-top: 22px; }
.home-vote #pollVote { min-width: 210px; }
.home-vote #pollResults { border-color: transparent; background: transparent; }
.home-vote #pollStatus:empty { display: none; }
.home-vote .poll-actions:has(#pollRecord) { padding-top: 18px; border-top: 1px dashed var(--rule); }
.home-vote .poll-actions:has(#pollRecord) .btn { border: 0; background: transparent; padding: 6px 0; min-height: 40px; font-size: 13px; margin-right: 18px; text-decoration: underline; text-underline-offset: 5px; }
.home-vote .poll-counts li { padding: 16px 12px; font-size: 15px; }
.home-vote .poll-counts li:has(b) { background: #f9eee8; color: var(--accent); }
.home-vote #pollCounts > p { font-size: 14px; color: var(--muted); }
#homePollNext { display: block; margin: 22px auto 0; color: var(--accent); font-size: 14px; min-height: 44px; }
#homePoll .poll-return { margin: 0 0 0; padding: 18px 26px; border: 1px solid #d7c8b9; border-top: 0; background: #f0e8dd; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
#homePoll .poll-return .eyebrow { margin: 0; font-size: 11px; color: var(--muted); }
#homePoll .poll-return .link { font-size: 13px; margin: 0; }
#homePoll .poll-return > p:not(.eyebrow) { font-size: 12px; }
.vs-box { position: relative; margin-top: 64px; margin-bottom: 40px; padding: 38px; border: 1px solid #c9cebe; border-top: 4px solid #626c51; border-radius: 4px; background: #e9ece2; }
.vs-box .explore-kicker, .vs-box .sec-title em { color: #59654b; }
.vs-box .vs-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; margin: 28px 0 22px; align-items: stretch; }
.vs-form .vs-person { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 24px; background: #fffef8; border: 1px solid #d1d5c7; border-radius: 3px; box-shadow: 0 4px 0 #d9dece; }
.vs-person__tag { font-size: 10px; color: #8a907f; letter-spacing: .15em; font-weight: 600; }
.vs-form .vs-person > label { font: 600 21px/1.5 var(--font-title); color: var(--ink); }
.vs-person > p { color: var(--muted); font-size: 12px; margin-top: auto; }
.vs-person .input { background: #fffef8; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 8px 0; min-height: 44px; }
.vs-person .stepper { grid-template-columns: 40px minmax(0,1fr) 40px; margin-top: auto; border-color: #d2d5c9; background: #fffef8; }
.vs-person .stepper__field input { font: 500 30px/1.3 var(--font-title); }
.vs-person .stepper__btn { min-width: 36px; }
.vs-person--me::after { content: 'VS'; position: absolute; right: -26px; top: 50%; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; background: #e9ece2; border: 1px solid #c9cebe; border-radius: 50%; color: #626c51; font: italic 13px/1 var(--font-title); }
.vs-form .vs-age { grid-column: 1 / -1; padding-top: 14px; font-size: 14px; }
.vs-age__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #424c37; }
.vs-age__heading output { font: 600 28px/1.3 var(--font-title); font-variant-numeric: tabular-nums; }
.vs-age__slider { display: block; width: 100%; height: 44px; margin: 6px 0 0; padding: 0; accent-color: #59654b; cursor: pointer; }
.vs-age__slider:focus-visible { outline: 2px solid #59654b; outline-offset: 4px; border-radius: 4px; }
.vs-age__ends { display: flex; justify-content: space-between; color: #59654b; font-size: 13px; }
.vs-box > .btn { max-width: 380px; margin-inline: auto; min-height: 52px; background: #59654b; border-color: #59654b; }
@media (hover:hover) { .home-vote .poll-options label:hover { border-color: #b77968; background: #fbf5ee; } .vs-box > .btn:hover { background: #424e36; } }
@media (max-width: 600px) {
  .home-discovery, .vs-box { padding: 24px 18px; }
  .vs-box { margin-top: 44px; }
  .explore-heading { margin-bottom: 22px; }
  .explore-heading .sec-desc { font-size: 14px; }
  .home-vote { padding: 22px 16px; margin-inline: -5px; }
  .home-vote .poll-options { grid-template-columns: 1fr; }
  .home-vote .poll-topics .btn { padding-inline: 18px; }
  .home-vote .poll-actions:has(#pollRecord) { gap: 4px 14px; }
  .home-vote .poll-actions:has(#pollRecord) .btn { flex: 0 1 auto; margin-right: 0; }
  .vs-box .vs-form { grid-template-columns: 1fr; gap: 24px; }
  .vs-form .vs-person { padding: 20px; }
  .vs-form .vs-person > label { font-size: 16px; }
  .vs-person .stepper__field input { font-size: 25px; }
  .vs-person .stepper__btn { min-width: 28px; padding: 0; }
  .vs-person--me::after { right: calc(50% - 16px); top: auto; bottom: -29px; }
  #homePoll .poll-return { padding: 18px; }
}
@media (max-width: 380px) {
  .vs-box .vs-form { grid-template-columns: 1fr; gap: 22px; }
  .vs-person--me::after { right: calc(50% - 16px); top: auto; bottom: -28px; }
}

.vs-box > .btn { display: flex; width: min(100%, 380px); justify-content: center; }
.vs-person > p { margin-top: 0; }

/* Personal records are the main flow; extra activities follow the issue action. */
.home-extras { margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--rule-strong); }
.home-extras__head { margin-bottom: 26px; }
.home-extras__head .eyebrow { color: var(--muted); font-size: 11px; }
.home-extras__head h2 { font: 600 26px/1.5 var(--font-title); margin: 8px 0; }
.home-extras__head > p:last-child { font-size: 14px; line-height: 1.8; color: var(--muted); }
.home-extras .explore-heading .sec-title { font-size: clamp(25px, 3vw, 32px); }
.home-extras .vs-box { margin-top: 32px; }
@media(max-width:600px) { .home-extras { margin-top: 48px; padding-top: 28px; } }
