@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --ink: #33443E; --ink2: #44554F; --pri: #3D7A68; --pri-d: #33695A; --sub: #6B7280; --muted: #9CA3AF; --line: #ECEEF1; --line2: #F3F4F6;
  --bg: #F7F6F2; --card: #FFFFFF;
  --em: #3D7A68; --em2: #4E8C79; --em-d: #2F5F51; --em-soft: #EAF2EE; --em-tint: #F4F8F6;
  --red: #C9514A; --red-soft: #F8ECEA; --amb: #B98326; --amb-soft: #F7F0E3; --blue: #4A6A8F; --blue-soft: #EDF1F6; --vio: #6E5F8F; --vio-soft: #F1EFF5;
  --r: 20px; --r-sm: 14px;
  --sh: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.05);
  --sh-lg: 0 2px 6px rgba(16,24,40,.05), 0 24px 48px rgba(16,24,40,.10);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; letter-spacing: -0.02em; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
input, select, textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--pri); box-shadow: 0 0 0 4px rgba(61,122,104,.12); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--sub); margin: 0 0 7px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 18px;
  font-weight: 700; background: var(--pri); color: #fff; transition: transform .08s, opacity .15s, background .15s; text-decoration: none; white-space: nowrap; }
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.98); }
.btn.em { background: var(--em); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: #D1D5DB; opacity: 1; }
.btn.soft { background: var(--line2); color: var(--ink); }
.btn.soft:hover { background: #ECEEF1; opacity: 1; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #FBD5D9; }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.p-ok { background: var(--em-soft); color: var(--em-d); } .p-warn { background: var(--amb-soft); color: #8A611B; }
.p-bad { background: var(--red-soft); color: var(--red); } .p-gray { background: var(--line2); color: var(--sub); }
.p-living { background: var(--blue-soft); color: var(--blue); } .p-silver { background: var(--vio-soft); color: var(--vio); }
.p-dark { background: var(--pri); color: #fff; }
.muted { color: var(--muted); } .sub { color: var(--sub); }
.eyebrow { font-size: 12.5px; font-weight: 700; color: var(--em); letter-spacing: 0; }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: -0.03em; text-decoration: none; color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 9px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px); background: var(--pri); color: #fff;
  padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; opacity: 0; transition: all .25s; z-index: 100; pointer-events: none; box-shadow: var(--sh-lg); }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.switch { position: relative; width: 44px; height: 26px; display: inline-block; flex: none; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; background: #E5E7EB; border-radius: 99px; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.switch input:checked + span { background: var(--em); }
.switch input:checked + span::before { transform: translateX(18px); }

.seg { display: flex; background: var(--line2); padding: 4px; border-radius: 12px; gap: 2px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--sub); }
.seg button.on { background: #fff; color: var(--pri-d); box-shadow: 0 1px 3px rgba(16,24,40,.08); }

/* ── 상단 내비 (웹 화면 공통) ── */
.topnav { position: sticky; top: 0; z-index: 20; background: rgba(247,246,242,.85); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid rgba(0,0,0,.04); }
.topnav .in { max-width: 1160px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
.topnav .sp { flex: 1; }
.topnav .who { font-size: 13px; color: var(--sub); }

/* ── 모바일 앱 공통 (부모님·자녀) ── */
body.mobile { background: #ECEFEA; min-height: 100vh; }
.device { max-width: 430px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 560px) {
  body.mobile { display: flex; align-items: center; justify-content: center; padding: 28px 0;
    background: radial-gradient(1200px 600px at 50% -10%, #E3EEE8 0%, transparent 60%), #ECEFEA; }
  .device { width: 400px; min-height: 0; height: min(860px, calc(100vh - 56px)); border-radius: 48px; outline: 10px solid #FFFFFF; box-shadow: 0 0 0 11px #DCE4DF, 0 40px 80px rgba(51,68,62,.18); }
}
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 26px 2px; font-size: 13.5px; font-weight: 700; flex: none; }
.statusbar .r { display: flex; gap: 6px; align-items: center; }
.statusbar svg.i { width: 15px; height: 15px; }
.app-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 10px; flex: none; }
.app-scroll { flex: 1; overflow-y: auto; padding: 4px 20px 28px; }
.app-scroll::-webkit-scrollbar { display: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--sh); text-decoration: none; color: var(--ink); }

.demo-fab { position: absolute; right: 16px; bottom: 96px; z-index: 30; border: 0; background: var(--pri); color: #fff; border-radius: 99px;
  padding: 10px 14px 10px 12px; font-size: 13px; font-weight: 700; box-shadow: 0 10px 24px rgba(61,122,104,.3); display: flex; gap: 6px; align-items: center; }
.demo-fab svg.i { width: 16px; height: 16px; }
.sheet-bg { position: absolute; inset: 0; background: rgba(120,135,128,.35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-bg.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; background: #fff; border-radius: 28px 28px 0 0; padding: 10px 20px 24px;
  transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1); max-height: 80%; overflow-y: auto; }
.sheet.on { transform: translateY(0); }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: #E5E7EB; margin: 0 auto 14px; }
.sheet h4 { margin: 18px 0 8px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.sheet .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet .act { border: 0; background: var(--line2); border-radius: 14px; padding: 13px 12px; text-align: left; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--ink); }
.sheet .act:active { background: #E5E7EB; }
.sheet .act svg.i { width: 18px; height: 18px; color: var(--sub); }

.banner-wrap { position: absolute; left: 10px; right: 10px; top: 40px; z-index: 50; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.banner { background: rgba(250,250,250,.88); backdrop-filter: saturate(180%) blur(20px); border-radius: 22px; padding: 12px 14px; box-shadow: 0 12px 32px rgba(0,0,0,.16);
  display: flex; gap: 11px; animation: drop .45s cubic-bezier(.2,.8,.2,1); }
.banner img { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.banner .t { font-size: 13.5px; line-height: 1.4; flex: 1; }
.banner .t small { color: var(--muted); font-size: 11.5px; display: flex; justify-content: space-between; }
.banner .t b { display: block; font-size: 14.5px; }
@keyframes drop { from { transform: translateY(-44px); opacity: 0; } }
@keyframes pop { 0% { transform: scale(.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
