/* 잼잼 — 귀여운 파스텔 디자인 / 모바일 우선 반응형 */
@font-face {
  font-family: "Jua";
  src: url("fonts/Jua-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #fff8f1;
  --bg2: #fff1f4;
  --card: #ffffff;
  --ink: #5a4a5e;
  --ink-soft: #7d6c80;
  --muted: #a293a5;
  --line: #f6e4ea;

  --pink: #ffdbe4;
  --pink-d: #f48fab;
  --pink-dd: #e0698b;
  --peach: #ffe4d4;
  --butter: #fff1c2;
  --mint: #d6f3e5;
  --mint-d: #6cc59e;
  --sky: #dbeeff;
  --sky-d: #6aa9e0;
  --lav: #e9e0ff;
  --lav-d: #9b85e0;

  --radius: 22px;
  --radius-s: 14px;
  --shadow: 0 6px 20px rgba(232, 150, 175, 0.16), 0 1px 3px rgba(150, 110, 130, 0.08);
  --shadow-s: 0 3px 10px rgba(232, 150, 175, 0.14);
  --font-cute: "Jua", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --tabbar-h: 68px;
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, #ffe6ee 0, transparent 40%),
    radial-gradient(circle at 110% 10%, #e9f6ff 0, transparent 35%),
    radial-gradient(circle at 50% 120%, #f1ebff 0, transparent 45%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: var(--ink); }
h1, h2, h3, .cute { font-family: var(--font-cute); font-weight: 400; letter-spacing: -0.01em; }
img { max-width: 100%; display: block; }

.app.big { font-size: 118%; }
.app.big .nav-label { font-size: 12px; }

/* ───────── 레이아웃 ───────── */
.shell { min-height: 100vh; }
.main {
  padding: 16px 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
  padding-top: calc(16px + env(safe-area-inset-top));
  max-width: 900px;
  margin: 0 auto;
}
.page { display: flex; flex-direction: column; gap: 14px; animation: rise 0.35s ease backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 하단 탭바 (모바일) */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around; align-items: stretch;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 6px env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(232, 150, 175, 0.12);
}
.nav-brand { display: none; }
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border-radius: 16px; color: var(--muted); transition: background 0.2s, color 0.2s, transform 0.15s;
}
.nav-item:active { transform: scale(0.94); }
.nav-icon { font-size: 22px; line-height: 1; filter: grayscale(0.4); transition: transform 0.2s, filter 0.2s; }
.nav-label { font-size: 11px; white-space: nowrap; }
.nav-item.active { color: var(--pink-dd); background: var(--pink); }
.nav-item.active .nav-icon { filter: none; transform: translateY(-2px) scale(1.1); }

/* 태블릿·데스크톱: 왼쪽 사이드바 */
@media (min-width: 760px) {
  :root { font-size: 17px; }
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  .nav {
    position: sticky; top: 0; height: 100vh; flex-direction: column; justify-content: flex-start;
    gap: 6px; padding: 24px 14px; border-top: 0; border-right: 1px solid var(--line);
    box-shadow: 4px 0 24px rgba(232, 150, 175, 0.1);
  }
  .nav-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
  .nav-item { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; }
  .nav-label { font-size: 15px; }
  .main { padding: 32px 32px 48px; width: 100%; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .card-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-list.compact { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .stats { grid-template-columns: repeat(4, 1fr) !important; }
  .age-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .cat-grid { grid-template-columns: repeat(5, 1fr) !important; }
  .picture-steps { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (min-width: 1200px) {
  .main { max-width: 1040px; }
  .timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
  .card-list { grid-template-columns: repeat(3, 1fr); }
}
:where(.two-col) { display: grid; gap: 14px; }
:where(.card-list) { display: flex; flex-direction: column; gap: 10px; }
:where(.timeline) { display: flex; flex-direction: column; gap: 14px; }

.brand-logo { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--pink); border-radius: 16px; }
.brand-name { font-family: var(--font-cute); font-size: 24px; color: var(--pink-dd); line-height: 1; }
.brand-sub { font-size: 12px; color: var(--muted); }

/* ───────── 카드·공통 ───────── */
.card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, 0.8);
}
.pastel-pink { background: linear-gradient(135deg, #ffe3ea, #fff0f3); }
.pastel-peach { background: linear-gradient(135deg, #ffe8da, #fff4ec); }
.pastel-butter { background: linear-gradient(135deg, #fff2c6, #fff9e4); }
.pastel-mint { background: linear-gradient(135deg, #d8f4e7, #effbf5); }
.pastel-sky { background: linear-gradient(135deg, #dcefff, #f0f8ff); }
.pastel-lav { background: linear-gradient(135deg, #ebe2ff, #f6f2ff); }

.page-head { display: flex; align-items: flex-start; gap: 10px; padding: 4px 2px; }
.page-head h1 { margin: 0; font-size: 1.7rem; line-height: 1.2; }
.head-emoji { margin-right: 6px; }
.page-sub { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.92rem; }
.back {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow-s); font-size: 26px; line-height: 1; color: var(--pink-dd);
}
.sec-title { font-size: 1.2rem; margin: 0 0 8px; }
.sec-title.pad, .pad { padding: 0 4px; margin-top: 4px; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link { color: var(--pink-dd); font-weight: 600; font-size: 0.9rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.block { display: block; }
.err { color: #e0577a; font-weight: 600; }
.ok { color: var(--mint-d); font-weight: 600; margin: 8px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 18px; border-radius: 999px; font-weight: 700;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn.primary { background: linear-gradient(135deg, #f7a1b9, #f48fab); color: #fff; box-shadow: 0 6px 16px rgba(244, 143, 171, 0.4); }
.btn.soft { background: var(--card); color: var(--ink); box-shadow: var(--shadow-s); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--muted); border: 1.5px dashed var(--line); }
.big-btn { width: 100%; min-height: 54px; font-size: 1.05rem; margin-top: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; opacity: 0.55; }
.icon-btn:hover { opacity: 1; background: var(--bg2); }

.pill, .chip, .tag {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-weight: 700;
}
.pill { padding: 4px 12px; background: var(--card); font-size: 0.85rem; box-shadow: var(--shadow-s); }
.chip { padding: 6px 12px; background: var(--card); border: 1px solid var(--line); font-size: 0.85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 2px 9px; font-size: 0.75rem; margin-right: 6px; background: var(--lav); color: var(--lav-d); }
.tag-vaccine { background: var(--sky); color: var(--sky-d); }
.tag-checkup { background: var(--mint); color: var(--mint-d); }
.tag-hospital { background: var(--pink); color: var(--pink-dd); }
.tag-care { background: var(--butter); color: #c49a1f; }
.tag-me { background: var(--pink); color: var(--pink-dd); margin-left: 6px; }

/* 단계 색 */
.st-milk { --st: #f48fab; --st-bg: var(--pink); }
.st-wean { --st: #e3a53a; --st-bg: var(--butter); }
.st-tod { --st: #5bbd91; --st-bg: var(--mint); }
.st-child { --st: #6aa9e0; --st-bg: var(--sky); }
.pill.st-milk, .pill.st-wean, .pill.st-tod, .pill.st-child { background: var(--st-bg); color: var(--st); }

/* 폼 */
.field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.field > span { font-size: 0.88rem; color: var(--ink-soft); font-weight: 600; }
.field input, .field select, .field textarea, .row-add input {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-s); border: 1.5px solid var(--line);
  background: #fffdfc; outline: none; transition: border 0.2s, box-shadow 0.2s; min-height: 48px;
}
.field input:focus, .field select:focus, .field textarea:focus, .row-add input:focus { border-color: var(--pink-d); box-shadow: 0 0 0 4px rgba(244, 143, 171, 0.18); }
.field input[type="range"] { padding: 0; accent-color: var(--pink-d); min-height: 32px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-add { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; margin-top: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; background: var(--bg2); padding: 5px; border-radius: 999px; margin: 6px 0; }
.seg button { flex: 1; min-height: 40px; padding: 6px 12px; border-radius: 999px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--pink-dd); box-shadow: var(--shadow-s); }

/* ───────── 온보딩 ───────── */
.onboard { max-width: 520px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.onboard-hero { text-align: center; padding: 10px 0; }
.onboard-hero h1 { font-size: 1.9rem; margin: 10px 0 4px; }
.onboard-hero p { color: var(--ink-soft); margin: 0; }
.hero-blob {
  width: 140px; height: 140px; margin: 0 auto; border-radius: 46% 54% 50% 50%; display: grid; place-items: center;
  font-size: 72px; background: radial-gradient(circle at 30% 30%, #fff, var(--pink)); box-shadow: var(--shadow);
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.who {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border-radius: 18px;
  background: var(--bg); border: 2px solid transparent; font-weight: 700; transition: all 0.15s;
}
.who.on { border-color: var(--pink-d); background: var(--pink); color: var(--pink-dd); transform: translateY(-2px); }
.who-emoji { font-size: 34px; }

/* ───────── 홈 ───────── */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 10px; overflow: hidden; position: relative; }
.hello-name { font-size: 2.1rem; margin: 0 0 8px; color: var(--pink-dd); }
.hello-text p { margin: 0; }
.age-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.hello-illust { width: 120px; height: 120px; flex: 0 0 auto; margin: -10px -6px -14px 0; }
.hello-illust img { animation: bob 3.2s ease-in-out infinite; }

.feed-card { border: 2px solid var(--pink); }
.feed-card.due { border-color: var(--pink-d); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(244, 143, 171, 0.18), var(--shadow); } }
.feed-top { display: flex; gap: 16px; align-items: center; }
.feed-ring {
  --p: 0; flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--pink-d) calc(var(--p) * 1%), var(--pink) 0);
}
.feed-ring span { width: 66px; height: 66px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 30px; }
.feed-info p { margin: 0; }
.feed-left { font-family: var(--font-cute); font-size: 1.6rem; color: var(--ink); line-height: 1.25; }
.feed-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.feed-actions .btn { padding: 8px 6px; font-size: 0.88rem; }
.feed-actions .btn.primary { grid-column: span 4; font-size: 1rem; }
.feed-actions.wrap { display: flex; flex-wrap: wrap; }
@media (min-width: 520px) { .feed-actions .btn.primary { grid-column: span 1; } }

.checklist { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.checklist li {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--bg);
  cursor: pointer; transition: background 0.2s;
}
.checklist li.done { background: var(--mint); color: var(--muted); text-decoration: line-through; }
.check {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--pink-d); display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 900; margin-top: 1px;
}
.done .check { background: var(--mint-d); border-color: var(--mint-d); }

.mini-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-list li { padding: 10px 12px; background: var(--bg); border-radius: 12px; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick {
  display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.quick:active { transform: scale(0.97); }
.quick span { font-size: 26px; }
.quick b { font-family: var(--font-cute); font-weight: 400; font-size: 1.15rem; }
.quick small { color: var(--ink-soft); }

/* 수유 입력 시트 */
.sheet-bg { position: fixed; inset: 0; background: rgba(90, 74, 94, 0.35); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 520px; background: var(--card); border-radius: 28px 28px 0 0; padding: 22px 18px calc(34px + env(safe-area-inset-bottom));
  animation: up 0.25s ease; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}
@media (min-width: 760px) { .sheet-bg { align-items: center; } .sheet { border-radius: 28px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 16px 0; }
.stepper button { width: 58px; height: 58px; border-radius: 50%; background: var(--pink); color: var(--pink-dd); font-size: 30px; font-weight: 900; }
.stepper-val { font-family: var(--font-cute); font-size: 2.6rem; min-width: 120px; text-align: center; }
.stepper-val small { font-size: 1rem; margin-left: 4px; color: var(--muted); }

/* ───────── 월령 가이드 ───────── */
.age-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.age-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow-s); border-left: 6px solid var(--st);
  transition: transform 0.15s;
}
.age-tile:active { transform: scale(0.97); }
.age-tile.current { background: var(--st-bg); box-shadow: 0 0 0 3px var(--st), var(--shadow); }
.age-label { font-family: var(--font-cute); font-size: 1.1rem; color: var(--st); }
.age-head { font-size: 0.85rem; color: var(--ink-soft); }
.now-badge { display: inline-block; align-self: flex-start; font-size: 0.75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--card); color: var(--pink-dd); }
.stage-banner { align-self: flex-start; padding: 6px 14px; border-radius: 999px; font-weight: 800; background: var(--st-bg); color: var(--st); }
.sleep-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.sleep-stats div { background: rgba(255, 255, 255, 0.7); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; }
.sleep-stats small { color: var(--muted); font-size: 0.75rem; }
.sleep-stats b { font-size: 0.9rem; }
.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pager .btn { flex: 1; }

/* ───────── 문서 ───────── */
.art-card { display: flex; gap: 12px; align-items: center; padding: 14px; transition: transform 0.15s; }
.art-card:active { transform: scale(0.98); }
.art-emoji { flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; font-size: 24px; background: var(--pink); }
.art-title { font-weight: 800; }
.art-sum { font-size: 0.85rem; color: var(--ink-soft); }
.cat-formula, .cat-feeding { background: var(--pink); }
.cat-weaning { background: var(--butter); }
.cat-toddler { background: var(--peach); }
.cat-sleep, .cat-sep-sleep { background: var(--lav); }
.cat-safety { background: var(--mint); }
.cat-health { background: var(--sky); }
.cat-growth { background: var(--mint); }
.cat-parents { background: var(--peach); }
.cat-badge { align-self: flex-start; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: 0.85rem; }
.prose { font-size: 1rem; }
.blk-h { margin: 18px 0 6px; font-size: 1.1rem; color: var(--pink-dd); }
.blk-h:first-child { margin-top: 0; }
.blk-p { margin: 6px 0; }
.blk-list { margin: 6px 0; padding-left: 20px; }
.blk-list li { margin: 4px 0; }
.blk-list li::marker { color: var(--pink-d); }
.blk-steps { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.blk-steps li { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); padding: 10px 12px; border-radius: 14px; }
.step-n {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--pink-d); color: #fff;
  display: inline-grid; place-items: center; font-weight: 900; font-size: 0.85rem; margin-right: 6px;
}
.callout { border-radius: 14px; padding: 12px 14px; margin: 10px 0; font-size: 0.95rem; }
.callout.tip { background: var(--butter); }
.callout.warn { background: #ffe1e6; color: #a8435f; }
.tbl-wrap { overflow-x: auto; margin: 8px 0; border-radius: 14px; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 320px; }
.tbl th { background: var(--pink); color: var(--pink-dd); text-align: left; padding: 9px 10px; font-weight: 800; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:nth-child(even) td { background: #fffafb; }
.sources { background: rgba(255, 255, 255, 0.7); border-radius: 16px; padding: 12px 14px; font-size: 0.88rem; }
.sources summary { cursor: pointer; font-weight: 700; color: var(--ink-soft); }
.sources a { color: var(--sky-d); text-decoration: underline; }

.picture-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pstep { background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-s); }
.pstep p { margin: 0; padding: 10px 12px; font-weight: 700; font-size: 0.92rem; }
.illust { display: grid; place-items: center; background: var(--bg2); aspect-ratio: 1; overflow: hidden; }
.illust img { width: 100%; height: 100%; object-fit: cover; }
.illust-fallback { font-size: 48px; }
.hello-illust.illust, .g-mascot.illust { background: transparent; }
.hello-illust img, .g-mascot img { object-fit: contain; }

/* 먹는 단계 */
.stage-card { border-top: 6px solid var(--st); }
.stage-card.current { box-shadow: 0 0 0 3px var(--st), var(--shadow); }
.stage-top { display: flex; gap: 14px; align-items: center; }
.stage-top h2 { margin: 0; font-size: 1.35rem; color: var(--st); }
.stage-top p { margin: 2px 0 6px; }
.stage-illust { width: 92px; height: 92px; flex: 0 0 auto; border-radius: 22px; }

/* 검색 */
.search {
  display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px; padding: 6px 8px 6px 18px;
  box-shadow: var(--shadow); border: 2px solid var(--pink);
}
.search input { flex: 1; border: 0; outline: none; background: transparent; min-height: 44px; font-size: 1rem; }
.clear { width: 34px; height: 34px; border-radius: 50%; background: var(--bg2); }
.suggest .chip { cursor: pointer; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; border-radius: 20px; box-shadow: var(--shadow-s); transition: transform 0.15s; }
.cat-tile:active { transform: scale(0.95); }
.cat-emoji { font-size: 30px; }
.cat-tile b { font-family: var(--font-cute); font-weight: 400; font-size: 1.1rem; }
.cat-tile small { color: var(--ink-soft); }

/* 기록 */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; box-shadow: var(--shadow-s); }
.stat small { color: var(--ink-soft); }
.stat b { font-family: var(--font-cute); font-weight: 400; font-size: 1.5rem; }
.log-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.log-list li { display: grid; grid-template-columns: 72px 34px 1fr auto auto; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.log-list li:last-child { border-bottom: 0; }
.log-time { font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; }
.log-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); }
.log-who { font-size: 0.8rem; color: var(--muted); }

/* 일정 */
.event-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.event-list li { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: start; padding: 10px; background: var(--bg); border-radius: 14px; }
.ev-date { display: flex; flex-direction: column; font-size: 0.85rem; }
.ev-date b { color: var(--pink-dd); }

/* 가족 */
.member-list, .care-list, .task-edit { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.member-list li { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg); border-radius: 14px; }
.m-emoji { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--card); border-radius: 50%; box-shadow: var(--shadow-s); }
.m-main { flex: 1; }
.care-item { display: flex; flex-direction: column; padding: 12px 14px; background: rgba(255, 255, 255, 0.8); border-radius: 14px; }
.task-edit li { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255, 255, 255, 0.85); border-radius: 12px; }
.t-time { color: var(--pink-dd); }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick button { font-size: 26px; width: 48px; height: 48px; border-radius: 14px; background: var(--bg); border: 2px solid transparent; }
.emoji-pick button.on { border-color: var(--pink-d); background: var(--pink); }
.code { font-family: ui-monospace, monospace; font-size: 1.3rem; letter-spacing: 0.15em; color: var(--sky-d); background: var(--card); padding: 2px 10px; border-radius: 10px; }

/* 설정 */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.toggle-row p { margin: 2px 0 0; }
.switch { flex: 0 0 auto; width: 56px; height: 32px; border-radius: 999px; background: #e9dfe6; position: relative; transition: background 0.2s; }
.switch span { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); transition: transform 0.2s; }
.switch.on { background: var(--pink-d); }
.switch.on span { transform: translateX(24px); }

/* ───────── 조부모 모드 ───────── */
.grand-main { max-width: 640px; }
.grand { display: flex; flex-direction: column; gap: 16px; font-size: 1.25rem; animation: rise 0.35s ease backwards; }
.preview-bar { background: var(--lav); color: var(--lav-d); text-align: center; padding: 10px; border-radius: 14px; font-weight: 800; font-size: 1rem; }
.g-head { display: flex; align-items: center; gap: 12px; }
.g-head h1 { margin: 0; font-size: 2rem; line-height: 1.2; color: var(--pink-dd); }
.g-hello { margin: 0; color: var(--ink-soft); }
.g-mascot { width: 96px; height: 96px; flex: 0 0 auto; }
.g-now { background: linear-gradient(135deg, #ffe0e8, #fff2d6); border-radius: 28px; padding: 22px; box-shadow: var(--shadow); text-align: center; border: 3px solid #fff; }
.g-now.calm { background: linear-gradient(135deg, #dcf5e8, #e9f3ff); }
.g-label { margin: 0; font-weight: 800; color: var(--pink-dd); }
.g-time { margin: 4px 0; font-family: var(--font-cute); font-size: 3rem; line-height: 1; }
.g-task { margin: 6px 0; font-family: var(--font-cute); font-size: 1.9rem; line-height: 1.3; }
.g-detail { margin: 8px 0 14px; font-size: 1.1rem; color: var(--ink-soft); }
.g-btn { display: flex; align-items: center; justify-content: center; min-height: 72px; border-radius: 22px; font-size: 1.5rem; font-weight: 900; width: 100%; padding: 10px; }
.g-btn.done { background: var(--mint-d); color: #fff; box-shadow: 0 8px 18px rgba(108, 197, 158, 0.45); }
.g-btn.call { background: var(--sky); color: #3b78ad; }
.g-btn.emergency { background: #ffd2d9; color: #c23a5c; }
.g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-big {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px;
  border-radius: 26px; font-size: 1.3rem; font-weight: 900; box-shadow: var(--shadow); transition: transform 0.12s;
}
.g-big:active { transform: scale(0.95); }
.g-big span { font-size: 3rem; }
.g-feed { text-align: center; margin: 0; font-weight: 800; color: var(--ink-soft); }
.g-card { background: var(--card); border-radius: 26px; padding: 20px; box-shadow: var(--shadow); }
.g-card h2 { margin: 0 0 12px; font-size: 1.6rem; }
.g-memo { background: var(--butter); padding: 12px; border-radius: 14px; }
.g-tasks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.g-tasks li { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg); border-radius: 16px; cursor: pointer; }
.g-tasks li.done { background: var(--mint); color: var(--muted); text-decoration: line-through; }
.g-tasks .check { width: 32px; height: 32px; font-size: 18px; }
.g-help { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-help-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; background: var(--bg2); border-radius: 18px; font-weight: 800; text-align: center; }
.g-help-item span { font-size: 2.4rem; }
.g-call { display: flex; flex-direction: column; gap: 10px; }
.g-settings { text-align: center; color: var(--muted); padding: 10px; font-size: 1rem; }
.g-back { align-self: flex-start; padding: 12px 20px; background: var(--card); border-radius: 999px; box-shadow: var(--shadow-s); font-weight: 900; }
.g-title { margin: 0; font-size: 2.1rem; }
.g-steps { display: flex; flex-direction: column; gap: 16px; }
.g-step { background: var(--card); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.g-step .illust { aspect-ratio: 4 / 3; }
.g-step p { margin: 0; padding: 16px 18px; font-size: 1.5rem; font-weight: 800; display: flex; gap: 12px; align-items: center; }
.g-step-n { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; background: var(--pink-d); color: #fff; display: grid; place-items: center; font-size: 1.3rem; }
.g-more { background: var(--card); border-radius: 20px; padding: 14px 18px; font-size: 1.05rem; }
.g-more summary { font-weight: 800; cursor: pointer; }
@media (min-width: 760px) { .g-steps { display: grid; grid-template-columns: 1fr 1fr; } }

.toast {
  position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: #fff; padding: 14px 24px; border-radius: 999px; font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2); animation: up 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.hero-blob .illust { width: 128px; height: 128px; background: transparent; border-radius: 50%; }
.hero-blob .illust img { object-fit: contain; }

/* Android 앱: 상태바·제스처바 여백 */
.app.android { --sys-top: 30px; --sys-bottom: 18px; }
.app.android .main, .app.android .onboard { padding-top: calc(16px + var(--sys-top)); }
.app.android .nav { height: calc(var(--tabbar-h) + var(--sys-bottom)); padding-bottom: var(--sys-bottom); }
.app.android .main { padding-bottom: calc(var(--tabbar-h) + 24px + var(--sys-bottom)); }
.app.android .sheet { padding-bottom: calc(22px + var(--sys-bottom)); }
.app.android .toast { bottom: calc(30px + var(--sys-bottom)); }
@media (min-width: 760px) {
  .app.android .nav { height: 100vh; padding: calc(24px + var(--sys-top)) 14px 24px; }
}
.gear { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow-s); font-size: 18px; }

/* 표: 한국어 단어 단위 줄바꿈 */
.tbl, .tbl th, .tbl td { overflow-wrap: normal; word-break: keep-all; }
.tbl td:first-child { white-space: nowrap; font-weight: 700; }
@media (max-width: 480px) { .tbl { font-size: 0.82rem; } .tbl th, .tbl td { padding: 8px 7px; } }

/* ───────── 검색 결과 · 내 책(개인용) ───────── */
.res-h { margin-top: 18px; }
.card-list.one-col { display: flex !important; flex-direction: column; gap: 10px; }
.more-btn { display: block; text-align: center; margin: 10px 0 4px; text-decoration: none; }
mark { background: #ffe66d; color: inherit; border-radius: 4px; padding: 0 2px; }
.go { margin-left: auto; font-size: 1.6rem; color: var(--muted); }

.book-entry, .resume {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 12px 0;
  text-decoration: none; color: var(--ink);
  background: linear-gradient(135deg, #fff, var(--lav));
}
.book-entry b, .resume b { display: block; font-family: var(--font-cute); font-weight: 400; font-size: 1.05rem; }
.book-cover { font-size: 2rem; }
.resume { background: linear-gradient(135deg, #fff, var(--butter)); }
.resume > span:first-child { font-size: 1.6rem; }

.book-hit { display: block; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.book-hit-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.book-hit-head b { color: var(--lav-d); }
.book-hit-head .muted { font-size: 0.82rem; flex: 1; min-width: 0; }
.hit-n { font-size: 0.75rem; background: var(--lav); color: var(--lav-d); border-radius: 999px; padding: 2px 8px; }
.book-snip { margin: 6px 0 0; font-size: 0.9rem; line-height: 1.6; color: var(--ink-soft); word-break: keep-all; overflow-wrap: anywhere; }

.toc { display: grid; gap: 12px; }
@media (min-width: 760px) { .toc { grid-template-columns: 1fr 1fr; } }
.toc-part { padding: 16px; }
.toc-part h2 { font-family: var(--font-cute); font-weight: 400; font-size: 1.15rem; margin: 0; color: var(--lav-d); }
.toc-part > p { margin: 2px 0 8px; font-size: 0.85rem; }
.toc-part ul { list-style: none; margin: 0; padding: 0; }
.toc-part li { padding: 8px 0; border-top: 1px dashed var(--line); }
.toc-ch { display: flex; justify-content: space-between; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; }
.toc-ch small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.toc-topics { margin-top: 6px; gap: 6px; }
.toc-topics .chip { font-size: 0.78rem; padding: 4px 10px; text-decoration: none; color: var(--ink-soft); }

.book-seg { margin: 4px 0 10px; }
.book-banner { background: #fff7cc; border-radius: var(--radius-s); padding: 8px 12px; margin: 0 0 10px; font-size: 0.9rem; }
.book-text { white-space: pre-wrap; line-height: 1.75; font-size: 1rem; padding: 18px; word-break: keep-all; overflow-wrap: anywhere; }
.big .book-text { font-size: 1.2rem; }
.book-img { background: var(--card); border-radius: var(--radius-s); box-shadow: var(--shadow-s); overflow: auto; cursor: zoom-in; max-width: 720px; margin: 0 auto; }
.book-img img { display: block; width: 100%; height: auto; }
.book-img.zoom { cursor: zoom-out; max-width: none; }
.book-img.zoom img { width: 200%; max-width: none; }
.book-nav {
  position: sticky; bottom: calc(var(--tabbar-h) + 8px); z-index: 5;
  display: flex; gap: 8px; align-items: center; margin-top: 12px;
  background: rgba(255, 248, 241, 0.92); backdrop-filter: blur(6px); padding: 8px; border-radius: 999px; box-shadow: var(--shadow-s);
}
.book-nav .btn { flex: 0 0 auto; min-height: 40px; padding: 6px 14px; background: var(--card); }
.book-nav select { flex: 1; min-width: 0; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; background: var(--card); color: var(--ink); font-size: 0.85rem; }
@media (min-width: 760px) { .book-nav { bottom: 12px; } }
@media (max-width: 759px) {
  .book-nav { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); }
  .app.android .book-nav { bottom: calc(var(--tabbar-h) + var(--sys-bottom) + 8px); }
}

/* ───────── 가족 연결 · 설치 안내 ───────── */
.install-card { background: linear-gradient(135deg, #fff, var(--butter)); }
.install-steps { margin: 6px 0 8px; padding-left: 22px; line-height: 1.9; }
.start-choices { display: grid; gap: 12px; }
@media (min-width: 760px) { .start-choices { grid-template-columns: 1fr 1fr; } }
.start-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; border: 2px solid transparent; text-align: center; cursor: pointer; color: var(--ink); font: inherit; }
.start-choice:active { transform: scale(0.98); }
.start-choice b { font-family: var(--font-cute); font-weight: 400; font-size: 1.25rem; }
.start-choice small { color: var(--muted); }
.sc-emoji { font-size: 2.6rem; }
.code-input { width: 100%; min-height: 56px; font-size: 1.5rem; text-align: center; letter-spacing: 0.25em; text-transform: uppercase; font-family: ui-monospace, monospace; border: 2px solid var(--line); border-radius: var(--radius-s); background: var(--card); color: var(--ink); margin: 8px 0 12px; }
.code-big { font-family: ui-monospace, monospace; font-size: 2rem; letter-spacing: 0.2em; text-align: center; color: var(--sky-d); background: var(--card); border-radius: var(--radius-s); padding: 10px; margin: 8px 0 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.btn-row .btn { flex: 1 1 140px; }
.center-link { display: block; margin: 12px auto 0; background: none; border: 0; cursor: pointer; text-align: center; }
button.link { background: none; border: 0; cursor: pointer; padding: 6px 0; }

/* ───────── 기록 버튼 · 타이머 · 지금 상태 ───────── */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px 6px; }
.rec-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); padding: 4px 0; }
.rec-ico { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--c) 22%, var(--card)); border: 2px solid color-mix(in srgb, var(--c) 45%, transparent); transition: transform 0.15s; }
.rec-btn:active .rec-ico { transform: scale(0.9); }
.run-box { background: var(--lav); border-radius: var(--radius-s); padding: 12px; margin-bottom: 12px; text-align: center; }
.run-card { background: linear-gradient(135deg, var(--lav), var(--card)); }
.run-row { display: flex; align-items: center; gap: 10px; }
.run-row + .run-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.run-row > div { flex: 1; min-width: 0; }
.run-clock { font-family: ui-monospace, monospace; font-size: 1.5rem; font-weight: 800; color: var(--lav-d); }
.status-strip { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; }
.st-tile { background: var(--card); border-radius: var(--radius-s); padding: 10px 8px; box-shadow: var(--shadow-s); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.st-tile > span { font-size: 22px; }
.st-tile small { color: var(--muted); font-size: 0.72rem; }
.st-tile b { font-size: 0.95rem; }
.st-tile .wake-msg { font-size: 0.7rem; line-height: 1.3; color: var(--ink-soft); }
.wake-bar { width: 100%; height: 6px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin: 2px 0; }
.wake-bar i { display: block; height: 100%; background: var(--mint-d); border-radius: 99px; transition: width 0.5s; }
.st-tile.wake.soon .wake-bar i { background: #f2c14e; }
.st-tile.wake.over .wake-bar i { background: #e0777a; }
.st-tile.wake.over { box-shadow: 0 0 0 2px #f4b4b6; }
.st-tile.wake.sleep { background: var(--lav); }
.warn-box { background: #fff1f1; color: #b4454e; border-radius: var(--radius-s); padding: 10px 12px; font-size: 0.88rem; margin: 8px 0; }
.stepper-val.hot { color: #e0577a; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.row3 .field input { min-width: 0; }

/* ───────── 탭 · 패턴 · 통계 ───────── */
.log-tabs { margin: 0 0 12px; }
.log-tabs a { flex: 1; min-height: 40px; padding: 8px 10px; border-radius: 999px; font-weight: 700; color: var(--ink-soft); text-align: center; text-decoration: none; white-space: nowrap; }
.log-tabs a.on { background: var(--card); color: var(--pink-dd); box-shadow: var(--shadow-s); }
.day-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.day-nav b { color: var(--pink-dd); }
.day-clock { width: 100%; max-width: 360px; display: block; margin: 0 auto; }
.clock-track { fill: none; stroke: var(--bg2); stroke-width: 26; }
.clock-sleep { fill: none; stroke: #9b85e0; stroke-width: 26; opacity: 0.85; }
.clock-ev { stroke-width: 3.5; stroke-linecap: round; }
.clock-tick { stroke: var(--muted); stroke-width: 1.2; }
.clock-num { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.clock-now { fill: #ff6f91; stroke: var(--card); stroke-width: 2; }
.clock-center { fill: var(--card); }
.clock-c1 { font-size: 10px; fill: var(--muted); text-anchor: middle; }
.clock-c2 { font-size: 18px; font-weight: 800; fill: var(--ink); text-anchor: middle; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.week-hours { display: grid; grid-template-columns: 90px repeat(4, 1fr) 0; font-size: 0.7rem; color: var(--muted); }
.week-hours span:first-child { grid-column: 2; }
.week-row { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 0; width: 100%; padding: 3px 0; text-align: left; border-radius: 10px; }
.week-row.sel { background: var(--pink); }
.week-day { font-size: 0.78rem; color: var(--ink-soft); }
.week-bar { width: 100%; height: 26px; display: block; }
.week-bg { fill: var(--bg2); }
.week-sleep { fill: #9b85e0; opacity: 0.85; }
.stat-chart .bars { width: 100%; height: auto; display: block; }
.bars .band { fill: var(--mint); opacity: 0.6; }
.bar-v { font-size: 10px; fill: var(--ink-soft); text-anchor: middle; }
.bar-d { font-size: 10px; fill: var(--muted); text-anchor: middle; }
.insights { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.insights li { padding: 10px 12px 10px 36px; border-radius: var(--radius-s); position: relative; background: var(--bg2); }
.insights li::before { position: absolute; left: 12px; top: 10px; }
.insights li.ok { background: color-mix(in srgb, var(--mint) 70%, var(--card)); }
.insights li.ok::before { content: "✅"; }
.insights li.warn { background: color-mix(in srgb, #ffd6d6 60%, var(--card)); }
.insights li.warn::before { content: "⚠️"; }
.insights li.info::before { content: "💡"; }

/* ───────── 성장 ───────── */
.growth-now { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.gc-now { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; text-align: center; border: 2px solid transparent; font: inherit; color: inherit; }
.gc-now.on { border-color: var(--pink-d); }
.gc-now b { font-size: 1.15rem; }
.gc-pct { font-size: 0.78rem; font-weight: 800; color: var(--pink-dd); }
.gc-desc { background: var(--card); border-radius: var(--radius-s); padding: 10px 14px; box-shadow: var(--shadow-s); margin: 0 0 12px; font-size: 0.92rem; }
.growth-chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.gc-grid { stroke: var(--line); stroke-width: 1; }
.gc-ylab { font-size: 9px; fill: var(--muted); text-anchor: end; }
.gc-xlab { font-size: 9px; fill: var(--muted); text-anchor: middle; }
.gc-plab { font-size: 8px; fill: var(--muted); text-anchor: end; }
.gc-unit { font-size: 9px; fill: var(--muted); }
.gc-unit.end { text-anchor: end; }
.gc-band { fill: var(--mint); opacity: 0.55; }
.gc-line { fill: none; stroke: #b9a9d8; stroke-width: 1; stroke-dasharray: 3 3; }
.gc-line.mid { stroke: var(--mint-d); stroke-width: 1.6; stroke-dasharray: none; }
.gc-baby-line { fill: none; stroke: var(--pink-d); stroke-width: 2.2; }
.gc-pt { fill: var(--pink-dd); stroke: var(--card); stroke-width: 2; }
.gc-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.gc-table th, .gc-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: center; }
.gc-table td:first-child { text-align: left; }

/* ───────── 자장가 ───────── */
.sound-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 760px) { .sound-grid { grid-template-columns: repeat(4, 1fr); } }
.sound-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 16px 10px; border: 2px solid transparent; font: inherit; color: inherit; }
.sound-btn.on { border-color: var(--lav-d); background: var(--lav); }
.sound-ico { font-size: 2rem; }
.now-playing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: linear-gradient(135deg, var(--lav), var(--card)); }
.now-playing .btn { margin-left: auto; }

/* ───────── 알람·보고서·내비 ───────── */
.member-list li.off { opacity: 0.55; }
.nav-extra { display: none; }
@media (min-width: 760px) {
  .nav-extra { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
}
@media print {
  .nav, .no-print, .log-tabs, .page-head .back { display: none !important; }
  .main { padding: 0 !important; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}

/* ───────── 밤 모드 ───────── */
body:has(.app.night) { background: #17151d; }
.app.night {
  --bg: #17151d; --bg2: #24202d; --card: #26222f; --ink: #eee6f2; --ink-soft: #cfc2d8; --muted: #9b8fa6; --line: #3a3446;
  --pink: #4a2d3b; --pink-d: #e98aa6; --pink-dd: #ff9fbd; --peach: #4b3428; --butter: #463d22; --mint: #1f4234; --sky: #1f3447; --lav: #342b4f;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.35); --shadow-s: 0 3px 10px rgba(0, 0, 0, 0.3);
  background: #17151d; min-height: 100vh; color-scheme: dark;
}
.app.night .nav { background: rgba(32, 28, 40, 0.96); }
.app.night .pastel-pink { background: linear-gradient(135deg, #3b2531, #2b2230); }
.app.night .pastel-peach { background: linear-gradient(135deg, #3d2c24, #2b2229); }
.app.night .pastel-butter { background: linear-gradient(135deg, #3a3322, #2b2629); }
.app.night .pastel-mint { background: linear-gradient(135deg, #1f3a30, #232a2d); }
.app.night .pastel-sky { background: linear-gradient(135deg, #1f3042, #23262f); }
.app.night .pastel-lav { background: linear-gradient(135deg, #2f2747, #26222f); }
.app.night input, .app.night select, .app.night textarea { background: #1d1a24; color: var(--ink); border-color: var(--line); }
.app.night .warn-box { background: #45262b; color: #ffb3b8; }
.app.night .btn.primary { box-shadow: none; }
.app.night .resume, .app.night .install-card, .app.night .book-entry { background: var(--card); }
.app { color: var(--ink); }
.app.night .callout.warn { background: #45262b; color: #ffb3b8; }
.app.night .tag-care { color: #f2c14e; }
.week-hours { display: flex; justify-content: space-between; padding-left: 90px; }
.week-hours span:first-child { grid-column: auto; }
.app.night .sources { background: var(--card); }
.app.night .book-nav { background: rgba(32, 28, 40, 0.94); }
.search-bar { margin: 0 0 12px; }
.search-bar input { -webkit-appearance: none; appearance: none; }
.small-btn { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; }
.guide-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.guide-links .chip { text-decoration: none; color: var(--ink); }
.nav-label { white-space: nowrap; }
.app.night .search input { background: transparent; border: 0; }
