/* 안부한장 — "한 장" 디자인 (2026-10-03 개편)
   한지 미색 배경 · 먹색 남색 · 연지색 하트 · 폴라로이드/편지지 카드 · 제목은 고운바탕(명조)
   트립N빵(주황·테두리 카드·칩)과 다른 얼굴을 갖는다 */
:root {
  --bg: #F3EEE6; --paper: #FFFCF7; --paper-2: #F7F1E7; --ink: #2B2722; --muted: #6F6658; --line: #E3DACB;
  --navy: #2F4260; --navy-ink: #22324B; --navy-soft: #E4E9F1; --on-navy: #FFFFFF;
  --rose: #D45D72; --rose-soft: #FBE7EB; --sage: #5C8A70; --sage-soft: #E3EEE7;
  --amber: #B97A22; --amber-soft: #F7EBD6; --sun-soft: #FFF2C9; --lav-soft: #ECE8F5;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 10px 26px rgba(60, 40, 20, .09);
  --serif: "Gowun Batang", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  --sans: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  /* 개인정보처리방침 등 기존 이름 호환 */
  --text: var(--ink); --surface: var(--paper); --surface-2: var(--paper-2); --accent: var(--navy);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1A18; --paper: #252320; --paper-2: #2E2B27; --ink: #F0EAE0; --muted: #ABA193; --line: #3B3731;
    --navy: #4A6490; --navy-ink: #A9BEDF; --navy-soft: #26303F; --on-navy: #FFFFFF;
    --rose: #EA8A9A; --rose-soft: #3A242A; --sage: #8DBBA0; --sage-soft: #213028;
    --amber: #E2B064; --amber-soft: #3A2E1C; --sun-soft: #3A3420; --lav-soft: #2C2A38;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; padding-bottom: env(safe-area-inset-bottom); }
#app { max-width: 540px; margin: 0 auto; padding: 0 18px 90px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy-ink); }
.muted { color: var(--muted); } .small { font-size: 14px; }
.boot, .empty { padding: 30vh 0; text-align: center; color: var(--muted); font-family: var(--serif); }
.row { display: flex; align-items: center; gap: 8px; } .grow { flex: 1; min-width: 0; }
.foot { text-align: center; margin-top: 36px; color: var(--muted); font-size: 13px; }
.foot a { color: inherit; }

/* ── 머리말 ── */
.mast { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 0 6px; background: var(--bg); box-shadow: 0 8px 10px -10px rgba(60, 40, 20, .25); }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.wordmark::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--rose); margin-right: 7px; transform: rotate(45deg) translateY(-2px); }
.icon-btn { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; text-decoration: none; color: var(--ink); font-size: 20px; border-radius: 99px; }
.icon-btn:active { background: var(--paper-2); }
.day-head { margin: 6px 0 18px; }
.date { margin: 0; color: var(--muted); font-size: 15px; letter-spacing: .02em; }
.day-head h1, .cover h1, .page-title { font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.3; margin: 4px 0 0; letter-spacing: -.01em; word-break: keep-all; }
.page-title { font-size: 24px; margin: 4px 0 6px; }
h2 { font-family: var(--serif); font-size: 19px; margin: 0 0 12px; font-weight: 700; }
h2 span { font-family: var(--sans); font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.block { margin-top: 34px; }

/* ── 폴라로이드 (오늘의 한 장) ── */
.polaroid { position: relative; background: var(--paper); padding: 12px 12px 16px; border-radius: 6px; box-shadow: var(--shadow); transform: rotate(-1.1deg); margin: 6px 4px 22px; }
.polaroid:nth-child(even) { transform: rotate(1deg); }
.polaroid::before { content: ""; position: absolute; top: -9px; left: 50%; width: 84px; height: 20px; transform: translateX(-50%) rotate(-2deg);
  background: rgba(212, 93, 114, .22); border-radius: 2px; }
.polaroid .photo { width: 100%; aspect-ratio: 4 / 5; max-height: 460px; object-fit: cover; display: block; border-radius: 3px; background: var(--paper-2); cursor: zoom-in; }
.face { aspect-ratio: 4 / 3; border-radius: 3px; display: grid; place-items: center; align-content: center; gap: 4px; text-align: center; padding: 0 14px;
  background: repeating-linear-gradient(var(--paper) 0 31px, var(--line) 31px 32px); }
.face .e { font-size: 64px; line-height: 1; }
.face .l { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.face.empty { background: var(--paper-2); border: 2px dashed var(--line); }
.face.empty .e { font-size: 46px; opacity: .85; }
.polaroid.late .face.empty { border-color: var(--amber); background: var(--amber-soft); }
.caption { padding: 12px 4px 0; }
.note { font-family: var(--serif); font-size: 20px; line-height: 1.5; margin: 2px 0 6px; word-break: keep-all; }
.mood-tag { display: inline-block; font-size: 15px; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: var(--paper-2); }
.mood-tag.good { background: var(--sun-soft); } .mood-tag.ok { background: var(--sage-soft); } .mood-tag.tired { background: var(--lav-soft); }
.meta { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 0; color: var(--muted); font-size: 14px; }
.hearted { margin: 6px 4px 0; font-size: 14px; color: var(--rose); }
.heart { border: 0; background: var(--rose-soft); color: var(--rose); border-radius: 99px; min-height: 40px; min-width: 56px; padding: 4px 14px; font-weight: 800; cursor: pointer; }
.heart.on { background: var(--rose); color: #fff; }
.heart.sm { min-height: 40px; min-width: 44px; padding: 2px 10px; font-size: 14px; }

/* ── 버튼 ── */
.btn { border: 0; border-radius: 99px; padding: 13px 20px; min-height: 52px; font-weight: 800; cursor: pointer; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.primary { background: var(--navy); color: var(--on-navy); box-shadow: 0 6px 16px rgba(47, 66, 96, .25); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; } .btn + .btn.block { margin-top: 10px; }
.btn:disabled { opacity: .5; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pill { flex: 1; border: 0; border-radius: 99px; min-height: 46px; padding: 8px 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; cursor: pointer; }

/* ── 이번 주: 우체국 소인 ── */
.stamps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.stamp { text-align: center; font-size: 13px; color: var(--muted); }
.stamp i { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 4px; border-radius: 50%; border: 2px dashed var(--line); font-style: normal; font-weight: 900; color: #fff; }
.stamp.ok i { border: 2px solid var(--sage); background: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.stamp.today span { color: var(--ink); font-weight: 800; }
.stamp.today:not(.ok) i { border-color: var(--navy); }

/* ── 지난 소식: 작은 앨범 ── */
.album { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mini { margin: 0; background: var(--paper); padding: 7px 7px 9px; border-radius: 4px; box-shadow: var(--shadow); transform: rotate(-.8deg); min-width: 0; }
.mini:nth-child(3n+2) { transform: rotate(.9deg); } .mini:nth-child(3n) { transform: rotate(-.3deg); }
.mini .photo { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 2px; background: var(--paper-2); cursor: zoom-in; }
.mini-face { aspect-ratio: 1; display: grid; place-items: center; font-size: 40px; border-radius: 2px; background: var(--paper-2); }
.mini-face.good { background: var(--sun-soft); } .mini-face.ok { background: var(--sage-soft); } .mini-face.tired { background: var(--lav-soft); }
.mini figcaption { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 7px 2px 0; font-size: 13px; color: var(--muted); }
.mini .m-note { display: block; font-family: var(--serif); color: var(--ink); font-size: 14px; padding: 4px 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 가족 ── */
.avatars { display: flex; flex-wrap: wrap; gap: 14px; }
.avatar { text-align: center; width: 64px; font-size: 13px; }
.avatar i { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 5px; border-radius: 50%; background: var(--c, var(--navy)); color: #fff; font-style: normal; font-weight: 800; font-size: 20px; font-family: var(--serif); }
.avatar span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 편지지 카드 (만들기·참여·안내) ── */
.letter-card { background: var(--paper); border-radius: 16px; padding: 20px 18px 20px 34px; box-shadow: var(--shadow); margin-top: 18px;
  background-image: linear-gradient(90deg, transparent 0 20px, rgba(212, 93, 114, .25) 20px 21.5px, transparent 21.5px); }
.letter-card > * + * { margin-top: 16px; }
.letter-card h2 { margin-bottom: 0; }
.kicker { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--rose); }
.setup p { margin: 6px 0 0; word-break: keep-all; }
.field { display: block; }
.field > span { display: block; font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.input { width: 100%; border: 0; border-bottom: 2px solid var(--line); background: transparent; border-radius: 0; padding: 10px 2px; min-height: 48px; outline: none; font-size: 18px; }
.input:focus { border-color: var(--navy); }
select.input { appearance: none; -webkit-appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23857B6D' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 4px center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.chip { border: 0; background: var(--paper-2); border-radius: 99px; padding: 8px 16px; min-height: 42px; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); }

/* ── 홈 표지 ── */
.home-top { display: flex; align-items: center; gap: 8px; padding: calc(16px + env(safe-area-inset-top)) 0 0; }
.beta { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; }
.cover { padding: 18px 0 4px; }
.cover p { margin: 10px 0 0; color: var(--muted); word-break: keep-all; }
.stack-art { position: relative; height: 150px; margin: 6px 0 14px; }
.stack-art i { position: absolute; top: 10px; width: 108px; height: 124px; background: var(--paper); border-radius: 4px; box-shadow: var(--shadow); isolation: isolate;
  display: grid; place-items: center; padding-bottom: 22px; font-style: normal; font-size: 40px; }
.stack-art i::after { content: ""; position: absolute; left: 8px; right: 8px; top: 8px; bottom: 30px; border-radius: 2px; background: var(--c); z-index: -1; }
.stack-art i:nth-child(1) { left: 6%; transform: rotate(-9deg); --c: var(--sun-soft); }
.stack-art i:nth-child(2) { left: calc(50% - 54px); top: 0; transform: rotate(3deg); --c: var(--sage-soft); z-index: 1; }
.stack-art i:nth-child(3) { right: 6%; transform: rotate(10deg); --c: var(--rose-soft); }
.list a { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 18px; }
.list a:first-child { border-top: 0; }
.list-card { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); padding: 4px 16px; }

/* ── 설정 ── */
.group { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); padding: 6px 18px 16px; margin-top: 16px; }
.group > h2 { margin: 14px 0 4px; font-size: 17px; }
.group .field { margin-top: 14px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle > span { display: grid; gap: 2px; }
.toggle small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.toggle input { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; margin: 0; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.toggle input:checked { background: var(--navy); }
.toggle input:checked::after { transform: translateX(22px); }
.toggle input:focus-visible { outline: 3px solid var(--navy-soft); outline-offset: 2px; }

/* ── 부모님 화면: 큰 글씨, 기분마다 다른 색 타일 ── */
.parent { padding: calc(26px + env(safe-area-inset-top)) 0 20px; }
.greet { font-family: var(--serif); font-size: 32px; font-weight: 700; line-height: 1.35; margin: 6px 0 20px; word-break: keep-all; }
.ask { font-size: 19px; color: var(--muted); margin: 14px 0 12px; }
.mood-tiles { display: grid; gap: 12px; }
.mood-tile { border: 0; border-radius: 22px; min-height: 96px; padding: 0 22px; font-size: 26px; font-weight: 900; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; gap: 18px; text-align: left; box-shadow: inset 0 -4px 0 rgba(0,0,0,.06); }
.mood-tile .e { font-size: 46px; line-height: 1; }
.mood-tile.good { background: var(--sun-soft); } .mood-tile.ok { background: var(--sage-soft); } .mood-tile.tired { background: var(--lav-soft); }
.mood-tile:active { transform: scale(.98); box-shadow: none; }
.photo-btns { display: grid; gap: 10px; margin-top: 14px; }
.photo-btns.two { grid-template-columns: 1fr 1fr; }
.big-btn { width: 100%; border: 2px dashed var(--line); background: var(--paper); border-radius: 20px; min-height: 76px; font-size: 21px; font-weight: 800; cursor: pointer; color: var(--ink); }
.note-form { margin-top: 16px; background: var(--paper); border-radius: 20px; padding: 14px 16px 16px; box-shadow: var(--shadow); }
.note-form label { display: block; font-family: var(--serif); font-weight: 700; font-size: 19px; }
.note-form textarea { width: 100%; border: 0; outline: none; resize: none; background: repeating-linear-gradient(transparent 0 35px, var(--line) 35px 36px);
  line-height: 36px; font-family: var(--serif); font-size: 20px; padding: 0 2px; margin: 6px 0 10px; }
.note-form .btn { width: 100%; min-height: 60px; font-size: 20px; }
.sent-card { background: var(--paper); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 6px; }
.sent-card.pop { animation: pop .5s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.sent-title { font-family: var(--serif); font-size: 22px; font-weight: 700; margin: 0; }
.sent-card .hearts { color: var(--rose); font-weight: 800; margin: 8px 0 0; font-size: 18px; }
.sent-photos { display: flex; gap: 10px; margin-bottom: 12px; overflow-x: auto; }
.sent-photos .photo { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; border: 5px solid #fff; box-shadow: var(--shadow); flex: none; }
.streak { font-size: 18px; margin-top: 24px; }
.tip { font-size: 15px; color: var(--muted); margin-top: 22px; }

/* ── 사진·한마디 같이 보내기 (공용 입력칸) ── */
.composer { margin-top: 16px; background: var(--paper); border-radius: 20px; padding: 14px 16px 16px; box-shadow: var(--shadow); }
.cmp-label { display: block; font-family: var(--serif); font-weight: 700; font-size: 19px; margin-bottom: 4px; }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; background: repeating-linear-gradient(transparent 0 31px, var(--line) 31px 32px);
  line-height: 32px; font-family: var(--serif); font-size: 18px; padding: 0 2px; margin: 4px 0 10px; }
.composer.big textarea { background: repeating-linear-gradient(transparent 0 35px, var(--line) 35px 36px); line-height: 36px; font-size: 20px; }
.cmp-preview { position: relative; width: 132px; margin: 6px 0 4px; }
.cmp-preview img { width: 132px; height: 132px; object-fit: cover; border-radius: 4px; border: 6px solid #fff; box-shadow: var(--shadow); display: block; transform: rotate(-2deg); }
.composer.big .cmp-preview, .composer.big .cmp-preview img { width: 180px; height: 180px; }
.cmp-x { position: absolute; top: -8px; right: -10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); font-weight: 800; cursor: pointer; }
.cmp-row { display: flex; gap: 8px; margin-bottom: 10px; }
.cmp-row.two > * { flex: 1; }
.cmp-add { border: 0; border-radius: 99px; min-height: 42px; padding: 6px 16px; background: var(--paper-2); font-weight: 700; cursor: pointer; }
.composer.big .cmp-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.composer.big .cmp-row.two { grid-template-columns: 1fr 1fr; }
.composer.big .cmp-send { min-height: 60px; font-size: 20px; }
.composer.has-photo .cmp-send { animation: nudge 1.4s ease-in-out 2; }
@keyframes nudge { 50% { transform: scale(1.03); box-shadow: 0 0 0 6px var(--navy-soft); } }
.cmp-hint { margin: 0 0 10px; color: var(--navy-ink); font-size: 15px; word-break: keep-all; }
.composer.big .cmp-hint { font-size: 18px; }

/* ── 가족 이야기 (말풍선) ── */
.talk-day { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 6px; }
.talk-empty { margin: 0; }
.bubble { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
.bubble.mine { justify-content: flex-end; }
.b-av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c, var(--navy)); color: #fff; font-style: normal; font-weight: 800; font-size: 14px; font-family: var(--serif); }
.b-body { max-width: 78%; background: var(--paper); border-radius: 4px 16px 16px 16px; padding: 8px 12px; box-shadow: var(--shadow); min-width: 0; }
.bubble.mine .b-body { background: var(--navy-soft); border-radius: 16px 4px 16px 16px; }
.b-name { display: block; font-size: 13px; font-weight: 800; color: var(--muted); }
.b-body p { margin: 2px 0; word-break: keep-all; overflow-wrap: anywhere; }
.b-body .photo { width: 100%; max-width: 240px; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; margin: 4px 0; cursor: zoom-in; background: var(--paper-2); }
.b-meta { display: block; font-size: 12px; color: var(--muted); }
.b-heart { color: var(--rose); font-weight: 700; }
.b-del { border: 0; background: none; padding: 10px 6px; margin: -10px -6px; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }

/* ── 부모님 화면: 자녀들이 보낸 이야기 ── */
.kids-talk { margin: 18px 0 8px; }
.p-h { font-family: var(--serif); font-size: 22px; margin: 0 0 10px; }
.kid-note { background: var(--paper); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 12px;
  border-left: 5px solid var(--rose); }
.kn-who { margin: 0 0 6px; font-size: 18px; } .kn-who span { color: var(--muted); font-size: 15px; margin-left: 4px; }
.kid-note .photo { width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 8px; cursor: zoom-in; background: var(--paper-2); }
.kn-msg { font-family: var(--serif); font-size: 21px; line-height: 1.5; margin: 0 0 10px; word-break: keep-all; }
.kn-heart { min-height: 48px; font-size: 17px; padding: 6px 18px; }
.kn-report { display: block; margin: 6px 0 0 auto; padding: 10px 6px; }

/* ── 당겨서 새로고침 ── */
.ptr { position: fixed; top: calc(env(safe-area-inset-top) - 44px); left: 50%; z-index: 40; width: 40px; height: 40px; border-radius: 50%; background: var(--paper);
  box-shadow: var(--shadow); display: grid; place-items: center; font-size: 22px; font-weight: 800; color: var(--muted); transform: translate(-50%, 0); transition: color .15s; pointer-events: none; }
.ptr.ready { color: var(--navy); }
.ptr.spin { transform: translate(-50%, 64px) !important; animation: ptr-spin .8s linear infinite; color: var(--navy); }
@keyframes ptr-spin { to { transform: translate(-50%, 64px) rotate(360deg); } }
html { overscroll-behavior-y: contain; }

/* ── 공통 ── */
.photo-viewer { position: fixed; inset: 0; z-index: 50; background: rgba(20, 18, 15, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.photo-viewer img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: 6px; border: 8px solid #fff; }
.photo-viewer span { color: #ccc; }
.photo-viewer .pv-report { border: 0; background: none; color: #bbb; font-size: 14px; text-decoration: underline; padding: 10px; cursor: pointer; }
#toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 99px;
  font-size: 16px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
#toast.on { opacity: 1; }

/* ── 소개 페이지 (웹에서 주소만 열었을 때. html.landing일 때만 보인다) — 10/6 I 시안: "알림 한 줄"(Life360 참고)
   흰 바탕 + 베이지 판, 남색·연지색, 폰 화면 둘레에 알림 카드. 글꼴 Noto Sans KR(웹 소개 페이지일 때만 불러옴). 다크 모드에서도 밝은 색 고정 ── */
#landing { display: none; }
html.landing #landing { display: block; }
html.landing #app { display: none; }
html.landing { color-scheme: light; }
html.landing body { background: #FFFFFF; }
#landing {
  --l-ink: #1E2430; --l-sub: #4A5160; --l-faint: #5C6270; --l-beige: #F4F1EC; --l-beige-2: #FAF8F4; --l-line: #ECE8E1;
  --l-navy: #2F4260; --l-navy-2: #3A4F72; --l-on-navy: #D8DFEA; --l-rose: #D45D72; --l-rose-ink: #B83F57; --l-phone: #1F2633;
  --l-good: #E3EEE7; --l-good-ink: #35604A; --l-soso: #F7EBD6; --l-soso-ink: #8A5A14; --l-tired: #E4E9F1;
  color: var(--l-ink); background: #FFFFFF;
  font-family: "Noto Sans KR", "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 18px; line-height: 1.65; word-break: keep-all; overflow-x: clip; padding-bottom: 40px;
}
#landing a { color: var(--l-navy); }
#landing h1, #landing h2, #landing h3 { font-family: inherit; font-weight: 900; letter-spacing: -0.04em; }
#landing :focus-visible { outline: 3px solid var(--l-rose); outline-offset: 2px; }

.lp-top { position: sticky; top: 0; z-index: 5; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px; background: #FFFFFF; }
.lp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 21px; letter-spacing: -0.03em; }
#landing .lp-brand { color: var(--l-ink); }
.lp-brand i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--l-rose); }
#landing .lp-top-link { text-decoration: none; background: var(--l-navy); color: #FFFFFF; font-weight: 700; font-size: 16px; padding: 10px 20px; border-radius: 99px; min-height: 44px; display: inline-flex; align-items: center; box-shadow: none; }

.lp-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 14px 32px; border-radius: 99px; font-weight: 700; font-size: 19px; }
#landing .lp-btn.navy { background: var(--l-navy); color: #FFFFFF; }
#landing .lp-btn.text { color: var(--l-ink); padding: 14px 14px; font-size: 18px; }

/* 첫 화면 */
.lp-hero-wrap { padding: 0 16px; }
.lp-hero { max-width: 1200px; margin: 0 auto; background: var(--l-beige); border-radius: 32px; padding: 44px 22px 36px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; overflow: hidden; }
.lp-hero h1 { margin: 0; font-size: clamp(36px, 7.4vw, 64px); line-height: 1.2; }
.lp-hero h1 em, .lp-final h2 em { font-style: normal; color: var(--l-rose-ink); }
.lp-lead { margin: 22px 0 0; font-size: 19px; color: var(--l-sub); max-width: 26em; }
.lp-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.lp-store { margin: 14px 0 0; font-size: 15px; color: var(--l-faint); }
.lp-store.has-links { display: flex; flex-wrap: wrap; gap: 10px; }
#landing .lp-store .btn { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 18px; border-radius: 99px; background: #FFFFFF; color: var(--l-navy); font-weight: 700; text-decoration: none; }
.lp-recent { margin: 12px 0 0; font-size: 16px; font-weight: 700; }

.lp-phone-wrap { position: relative; width: min(300px, 100%); justify-self: center; padding: 64px 0 74px; }
.lp-phone { background: var(--l-phone); border-radius: 44px; padding: 12px; }
.lp-screen { background: var(--l-beige-2); border-radius: 34px; padding: 26px 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.lp-screen-cap { margin: 0; font-size: 13px; font-weight: 700; color: var(--l-faint); }
.lp-screen-title { margin: 0; font-weight: 900; font-size: 24px; letter-spacing: -0.03em; }
.lp-today { background: #FFFFFF; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.lp-today p { margin: 0; font-size: 16px; }
.lp-today-head { display: flex; align-items: center; gap: 10px; }
.lp-today-head b { display: block; } .lp-today-head small { display: block; font-size: 13px; color: var(--l-faint); }
.lp-face { width: 40px; height: 40px; border-radius: 99px; display: grid; place-items: center; }
.lp-face.good { background: var(--l-good); color: var(--l-good-ink); }
.lp-photo { height: 130px; border-radius: 14px; background: var(--l-good); color: var(--l-good-ink); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.lp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 12px; color: var(--l-faint); }
.lp-week span { background: #EDEAE4; border-radius: 8px; padding: 6px 0; }
.lp-week .on { background: var(--l-navy); color: #FFFFFF; } .lp-week .today { background: var(--l-rose-ink); color: #FFFFFF; }
.lp-noti { position: absolute; width: 230px; background: #FFFFFF; border-radius: 18px; padding: 12px 14px; box-shadow: 0 14px 34px rgba(30, 36, 48, .18); display: flex; gap: 12px; align-items: center; }
.lp-noti b { display: block; font-size: 15px; line-height: 1.4; } .lp-noti small { display: block; font-size: 13px; color: var(--l-faint); }
.lp-noti-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--l-rose); display: grid; place-items: center; }
.lp-noti.n1 { top: 0; left: -10px; }
.lp-noti.n2 { top: 46%; right: -14px; width: 220px; }
.lp-noti.n3 { bottom: 0; left: -6px; background: var(--l-navy); }
.lp-noti.n3 b { color: #FFFFFF; } .lp-noti.n3 small { color: var(--l-on-navy); font-size: 14px; }

.lp-sec { max-width: 1200px; margin: 0 auto; padding: 88px 20px 0; }
.lp-h { margin: 0; font-size: clamp(30px, 5.2vw, 46px); line-height: 1.25; }
.center { text-align: center; }
.lp-sub { margin: 14px auto 0; max-width: 30em; color: var(--l-sub); }

/* 알림 흐름 */
.lp-flow { margin-top: 40px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.lp-flow article { background: var(--l-beige); border-radius: 26px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.lp-tag { font-weight: 900; font-size: 15px; color: var(--l-rose-ink); }
.lp-bubble { background: #FFFFFF; border-radius: 16px; padding: 14px 16px; box-shadow: 0 6px 16px rgba(30, 36, 48, .08); }
.lp-bubble b { display: block; font-size: 16px; } .lp-bubble small { display: block; font-size: 13px; color: var(--l-faint); }
.lp-flow p { margin: 0; font-size: 17px; color: var(--l-sub); }

/* 부모님 화면 */
.lp-parent { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.lp-kicker { margin: 0 0 8px; font-weight: 900; color: var(--l-rose-ink); }
.lp-parent-text > p:not(.lp-kicker) { margin: 18px 0 0; color: var(--l-sub); max-width: 26em; }
.lp-parent ul { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lp-parent li { position: relative; padding-left: 18px; }
.lp-parent li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 99px; background: var(--l-rose); }
.lp-parent-phone { width: 100%; max-width: 360px; justify-self: center; background: var(--l-beige-2); border: 12px solid var(--l-phone); border-radius: 44px; padding: 28px 20px; display: flex; flex-direction: column; gap: 12px; }
.lp-greet { margin: 0 0 6px; font-weight: 900; font-size: 27px; letter-spacing: -0.03em; }
.lp-mood { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 0 20px; border-radius: 20px; font-weight: 900; font-size: 24px; }
.lp-mood.good { background: var(--l-good); } .lp-mood.good svg { color: var(--l-good-ink); }
.lp-mood.soso { background: var(--l-soso); } .lp-mood.soso svg { color: var(--l-soso-ink); }
.lp-mood.tired { background: var(--l-tired); } .lp-mood.tired svg { color: var(--l-navy); }
.lp-mood-photo { display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 16px; border: 2px solid #D9D4CB; font-weight: 700; font-size: 18px; }

/* 이런 가족에게 / 할 수 있는 것 */
.lp-fam-wrap { padding-left: 16px; padding-right: 16px; }
.lp-fam { background: var(--l-navy); color: #FFFFFF; border-radius: 32px; padding: 44px 22px; }
.lp-fam .lp-h { font-size: clamp(28px, 4.4vw, 40px); }
.lp-grid { margin-top: 26px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.lp-grid article { border-radius: 22px; padding: 24px; }
.lp-grid h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.02em; }
.lp-grid p { margin: 0; font-size: 17px; }
.lp-fam .lp-grid article { background: var(--l-navy-2); } .lp-fam .lp-grid p { color: var(--l-on-navy); }
.lp-feat .lp-h { font-size: clamp(28px, 4.4vw, 40px); }
.lp-feat .lp-grid article { background: var(--l-beige); } .lp-feat .lp-grid p { color: var(--l-sub); }

/* 자주 묻는 질문 */
.lp-faq { max-width: 820px; }
.lp-faq .lp-h { font-size: clamp(26px, 4vw, 34px); margin-bottom: 16px; }
.lp-faq details { background: var(--l-beige); border-radius: 18px; padding: 2px 22px; margin-top: 10px; }
.lp-faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--l-rose-ink); font-size: 22px; line-height: 1; font-weight: 900; }
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq details p { margin: 0 0 18px; color: var(--l-sub); }

.lp-final { text-align: center; }
.lp-final h2 { margin: 0 0 30px; font-size: clamp(32px, 6vw, 54px); line-height: 1.25; }
.lp-foot { max-width: 1200px; margin: 72px auto 0; padding: 28px 20px 0; border-top: 1px solid var(--l-line); text-align: center; color: var(--l-faint); font-size: 15px; }
.lp-foot p { margin: 4px 0 0; } #landing .lp-foot a { color: inherit; }

@media (min-width: 860px) {
  .lp-top { padding-left: 32px; padding-right: 32px; }
  .lp-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); padding: 64px 48px; border-radius: 36px; gap: 48px; }
  .lp-phone-wrap { padding: 30px 0; }
  .lp-noti { width: 260px; }
  .lp-noti.n1 { left: -120px; } .lp-noti.n2 { right: -130px; width: 250px; } .lp-noti.n3 { left: -100px; width: 270px; }
  .lp-parent { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .lp-parent-phone { order: -1; }
  .lp-fam { padding: 56px 40px; border-radius: 36px; }
}
.kids-jump { display: block; width: 100%; border: 0; text-align: left; cursor: pointer; margin: 0 0 14px; padding: 12px 16px; border-radius: 16px; background: var(--rose-soft); color: var(--rose); font-weight: 800; font-size: 18px; text-decoration: none; }

/* ── 부모님 화면: 매일 알림 받기 ── */
.pp-card { margin-top: 22px; background: var(--sun-soft); border-radius: 20px; padding: 18px; }
.pp-title { font-family: var(--serif); font-size: 21px; font-weight: 700; margin: 0; }
.pp-desc { margin: 6px 0 12px; font-size: 17px; word-break: keep-all; }
.pp-btn { min-height: 60px; font-size: 20px; }
.pp-call { margin-top: 12px; }
.pp-fs { margin: 0 0 10px; padding: 14px 16px; border-radius: 16px; background: var(--amber-soft); font-size: 16px; word-break: keep-all; }
.pp-fs .btn { margin-top: 10px; }
a.pp-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.pp-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
/* 띄어쓰기 없는 긴 호칭(최대 20자)도 좁은 화면에서 줄바꿈 */
.day-head h1, .cover h1, .page-title, .greet, .sent-title, .lp-hero h1 { overflow-wrap: anywhere; }
/* 부모님 화면: 안부 알람 받기 스위치 */
.pp-call { margin-top: 14px; background: var(--paper); border-radius: 20px; padding: 4px 18px 16px; box-shadow: var(--shadow); }
.pp-toggle { border-top: 0; font-size: 19px; } .pp-toggle small { font-size: 16px; }
/* 기분 버튼 3초 취소 막대 (부모님용 큰 글씨) */
.undo-bar { position: fixed; left: 12px; right: 12px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 70; display: flex; align-items: center; gap: 12px;
  background: var(--navy); color: #fff; border-radius: 20px; padding: 16px 16px 20px 20px; font-size: 20px; font-weight: 800; box-shadow: var(--shadow); overflow: hidden; }
.undo-bar span { flex: 1; } .undo-bar button { border: 0; border-radius: 99px; background: #fff; color: var(--navy); font-size: 20px; font-weight: 900; padding: 12px 22px; cursor: pointer; }
.undo-bar i { position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: var(--rose); transform-origin: left; animation: undo-shrink linear forwards; }
@keyframes undo-shrink { to { transform: scaleX(0); } }
/* 못 불러왔을 때 화면 (10/7) */
.err-screen p { margin: 0 0 18px; word-break: keep-all; }
.err-screen .btn { min-height: 52px; padding: 12px 28px; }
.err-screen p:last-child { margin: 18px 0 0; }
/* 10/7 점검: 잘못 연 링크 안내 · 카톡 안 브라우저 · 부모님 폰 상태 · 알림 켜기 · 가족 방 지우기 */
.wrong-link { margin: 12px 0; padding: 14px 16px; border-radius: 16px; background: var(--amber-soft); font-size: 16px; line-height: 1.55; word-break: keep-all; }
.wrong-link a { display: inline-block; margin-top: 6px; font-weight: 800; }
.kakao-bar { margin: 10px 0; padding: 10px 14px; border-radius: 14px; background: var(--sun-soft); font-size: 15px; word-break: keep-all; }
.kakao-bar a { font-weight: 800; }
.parent-state { margin: 8px 2px 0; }
.push-card { margin: 14px 0; }
.danger-zone { margin-top: 28px; }
.btn.danger { background: transparent; color: var(--rose); box-shadow: inset 0 0 0 1.5px var(--rose); }
/* 10/7 성장: 내가 전화드릴게요 · 이번 주 공유 */
.call-claim { margin: 10px 2px 0; padding: 12px 14px; border-radius: 14px; background: var(--sage-soft); font-size: 16px; word-break: keep-all; }
.call-claim .b-del { margin-left: 6px; }
.call-hint { margin: 6px 2px 0; }
.week-share { margin-top: 12px; }

/* ── 부모님 두 분 (hb_014) ── */
.today-wrap.multi .p-sub { margin: 18px 0 8px; font-size: 17px; font-weight: 800; color: var(--ink); }
.today-wrap.multi .p-sub:first-child { margin-top: 0; }
.stamp-who { margin: 10px 0 4px; font-size: 14px; font-weight: 700; color: var(--muted); }
.add-hint { margin: 12px 0 0; text-align: center; }
.partner-sent { margin: 10px 0 0; font-size: 18px; color: var(--muted); }
.add-parent .chips { margin-bottom: 8px; }
.pp-widget [hidden] { display: none !important; }

/* 부모님 화면 미리보기 (0.6.5) */
.preview-bar { position: sticky; top: env(safe-area-inset-top); z-index: 5; margin: 0; padding: 12px 14px; border-radius: 0 0 18px 18px; background: var(--navy-soft); color: var(--ink); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.preview-bar p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; }
.preview-bar .row { display: flex; gap: 8px; flex-wrap: wrap; }
.preview-bar .btn.sm { min-height: 42px; padding: 8px 14px; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; }
.parent.preview { padding-top: 18px; }
.pv-note { margin-top: 14px; }
.call-hint { margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--navy-soft); font-size: 15px; line-height: 1.5; word-break: keep-all; }
.pv-next { padding-left: 34px; }
.pv-steps { margin: 0; padding-left: 20px; line-height: 1.7; }
.pv-next .btn { text-decoration: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
