/* ==========================================================================
   albam-care v0.1 — Premium Light Theme Design System
   Target Devices: iPhone 17 Pro, iPad Air 11", Galaxy S24
   ========================================================================== */

/* 1. 디자인 시스템 토큰 & 글로벌 리셋 */
:root {
  /* HSL Palette — Soft Warm Creamy & Harmonious Accents */
  --bg-app: hsla(30, 42%, 97%, 1);       /* 부드럽고 따뜻한 살구빛 감도는 웜 크림 */
  --bg-card: hsla(0, 0%, 100%, 0.88);     /* 반투명 프로스트 글라스 화이트 */
  --border-card: hsla(30, 15%, 90%, 0.5); /* 튀지 않는 은은한 크림 베이지 외곽선 */
  
  --text-main: hsla(210, 24%, 16%, 1);    /* 가독성 1순위 다크 슬레이트 네이비 */
  --text-muted: hsla(210, 12%, 46%, 1);   /* 보조 텍스트 그레이 */
  
  /* 조화로운 상태 포인트 색상 */
  --color-orange: hsla(24, 95%, 55%, 1);      /* 특이 관찰 / 확인 */
  --color-orange-bg: hsla(24, 100%, 96%, 1);
  
  --color-mint: hsla(158, 64%, 42%, 1);       /* 수유 */
  --color-mint-bg: hsla(158, 70%, 95%, 1);
  
  --color-emerald: hsla(145, 60%, 45%, 1);    /* 기저귀 */
  --color-emerald-bg: hsla(145, 60%, 96%, 1);
  
  --color-blue: hsla(214, 82%, 56%, 1);       /* 수면 */
  --color-blue-bg: hsla(214, 90%, 96%, 1);
  
  --color-purple: hsla(262, 62%, 58%, 1);     /* 목욕/위생 */
  
  /* 그림자 & 블러 효과 */
  --shadow-premium: 0 8px 30px hsla(30, 20%, 88%, 0.4);
  --shadow-active: 0 4px 12px hsla(30, 20%, 80%, 0.55);
  --blur-glass: 16px;
  
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 100px; /* 모바일 하단바 여백 */
  line-height: 1.5;
}

/* 2. 글로벌 슬라이드 아웃 드로어 (IA 네비게이션) */
.sidebar-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 310px;
  height: 100%;
  background: hsla(0, 0%, 100%, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 1000;
  box-shadow: 10px 0 40px hsla(210, 20%, 80%, 0.25);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-drawer.open {
  transform: translateX(320px);
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: hsla(210, 20%, 10%, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  padding: 24px;
  border-bottom: 1px solid hsla(30, 10%, 92%, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.drawer-logo .version {
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--color-mint-bg);
  color: var(--color-mint);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.close-btn:hover {
  background: hsla(30, 10%, 94%, 1);
  color: var(--text-main);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
}

.menu-section {
  margin-bottom: 24px;
}

.menu-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin-left: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-section-title .badge {
  font-size: 0.65rem;
  background: hsla(24, 100%, 92%, 1);
  color: var(--color-orange);
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: none;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.menu-item:hover:not(.disabled) {
  background: hsla(30, 20%, 94%, 0.6);
  transform: translateX(4px);
}

.menu-item.active {
  background: var(--color-mint-bg);
  color: var(--color-mint);
  font-weight: 600;
}

.menu-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  stroke: currentColor;
}

.menu-item.disabled {
  color: hsla(210, 10%, 70%, 1);
  cursor: not-allowed;
  opacity: 0.6;
}

.menu-item.disabled:hover {
  transform: none;
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid hsla(30, 10%, 92%, 1);
  background: hsla(30, 20%, 98%, 0.5);
}

.partner-info {
  display: flex;
  align-items: center;
}

.avatar-group {
  display: flex;
  margin-right: 10px;
}

.avatar {
  font-size: 1.4rem;
}

.partner-info .text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}


/* 3. 전체 레이아웃 (반응형 래퍼) */
.app-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* A. 헤더 스타일 */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-premium);
  color: var(--text-main);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.menu-btn:active {
  transform: scale(0.95);
}

.logo-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-title .ver {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  vertical-align: super;
}

/* 도움받는 ↔ 단독 운영 모드 토글 */
.mode-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
}

.mode-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}

.mode-label.active-help {
  color: var(--color-mint);
  font-weight: 700;
}

.mode-label.active-solo {
  color: var(--color-orange);
  font-weight: 700;
}

/* 스위치 슬라이더 */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-mint);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
}

input:checked + .slider {
  background-color: var(--color-orange);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}


/* Home Compact Care Console */
.home-baby-strip {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 11px 12px;
  margin-bottom: 12px;
  box-shadow: 0 5px 16px hsla(30, 20%, 88%, 0.24);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.home-baby-left {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.home-baby-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px hsla(30, 18%, 84%, 0.35);
}

.home-baby-left strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.home-baby-left span:last-child {
  background: var(--color-orange);
  color: white;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-baby-vital {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
  min-width: 0;
}

.handoff-dashboard {
  background: linear-gradient(135deg, hsla(158, 70%, 96%, 0.95), hsla(30, 42%, 98%, 0.96));
  border: 1px solid hsla(158, 35%, 82%, 0.8);
  border-radius: 16px;
  padding: 13px;
  margin-bottom: 10px;
  box-shadow: 0 7px 24px hsla(30, 20%, 88%, 0.32);
}

.handoff-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.handoff-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-mint);
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 2px;
}

.handoff-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.handoff-now {
  flex-shrink: 0;
  background: white;
  color: var(--text-muted);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 2px 8px hsla(30, 20%, 88%, 0.35);
}

.handoff-timer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.handoff-timer-card {
  background: hsla(0, 0%, 100%, 0.86);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 11px;
}

.handoff-timer-card.feeding {
  border-left: 4px solid var(--color-mint);
}

.handoff-timer-card.diaper {
  border-left: 4px solid var(--color-emerald);
}

.handoff-timer-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.handoff-timer-top span {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.handoff-timer-top strong {
  color: var(--text-main);
  font-size: 0.96rem;
  font-weight: 900;
  white-space: nowrap;
}

.handoff-timer-card p {
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 4px;
}

.handoff-timer-card small {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  display: block;
}

/* 상황판 3행 리스트 (수면 / 수유 / 기저귀) */
.handoff-status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.handoff-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: hsla(0, 0%, 100%, 0.86);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--border-card);
  border-radius: 12px;
  padding: 10px 12px;
}

.handoff-status-row.feeding {
  border-left-color: var(--color-mint);
}

.handoff-status-row.diaper {
  border-left-color: var(--color-emerald);
}

/* 수면 상태 시각 대비 (경고/위험색 아님: 차분한 인디고 ↔ 따뜻한 앰버) */
.handoff-status-row.sleep.is-sleeping {
  border-left-color: hsl(238, 60%, 64%);
  background: hsla(238, 70%, 97%, 0.92);
}

.handoff-status-row.sleep.is-awake {
  border-left-color: hsl(38, 82%, 60%);
  background: hsla(38, 78%, 97%, 0.9);
}

.handoff-status-label {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.handoff-status-value {
  text-align: right;
  color: var(--text-main);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.35;
}

/* 1-Tap 수면 버튼: 자는 중/깨어 있음 상태 대비 (subtle) */
.home-quick-sleep-status {
  color: var(--text-muted);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.home-quick-action-btn.sleep-active {
  border-color: hsla(238, 55%, 72%, 0.85);
  background: hsla(238, 70%, 97%, 0.92);
}

.home-quick-action-btn.sleep-awake {
  border-color: hsla(38, 72%, 74%, 0.75);
  background: hsla(38, 74%, 97%, 0.88);
}

.handoff-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
}

.handoff-block {
  background: hsla(0, 0%, 100%, 0.82);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 14px;
}

.handoff-block.immediate {
  grid-row: span 2;
}

.handoff-block h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.handoff-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.handoff-task {
  background: hsla(30, 16%, 97%, 0.8);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.handoff-task-label,
.handoff-summary-grid span {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
}

.handoff-task strong,
.handoff-summary-grid strong {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.handoff-sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.handoff-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.handoff-summary-grid div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: hsla(30, 16%, 97%, 0.74);
  border-radius: 10px;
  padding: 8px 10px;
}

.handoff-summary-grid strong {
  text-align: right;
}

.handoff-logistics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.handoff-supply-pill {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.74rem;
  font-weight: 800;
  background: white;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
}

.handoff-supply-pill.urgent {
  background: var(--color-orange-bg);
  border-color: hsla(24, 80%, 78%, 0.85);
  color: var(--color-orange);
}

.handoff-supply-pill.check {
  background: var(--color-blue-bg);
  border-color: hsla(214, 70%, 82%, 0.9);
  color: var(--color-blue);
}

.handoff-supply-pill.calm {
  background: var(--color-mint-bg);
  border-color: hsla(158, 55%, 82%, 0.9);
  color: var(--color-mint);
}

.handoff-empty,
.handoff-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.handoff-note {
  margin-top: 12px;
  font-weight: 700;
}

.handoff-manual-note {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: hsla(24, 100%, 96%, 0.85);
  border: 1px solid hsla(24, 80%, 84%, 0.8);
  color: var(--color-orange);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.4;
}

/* Home Care Operations */
.home-care-actions,
.home-recent-timeline {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 7px 24px hsla(30, 20%, 88%, 0.3);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
}

.home-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.home-section-header.compact {
  align-items: center;
}

.home-section-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-orange);
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 2px;
}

.home-section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.home-section-note {
  border-radius: 999px;
  background: var(--color-mint-bg);
  border: 1px solid hsla(158, 55%, 82%, 0.9);
  color: var(--color-mint);
  flex-shrink: 0;
  padding: 5px 9px;
  font-size: 0.7rem;
  font-weight: 800;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-quick-action-btn {
  min-height: 72px;
  border: 1px solid var(--border-card);
  background: hsla(30, 14%, 97%, 0.82);
  color: var(--text-main);
  border-radius: 14px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  position: relative;
}

.home-quick-action-btn:hover {
  background: white;
  border-color: hsla(158, 35%, 78%, 0.85);
  transform: translateY(-1px);
}

.home-quick-action-btn:active {
  transform: scale(0.96);
}

.home-quick-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  font-size: 1.18rem;
  box-shadow: 0 3px 10px hsla(30, 18%, 84%, 0.28);
}

.home-local-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  border-radius: 999px;
  background: hsla(210, 10%, 92%, 0.9);
  color: var(--text-muted);
  padding: 2px 5px;
  font-size: 0.56rem;
  font-weight: 900;
}

.home-care-briefing {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 11px;
  margin-bottom: 10px;
  box-shadow: 0 5px 16px hsla(30, 20%, 88%, 0.22);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
}

.home-brief-row {
  background: hsla(30, 16%, 97%, 0.78);
  border-radius: 12px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-brief-row strong {
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.3;
}

.home-brief-row span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.42;
}

.home-brief-row.stock {
  background: hsla(24, 100%, 96%, 0.6);
}

.home-brief-chip {
  align-self: flex-start;
  width: fit-content;
  margin-top: 4px;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--color-orange-bg);
  border: 1px solid hsla(24, 80%, 84%, 0.86);
  color: var(--color-orange);
  font-size: 0.7rem;
  font-weight: 900;
  text-decoration: none;
}

.home-brief-row small {
  margin-top: 1px;
  display: block;
}

.home-view-all-btn {
  border: 1px solid var(--border-card);
  background: white;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.home-recent-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.timeline-date-header {
  margin: 18px 0 8px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.35;
}

.timeline-date-header:first-child {
  margin-top: 0;
}

.timeline-card {
  background: white;
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--color-mint);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.timeline-card.type-diaper {
  border-left-color: var(--color-emerald);
}

.timeline-card.type-sleep {
  border-left-color: var(--color-blue);
}

.timeline-card.type-play {
  border-left-color: var(--color-purple);
}

.timeline-card.type-measurement {
  border-left-color: var(--color-orange);
}

.timeline-card.type-handoff,
.timeline-card.type-other,
.timeline-card.type-observation,
.timeline-card.type-ask-clinic,
.timeline-card.type-clinic-result {
  border-left-color: var(--text-muted);
}

.timeline-card-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsla(30, 18%, 96%, 0.9);
  flex-shrink: 0;
  font-size: 1.25rem;
}

.timeline-card-content {
  min-width: 0;
  flex: 1;
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.timeline-card-time {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.timeline-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-card-detail,
.timeline-card-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Timeline Feed Container List Lightweight View (T-3-b) */
#timelineFeedContainer .timeline-date-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-app);
  padding: 8px 0 6px;
  border-bottom: 1px solid var(--border-card);
  box-shadow: 0 4px 10px hsla(30, 20%, 88%, 0.18);
}

#timelineFeedContainer .timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  box-shadow: none;
  align-items: flex-start;
  gap: 10px;
  transition: none;
}

#timelineFeedContainer .timeline-card:hover {
  transform: none;
  box-shadow: none;
}

#timelineFeedContainer .timeline-card-badge {
  width: 24px;
  height: 24px;
  background: transparent;
  font-size: 1.1rem;
  border-radius: 0;
  margin-right: 2px;
}

#timelineFeedContainer .timeline-card-header {
  display: flex;
  flex-direction: row !important;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

#timelineFeedContainer .timeline-card-time {
  order: -1;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  width: 42px;
  flex-shrink: 0;
  text-align: left;
}

#timelineFeedContainer .timeline-card-body {
  margin-left: 50px;
  gap: 2px;
}

#timelineFeedContainer .timeline-card-detail {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

#timelineFeedContainer .timeline-card-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-recent-card {
  padding: 10px;
  border-radius: 14px;
}

.home-recent-card .timeline-card-header {
  flex-direction: column;
  gap: 3px;
}

.home-recent-card .timeline-card-time {
  white-space: normal;
}

.home-recent-empty {
  border: 1px dashed var(--border-card);
  border-radius: 14px;
  background: hsla(30, 16%, 97%, 0.74);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.home-recent-empty strong {
  color: var(--text-main);
  font-weight: 800;
}

/* B. 최상단 플래그 확인 배너 */
.flag-banner {
  background-color: var(--color-orange-bg);
  border: 1.5px solid var(--color-orange);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px hsla(24, 90%, 90%, 0.35);
  transition: all 0.3s ease;
}

.flag-icon {
  color: var(--color-orange);
  flex-shrink: 0;
}

.flag-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flag-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.flag-memo {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}


/* C. 메인 대시보드 카드 그리드 */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.dashboard-left-panel, .dashboard-right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 공통 카드 디자인 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px hsla(30, 20%, 84%, 0.45);
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.card-header-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.update-pulse {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-mint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.update-pulse:before {
  content: "";
  width: 8px;
  height: 8px;
  background-color: var(--color-mint);
  border-radius: 50%;
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.5; }
}


/* 4. 돌봄 경과 서클 Progress 스타일 */
.status-circles-container {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  margin-bottom: 24px;
}

.circle-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* 외부 상단 타이틀 배지 디자인 */
.circle-title-outer {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 5px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px hsla(30, 20%, 90%, 0.35);
  text-align: center;
  display: inline-block;
  transition: transform 0.2s, border-color 0.2s, color 0.2s;
}

.circle-box:hover .circle-title-outer {
  transform: translateY(-1px);
  border-color: var(--color-mint);
  color: var(--color-mint);
}

#diaperCircleBox:hover .circle-title-outer {
  border-color: var(--color-emerald);
  color: var(--color-emerald);
}

.circular-progress {
  position: relative;
  width: 180px;
  height: 180px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  stroke: hsla(30, 10%, 92%, 1);
}

.progress-ring-bar {
  transition: stroke-dashoffset 0.4s ease;
}

.feeding-bar {
  stroke: var(--color-mint);
}

.diaper-bar {
  stroke: var(--color-emerald);
}

.circle-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px;
}

.circle-time-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 6px;
}

.circle-sub-info {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.35;
}


/* 5. 수면 동적 연동 상태바 */
.sleep-status-bar {
  background-color: var(--color-blue-bg);
  border: 1px solid var(--color-blue);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sleep-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sleep-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.sleep-indicator.active-sleep {
  background-color: var(--color-blue);
  box-shadow: 0 0 10px var(--color-blue);
}

.sleep-indicator.active-awake {
  background-color: var(--color-mint);
  box-shadow: 0 0 10px var(--color-mint);
}

.sleep-status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.awake-text {
  color: var(--color-mint);
}

.sleep-text {
  color: var(--color-blue);
}

.sleep-actions {
  display: flex;
  gap: 8px;
}

.btn-sleep-action {
  background-color: var(--color-blue);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-active);
  transition: transform 0.15s, opacity 0.15s, background-color 0.25s, box-shadow 0.25s;
}

/* 방금 깼어요 ⏰ 상태일 때 초록색(민트색) 배경으로 피드백 강조 */
.btn-sleep-action.awake-action {
  background-color: var(--color-mint);
  box-shadow: 0 4px 12px hsla(158, 64%, 42%, 0.25);
}

.btn-sleep-action:active {
  transform: scale(0.95);
}

.btn-sleep-edit {
  background: transparent;
  border: 1px solid hsla(214, 50%, 80%, 1);
  color: var(--color-blue);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-sleep-edit:hover {
  background: hsla(214, 80%, 93%, 0.5);
}


/* 6. 오늘 요약 현황 그리드 */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: hsla(30, 10%, 95%, 0.4);
  border: 1px solid var(--border-card);
  padding: 12px;
  border-radius: 16px;
}

.summary-icon {
  font-size: 1.6rem;
  width: 42px;
  height: 42px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px hsla(30, 10%, 90%, 0.4);
}

.summary-info {
  display: flex;
  flex-direction: column;
}

.summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.summary-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}


/* 7. 소모품 & 약물 Alerts 디자인 */
.alerts-card-header {
  margin-bottom: 16px;
}

.sub-alert-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.alert-item {
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s;
}

.alert-item:hover {
  transform: translateX(4px);
}

.alert-item.urgent {
  background-color: hsla(0, 100%, 96%, 0.85);
  border: 1px solid hsla(0, 80%, 75%, 0.6);
}

.alert-item.warning {
  background-color: hsla(45, 100%, 95%, 0.85);
  border: 1px solid hsla(45, 80%, 75%, 0.6);
}

.alert-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.alert-tag {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.urgent-tag {
  background-color: hsla(0, 100%, 50%, 0.1);
  color: hsla(0, 85%, 45%, 1);
}

.warning-tag {
  background-color: hsla(45, 100%, 50%, 0.1);
  color: hsla(40, 85%, 40%, 1);
}

.item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.alert-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}


/* 소모품 눈대중 상태 토글 영역 */
.consumables-quick-manager {
  background-color: hsla(30, 20%, 96%, 0.4);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 16px;
}

.consumables-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.consumables-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.consumables-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* 상태별 뱃지 버튼 */
.stock-badge {
  background: white;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px hsla(30, 10%, 92%, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stock-badge:active {
  transform: scale(0.97);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* [충분] 상태 */
.stock-badge.active-sufficient {
  background-color: var(--color-mint-bg);
  border-color: hsla(158, 60%, 85%, 1);
  color: var(--color-mint);
}
.stock-badge.active-sufficient .badge-dot {
  background-color: var(--color-mint);
}

/* [확인 필요] 상태 */
.stock-badge.active-check {
  background-color: hsla(214, 90%, 96%, 1);
  border-color: hsla(214, 70%, 85%, 1);
  color: var(--color-blue);
}
.stock-badge.active-check .badge-dot {
  background-color: var(--color-blue);
}

/* [곧 구매] 상태 */
.stock-badge.active-buy-soon {
  background-color: var(--color-orange-bg);
  border-color: hsla(24, 80%, 85%, 1);
  color: var(--color-orange);
}
.stock-badge.active-buy-soon .badge-dot {
  background-color: var(--color-orange);
}

/* [구매 완료] 상태 */
.stock-badge.active-bought {
  background-color: hsla(262, 70%, 96%, 1);
  border-color: hsla(262, 60%, 88%, 1);
  color: var(--color-purple);
}
.stock-badge.active-bought .badge-dot {
  background-color: var(--color-purple);
}


/* 8. 즉석 메모 입력 카드 */
.quick-memo-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.input-group input {
  background-color: hsla(30, 20%, 96%, 0.4);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.input-group input:focus {
  background-color: white;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px hsla(158, 64%, 42%, 0.15);
}

.btn-memo-submit {
  background-color: var(--color-mint);
  border: none;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-active);
  transition: background 0.2s, transform 0.15s;
}

.btn-memo-submit:active {
  transform: scale(0.97);
}

.memo-policy-tip {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 10px;
}


/* 9. 하단 1-Tap Quick Entry 패널 (모바일 전용) */
.quick-entry-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: hsla(0, 0%, 100%, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-card);
  padding: 10px 16px calc(10px + var(--safe-area-bottom));
  box-shadow: 0 -8px 30px hsla(30, 10%, 80%, 0.15);
  z-index: 100;
}

.quick-entry-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.quick-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px;
  border-radius: 12px;
  transition: background 0.2s, transform 0.15s;
  flex: 1;
}

.quick-btn:active {
  transform: scale(0.9);
  background: hsla(30, 20%, 92%, 0.4);
}

.quick-icon {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
}


/* 10. 상황 카드 뷰어 모달 디자인 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: hsla(210, 24%, 16%, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  padding: 16px;
  transition: opacity 0.3s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: white;
  border-radius: 28px;
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 45px hsla(210, 24%, 10%, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid hsla(30, 10%, 93%, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: hsla(30, 10%, 94%, 1);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* 모달 본문 마크다운 모방 스타일링 */
.modal-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--text-main);
}

.modal-body h3:first-of-type {
  margin-top: 0;
}

.modal-body ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.modal-body li {
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text-muted);
  line-height: 1.45;
}

.modal-body li strong {
  color: var(--text-main);
}

.modal-body blockquote {
  background-color: var(--color-mint-bg);
  border-left: 4px solid var(--color-mint);
  padding: 12px;
  border-radius: 0 12px 12px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-mint);
  margin-bottom: 16px;
}

.modal-body blockquote.orange {
  background-color: var(--color-orange-bg);
  border-left-color: var(--color-orange);
  color: var(--color-orange);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid hsla(30, 10%, 93%, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: hsla(30, 10%, 98%, 0.8);
  border-radius: 0 0 28px 28px;
}

.modal-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
}

.btn-modal-close {
  background-color: var(--text-main);
  border: none;
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-modal-close:active {
  opacity: 0.85;
}


/* ==========================================================================
   Responsive Breakpoints & Layout Adaptations
   ========================================================================== */

/* 11. 모바일 뷰 (iPhone 17 Pro, Galaxy S24 등) */
@media (max-width: 768px) {
  body {
    padding-bottom: 100px; /* 하단바 간섭 방지 */
  }

  .logo-title {
    font-size: 1.4rem;
  }

  /* 헤더 간소화 */
  .mode-switch-wrapper {
    padding: 6px 12px;
  }
  .mode-label {
    font-size: 0.75rem;
  }
  .switch {
    width: 34px;
    height: 18px;
  }
  .slider:before {
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
  }
  input:checked + .slider:before {
    transform: translateX(16px);
  }

  /* 그리드 1열 정렬 */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }

  /* 원형 상황판 간격 조절 */
  .status-circles-container {
    gap: 12px;
  }
  
  .circular-progress {
    width: 120px;
    height: 120px;
  }
  .progress-ring {
    width: 120px;
    height: 120px;
  }
  .progress-ring-bg, .progress-ring-bar {
    r: 48;
    cx: 60;
    cy: 60;
  }
  .progress-ring-bar {
    stroke-dasharray: 301.59;
  }
  
  .circle-inner {
    padding: 6px;
  }
  .circle-label {
    font-size: 0.65rem;
  }
  .circle-time-value {
    font-size: 1.05rem;
  }
  .circle-sub-info {
    font-size: 0.65rem;
  }

  /* 수면 바 폰트 및 패딩 */
  .sleep-status-bar {
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .sleep-actions {
    justify-content: flex-end;
  }

  /* 소모품 관리 그리드 유지 */
  .consumables-badge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 12. 태블릿 뷰 (iPad Air 11인치 등) */
@media (min-width: 769px) {
  /* 하단바를 데스크탑/태블릿에서 프리미엄 플로팅 독(Floating Dock) 스타일로 노출 */
  .quick-entry-nav {
    display: block;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 600px;
    background: hsla(0, 0%, 100%, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 10px 24px;
    box-shadow: 0 12px 40px hsla(30, 20%, 80%, 0.3);
    z-index: 1000;
  }

  body {
    padding-bottom: 110px; /* 플로팅 독 간섭 방지 여유 공간 */
  }

  /* 데스크탑 마우스 호버 시 미세 인터랙션 강화 */
  .quick-btn {
    transition: background 0.25s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .quick-btn:hover {
    background: hsla(30, 20%, 92%, 0.55);
    transform: translateY(-2px);
  }

  .dashboard-grid {
    grid-template-columns: 1.25fr 1fr;
    gap: 24px;
  }
  
  /* 상황 카드 모달 콘텐츠 크기 최적화 */
  .modal-content {
    max-width: 700px;
  }
}

/* 13. 놀이/상호작용 보조 연동 상태바 */
.play-status-bar {
  margin-top: 12px;
  background-color: var(--color-mint-bg);
  border: 1px dashed var(--color-mint);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.play-status-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.play-status-text strong {
  color: var(--color-mint);
}

.play-policy-tip {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* 놀이 모달 내 버튼 그리드 스타일 */
.cat-btn, .time-btn {
  background: white;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.cat-btn:hover, .time-btn:hover {
  background: hsla(30, 10%, 94%, 1);
}

.cat-btn.active, .time-btn.active {
  background: var(--color-mint-bg);
  border-color: var(--color-mint);
  color: var(--color-mint);
  box-shadow: 0 2px 6px hsla(158, 60%, 90%, 0.4);
}

.play-record-content {
  align-items: stretch;
  overflow-y: auto;
}

.play-record-header,
.play-record-form,
.play-record-status,
.play-record-footer {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.play-record-header {
  text-align: center;
  margin-bottom: 14px;
}

.play-record-header .bottom-sheet-title {
  font-size: 1.2rem;
  line-height: 1.35;
}

.play-record-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.play-record-field {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.play-record-field label {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--text-muted);
}

.play-category-grid,
.play-time-grid {
  display: grid;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  background: hsla(30, 20%, 96%, 0.5);
}

.play-category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.play-time-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.play-record-sheet .cat-btn,
.play-record-sheet .time-btn {
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 9px 8px;
  box-shadow: none;
}

.play-record-sheet .cat-btn:hover,
.play-record-sheet .time-btn:hover {
  background: hsla(0, 0%, 100%, 0.72);
  transform: none;
}

.play-record-sheet .cat-btn.active,
.play-record-sheet .time-btn.active {
  background: white;
  border: none;
  color: var(--color-mint);
  box-shadow: 0 2px 8px hsla(30, 12%, 82%, 0.35);
}

.play-custom-duration {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 0;
}

.play-custom-duration label {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--text-muted);
  white-space: nowrap;
  align-self: center;
}

.play-duration-input {
  flex: 1;
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: hsla(30, 20%, 96%, 0.48);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 12px;
  outline: none;
}

.play-duration-input:focus {
  background: white;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px hsla(158, 64%, 42%, 0.14);
}

.play-custom-duration[hidden] {
  display: none;
}

.play-record-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.play-record-status:empty {
  display: none;
}

.play-record-status.success {
  background: var(--color-mint-bg);
  border: 1px solid hsla(158, 55%, 78%, 0.9);
  color: var(--color-mint);
}

.play-record-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 12px;
  padding-top: 10px;
  padding-bottom: 4px;
  background: white;
  border-top: 1px solid var(--border-card);
}

.play-record-submit,
.play-record-cancel {
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.play-record-submit {
  background: var(--color-mint);
  color: white;
}

.play-record-cancel {
  background: hsla(30, 16%, 94%, 0.9);
  color: var(--text-muted);
}

#btnSubmitPlayRecord:disabled {
  opacity: 0.72;
  cursor: default;
}

.measurement-mode-temperature .measurement-tab-growth,
.measurement-mode-growth .measurement-tab-temperature {
  display: none;
}

.measurement-mode-temperature .measurement-category-grid {
  grid-template-columns: 1fr !important;
}

.measurement-mode-growth .measurement-category-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

.measurement-mode-temperature .measurement-category-field {
  display: none;
}

.measurement-record-content {
  align-items: stretch;
  overflow-y: auto;
}

.measurement-record-header,
.measurement-record-form,
.measurement-record-status,
.measurement-record-actions {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.measurement-record-header {
  margin-bottom: 14px;
}

.measurement-record-header .bottom-sheet-title {
  font-size: 1.2rem;
  line-height: 1.35;
}

.measurement-record-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.measurement-record-field {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.measurement-record-field label {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--text-muted);
}

.measurement-category-grid,
.measurement-form-row {
  display: grid;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  background: hsla(30, 20%, 96%, 0.5);
}

.measurement-record-form .measurement-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.measurement-source-center {
  display: none;
}

.measurement-category-tab,
.measurement-record-form .btn-source-selector {
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 9px 8px;
  box-shadow: none;
}

.measurement-category-tab:hover,
.measurement-record-form .btn-source-selector:hover {
  background: hsla(0, 0%, 100%, 0.72);
  transform: none;
}

.measurement-category-tab.active,
.measurement-record-form .btn-source-selector.active {
  background: white;
  box-shadow: 0 2px 8px hsla(30, 12%, 82%, 0.35);
}

.measurement-category-tab.active {
  color: var(--color-mint);
}

.measurement-record-form .btn-source-selector.active.source-home {
  background: white;
  border: none;
  color: var(--color-mint);
  box-shadow: 0 2px 8px hsla(30, 12%, 82%, 0.35);
}

.measurement-record-form .btn-source-selector.active.source-clinic {
  background: white;
  border: none;
  color: var(--color-blue);
  box-shadow: 0 2px 8px hsla(30, 12%, 82%, 0.35);
}

.measurement-record-form .btn-source-selector.active.source-center {
  background: white;
  border: none;
  color: var(--color-orange);
  box-shadow: 0 2px 8px hsla(30, 12%, 82%, 0.35);
}

.measurement-record-amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.measurement-record-input {
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: hsla(30, 20%, 96%, 0.48);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 12px;
  outline: none;
}

.measurement-record-input:focus {
  background: white;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px hsla(158, 64%, 42%, 0.14);
}

.measurement-unit-text {
  min-width: 40px;
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
}

.measurement-record-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 12px;
  padding-top: 10px;
  padding-bottom: 4px;
  background: white;
  border-top: 1px solid var(--border-card);
}

.measurement-submit-btn,
.measurement-cancel-btn {
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.measurement-submit-btn {
  background: var(--color-mint);
  color: white;
  box-shadow: var(--shadow-active);
}

.measurement-cancel-btn {
  background: hsla(30, 18%, 94%, 0.85);
  color: var(--text-muted);
}

.measurement-record-status {
  display: block;
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.measurement-record-status:empty {
  display: none;
}

.measurement-record-status.error {
  color: var(--color-orange);
  background: var(--color-orange-bg);
  border: 1px solid hsla(24, 80%, 78%, 0.85);
}

/* 14. 아기 기본 정보 카드 스타일 (대형 프리미엄 카드 리디자인) */
.baby-info-card-large {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.baby-info-card-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px hsla(30, 20%, 86%, 0.45);
  border-color: hsla(158, 60%, 80%, 0.5);
}

.baby-avatar-large {
  font-size: 2.6rem;
  background: hsla(30, 20%, 96%, 0.7);
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 6px hsla(30, 10%, 80%, 0.15);
}

.baby-details-large {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.baby-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.baby-badge-dday {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--color-mint);
  color: white;
  padding: 3px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 10px hsla(158, 64%, 42%, 0.25);
}

.baby-title-large {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
}

.baby-title-large span {
  color: var(--text-main);
  font-weight: 800;
}

.baby-age-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.baby-age-highlight {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.baby-birth-detail {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.baby-arrow-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-mint);
  background: var(--color-mint-bg);
  padding: 8px 14px;
  border-radius: 12px;
  transition: all 0.2s;
}

.baby-info-card-large:hover .baby-arrow-link {
  background: var(--color-mint);
  color: white;
}

.baby-arrow-link svg {
  transition: transform 0.2s;
}

.baby-info-card-large:hover .baby-arrow-link svg {
  transform: translateX(3px);
}

/* 모바일 뷰에서의 대형 카드 미세 조정 */
@media (max-width: 768px) {
  .baby-info-card-large {
    padding: 16px;
    gap: 14px;
  }
  .baby-avatar-large {
    width: 52px;
    height: 52px;
    font-size: 2rem;
  }
  .baby-title-large {
    font-size: 1.1rem;
  }
  .baby-age-highlight {
    font-size: 0.95rem;
  }
  .baby-arrow-link {
    display: none; /* 모바일은 클릭 영역 전체로 커버되므로 텍스트 숨김 */
  }
}

/* 15. 공식 일정 / 마일스톤 카드 스타일 */
.milestone-card {
  border-color: hsla(214, 50%, 85%, 0.6);
}

.milestone-header {
  margin-bottom: 12px;
}

.calendar-sync-badge {
  background: var(--color-blue-bg);
  border: 1px solid hsla(214, 80%, 85%, 1);
  color: var(--color-blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.milestone-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.milestone-item {
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border-card);
  background: hsla(30, 10%, 96%, 0.3);
  transition: all 0.3s ease;
}

.milestone-item.check-needed {
  border-left: 4px solid var(--color-orange);
  background-color: var(--color-orange-bg);
}

.milestone-item.reservation-ok {
  border-left: 4px solid var(--color-blue);
  background-color: var(--color-blue-bg);
}

.milestone-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ms-tag {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.tag-check {
  background-color: hsla(24, 100%, 50%, 0.1);
  color: var(--color-orange);
}

.tag-reserve {
  background-color: hsla(214, 100%, 50%, 0.1);
  color: var(--color-blue);
}

.ms-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.ms-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ms-action-row {
  display: flex;
  margin-top: 4px;
}

.btn-ms-complete {
  background-color: var(--color-blue);
  border: none;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-active);
  transition: transform 0.15s;
}

.btn-ms-complete:active {
  transform: scale(0.95);
}

/* 접종 후 조치 제안 팝업 박스 */
.milestone-followup-box {
  background: white;
  border: 1.5px solid var(--color-mint);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px hsla(158, 64%, 42%, 0.15);
  animation: slide-up-followup 0.3s ease;
}

@keyframes slide-up-followup {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.followup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.followup-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.followup-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.followup-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.followup-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-followup {
  background-color: var(--color-mint-bg);
  border: 1px solid hsla(158, 64%, 85%, 1);
  color: var(--color-mint);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.btn-followup:hover {
  background-color: var(--color-mint);
  color: white;
}

.milestone-tip {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 10px;
}

/* ==========================================================================
   성장·측정 기록 (Growth & Measurement Records) 관련 신설 스타일
   ========================================================================== */

.measurement-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.measurement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background-color: hsla(30, 10%, 95%, 0.4);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  transition: transform 0.2s, background-color 0.2s;
}

.measurement-row:hover {
  transform: translateX(4px);
  background-color: hsla(30, 20%, 94%, 0.6);
}

.measurement-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.measurement-category-icon {
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px hsla(30, 10%, 90%, 0.35);
}

.measurement-details {
  display: flex;
  flex-direction: column;
}

.measurement-label-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.measurement-time-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.measurement-info-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.measurement-value-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

/* 측정 출처 파스텔 뱃지 */
.badge-source {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

.badge-home {
  background-color: var(--color-mint-bg);
  color: var(--color-mint);
  border: 0.5px solid hsla(158, 64%, 80%, 0.5);
}

.badge-clinic {
  background-color: var(--color-blue-bg);
  color: var(--color-blue);
  border: 0.5px solid hsla(214, 82%, 85%, 0.5);
}

.badge-center {
  background-color: var(--color-orange-bg);
  color: var(--color-orange);
  border: 0.5px solid hsla(24, 95%, 85%, 0.5);
}

/* 신규 측정 기록 폼 스타일 */
.measurement-form-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-source-selector {
  flex: 1;
  background: white;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-source-selector:hover {
  background-color: hsla(30, 20%, 97%, 1);
}

.btn-source-selector.active.source-home {
  background-color: var(--color-mint-bg);
  border-color: var(--color-mint);
  color: var(--color-mint);
}

.btn-source-selector.active.source-clinic {
  background-color: var(--color-blue-bg);
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.btn-source-selector.active.source-center {
  background-color: var(--color-orange-bg);
  border-color: var(--color-orange);
  color: var(--color-orange);
}

/* 위키 이력 뷰어 테이블 스타일 */
.wiki-table-container {
  max-height: 380px;
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: white;
  margin-top: 16px;
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.wiki-table th {
  background-color: hsla(30, 20%, 96%, 0.85);
  color: var(--text-main);
  font-weight: 700;
  padding: 12px;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--border-card);
}

.wiki-table td {
  padding: 12px;
  border-bottom: 1px solid hsla(30, 10%, 94%, 0.5);
  color: var(--text-main);
  vertical-align: middle;
}

.wiki-table tr:last-child td {
  border-bottom: none;
}

.wiki-table tr:hover {
  background-color: hsla(30, 20%, 98%, 0.5);
}

.wiki-table-note {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ==========================================================================
   SPA GNB Navigation & Active Tab Management
   ========================================================================== */
.tab-view {
  display: none;
}
.tab-view.active {
  display: block;
}

/* GNB Floating Island Bar Style */
.gnb-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: hsla(0, 0%, 100%, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-card);
  padding: 8px 16px calc(8px + var(--safe-area-bottom));
  box-shadow: 0 -8px 30px hsla(30, 10%, 80%, 0.18);
  z-index: 1000;
}
.gnb-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}
.gnb-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex: 1;
  color: var(--text-muted);
}
.gnb-btn:active {
  transform: scale(0.9);
}
.gnb-btn.active {
  color: var(--color-mint);
  font-weight: 700;
}
.gnb-btn.active .gnb-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 6px hsla(158, 64%, 42%, 0.2));
}
.gnb-icon {
  font-size: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.gnb-label {
  font-size: 0.7rem;
  font-weight: 700;
}

/* GNB Floating Action Button (FAB) */
.fab-wrapper {
  position: relative;
  width: 64px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.fab-btn {
  position: absolute;
  bottom: 8px;
  width: 58px;
  height: 58px;
  background-color: var(--color-mint);
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 8px 25px hsla(158, 64%, 42%, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s, box-shadow 0.2s;
  z-index: 1001;
}
.fab-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px hsla(158, 64%, 42%, 0.45);
}
.fab-btn:active {
  transform: scale(0.93) translateY(0);
}
.fab-plus {
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 2px;
}

/* ==========================================================================
   Sliding Bottom Sheet Modal
   ========================================================================== */
body.sheet-open {
  overflow: hidden;
}

/* ==========================================================================
   R7-A: 기록 입력 record modal (모바일 full-screen / 데스크톱 centered)
   - 하단 고정(bottom sheet) 대신 상단 기준 full-screen → iOS 키보드 가림 회피
   ========================================================================== */
.record-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: hsla(210, 24%, 16%, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.record-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.record-modal-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--bg-app);
  height: 100%;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.record-modal.open .record-modal-content {
  transform: translateY(0);
}

.record-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 14px;
  border-bottom: 1px solid var(--border-card);
  background: var(--bg-app);
}

.record-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.record-modal-subtitle {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.4;
}

.record-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}

.record-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 18px 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.record-modal-launcher[hidden] {
  display: none;
}

.record-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.record-modal-launcher .manual-backfill-trigger {
  margin-top: 4px;
}

/* 모달 안에서는 저장/취소를 흐름 배치(스크롤로 접근) → 키보드 가림 회피 */
.record-modal .feeding-quick-actions,
.record-modal .note-quick-actions,
.record-modal .play-record-footer,
.record-modal .measurement-record-actions,
.record-modal .fever-observation-actions,
.record-modal .clinic-result-actions {
  position: static;
}

@media (min-width: 768px) {
  .record-modal {
    align-items: center;
  }
  .record-modal-content {
    height: auto;
    max-height: 90vh;
    max-width: 520px;
    margin: 0 16px;
    border-radius: 24px;
  }
  .record-modal-header {
    border-radius: 24px 24px 0 0;
  }
}

.bottom-sheet {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: hsla(210, 24%, 16%, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
}
.bottom-sheet.open {
  opacity: 1;
  pointer-events: auto;
}
.bottom-sheet-content {
  width: 100%;
  background: white;
  border-radius: 28px 28px 0 0;
  padding: 20px 20px calc(20px + var(--safe-area-bottom));
  box-shadow: 0 -10px 40px hsla(210, 24%, 10%, 0.12);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.bottom-sheet.open .bottom-sheet-content {
  transform: translateY(0);
}
.bottom-sheet-handle {
  width: 44px;
  height: 5px;
  background-color: hsla(30, 10%, 88%, 1);
  border-radius: 3px;
  margin-bottom: 16px;
}
.bottom-sheet-header {
  text-align: center;
  margin-bottom: 20px;
}
.bottom-sheet-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}
.bottom-sheet-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.confirm-sheet-content {
  max-width: 420px;
  margin: 0 auto;
  align-items: stretch;
}
.confirm-sheet-header {
  margin-bottom: 18px;
}
.confirm-sheet-message {
  white-space: pre-line;
  line-height: 1.55;
  font-size: 0.9rem;
}
.confirm-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.confirm-sheet-cancel,
.confirm-sheet-confirm {
  min-height: 46px;
  border-radius: 14px;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
}
.confirm-sheet-cancel {
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-main);
}
.confirm-sheet-confirm {
  border: 0;
  background: var(--color-mint);
  color: white;
}
.confirm-sheet-confirm.danger {
  background: var(--color-orange);
}
.bottom-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
}

.bottom-sheet.quick-dedicated .bottom-sheet-grid,
.bottom-sheet.quick-dedicated .manual-backfill-trigger {
  display: none;
}

.bottom-sheet.quick-picker-active .bottom-sheet-header,
.bottom-sheet.quick-picker-active .bottom-sheet-grid,
.bottom-sheet.quick-picker-active .manual-backfill-trigger,
.bottom-sheet.quick-picker-active .btn-sheet-close {
  display: none;
}

.sheet-action-btn {
  background: hsla(30, 10%, 96%, 0.45);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.sheet-action-btn:hover {
  background-color: hsla(30, 20%, 94%, 0.8);
  transform: translateY(-2px);
}
.sheet-action-btn:active {
  transform: scale(0.95);
}
.sheet-action-icon {
  font-size: 1.65rem;
}
.sheet-action-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.feeding-quick-picker,
.diaper-category-picker,
.note-quick-picker {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: center;
}

.feeding-quick-picker[hidden],
.diaper-category-picker[hidden],
.note-quick-picker[hidden],
.handoff-quick-picker[hidden] {
  display: none;
}

.feeding-quick-copy,
.diaper-category-copy,
.note-quick-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0 0 2px;
  text-align: center;
}

.feeding-quick-copy strong,
.diaper-category-copy strong,
.note-quick-copy strong {
  color: var(--text-main);
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.25;
}

.feeding-quick-copy span,
.diaper-category-copy span,
.note-quick-copy span {
  max-width: 420px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
}

.feeding-type-options,
.feeding-choice-grid,
.diaper-category-options {
  display: grid;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  background: hsla(30, 20%, 96%, 0.5);
}

.feeding-type-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feeding-choice-grid,
.feeding-choice-grid.three,
.diaper-category-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feeding-type-option,
.feeding-choice-option,
.diaper-category-option {
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 40px;
  padding: 9px 8px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: none;
}

.feeding-type-option:hover,
.feeding-choice-option:hover,
.diaper-category-option:hover {
  background: hsla(0, 0%, 100%, 0.72);
  transform: none;
}

.feeding-type-option.active,
.feeding-choice-option.active {
  background: white;
  color: var(--color-orange);
  box-shadow: 0 2px 8px hsla(30, 12%, 82%, 0.35);
}

.diaper-category-option:hover,
.diaper-category-option:focus-visible {
  color: var(--color-mint);
}

.feeding-type-option:active,
.feeding-choice-option:active,
.diaper-category-option:active {
  transform: scale(0.98);
}

.feeding-quick-panel,
.note-quick-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.feeding-quick-panel.hidden {
  display: none;
}

.feeding-quick-label {
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 800;
}

.feeding-quick-input,
.note-quick-textarea {
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: hsla(30, 20%, 96%, 0.48);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 12px;
  outline: none;
  font-family: inherit;
}

.note-quick-textarea {
  min-height: 88px;
  resize: vertical;
}

.feeding-quick-input:focus,
.note-quick-textarea:focus {
  background: white;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px hsla(158, 64%, 42%, 0.14);
}

.feeding-quick-status,
.note-quick-status {
  display: none;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.feeding-quick-status.error,
.feeding-quick-status.warning,
.note-quick-status.error,
.note-quick-status.warning {
  display: block;
  background: var(--color-orange-bg);
  border: 1px solid hsla(24, 80%, 78%, 0.85);
  color: var(--color-orange);
}

.feeding-quick-status.success,
.note-quick-status.success {
  display: block;
  background: var(--color-mint-bg);
  border: 1px solid hsla(158, 55%, 78%, 0.9);
  color: var(--color-mint);
}

.feeding-quick-actions,
.note-quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 2px;
  padding-top: 10px;
  padding-bottom: 4px;
  background: white;
  border-top: 1px solid var(--border-card);
}

.feeding-quick-save,
.feeding-quick-cancel,
.note-quick-save,
.note-quick-cancel,
.diaper-category-cancel {
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.feeding-quick-save,
.note-quick-save {
  background: var(--color-mint);
  color: white;
}

.feeding-quick-save:disabled,
.note-quick-save:disabled {
  opacity: 0.62;
  cursor: default;
}

.feeding-quick-cancel,
.note-quick-cancel,
.diaper-category-cancel {
  background: hsla(30, 16%, 94%, 0.9);
  color: var(--text-muted);
}

.diaper-category-option span {
  font-size: 1.2rem;
}

.diaper-category-option strong {
  font-size: 0.76rem;
}

.diaper-category-cancel {
  width: 100%;
}

.btn-sheet-close {
  width: 100%;
  max-width: 500px;
  background-color: var(--text-main);
  border: none;
  color: white;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}
.btn-sheet-close:active {
  opacity: 0.85;
}

.manual-backfill-trigger {
  width: 100%;
  max-width: 500px;
  border: 1px solid hsla(158, 55%, 82%, 0.9);
  background: linear-gradient(135deg, var(--color-mint-bg), white);
  color: var(--text-main);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 14px hsla(158, 38%, 82%, 0.35);
}

.manual-backfill-trigger-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 12px;
  background: white;
  font-size: 1.2rem;
}

.manual-backfill-trigger strong,
.manual-backfill-trigger small {
  display: block;
}

.manual-backfill-trigger strong {
  font-size: 0.88rem;
  font-weight: 800;
}

.manual-backfill-trigger small {
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.35;
}

.manual-backfill-content {
  align-items: stretch;
  overflow-y: auto;
}

.manual-backfill-header {
  margin-bottom: 14px;
}

.manual-backfill-form {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manual-backfill-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.manual-backfill-field label {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--text-muted);
}

.manual-backfill-field input,
.manual-backfill-field textarea {
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: hsla(30, 20%, 96%, 0.48);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 12px;
  outline: none;
  resize: vertical;
}

.manual-backfill-field input:focus,
.manual-backfill-field textarea:focus {
  background: white;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px hsla(158, 64%, 42%, 0.14);
}

.manual-backfill-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.manual-backfill-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  background: hsla(30, 20%, 96%, 0.5);
}

.manual-backfill-segmented.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manual-backfill-segmented.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manual-backfill-feeding-subfields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manual-backfill-option {
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 9px 8px;
  cursor: pointer;
}

.manual-backfill-option.active {
  background: white;
  color: var(--color-mint);
  box-shadow: 0 2px 8px hsla(30, 12%, 82%, 0.35);
}

.manual-backfill-field.hidden,
.manual-backfill-feeding-subfields.hidden,
.manual-backfill-type-fields.hidden {
  display: none;
}

.manual-backfill-status {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
}

.manual-backfill-status:empty {
  display: none;
}

.manual-backfill-status.error {
  background: var(--color-orange-bg);
  border: 1px solid hsla(24, 80%, 78%, 0.85);
  color: var(--color-orange);
}

.manual-backfill-status.success {
  background: var(--color-mint-bg);
  border: 1px solid hsla(158, 55%, 78%, 0.9);
  color: var(--color-mint);
}

.manual-backfill-status.warning {
  background: var(--color-blue-bg);
  border: 1px solid hsla(214, 70%, 82%, 0.9);
  color: var(--color-blue);
}

.manual-backfill-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 2px;
  padding-top: 10px;
  padding-bottom: 4px;
  background: white;
  border-top: 1px solid var(--border-card);
}

.btn-backfill-submit,
.btn-backfill-cancel {
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-backfill-submit {
  background: var(--color-mint);
  color: white;
  box-shadow: var(--shadow-active);
}

.btn-backfill-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-backfill-cancel {
  background: hsla(30, 18%, 94%, 0.85);
  color: var(--text-muted);
}

.fever-observation-content {
  align-items: stretch;
  overflow-y: auto;
}

.fever-observation-header {
  margin-bottom: 14px;
}

.fever-observation-form {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fever-observation-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fever-observation-field label {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--text-muted);
}

.fever-observation-field input,
.fever-observation-field textarea {
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: hsla(30, 20%, 96%, 0.48);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 12px;
  outline: none;
  resize: vertical;
}

.fever-observation-field input:focus,
.fever-observation-field textarea:focus {
  background: white;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px hsla(158, 64%, 42%, 0.14);
}

.fever-observation-options,
.fever-observation-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  background: hsla(30, 20%, 96%, 0.5);
}

.fever-observation-option,
.fever-observation-flag {
  flex: 1 1 132px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.79rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 9px 8px;
  cursor: pointer;
}

.fever-observation-option.active,
.fever-observation-flag.active {
  background: white;
  color: var(--color-mint);
  box-shadow: 0 2px 8px hsla(30, 12%, 82%, 0.35);
}

.fever-observation-status {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
}

.fever-observation-status:empty {
  display: none;
}

.fever-observation-status.error {
  background: var(--color-orange-bg);
  border: 1px solid hsla(24, 80%, 78%, 0.85);
  color: var(--color-orange);
}

.fever-observation-status.success {
  background: var(--color-mint-bg);
  border: 1px solid hsla(158, 55%, 78%, 0.9);
  color: var(--color-mint);
}

.fever-observation-status.warning {
  background: var(--color-blue-bg);
  border: 1px solid hsla(214, 70%, 82%, 0.9);
  color: var(--color-blue);
}

.fever-observation-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 2px;
  padding-top: 10px;
  padding-bottom: 4px;
  background: white;
  border-top: 1px solid var(--border-card);
}

.btn-fever-observation-save,
.btn-fever-observation-cancel {
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.clinic-result-form {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clinic-result-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.clinic-result-field label {
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 800;
}

.clinic-result-field textarea {
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: hsla(30, 20%, 96%, 0.48);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  padding: 11px 12px;
  outline: none;
  resize: vertical;
}

.clinic-result-field textarea:focus {
  background: white;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px hsla(158, 64%, 42%, 0.14);
}

.clinic-result-status {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
}

.clinic-result-status:empty {
  display: none;
}

.clinic-result-status.error {
  background: var(--color-orange-bg);
  border: 1px solid hsla(24, 80%, 78%, 0.85);
  color: var(--color-orange);
}

.clinic-result-status.success {
  background: var(--color-mint-bg);
  border: 1px solid hsla(158, 55%, 78%, 0.9);
  color: var(--color-mint);
}

.clinic-result-status.warning {
  background: var(--color-blue-bg);
  border: 1px solid hsla(214, 70%, 82%, 0.9);
  color: var(--color-blue);
}

.clinic-result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 2px;
  padding-top: 10px;
  padding-bottom: 4px;
  background: white;
  border-top: 1px solid var(--border-card);
}

.btn-clinic-result-save,
.btn-clinic-result-cancel {
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.inventory-edit-content {
  align-items: stretch;
  overflow-y: auto;
}

.inventory-edit-header {
  margin-bottom: 14px;
}

.inventory-edit-form {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inventory-edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inventory-edit-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.inventory-edit-field label {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--text-muted);
}

.inventory-edit-field input {
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: hsla(30, 20%, 96%, 0.48);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 11px 12px;
  outline: none;
}

.inventory-edit-field input:focus {
  background: white;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px hsla(158, 64%, 42%, 0.14);
}

.inventory-variant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inventory-variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(88px, 0.6fr) auto;
  gap: 8px;
  align-items: center;
}

.inventory-empty-variants {
  border: 1px dashed var(--border-card);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 11px 12px;
}

.inventory-add-variant,
.inventory-remove-variant,
.btn-inventory-save,
.btn-inventory-cancel {
  border: none;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.inventory-add-variant {
  align-self: flex-start;
  background: var(--color-mint-bg);
  color: var(--color-mint);
  padding: 9px 12px;
}

.inventory-remove-variant {
  background: hsla(30, 20%, 94%, 0.8);
  color: var(--text-muted);
  padding: 10px 11px;
}

.inventory-edit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 2px;
  padding-top: 10px;
  padding-bottom: 4px;
  background: white;
  border-top: 1px solid var(--border-card);
}

.btn-inventory-save {
  background: var(--color-mint);
  color: white;
  padding: 12px;
}

.btn-inventory-cancel {
  background: hsla(30, 20%, 94%, 0.9);
  color: var(--text-muted);
  padding: 12px;
}

.btn-fever-observation-save {
  background: var(--color-mint);
  color: white;
  box-shadow: var(--shadow-active);
}

.btn-fever-observation-save:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-fever-observation-cancel {
  background: hsla(30, 18%, 94%, 0.85);
  color: var(--text-muted);
}

.btn-clinic-result-save {
  background: var(--color-mint);
  color: white;
  box-shadow: var(--shadow-active);
}

.btn-clinic-result-save:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-clinic-result-cancel {
  background: hsla(30, 18%, 94%, 0.85);
  color: var(--text-muted);
}

.timeline-card-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.timeline-manual-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--color-orange-bg);
  border: 1px solid hsla(24, 80%, 82%, 0.9);
  color: var(--color-orange);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ==========================================================================
   Archive Subview Controller
   ========================================================================== */
.archive-subview {
  display: none;
}
.archive-subview.active {
  display: block;
  animation: fade-in-subview 0.3s ease;
}
@keyframes fade-in-subview {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.subview-header {
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--border-card);
  padding-bottom: 16px;
}
.btn-subview-back {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px hsla(30, 10%, 90%, 0.4);
  margin-bottom: 12px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-subview-back:hover {
  background-color: hsla(30, 20%, 96%, 1);
  transform: translateX(-2px);
}

.archive-profile-card,
.archive-flag-card,
.archive-summary-card {
  margin-bottom: 16px;
}

.archive-main-group {
  margin: 26px 0 0;
}

.archive-today-group {
  margin-top: 18px;
}

.archive-now-group .archive-flag-card {
  margin-bottom: 0;
}

.archive-clinic-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: var(--shadow-premium);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.archive-clinic-summary-copy {
  min-width: 0;
}

.archive-clinic-summary-copy strong {
  display: block;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.3;
}

.archive-clinic-summary-copy small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.45;
}

.archive-clinic-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.archive-clinic-summary-stats span {
  border: 1px solid hsla(158, 55%, 80%, 0.72);
  border-radius: 999px;
  background: hsla(158, 70%, 96%, 0.58);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.archive-clinic-summary-stats b {
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 900;
}

.archive-clinic-summary-action {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid hsla(158, 55%, 80%, 0.82);
  border-radius: 14px;
  background: var(--color-mint-bg);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
  padding: 11px 12px;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  width: 100%;
}

.archive-clinic-summary-action:active,
.clinic-subview-checklist-action:active {
  transform: scale(0.99);
}

.archive-clinic-summary-action:hover,
.clinic-subview-checklist-action:hover {
  border-color: hsla(158, 60%, 76%, 0.9);
  background: hsla(158, 70%, 94%, 0.9);
}

.archive-clinic-summary-action span,
.clinic-subview-checklist-action span {
  color: var(--color-mint);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.archive-main-group:last-of-type {
  padding-bottom: 88px;
}

.archive-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  padding: 0 2px;
}

.archive-group-eyebrow {
  color: var(--color-mint);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.archive-group-header h3 {
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 1.03rem;
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.archive-schedule-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.archive-schedule-card {
  grid-column: 1;
}

.archive-schedule-subsection {
  border-top: 1px solid var(--border-card);
  margin-top: 4px;
  padding-top: 16px;
}

.archive-schedule-card .milestone-empty-inline {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 14px;
}

.archive-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: var(--shadow-premium);
  padding: 16px;
  min-width: 0;
}

.archive-card.highlight {
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.archive-card.highlight:active {
  transform: scale(0.99);
}

.archive-card.highlight:hover {
  border-color: hsla(158, 60%, 80%, 0.78);
  box-shadow: 0 10px 24px hsla(30, 20%, 86%, 0.4);
}

.archive-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--color-mint-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1.25rem;
}

.archive-card-info {
  min-width: 0;
}

.archive-card-info h3,
.archive-card.text-card .archive-card-sub-title {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 5px;
}

.archive-card-info p {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.manual-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manual-item-btn {
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 13px;
  background: hsla(30, 16%, 97%, 0.78);
  color: var(--text-main);
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.manual-item-btn:active {
  transform: scale(0.99);
}

.manual-item-btn:hover {
  border-color: hsla(158, 60%, 80%, 0.8);
  background: hsla(158, 70%, 96%, 0.52);
}

.manual-item-btn svg {
  flex: 0 0 auto;
  color: var(--color-mint);
}

.archive-detail-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.archive-detail-item,
.archive-detail-chip {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  font-family: inherit;
}

.archive-detail-list > .archive-detail-item {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: none;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  font: inherit;
  text-align: left;
  text-decoration: none;
  margin: 0;
  min-width: 0;
}

.archive-detail-list > button.archive-detail-item {
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.archive-detail-list > button.archive-detail-item:active,
.archive-detail-chip:active {
  transform: scale(0.99);
}

.archive-detail-list > button.archive-detail-item:hover,
.archive-detail-chip:hover {
  border-color: hsla(158, 60%, 80%, 0.8);
  background: hsla(158, 70%, 96%, 0.52);
}

.archive-detail-list > button.archive-detail-item:focus-visible,
.archive-detail-chip:focus-visible {
  outline: 2px solid hsla(158, 54%, 60%, 0.45);
  outline-offset: 2px;
}

.archive-detail-icon {
  width: 36px;
  height: 36px;
  border: 1px solid hsla(158, 50%, 86%, 0.72);
  border-radius: 10px;
  background: var(--color-mint-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px hsla(0, 0%, 100%, 0.68);
}

.archive-detail-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
}

.archive-detail-copy strong {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.3;
}

.archive-detail-copy small {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.archive-detail-arrow {
  color: var(--color-mint);
  font-size: 1.3rem;
  font-weight: 900;
  flex: 0 0 auto;
  justify-self: end;
  line-height: 1;
}

.archive-detail-arrow-muted {
  opacity: 0.55;
}

.archive-detail-manual {
  align-items: start;
  cursor: default;
}

.archive-detail-manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 2 / 4;
  width: 100%;
  margin-top: 4px;
}

.archive-detail-chip {
  min-height: 30px;
  border: 1px solid hsla(158, 54%, 82%, 0.68);
  border-radius: 999px;
  background: hsla(158, 70%, 96%, 0.58);
  color: var(--color-mint);
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  box-shadow: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.archive-detail-chip span {
  color: currentColor;
  font-size: 0.86rem;
  font-weight: 900;
}

.ask-clinic-notes-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: var(--shadow-premium);
  padding: 16px;
  margin-bottom: 12px;
}

.clinic-ia-section {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.clinic-ia-section:last-child {
  margin-bottom: 88px;
}

.clinic-ia-header h3 {
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
}

.clinic-ia-header p {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 4px 0 0;
}

.clinic-previsit-summary {
  background: linear-gradient(135deg, hsla(158, 72%, 96%, 0.82), hsla(48, 80%, 96%, 0.72));
  border: 1px solid hsla(158, 55%, 80%, 0.68);
  border-radius: 16px;
  padding: 13px 14px;
}

.clinic-previsit-summary strong {
  color: var(--text-main);
  display: block;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.3;
}

.clinic-previsit-summary small {
  color: var(--text-muted);
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 3px;
}

.clinic-previsit-summary-heading {
  margin-bottom: 10px;
}

.clinic-vital-summary-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clinic-vital-summary-item {
  background: hsla(0, 0%, 100%, 0.72);
  border: 1px solid hsla(158, 35%, 82%, 0.72);
  border-radius: 12px;
  padding: 10px;
}

.clinic-vital-summary-item span {
  color: var(--text-muted);
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
}

.clinic-vital-summary-item b {
  color: var(--text-main);
  display: block;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.clinic-previsit-summary-note {
  margin-top: 9px;
}

.ask-clinic-notes-header {
  margin-bottom: 12px;
}

.ask-clinic-notes-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.ask-clinic-notes-header p,
.ask-clinic-notes-empty {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.ask-clinic-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ask-clinic-entry-row {
  background: hsla(48, 82%, 96%, 0.58);
  border: 1px solid hsla(48, 70%, 82%, 0.62);
  border-radius: 14px;
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  padding: 10px;
}

.ask-clinic-entry-row small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
}

.ask-clinic-add-btn {
  align-items: center;
  background: var(--text-main);
  border: 0;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 900;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  transition: transform 0.16s ease, opacity 0.16s ease;
  width: fit-content;
}

.ask-clinic-add-btn:active {
  transform: scale(0.98);
}

.ask-clinic-list-note {
  color: var(--text-muted);
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 9px;
}

.ask-clinic-note-item {
  border: 1px solid hsla(158, 55%, 80%, 0.72);
  border-radius: 14px;
  background: hsla(158, 70%, 96%, 0.56);
  padding: 11px 12px;
}

.ask-clinic-note-title {
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.ask-clinic-note-item p {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.clinic-result-entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: var(--shadow-premium);
  padding: 12px;
  margin: 0 0 12px;
}

.clinic-result-entry-btn {
  width: 100%;
  border: 1px solid hsla(158, 55%, 80%, 0.72);
  border-radius: 14px;
  background: hsla(158, 70%, 96%, 0.56);
  color: var(--text-main);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.clinic-result-entry-btn:active {
  transform: scale(0.99);
}

.clinic-result-entry-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 3px 8px hsla(30, 12%, 84%, 0.28);
}

.clinic-result-entry-btn strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.3;
}

.clinic-result-entry-btn small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
}

.clinic-result-archive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: var(--shadow-premium);
  padding: 16px;
  margin: 0 0 12px;
}

#archive-clinic-subview .ask-clinic-notes-card,
#archive-clinic-subview .clinic-result-entry-card,
#archive-clinic-subview .clinic-result-archive-card,
#archive-clinic-subview .clinic-subview-checklist-card {
  margin-bottom: 14px;
}

.clinic-subview-checklist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: var(--shadow-premium);
  display: grid;
  gap: 12px;
  margin-bottom: 0;
  padding: 16px;
}

.clinic-subview-checklist-copy strong {
  display: block;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.3;
}

.clinic-subview-checklist-copy small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.45;
}

.clinic-subview-checklist-action {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid hsla(158, 55%, 80%, 0.82);
  border-radius: 14px;
  background: var(--color-mint-bg);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
  padding: 11px 12px;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  width: 100%;
}

.clinic-result-archive-header {
  margin-bottom: 12px;
}

.clinic-result-archive-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.clinic-result-archive-header p,
.clinic-result-archive-empty {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.clinic-result-archive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clinic-result-archive-item {
  border: 1px solid hsla(32, 58%, 78%, 0.72);
  border-radius: 14px;
  background: hsla(40, 70%, 97%, 0.72);
  padding: 11px 12px;
}

.clinic-result-archive-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.clinic-result-archive-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.clinic-result-archive-badge.consult {
  background: hsla(158, 70%, 92%, 0.86);
  color: hsl(166, 44%, 30%);
}

.clinic-result-archive-badge.visit {
  background: hsla(214, 72%, 93%, 0.9);
  color: hsl(218, 48%, 36%);
}

.clinic-result-archive-meta time {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.clinic-result-archive-title {
  display: block;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 5px;
}

.clinic-result-archive-item p {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.archive-summary-shelf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.archive-summary-card {
  padding: 16px;
}

.archive-summary-card .archive-card-sub-title {
  margin-bottom: 12px;
}

.archive-summary-card .milestone-list,
.archive-summary-card .alerts-list,
.archive-summary-card .measurement-horizontal-summary-row {
  margin-top: 12px;
}

.archive-summary-card .card-header-simple,
.archive-summary-card .alerts-card-header {
  margin-bottom: 12px;
}

/* ==========================================================================
   Growth 상세 서브뷰
   ========================================================================== */
.growth-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.growth-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.growth-metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px hsla(30, 20%, 86%, 0.45);
}
.growth-metric-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.metric-icon-box {
  font-size: 1.15rem;
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px hsla(30, 10%, 90%, 0.4);
}
.metric-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}
.growth-metric-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin: 4px 0;
}
.growth-metric-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  min-height: 14px;
}
.growth-metric-add-btn {
  background-color: var(--color-mint-bg);
  border: none;
  color: var(--color-mint);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
  width: 100%;
}
.growth-metric-add-btn:hover {
  background-color: var(--color-mint);
  color: white;
}

/* 성장 이력 필터링 탭 */
.growth-history-section {
  margin-top: 32px;
}
.growth-filter-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.growth-filter-tab {
  background: white;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.growth-filter-tab:hover {
  background: hsla(30, 10%, 96%, 1);
}
.growth-filter-tab.active {
  background: var(--color-mint-bg);
  border-color: var(--color-mint);
  color: var(--color-mint);
  box-shadow: 0 2px 6px hsla(158, 60%, 90%, 0.35);
}

/* ==========================================================================
   Consumables & Medicines 상세 서브뷰
   ========================================================================== */
.consumables-badge-grid-large {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.stock-badge-large {
  background: white;
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-premium);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}
.stock-badge-large:active {
  transform: scale(0.97);
}
.stock-badge-large-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stock-badge-large-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.stock-badge-large-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}
.stock-badge-large-state {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.inventory-edit-entry {
  margin-top: 10px;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: white;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 9px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px hsla(30, 12%, 84%, 0.28);
}
.inventory-edit-entry:active {
  transform: scale(0.98);
}
.stock-quantity-line {
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.3;
}
.stock-quantity-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.stock-quantity-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid hsla(30, 12%, 84%, 0.8);
  border-radius: 10px;
  background: hsla(0, 0%, 100%, 0.72);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 3px 6px;
  word-break: break-word;
}
.stock-badge-large.active-sufficient {
  background-color: var(--color-mint-bg);
  border-color: hsla(158, 60%, 85%, 1);
}
.stock-badge-large.active-sufficient .stock-badge-large-dot {
  background-color: var(--color-mint);
}
.stock-badge-large.active-sufficient .stock-badge-large-state {
  color: var(--color-mint);
  font-weight: 700;
}
.stock-badge-large.active-check {
  background-color: hsla(214, 90%, 96%, 1);
  border-color: hsla(214, 70%, 85%, 1);
}
.stock-badge-large.active-check .stock-badge-large-dot {
  background-color: var(--color-blue);
}
.stock-badge-large.active-check .stock-badge-large-state {
  color: var(--color-blue);
  font-weight: 700;
}
.stock-badge-large.active-buy-soon {
  background-color: var(--color-orange-bg);
  border-color: hsla(24, 80%, 85%, 1);
}
.stock-badge-large.active-buy-soon .stock-badge-large-dot {
  background-color: var(--color-orange);
}
.stock-badge-large.active-buy-soon .stock-badge-large-state {
  color: var(--color-orange);
  font-weight: 700;
}
.stock-badge-large.active-bought {
  background-color: hsla(262, 70%, 96%, 1);
  border-color: hsla(262, 60%, 88%, 1);
}
.stock-badge-large.active-bought .stock-badge-large-dot {
  background-color: var(--color-purple);
}
.stock-badge-large.active-bought .stock-badge-large-state {
  color: var(--color-purple);
  font-weight: 700;
}

/* 체중 링크 대조 안내 패널 */
.weight-ref-section {
  margin: 28px 0;
}
.weight-ref-card {
  background: hsla(30, 20%, 96%, 0.45);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-premium);
}
.weight-ref-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.weight-ref-icon {
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px hsla(30, 10%, 90%, 0.4);
}
.weight-ref-meta {
  display: flex;
  flex-direction: column;
}
.weight-ref-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.weight-ref-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 1px;
}
.weight-ref-policy {
  background-color: var(--color-orange-bg);
  border-left: 4px solid var(--color-orange);
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 0.8rem;
  color: var(--color-orange);
  font-weight: 700;
  margin: 12px 0;
}
.weight-ref-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* 상비약 안전 안내 배너 및 목록 */
.medicine-safety-banner {
  background-color: var(--color-orange-bg);
  border: 1px solid var(--color-orange);
  border-radius: 14px;
  padding: 12px;
  font-size: 0.82rem;
  color: var(--color-orange);
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px hsla(24, 95%, 90%, 0.3);
}
.medicines-detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.med-detail-card {
  background: white;
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}
.med-detail-card:hover {
  transform: translateX(4px);
  border-color: hsla(30, 20%, 88%, 0.8);
}
.med-detail-card.med-urgent {
  border-left: 4px solid var(--color-orange);
  background-color: var(--color-orange-bg);
}
.med-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.med-detail-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}
.med-urgent-tag {
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--color-orange);
  color: white;
  padding: 2px 8px;
  border-radius: 6px;
}
.med-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: hsla(30, 10%, 96%, 0.45);
  padding: 10px 14px;
  border-radius: 12px;
}
.med-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.med-detail-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.med-detail-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}
.med-detail-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  background-color: hsla(30, 10%, 98%, 0.7);
  padding: 8px 12px;
  border-radius: 8px;
}
.med-detail-note strong {
  color: var(--text-main);
}

/* ==========================================================================
   Menu / Settings Tab Design
   ========================================================================== */
.menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  margin-bottom: 18px;
}
.menu-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}
.settings-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

.connection-reset-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.connection-reset-btn {
  background: var(--bg-card);
  border-left: 4px solid var(--color-mint);
  color: var(--text-main);
  min-height: 58px;
  padding: 12px 16px;
}

.connection-reset-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.connection-reset-title {
  font-size: 0.9rem;
  font-weight: 900;
}

.connection-reset-subtitle {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.connection-reset-btn svg {
  color: var(--color-mint);
}

.mode-switch-wrapper-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  background: hsla(30, 10%, 96%, 0.45);
  padding: 10px 16px;
  border-radius: 16px;
  width: fit-content;
}
.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: hsla(30, 10%, 96%, 0.45);
  padding: 14px 16px;
  border-radius: 20px;
}
.profile-avatar {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px hsla(30, 10%, 90%, 0.4);
}
.profile-details {
  display: flex;
  flex-direction: column;
}
.profile-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}
.profile-dday {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-mint);
}
.menu-wiki-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.wiki-roadmap-item {
  background: white;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}
.wiki-roadmap-item.disabled {
  opacity: 0.65;
  background: hsla(30, 10%, 96%, 0.2);
  cursor: not-allowed;
}

/* Header Mode Status Badge */
.header-mode-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  background-color: var(--color-orange-bg);
  border: 1px solid hsla(24, 95%, 85%, 0.5);
  color: var(--color-orange);
  box-shadow: 0 2px 6px hsla(24, 95%, 90%, 0.25);
  transition: all 0.3s ease;
}
.header-mode-badge.help-mode {
  background-color: var(--color-mint-bg);
  border-color: hsla(158, 64%, 85%, 0.5);
  color: var(--color-mint);
  box-shadow: 0 2px 6px hsla(158, 64%, 90%, 0.25);
}

/* ==========================================================================
   Responsive Adaptations & Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-bottom: 95px; /* Prevent floating island overlap */
  }
  .handoff-dashboard {
    padding: 13px;
    border-radius: 18px;
  }
  .handoff-header {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }
  .handoff-now {
    width: fit-content;
  }
  .handoff-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .handoff-timer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .handoff-timer-card {
    padding: 10px;
  }
  .handoff-timer-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .handoff-block.immediate {
    grid-row: auto;
  }
  .handoff-block {
    padding: 12px;
    border-radius: 14px;
  }
  .handoff-summary-grid div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .handoff-summary-grid strong {
    text-align: left;
  }
  .home-care-actions,
  .home-recent-timeline {
    padding: 13px;
    border-radius: 18px;
  }
  .home-baby-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .home-baby-vital {
    text-align: left;
  }
  .home-section-header {
    flex-direction: column;
    gap: 8px;
  }
  .home-section-header.compact {
    flex-direction: row;
    align-items: center;
  }
  .home-section-note {
    width: fit-content;
  }
  .home-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .home-quick-action-btn {
    min-height: 72px;
    padding: 10px 6px;
    border-radius: 12px;
    font-size: 0.72rem;
  }
  .home-quick-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 1.1rem;
  }
  .home-recent-list {
    grid-template-columns: 1fr;
  }
  .home-care-briefing {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .home-brief-row {
    padding: 10px 11px;
  }
  .archive-summary-shelf {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .archive-main-group {
    margin-top: 22px;
  }
  .archive-main-group:last-of-type {
    padding-bottom: 96px;
  }
  .archive-group-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-bottom: 10px;
  }
  .archive-grid,
  .archive-detail-grid,
  .archive-schedule-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .archive-card {
    padding: 14px;
  }
  .archive-summary-card {
    padding: 14px;
  }
  .timeline-card-header {
    flex-direction: column;
    gap: 3px;
  }
  .timeline-card-time {
    white-space: normal;
  }
  .gnb-nav {
    display: block;
  }
  .quick-entry-nav {
    display: none !important; /* Hide old bar */
  }
  .growth-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .consumables-badge-grid-large {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stock-badge-large {
    padding: 12px;
    border-radius: 16px;
  }
  .menu-wiki-roadmap-grid {
    grid-template-columns: 1fr;
  }
  .bottom-sheet-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .sheet-action-btn {
    padding: 10px 4px;
    border-radius: 14px;
  }
  .sheet-action-icon {
    font-size: 1.45rem;
  }
  .sheet-action-label {
    font-size: 0.65rem;
  }
  .manual-backfill-trigger {
    padding: 10px 12px;
  }
  .manual-backfill-content {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding-left: 16px;
    padding-right: 16px;
  }
  .measurement-record-content {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding-left: 16px;
    padding-right: 16px;
  }
  .inventory-edit-content {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding-left: 16px;
    padding-right: 16px;
  }
  .inventory-edit-row,
  .inventory-edit-actions {
    grid-template-columns: 1fr;
  }
  .inventory-variant-row {
    grid-template-columns: minmax(0, 1fr) 82px auto;
  }
  .manual-backfill-actions {
    grid-template-columns: 1fr;
  }
  .play-record-footer {
    grid-template-columns: 1fr;
  }
  .play-custom-duration {
    flex-direction: column;
  }
  .play-custom-duration label {
    align-self: flex-start;
  }
  .measurement-record-actions {
    grid-template-columns: 1fr;
  }
  .feeding-quick-actions,
  .note-quick-actions {
    grid-template-columns: 1fr;
  }
  .clinic-result-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .gnb-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 600px;
    background: hsla(0, 0%, 100%, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 8px 24px;
    box-shadow: 0 12px 40px hsla(30, 20%, 80%, 0.25);
    z-index: 1000;
  }
  .gnb-btn {
    transition: background 0.25s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .gnb-btn:hover {
    background: hsla(30, 20%, 92%, 0.55);
    transform: translateY(-2px);
  }
  .quick-entry-nav {
    display: none !important; /* Hide old bar */
  }
  body {
    padding-bottom: 110px;
  }
}

/* ==========================================================================
   albam-care v0_lite_pwa 1단계: 초기 설정 모달 전용 스타일
   ========================================================================== */
#initialSetupModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-app);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
}

#initialSetupModal.open {
  display: flex !important;
}

#initialSetupModal .modal-content {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border-card);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 28px;
  animation: modal-appear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.setup-modal-title {
  margin: 0;
}

.setup-lead {
  color: var(--text-main);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 16px;
}

.setup-pin-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.setup-pin-label {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 800;
}

.setup-pin-input {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 1rem;
  min-height: 48px;
  padding: 12px;
  width: 100%;
}

.setup-submit-btn {
  background-color: var(--color-mint);
  border: none;
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  min-height: 50px;
  padding: 14px;
  transition: background-color 0.2s, opacity 0.2s;
  width: 100%;
}

.setup-submit-btn:disabled {
  cursor: default;
  opacity: 0.72;
}

.setup-edit-cancel-btn {
  background: transparent;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 800;
  min-height: 46px;
  padding: 12px;
  width: 100%;
}

.setup-edit-cancel-btn[hidden] {
  display: none;
}

@keyframes modal-appear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* PWA 초기 설정 모달 내 오류 안내 스타일 */
.setup-error-msg {
  background-color: var(--color-orange-bg);
  border: 1px solid var(--color-orange);
  color: var(--color-orange);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: shake-error 0.3s ease-in-out;
}

.setup-advanced-helper {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0 0 8px;
}

.setup-advanced-settings {
  margin: 0 0 14px;
}

.setup-advanced-summary {
  min-height: 46px;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 800;
  list-style: none;
}

.setup-advanced-summary::-webkit-details-marker {
  display: none;
}

.setup-advanced-summary::after {
  content: "⌄";
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.setup-advanced-settings[open] .setup-advanced-summary::after {
  transform: rotate(180deg);
}

.setup-advanced-body {
  border: 1px solid var(--border-card);
  border-radius: 12px;
  margin-top: 8px;
  padding: 12px;
  background: var(--bg-app);
}

.setup-advanced-settings:not([open]) .setup-advanced-body {
  display: none;
}

.setup-advanced-title {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.setup-default-api-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0 0 12px;
}

.setup-default-api-url {
  display: block;
  margin-top: 6px;
  word-break: break-all;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-main);
}

.setup-advanced-label {
  color: var(--text-muted);
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
}

@keyframes shake-error {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
