@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --primary-50: #fcf4f2;
  --primary-100: #f9e6e1;
  --primary-300: #f0b8a8;
  --primary-500: #e07a5f;
  --primary-600: #d06a50;
  --primary-700: #b85239;

  --secondary-50: #f0f4f8;
  --secondary-100: #d9e2ec;
  --secondary-500: #3d5a80;
  --secondary-700: #293d5a;
  --secondary-900: #1a2639;

  --accent-400: #f4d35e;
  --accent-500: #f2cc8f;

  --success-50: #f2f7f5;
  --success-500: #81b29a;
  --danger-50: #fef2f2;
  --danger-500: #e07a5f;

  --bg-main: #fdfdfb;
  --surface: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --text-main: #293241;
  --text-muted: #7a8b99;
  --text-light: #a0aec0;

  --doc-bg: #eaebef;
  --shadow-sm: 0 2px 8px rgba(41, 50, 65, 0.04);
  --shadow-md: 0 8px 24px rgba(41, 50, 65, 0.06);
  --shadow-lg: 0 16px 40px rgba(41, 50, 65, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--doc-bg);
  color: var(--text-main);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  padding: 48px 24px 80px;
}

a {
  color: inherit;
}

.doc-header {
  margin: 0 auto 56px;
  max-width: 860px;
  text-align: center;
}

.doc-header h1 {
  color: var(--secondary-900);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
}

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

.version-badge {
  background: var(--primary-500);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 6px 16px;
}

.date-badge {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.back-link {
  color: var(--primary-500);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-top: 18px;
}

.toc {
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  margin: 0 auto 56px;
  max-width: 860px;
  padding: 32px;
}

.toc h3 {
  color: var(--primary-500);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.toc p,
.toc ul {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.toc ul {
  list-style: none;
}

.toc-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.toc-item {
  align-items: center;
  background: var(--gray-50);
  border-radius: 12px;
  color: var(--text-main);
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  transition: 0.2s ease;
}

.toc-item:hover {
  background: var(--primary-50);
  color: var(--primary-600);
  transform: translateY(-1px);
}

.toc-num {
  align-items: center;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  color: var(--primary-500);
  display: inline-flex;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.section {
  margin: 0 auto 80px;
  max-width: 1400px;
}

.section-header {
  align-items: center;
  border-bottom: 2px solid var(--secondary-100);
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 20px;
}

.section-icon {
  align-items: center;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-shrink: 0;
  font-size: 24px;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.section-meta {
  background: white;
  border-radius: 8px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  margin-left: auto;
  padding: 6px 12px;
}

.screen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: center;
}

.screen-wrapper {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s ease;
}

.screen-wrapper:hover {
  transform: translateY(-4px);
}

.screen-label {
  background: white;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  padding: 8px 20px;
}

.phone {
  background: var(--bg-main);
  border: 8px solid #e2e4e9;
  border-radius: 48px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 24px 64px rgba(41, 50, 65, 0.15),
    0 4px 12px rgba(41, 50, 65, 0.08);
  display: flex;
  flex-direction: column;
  height: 720px;
  overflow: hidden;
  position: relative;
  width: 340px;
}

.notch {
  align-items: center;
  background: transparent;
  display: flex;
  flex-shrink: 0;
  height: 48px;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 100;
}

.notch::after {
  background: black;
  border-radius: 14px;
  content: "";
  height: 28px;
  position: absolute;
  top: 10px;
  width: 100px;
}

.screen {
  background: var(--bg-main);
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  padding-top: 56px;
  scrollbar-width: none;
}

.screen-scroll::-webkit-scrollbar {
  display: none;
}

.glass-header {
  align-items: flex-end;
  backdrop-filter: blur(12px);
  background: rgba(253, 253, 251, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  height: 100px;
  left: 0;
  padding: 0 20px 16px;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 50;
}

.header-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.header-side {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  min-width: 56px;
}

.header-side.right {
  justify-content: flex-end;
}

.mini-pill {
  align-items: center;
  background: var(--gray-100);
  border-radius: 999px;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  padding: 6px 12px;
}

.badge-safe {
  align-items: center;
  background: var(--success-50);
  border-radius: 999px;
  color: var(--success-500);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  padding: 6px 12px;
}

.dot {
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.dot-safe {
  background: var(--success-500);
  box-shadow: 0 0 0 3px var(--success-50);
}

.btn-primary,
.btn-secondary {
  align-items: center;
  border-radius: 16px;
  display: flex;
  font-size: 16px;
  height: 52px;
  justify-content: center;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  box-shadow: 0 4px 12px rgba(224, 122, 95, 0.3);
  color: white;
  font-weight: 700;
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  font-weight: 600;
}

.card {
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 20px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
}

.chip.active {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-600);
}

.hero-panel {
  background: linear-gradient(180deg, rgba(224, 122, 95, 0.1), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(224, 122, 95, 0.15);
  border-radius: 28px;
  padding: 24px 22px;
}

.record-orb {
  align-items: center;
  background: radial-gradient(circle at 30% 30%, #f6b6a5, var(--primary-500));
  border-radius: 50%;
  box-shadow:
    0 0 0 14px rgba(224, 122, 95, 0.08),
    0 20px 36px rgba(224, 122, 95, 0.22);
  color: white;
  display: flex;
  font-size: 42px;
  font-weight: 800;
  height: 128px;
  justify-content: center;
  margin: 0 auto;
  width: 128px;
}

.record-orb.live {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 14px rgba(224, 122, 95, 0.08),
      0 20px 36px rgba(224, 122, 95, 0.22);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 22px rgba(224, 122, 95, 0.12),
      0 24px 40px rgba(224, 122, 95, 0.26);
    transform: scale(1.03);
  }
}

.wave-strip {
  align-items: flex-end;
  display: flex;
  gap: 6px;
  height: 44px;
  justify-content: center;
}

.wave-strip span {
  background: linear-gradient(180deg, var(--primary-300), var(--primary-600));
  border-radius: 999px;
  display: block;
  width: 6px;
}

.log-card {
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 14px;
}

.log-top {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tag-pill {
  background: var(--gray-100);
  border-radius: 999px;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.tag-pill.primary {
  background: var(--primary-50);
  color: var(--primary-600);
}

.tag-pill.success {
  background: var(--success-50);
  color: var(--success-500);
}

.time-label {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 700;
}

.log-title {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.log-body {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.divider {
  background: var(--gray-200);
  height: 1px;
  margin: 18px 0;
  width: 100%;
}

.composer {
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 18px;
}

.field {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  min-height: 108px;
  padding: 16px;
}

.sheet-scrim {
  background: rgba(26, 38, 57, 0.3);
  inset: 0;
  position: absolute;
  z-index: 10;
}

.bottom-sheet {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px 28px 0 0;
  bottom: 0;
  box-shadow: 0 -12px 32px rgba(41, 50, 65, 0.18);
  left: 0;
  padding: 16px 20px 28px;
  position: absolute;
  right: 0;
  z-index: 20;
}

.sheet-handle {
  background: var(--gray-300);
  border-radius: 999px;
  height: 5px;
  margin: 0 auto 16px;
  width: 48px;
}

.list-row {
  align-items: center;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
}

.list-row:last-child {
  border-bottom: none;
}

.subtle {
  color: var(--text-light);
}

.fab {
  align-items: center;
  background: var(--secondary-900);
  border-radius: 999px;
  bottom: 92px;
  box-shadow: 0 18px 32px rgba(26, 38, 57, 0.2);
  color: white;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  padding: 14px 18px;
  position: absolute;
  right: 20px;
  z-index: 12;
}

.glass-tabbar {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 1);
  border-radius: 32px;
  bottom: 20px;
  box-shadow: 0 12px 32px rgba(41, 50, 65, 0.12);
  display: flex;
  height: 64px;
  justify-content: space-around;
  left: 20px;
  position: absolute;
  right: 20px;
  z-index: 10;
}

.glass-tab {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.glass-tab.active {
  color: var(--primary-500);
}

.glass-tab.inactive {
  color: var(--text-light);
}

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

/* -- Transcript fold -- */

.transcript-label {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.transcript-fold {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  max-height: 42px;
  overflow: hidden;
  padding: 10px 16px;
  position: relative;
}

.transcript-fold::after {
  color: var(--text-light);
  content: "펼치기 ▾";
  font-size: 11px;
  font-weight: 700;
  position: absolute;
  right: 14px;
  top: 12px;
}

.transcript-fold.open {
  max-height: none;
}

.transcript-fold.open::after {
  content: "접기 ▴";
}

/* -- Structured field rows -- */

.field-row {
  align-items: center;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}

.field-row:last-child {
  border-bottom: none;
}

.field-label {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  min-width: 72px;
}

.field-value {
  color: var(--text-main);
  font-size: 14px;
  text-align: right;
}

.field-value.editable {
  background: var(--primary-50);
  border: 1px dashed var(--primary-300);
  border-radius: 10px;
  padding: 6px 12px;
}

.field-value.placeholder {
  color: var(--text-light);
}

/* -- Record group (multi-record from one recording) -- */

.record-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-group-header {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.record-card-mini {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
}

.tag-border-feeding {
  border-left: 4px solid var(--primary-500);
}

.tag-border-sleep {
  border-left: 4px solid var(--secondary-500);
}

.tag-border-medicine {
  border-left: 4px solid var(--success-500);
}

.tag-border-symptom {
  border-left: 4px solid #e05f5f;
}

.tag-border-other {
  border-left: 4px solid var(--gray-400);
}

/* -- Add / delete actions -- */

.btn-add-record {
  align-items: center;
  border: 2px dashed var(--gray-300);
  border-radius: 16px;
  color: var(--text-muted);
  display: flex;
  font-size: 14px;
  font-weight: 600;
  height: 44px;
  justify-content: center;
  width: 100%;
}

.btn-danger {
  align-items: center;
  background: var(--danger-50);
  border: 1px solid rgba(224, 95, 95, 0.2);
  border-radius: 16px;
  color: #c0392b;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  height: 44px;
  justify-content: center;
  width: 100%;
}

.severity-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.severity-mild {
  background: var(--success-50);
  color: var(--success-500);
}

.severity-watch {
  background: #fef3cd;
  color: #b8860b;
}

.edit-hint {
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 8px;
}

@media (max-width: 900px) {
  body {
    padding: 32px 16px 64px;
  }

  .doc-header h1 {
    font-size: 28px;
  }

  .toc,
  .section {
    max-width: 100%;
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}
