/* Patient Guide - Toss Style Design System
 * Single Source of Truth for all CSS
 * Version 3.0 - Commercial Grade
 */

/* ==================== Font Import ==================== */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* ==================== Design Tokens ==================== */
:root {
  /* Primary */
  --toss-blue: #3182f6;
  --toss-blue-light: #4990f8;
  --toss-blue-dark: #1b64da;
  --toss-blue-darker: #006ffd;
  --toss-blue-bg: #eff6ff;
  --toss-blue-bg-deep: #dbeafe;
  
  /* Grayscale */
  --toss-gray-50: #f9fafb;
  --toss-gray-100: #f2f4f6;
  --toss-gray-200: #e5e8eb;
  --toss-gray-300: #d1d6db;
  --toss-gray-400: #b0b8c1;
  --toss-gray-500: #8b95a1;
  --toss-gray-600: #6b7684;
  --toss-gray-700: #4e5968;
  --toss-gray-800: #333d4b;
  --toss-gray-900: #191f28;
  
  /* Semantic Colors */
  --toss-red: #f04452;
  --toss-red-bg: #fef2f2;
  --toss-green: #00c853;
  --toss-green-dark: #00a86b;
  --toss-green-bg: #ecfdf5;
  --toss-yellow: #ffc107;
  --toss-yellow-bg: #fffbeb;
  --toss-orange: #f59f00;
  --toss-orange-bg: #fff7ed;
  --toss-purple: #8b5cf6;
  --toss-purple-bg: rgba(139,92,246,0.08);
  --toss-indigo: #6366f1;
  
  /* Gradient Tokens */
  --gradient-blue: linear-gradient(135deg, #3182f6 0%, #006ffd 100%);
  --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-green: linear-gradient(135deg, #00c471 0%, #00a86b 100%);
  --gradient-red: linear-gradient(135deg, #f04452 0%, #d63845 100%);
  --gradient-orange: linear-gradient(135deg, #ff9500 0%, #ff7b00 100%);
  --gradient-warn: linear-gradient(135deg, #ffb400 0%, #ff9500 100%);
  --gradient-indigo: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(99,102,241,0.1) 100%);
  
  /* Layout Tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-blue: 0 4px 16px rgba(49, 130, 246, 0.3);
  --shadow-blue-lg: 0 8px 32px rgba(49,130,246,0.3);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --max-width: 500px;
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #ffffff;
  color: var(--toss-gray-900);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

/* ==================== Typography ==================== */
.text-display { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.3; }
.text-title1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.4; }
.text-title2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.4; }
.text-title3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.5; }
.text-body1 { font-size: 16px; font-weight: 400; line-height: 1.6; }
.text-body2 { font-size: 15px; font-weight: 400; line-height: 1.6; }
.text-body3 { font-size: 14px; font-weight: 400; line-height: 1.5; }
.text-caption { font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--toss-gray-500); }
.text-small { font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--toss-gray-500); }
.text-tiny { font-size: 11px; font-weight: 400; line-height: 1.4; color: var(--toss-gray-500); }
.text-micro { font-size: 10px; font-weight: 400; line-height: 1.4; color: var(--toss-gray-500); }

/* Font Size Utilities */
.text-10 { font-size: 10px; }
.text-11 { font-size: 11px; }
.text-12 { font-size: 12px; }
.text-13 { font-size: 13px; }
.text-14 { font-size: 14px; }
.text-15 { font-size: 15px; }
.text-16 { font-size: 16px; }
.text-17 { font-size: 17px; }
.text-18 { font-size: 18px; }
.text-20 { font-size: 20px; }
.text-24 { font-size: 24px; }
.text-26 { font-size: 26px; }
.text-28 { font-size: 28px; }
.text-32 { font-size: 32px; }
.text-36 { font-size: 36px; }
.text-40 { font-size: 40px; }

/* ==================== Layout ==================== */
#app { 
  padding-bottom: calc(70px + var(--safe-area-bottom));
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-container, .content-padding {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-header { padding: 24px 20px 12px; }

.toss-container {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: white;
  position: relative;
}

.toss-header {
  padding: 16px 20px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--toss-gray-100);
}

.toss-content {
  padding: 20px;
  padding-bottom: 100px;
}

/* Section padding patterns */
.section-px { padding-left: 20px; padding-right: 20px; }
.section-py { padding-top: 16px; padding-bottom: 16px; }
.section-p { padding: 0 20px 16px; }
.section-card { padding: 20px; }
.section-card-lg { padding: 24px; }
.section-card-sm { padding: 16px; }

/* Full height pages */
.page-full {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.page-bg-light { background: var(--toss-gray-50); }
.page-bg-white { background: #fff; }
.min-h-screen { min-height: 100vh; min-height: 100dvh; }

/* ==================== Cards ==================== */
.toss-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--toss-gray-100);
  transition: all var(--transition-normal);
}
.toss-card:active { transform: scale(0.98); }
.toss-card-lg { padding: 24px; }
.toss-card-sm { padding: 16px; }

.toss-card-elevated {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: none;
}

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

.toss-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--toss-gray-900);
}

.toss-card-subtitle {
  font-size: 14px;
  color: var(--toss-gray-500);
}

/* Card with border - common dashboard card */
.card-bordered {
  background: #fff;
  border: 1px solid var(--toss-gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card-bordered-sm { padding: 16px; }
.card-bordered-lg { padding: 24px; }
.card-bordered-mt { margin-top: 16px; }

/* Interactive card for dashboard */
.toss-card-interactive {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.toss-card-interactive::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background var(--transition-fast);
}
.toss-card-interactive:hover::after {
  background: rgba(0,0,0,0.02);
}

/* Section card (for input/metric sections) */
.section-card-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--toss-gray-100);
}

/* ==================== Buttons ==================== */
.toss-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  line-height: 1;
}
.toss-btn:active { transform: scale(0.97); }
.toss-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.toss-btn-primary { background: var(--toss-blue); color: white; }
.toss-btn-primary:hover:not(:disabled) { background: var(--toss-blue-dark); }

.toss-btn-secondary { background: var(--toss-gray-100); color: var(--toss-gray-800); }
.toss-btn-secondary:hover:not(:disabled) { background: var(--toss-gray-200); }

.toss-btn-outline { background: transparent; border: 1.5px solid var(--toss-gray-200); color: var(--toss-gray-700); }
.toss-btn-outline:hover:not(:disabled) { border-color: var(--toss-blue); color: var(--toss-blue); }

.toss-btn-ghost { background: transparent; color: var(--toss-blue); padding: 8px 12px; }
.toss-btn-ghost:hover:not(:disabled) { background: var(--toss-blue-bg); }

.toss-btn-danger { background: var(--toss-red); color: white; }
.toss-btn-danger:hover:not(:disabled) { background: #d63a47; }

.toss-btn-full { width: 100%; }
.toss-btn-lg { padding: 16px 24px; font-size: 17px; border-radius: 14px; }
.toss-btn-xl { padding: 18px 24px; height: 56px; font-size: 17px; border-radius: 14px; }
.toss-btn-sm { padding: 8px 14px; font-size: 13px; border-radius: var(--radius-sm); }

/* Button loading state */
.toss-btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.toss-btn.loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Ghost button - no style, full tap */
.btn-ghost {
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
  padding: 0;
}

/* Icon button - circle/rounded */
.btn-icon {
  width: 40px;
  height: 40px;
  background: var(--toss-gray-100);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--toss-gray-200); }
.btn-icon-sm { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.btn-icon-lg { width: 48px; height: 48px; border-radius: var(--radius-md); }
.btn-icon-white { background: #fff; border: 1px solid var(--toss-gray-200); }
.btn-icon-round { border-radius: 50%; }
.btn-icon-transparent { background: transparent; }

/* Dismiss/Close button */
.btn-dismiss {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-dismiss-sm { width: 24px; height: 24px; border-radius: 6px; }

/* Counter button (for onboarding) */
.btn-counter {
  width: 48px;
  height: 48px;
  background: #fff;
  border: 1px solid var(--toss-gray-200);
  border-radius: var(--radius-md);
  font-size: 24px;
  cursor: pointer;
  color: var(--toss-gray-900);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation gradient buttons */
.btn-gradient-blue {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--gradient-blue);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  flex: 1;
  text-align: left;
}
.btn-gradient-purple {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--gradient-purple);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  flex: 1;
  text-align: left;
}

/* Action button (colored, small) */
.btn-action {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
}
.btn-action-blue { background: var(--toss-blue); }
.btn-action-green { background: var(--toss-green); }
.btn-action-purple { background: var(--toss-purple); }

/* Skip / text-only button */
.btn-skip {
  background: none;
  border: none;
  color: var(--toss-gray-500);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
}

/* ==================== Inputs ==================== */
.toss-input {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  border: 1.5px solid var(--toss-gray-200);
  border-radius: var(--radius-md);
  background: white;
  color: var(--toss-gray-900);
  outline: none;
  transition: all var(--transition-fast);
}
.toss-input:focus {
  border-color: var(--toss-blue);
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
}
.toss-input::placeholder { color: var(--toss-gray-400); }
.toss-input:disabled {
  background: var(--toss-gray-50);
  color: var(--toss-gray-400);
}

.toss-input-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-gray-700);
  margin-bottom: 8px;
}

.toss-input-group { margin-bottom: 20px; }

.toss-input-hint { font-size: 13px; color: var(--toss-gray-500); margin-top: 6px; }
.toss-input-error { font-size: 13px; color: var(--toss-red); margin-top: 6px; }

/* Metric Input - big number */
.toss-metric {
  width: 100%;
  padding: 12px 0;
  font-size: 24px;
  font-weight: 700;
  text-align: right;
  border: none;
  border-bottom: 2px solid var(--toss-gray-200);
  background: transparent;
  color: var(--toss-gray-900);
  outline: none;
  transition: border-color var(--transition-normal);
}
.toss-metric:focus { border-color: var(--toss-blue); }

/* Number counter input (for onboarding) */
.input-counter {
  width: 60px;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--toss-gray-900);
}

/* Code input (for OTP/reset) */
.input-code {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 8px;
  text-align: center;
  border: 1.5px solid var(--toss-gray-200);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--toss-gray-900);
  outline: none;
  transition: all 0.2s ease;
}
.input-code:focus {
  border-color: var(--toss-blue);
  box-shadow: 0 0 0 3px rgba(49,130,246,0.12);
}

/* Transparent input (inline edit) */
.input-transparent {
  width: 100%;
  padding: 10px 0;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--toss-gray-900);
  outline: none;
}

/* Time input (for schedule) */
.input-time {
  width: 110px;
  padding: 10px 12px;
  text-align: center;
  border: 1.5px solid var(--toss-gray-200);
  border-radius: 10px;
  font-size: 14px;
  color: var(--toss-gray-900);
  background: #fff;
  outline: none;
  transition: all 0.2s ease;
}
.input-time:focus { border-color: var(--toss-blue); }
.input-time:disabled { border-color: var(--toss-gray-100); color: var(--toss-gray-400); background: var(--toss-gray-50); }

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* Select with arrow */
.select-wrapper { position: relative; }
.select-wrapper select { appearance: none; cursor: pointer; padding-right: 44px; }
.select-wrapper svg, .select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ==================== Bottom Navigation ==================== */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--toss-gray-100);
  padding-bottom: var(--safe-area-bottom);
  z-index: 100;
}
.nav-container {
  display: flex;
  justify-content: space-around;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 0 4px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 16px;
  color: var(--toss-gray-400);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.nav-item svg { width: 24px; height: 24px; }
.nav-item span { font-size: 11px; font-weight: 500; }
.nav-item.active { color: var(--toss-blue); font-weight: 600; }
.nav-item:hover { color: var(--toss-gray-600); }

/* ==================== Stats & Metrics ==================== */
.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.02em;
}
.stat-value-lg { font-size: 40px; }
.stat-label {
  font-size: 14px;
  color: var(--toss-gray-500);
  font-weight: 400;
}
.stat-change { font-size: 13px; font-weight: 600; }
.stat-change.positive { color: var(--toss-green); }
.stat-change.negative { color: var(--toss-red); }

.toss-amount { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; }
.toss-amount-unit { font-size: 20px; font-weight: 600; color: var(--toss-gray-600); margin-left: 2px; }

/* Section title patterns */
.section-title { font-size: 16px; font-weight: 600; color: var(--toss-gray-900); margin: 0 0 16px 0; }
.section-title-lg { font-size: 17px; font-weight: 700; color: var(--toss-gray-900); margin: 0; }
.section-title-xl { font-size: 20px; font-weight: 700; color: var(--toss-gray-900); margin: 0; }

/* Metric label styles */
.metric-label { font-size: 12px; color: var(--toss-gray-500); margin-bottom: 4px; }
.metric-label-sm { font-size: 11px; color: var(--toss-gray-500); }
.metric-value { font-size: 20px; font-weight: 700; color: var(--toss-gray-900); }
.metric-value-lg { font-size: 24px; }
.metric-value-sm { font-size: 16px; }
.metric-sub { font-size: 12px; color: var(--toss-gray-500); margin-top: 4px; }

/* ==================== Status Colors ==================== */
.status-success { color: var(--toss-green); }
.status-warning { color: var(--toss-yellow); }
.status-danger { color: var(--toss-red); }
.status-info { color: var(--toss-blue); }

.bg-success-light { background: rgba(0, 200, 83, 0.08); }
.bg-warning-light { background: rgba(255, 193, 7, 0.08); }
.bg-danger-light { background: rgba(240, 68, 82, 0.08); }
.bg-info-light { background: rgba(49, 130, 246, 0.08); }
.bg-purple-light { background: rgba(139, 92, 246, 0.08); }

.bg-gray-50 { background: var(--toss-gray-50); }
.bg-gray-100 { background: var(--toss-gray-100); }
.bg-white { background: #fff; }

.text-primary { color: var(--toss-blue); }
.text-success { color: var(--toss-green); }
.text-danger { color: var(--toss-red); }
.text-warning { color: var(--toss-orange); }
.text-muted { color: var(--toss-gray-500); }
.text-gray-400 { color: var(--toss-gray-400); }
.text-gray-600 { color: var(--toss-gray-600); }
.text-gray-700 { color: var(--toss-gray-700); }
.text-gray-800 { color: var(--toss-gray-800); }
.text-dark { color: var(--toss-gray-900); }
.text-white { color: #fff; }
.text-white-80 { color: rgba(255,255,255,0.8); }
.text-white-70 { color: rgba(255,255,255,0.7); }
.text-white-60 { color: rgba(255,255,255,0.6); }

/* ==================== Progress Bar ==================== */
.toss-progress {
  width: 100%;
  height: 6px;
  background: var(--toss-gray-100);
  border-radius: 3px;
  overflow: hidden;
}
.toss-progress-bar {
  height: 100%;
  background: var(--toss-blue);
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.toss-progress-bar.animated {
  animation: progressPulse 2s ease-in-out infinite;
}
@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.toss-progress-lg { height: 10px; border-radius: 5px; }
.toss-progress-lg .toss-progress-bar { border-radius: 5px; }

/* Onboarding step progress bar */
.progress-step {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  transition: background 0.3s;
}
.progress-step-active { background: var(--toss-blue); }
.progress-step-inactive { background: var(--toss-gray-200); }

/* Hero progress bar */
.progress-hero {
  height: 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

/* ==================== Tags & Badges ==================== */
.toss-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.toss-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.toss-badge-blue { background: var(--toss-blue-bg); color: var(--toss-blue); }
.toss-badge-green { background: var(--toss-green-bg); color: var(--toss-green); }
.toss-badge-red { background: var(--toss-red-bg); color: var(--toss-red); }
.toss-badge-orange { background: var(--toss-yellow-bg); color: var(--toss-orange); }
.toss-badge-gray { background: var(--toss-gray-100); color: var(--toss-gray-600); }
.toss-badge-sm { font-size: 11px; padding: 2px 8px; }
.toss-badge-xs { font-size: 10px; padding: 2px 6px; border-radius: 4px; }

/* Count badge */
.count-badge {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--toss-gray-100);
  color: var(--toss-gray-600);
  border-radius: 10px;
}

/* Category tag on action items */
.category-tag {
  font-size: 10px;
  padding: 2px 6px;
  color: #fff;
  border-radius: 4px;
}

/* ==================== Alerts ==================== */
.toss-alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.toss-alert-info { background: linear-gradient(135deg, var(--toss-blue-bg) 0%, var(--toss-blue-bg-deep) 100%); color: var(--toss-blue-dark); }
.toss-alert-success { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); color: #047857; }
.toss-alert-warning { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); color: #b45309; }
.toss-alert-danger { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); color: #b91c1c; }

/* Alert banner (gradient colored) */
.alert-banner {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  animation: slideIn 0.3s ease;
}
.alert-banner-lg {
  padding: 18px;
  border-radius: var(--radius-lg);
  animation: slideIn 0.3s ease;
  color: white;
}

/* ==================== Dividers ==================== */
.toss-divider { height: 1px; background: var(--toss-gray-100); margin: 20px 0; }
.toss-divider-thick { height: 8px; background: var(--toss-gray-50); margin: 0 -20px; }
.divider-sm { height: 1px; background: var(--toss-gray-100); }
.divider-section { border-top: 1px solid rgba(255,255,255,0.2); padding-top: 12px; margin-top: 12px; }

/* ==================== List Items ==================== */
.toss-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--toss-gray-100);
}
.toss-list-item:last-child { border-bottom: none; }

/* Day item (onboarding schedule) */
.day-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--toss-gray-100);
}

/* ==================== Toast ==================== */
.toss-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 24px;
  background: var(--toss-gray-800);
  color: white;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  animation: toastSlideUp 0.3s ease;
  box-shadow: var(--shadow-xl);
  max-width: calc(var(--max-width) - 40px);
  text-align: center;
  word-break: keep-all;
}
.toss-toast.success { background: var(--toss-green); }
.toss-toast.error { background: var(--toss-red); }

@keyframes toastSlideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==================== Floating Button ==================== */
.floating-btn {
  position: fixed;
  bottom: 90px;
  right: 20px;
  padding: 14px 20px;
  background: var(--toss-blue);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-blue);
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: floatBounce 2s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ==================== Loading & Spinner ==================== */
.toss-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 16px;
}

.toss-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--toss-gray-200);
  border-top-color: var(--toss-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.toss-spinner-lg { width: 32px; height: 32px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== Skeleton Loading ==================== */
.skeleton {
  background: linear-gradient(90deg, var(--toss-gray-100) 0%, var(--toss-gray-50) 50%, var(--toss-gray-100) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-text-sm { height: 12px; margin-bottom: 6px; }
.skeleton-title { height: 24px; margin-bottom: 12px; width: 60%; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--toss-gray-100);
}

/* Shimmer - reusable inline */
.shimmer-bg {
  background: linear-gradient(90deg, #f2f4f6 25%, #e8eaed 50%, #f2f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
}

/* ==================== Charts ==================== */
.chart-container {
  position: relative;
  width: 100%;
  height: 200px;
  margin: 16px 0;
}
.chart-bar {
  position: absolute;
  bottom: 30px;
  background: var(--toss-blue);
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
}
.chart-bar:hover { opacity: 0.85; }
.chart-label {
  position: absolute;
  bottom: 8px;
  font-size: 11px;
  color: var(--toss-gray-500);
  text-align: center;
}

.donut-chart { position: relative; width: 60px; height: 60px; }
.donut-chart svg { transform: rotate(-90deg); }
.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 700;
}

/* ==================== Checkbox ==================== */
.toss-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.toss-checkbox input { display: none; }
.toss-checkbox .check-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--toss-gray-300);
  border-radius: 6px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.toss-checkbox input:checked + .check-box {
  background: var(--toss-blue);
  border-color: var(--toss-blue);
}
.toss-checkbox input:checked + .check-box::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* Day checkbox (onboarding) */
.day-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--toss-blue);
  cursor: pointer;
}

/* ==================== Toggle Switch ==================== */
.toss-toggle {
  position: relative;
  width: 52px;
  height: 32px;
  background: var(--toss-gray-200);
  border-radius: 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  padding: 0;
}
.toss-toggle.active { background: var(--toss-blue); }
.toss-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform var(--transition-fast);
}
.toss-toggle.active::after { transform: translateX(20px); }

/* ==================== Modal/Bottom Sheet ==================== */
.toss-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  animation: fadeIn 0.2s ease;
}
.toss-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 20px;
  padding-bottom: calc(24px + var(--safe-area-bottom));
  z-index: 501;
  animation: slideUpSheet 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}
.toss-bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--toss-gray-300);
  border-radius: 2px;
  margin: 0 auto 20px;
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Fullscreen modal/dialog */
.modal-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.modal-content {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.3s ease;
}

/* ==================== Empty State ==================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--toss-gray-800);
  margin-bottom: 8px;
}
.empty-state-desc {
  font-size: 14px;
  color: var(--toss-gray-500);
  line-height: 1.6;
}

/* ==================== Icon containers ==================== */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-box-sm { width: 24px; height: 24px; border-radius: 6px; }
.icon-box-md { width: 28px; height: 28px; border-radius: 8px; }
.icon-box-lg { width: 36px; height: 36px; border-radius: 10px; }
.icon-box-xl { width: 40px; height: 40px; border-radius: 10px; }
.icon-box-2xl { width: 48px; height: 48px; border-radius: 12px; }
.icon-box-3xl { width: 64px; height: 64px; border-radius: 20px; }
.icon-box-round { border-radius: 50%; }
.icon-box-white { background: #fff; }
.icon-box-blue { background: var(--gradient-blue); }
.icon-box-gray { background: var(--toss-gray-100); }
.icon-box-blue-light { background: #e8f3ff; }
.icon-box-alpha { background: rgba(255,255,255,0.2); }
.icon-box-alpha-15 { background: rgba(255,255,255,0.15); }

/* ==================== Action Plan / Tips Items ==================== */
.action-plan-item {
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 10px;
}
.action-plan-item-highlight {
  background: var(--gradient-blue);
  color: white;
  border: none;
}
.action-plan-item-normal {
  background: #fff;
  border: 1px solid var(--toss-gray-200);
}

.tip-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius-md);
}
.tip-item-bordered { border-left: 4px solid; }

.step-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}

/* ==================== Onboarding Specific ==================== */
.onboarding-steps {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.onboarding-step {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--toss-gray-200);
  transition: all var(--transition-normal);
}
.onboarding-step.active {
  width: 24px;
  border-radius: 4px;
  background: var(--toss-blue);
}
.onboarding-step.completed { background: var(--toss-blue); }

.counter-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px;
  background: var(--toss-gray-50);
  border-radius: var(--radius-lg);
}

.key-service-item {
  background: var(--toss-gray-50);
  border-radius: 14px;
  padding: 16px;
}

/* ==================== Login Page ==================== */
.login-gradient {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.login-gradient::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(49,130,246,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.login-gradient::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -100px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(49,130,246,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.login-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}
.login-logo {
  width: 64px;
  height: 64px;
  background: var(--toss-blue);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
  box-shadow: 0 8px 24px rgba(49,130,246,0.25);
}
.login-logo-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  background: var(--toss-green);
  border-radius: 50%;
  border: 2.5px solid white;
}
.login-form-area {
  padding: 0 28px;
  position: relative;
  z-index: 1;
}
.login-divider {
  display: flex;
  align-items: center;
  margin: 28px 0;
  gap: 16px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--toss-gray-200);
}
.login-divider span {
  font-size: 13px;
  color: var(--toss-gray-500);
  white-space: nowrap;
}
.login-footer {
  padding: 20px 28px 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ==================== Dashboard Specific ==================== */
.input-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--toss-gray-100);
}
.input-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--toss-gray-800);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-highlight {
  background: linear-gradient(135deg, var(--toss-blue) 0%, var(--toss-blue-dark) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.metric-highlight .stat-label { color: rgba(255,255,255,0.7); }
.metric-highlight .stat-value { color: white; }
.metric-highlight .stat-change { color: rgba(255,255,255,0.85); }

/* Hero card (gradient overlay) */
.hero-card {
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  color: white;
  position: relative;
  overflow: hidden;
}
.hero-card-deco1 {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.hero-card-deco2 {
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

/* ==================== Tabs ==================== */
.tab-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--toss-gray-100);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.tab-item {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--toss-gray-500);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.tab-item.active {
  background: white;
  color: var(--toss-gray-900);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* ==================== Accordion ==================== */
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.accordion-header svg { transition: transform var(--transition-normal); }
.accordion-header.open svg { transform: rotate(180deg); }
.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-slow);
}
.accordion-content.open { max-height: 2000px; }

/* ==================== Animations ==================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes slideIn { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { transform: translateX(-50%) translateY(-20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
@keyframes slideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatUp { from { opacity:0; transform:translateX(-50%) translateY(20px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 4px 20px rgba(49,130,246,0.4); } 50% { box-shadow: 0 4px 30px rgba(49,130,246,0.6); } }

.page-enter { animation: fadeIn 0.2s ease; }
.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.3s ease; }
.animate-slide-in { animation: slideIn 0.3s ease; }
.animate-count-up { animation: countUp 0.5s ease; }

/* ==================== Flex Utilities ==================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1-min0 { flex: 1; min-width: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-around { justify-content: space-around; }
.gap-0 { gap: 0; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 10px; }

/* ==================== Spacing Utilities ==================== */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.px-7 { padding-left: 28px; padding-right: 28px; }
.pt-0 { padding-top: 0; }
.pt-3 { padding-top: 12px; }
.pt-5 { padding-top: 20px; }
.pb-0 { padding-bottom: 0; }
.pb-6 { padding-bottom: 24px; }
.pb-10 { padding-bottom: 40px; }
.pb-safe { padding-bottom: calc(24px + var(--safe-area-bottom)); }

/* ==================== Width/Height & Display ==================== */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-20 { height: 20px; }
.max-w-320 { max-width: 320px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.leading-tight { line-height: 1.3; }
.leading-snug { line-height: 1.4; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.6; }

.tracking-tight { letter-spacing: -0.02em; }
.tracking-tighter { letter-spacing: -0.03em; }

.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.break-keep { word-break: keep-all; }
.underline { text-decoration: underline; }
.underline-offset { text-underline-offset: 3px; }
.no-wrap { white-space: nowrap; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Rounded */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; top: 0; }
.z-1 { z-index: 1; }
.z-10 { z-index: 10; }
.z-100 { z-index: 100; }
.inset-0 { inset: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.cursor-pointer { cursor: pointer; }

/* Border utilities */
.border-0 { border: none; }
.border-gray { border: 1px solid var(--toss-gray-200); }
.border-b-gray { border-bottom: 1px solid var(--toss-gray-100); }

/* Opacity */
.opacity-80 { opacity: 0.8; }
.opacity-95 { opacity: 0.95; }

/* Hidden */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ==================== Media Queries ==================== */
@media (max-width: 480px) {
  .toss-container { max-width: 100%; }
  .stat-value-lg { font-size: 32px; }
}

@media (max-width: 360px) {
  :root { --max-width: 100%; }
  .text-display { font-size: 28px; }
  .hero-card { padding: 24px 20px; }
}

/* ==================== Dark Mode ==================== */
@media (prefers-color-scheme: dark) {
  :root {
    --toss-gray-50: #1a1a1a;
    --toss-gray-100: #2a2a2a;
    --toss-gray-200: #3a3a3a;
    --toss-gray-300: #4a4a4a;
    --toss-gray-800: #e0e0e0;
    --toss-gray-900: #ffffff;
  }
  body { background: #111; }
  
  .toss-container, .toss-card, .toss-header,
  .toss-bottom-sheet, .input-section, .card-bordered,
  .section-card-box, #bottom-nav { background: #1a1a1a; }
  
  .toss-card-elevated, .modal-content { background: #222; }
  
  .toss-input, .input-code, .input-time {
    background: #2a2a2a;
    color: white;
    border-color: #3a3a3a;
  }
  .toss-input:focus, .input-code:focus, .input-time:focus { border-color: var(--toss-blue); }
  
  .login-gradient { background: #111; }
  .login-gradient::before, .login-gradient::after { opacity: 0.5; }
}

/* ==================== Print ==================== */
@media print {
  #bottom-nav, .floating-btn, .toss-toast { display: none !important; }
  body { background: white; }
  .toss-card { break-inside: avoid; }
}

/* ==================== 오늘의 판독 (Daily Readout) v3.4 ==================== */
/* 훈련 기구의 핵심 화면: 입력 직후 "오늘 병원의 모습"을 보여준다 */

.readout-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 3001;
  animation: slideUpSheet 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 92vh;
  overflow-y: auto;
  padding-bottom: calc(16px + var(--safe-area-bottom));
}
.readout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 3000;
  animation: fadeIn 0.2s ease;
}

/* 헤더 */
.readout-header {
  padding: 24px 20px 18px;
  border-bottom: 1px solid var(--toss-gray-100);
}
.readout-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--toss-blue);
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.readout-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--toss-gray-900);
  margin: 0 0 4px;
  line-height: 1.3;
}
.readout-daycount {
  font-size: 13px;
  color: var(--toss-gray-500);
}

/* 지표 라인 */
.readout-lines { padding: 8px 20px 4px; }
.readout-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--toss-gray-50);
}
.readout-line:last-child { border-bottom: none; }
.readout-line.is-focus {
  background: var(--toss-blue-bg);
  margin: 0 -12px;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  border-bottom: none;
}
.readout-line-label {
  width: 82px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--toss-gray-600);
  padding-top: 2px;
}
.readout-line-body { flex: 1; min-width: 0; }
.readout-line-value {
  font-size: 19px;
  font-weight: 700;
  color: var(--toss-gray-900);
  line-height: 1.25;
  word-break: keep-all;
}
.readout-line-delta {
  font-size: 13px;
  font-weight: 500;
  margin-top: 3px;
}
.readout-line-delta.trend-up { color: var(--toss-green-dark); }
.readout-line-delta.trend-down { color: var(--toss-red); }
.readout-line-delta.trend-flat { color: var(--toss-gray-500); }
.readout-line-delta.trend-none { color: var(--toss-gray-400); }
.readout-line-note {
  font-size: 12px;
  color: var(--toss-gray-500);
  margin-top: 5px;
  line-height: 1.5;
  word-break: keep-all;
}
.readout-line.is-focus .readout-line-note {
  color: var(--toss-blue-dark);
  font-weight: 500;
}

/* 판독 문장 — 이 화면의 주인공 */
.readout-verdict {
  margin: 12px 20px 0;
  padding: 18px;
  background: var(--toss-gray-50);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--toss-blue);
}
.readout-verdict-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--toss-gray-500);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.readout-verdict-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--toss-gray-900);
  font-weight: 500;
  word-break: keep-all;
}
.readout-focus-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--toss-blue);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--toss-blue-dark);
}

/* 훈련 코멘트 */
.readout-training {
  margin: 14px 20px 0;
  padding: 14px 16px;
  background: var(--toss-yellow-bg);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  color: var(--toss-gray-700);
  word-break: keep-all;
}
.readout-training strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--toss-orange);
  letter-spacing: 0.4px;
  margin-bottom: 5px;
}

/* 액션 버튼 */
.readout-actions {
  display: flex;
  gap: 10px;
  padding: 20px;
}
.readout-btn {
  flex: 1;
  padding: 15px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.readout-btn:active { opacity: 0.7; }
.readout-btn-secondary {
  background: var(--toss-gray-100);
  color: var(--toss-gray-700);
}
.readout-btn-primary {
  background: var(--toss-blue);
  color: #fff;
}

@media (max-width: 360px) {
  .readout-title { font-size: 20px; }
  .readout-line-label { width: 68px; font-size: 12px; }
  .readout-line-value { font-size: 17px; }
}

@media (prefers-color-scheme: dark) {
  .readout-sheet { background: #222; }
  .readout-title, .readout-line-value, .readout-verdict-text { color: #f0f0f0; }
  .readout-verdict { background: #2a2a2a; }
  .readout-line.is-focus { background: rgba(49,130,246,0.12); }
  .readout-training { background: rgba(255,193,7,0.1); color: #d8d8d8; }
  .readout-btn-secondary { background: #333; color: #ddd; }
}

/* ==========================================================================
   v4.0 강의 실행 레이어 (curriculum.js)
   1주차 커리큘럼 · 미비핵 워크숍 · 소개율 복리 · 의사결정 노트 · 환경 진단
   ========================================================================== */

/* ---------- 공통 ---------- */
.cur-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--toss-gray-600);
  margin: 24px 0 10px;
  letter-spacing: -0.2px;
}
.cur-progress-track {
  height: 8px;
  background: var(--toss-gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.cur-progress-fill {
  height: 100%;
  background: var(--toss-blue);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 강의 → 실행 매핑 ---------- */
.lecture-map-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--toss-gray-100);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, transform 0.1s;
}
.lecture-map-item:active { transform: scale(0.99); }
.lecture-map-item:hover { border-color: var(--toss-blue); }
.lecture-map-icon { font-size: 20px; line-height: 1.2; flex-shrink: 0; }
.lecture-map-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lecture-map-chapter { font-size: 14px; font-weight: 700; color: var(--toss-gray-900); }
.lecture-map-lecture { font-size: 12px; color: var(--toss-gray-500); line-height: 1.5; }
.lecture-map-do { font-size: 12px; color: var(--toss-blue); font-weight: 600; margin-top: 3px; }

/* ---------- 과제 카드 ---------- */
.task-card {
  background: #fff;
  border: 1px solid var(--toss-gray-100);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
}
.task-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.task-order {
  width: 22px; height: 22px;
  background: var(--toss-gray-100);
  color: var(--toss-gray-600);
  border-radius: 50%;
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.task-title { font-size: 15px; font-weight: 700; color: var(--toss-gray-900); flex: 1; }
.task-status {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  flex-shrink: 0;
}
.task-detail { font-size: 13px; color: var(--toss-gray-600); line-height: 1.6; margin: 0 0 10px; }
.task-why {
  font-size: 12px; color: var(--toss-gray-700);
  line-height: 1.6;
  background: var(--toss-gray-50);
  border-left: 3px solid var(--toss-gray-300);
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 10px;
}
.task-auto {
  background: #e8f3ff;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.task-auto-label { font-size: 11px; color: #1b64da; font-weight: 700; display: block; }
.task-auto-value { font-size: 15px; font-weight: 700; color: var(--toss-gray-900); display: block; margin: 2px 0; }
.task-auto-detail { font-size: 11px; color: var(--toss-gray-500); display: block; line-height: 1.5; }
.task-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.task-link {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 600;
  color: var(--toss-gray-600);
  background: var(--toss-gray-100);
  padding: 5px 10px; border-radius: 999px;
  text-decoration: none;
}
.task-link:hover { background: var(--toss-gray-200); color: var(--toss-gray-800); }
.task-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.task-btn {
  flex: 1; min-width: 110px;
  padding: 9px 12px;
  font-size: 13px; font-weight: 600;
  border: none; border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.task-btn-primary { background: var(--toss-blue); color: #fff; }
.task-btn-primary:hover { background: #1b64da; }
.task-btn-ghost { background: var(--toss-gray-100); color: var(--toss-gray-700); }
.task-btn-ghost:hover { background: var(--toss-gray-200); }

/* ---------- 미비핵 워크숍 ---------- */
.mbh-steps {
  display: flex; gap: 4px;
  overflow-x: auto;
  padding: 12px 0 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mbh-steps::-webkit-scrollbar { display: none; }
.mbh-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 60px;
  padding: 6px 4px;
  background: none; border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.mbh-step-n {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--toss-gray-100);
  color: var(--toss-gray-500);
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.mbh-step-label { font-size: 10px; color: var(--toss-gray-400); font-weight: 600; white-space: nowrap; }
.mbh-step.active .mbh-step-n { background: var(--toss-blue); color: #fff; }
.mbh-step.active .mbh-step-label { color: var(--toss-blue); }
.mbh-step.done .mbh-step-n { background: #e7f9f0; color: var(--toss-green-dark); }
.mbh-step.done .mbh-step-label { color: var(--toss-green-dark); }

.mbh-h3 { font-size: 17px; font-weight: 700; color: var(--toss-gray-900); margin: 0 0 6px; letter-spacing: -0.3px; }
.mbh-p { font-size: 13px; color: var(--toss-gray-600); line-height: 1.65; margin: 0 0 16px; }
.mbh-label {
  display: block;
  font-size: 13px; font-weight: 700;
  color: var(--toss-gray-800);
  margin-bottom: 8px;
}
.mbh-warn {
  background: var(--toss-yellow-bg);
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px; color: #92400e; line-height: 1.6;
  margin-bottom: 14px;
}
.mbh-guard {
  background: #ffeff0;
  border: 1px solid #fecdd3;
  border-left: 4px solid var(--toss-red);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  font-size: 12px; color: #9f1239; line-height: 1.65;
  margin-bottom: 14px;
}
.mbh-guard strong { color: #881337; }
.mbh-recall {
  background: var(--toss-gray-50);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.mbh-recall-label { font-size: 11px; font-weight: 700; color: var(--toss-gray-500); display: block; margin-bottom: 4px; }
.mbh-details {
  border: 1px solid var(--toss-gray-100);
  border-radius: 10px;
  padding: 0;
  margin-bottom: 14px;
  overflow: hidden;
}
.mbh-details > summary {
  padding: 12px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--toss-gray-700);
  cursor: pointer;
  background: var(--toss-gray-50);
  list-style: none;
}
.mbh-details > summary::-webkit-details-marker { display: none; }
.mbh-details > summary::after { content: ' ▾'; color: var(--toss-gray-400); }
.mbh-details[open] > summary::after { content: ' ▴'; }
.mbh-details > *:not(summary) { padding: 0 14px; }
.mbh-details > *:last-child { padding-bottom: 14px; }
.mbh-example {
  border-left: 3px solid var(--toss-gray-200);
  padding-left: 10px !important;
  margin: 10px 14px;
}
.mbh-example-title { font-size: 11px; font-weight: 700; color: var(--toss-gray-500); margin: 0 0 3px; }
.mbh-example-body { font-size: 12px; color: var(--toss-gray-700); line-height: 1.6; margin: 0; }
.mbh-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--toss-gray-100);
  cursor: pointer;
}
.mbh-check:last-of-type { border-bottom: none; }

/* ---------- 페인포인트 ---------- */
.pp-item {
  border: 1px solid var(--toss-gray-100);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  background: #fff;
}
.pp-item.selected { border-color: var(--toss-blue); background: #f5f9ff; }
.pp-content { font-size: 13px; color: var(--toss-gray-800); line-height: 1.6; margin: 0 0 8px; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pp-tag {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
  background: var(--toss-gray-100); color: var(--toss-gray-600);
}
.pp-tag.strong { background: #e7f9f0; color: var(--toss-green-dark); }
.pp-tag.weak { background: var(--toss-yellow-bg); color: #92400e; }
.pp-btn {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--toss-gray-200);
  background: #fff; color: var(--toss-gray-600);
  cursor: pointer;
}
.pp-btn.on { background: var(--toss-blue); border-color: var(--toss-blue); color: #fff; }
.pp-btn.del { color: var(--toss-red); border-color: #fecdd3; }
.pq-item { padding: 10px 0; border-bottom: 1px solid var(--toss-gray-100); }
.pq-item:last-child { border-bottom: none; }
.pq-q { font-size: 13px; font-weight: 700; color: var(--toss-gray-800); margin: 0 0 4px; }
.pq-ex { font-size: 12px; color: var(--toss-gray-500); line-height: 1.6; margin: 0; }

/* ---------- 미비핵 평가 ---------- */
.eval-empty {
  font-size: 13px; color: var(--toss-gray-400);
  text-align: center; padding: 20px;
}
.eval-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.eval-score { font-size: 30px; font-weight: 800; color: var(--toss-gray-900); letter-spacing: -1px; }
.eval-headline { font-size: 14px; font-weight: 700; color: var(--toss-gray-800); line-height: 1.5; margin: 0 0 10px; }
.eval-next {
  font-size: 12px; color: #1b64da; line-height: 1.6;
  background: #e8f3ff; border-radius: 8px; padding: 10px 12px;
  margin-bottom: 12px;
}
.eval-checks { display: flex; flex-direction: column; gap: 2px; }
.eval-check {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--toss-gray-50);
}
.eval-check:last-child { border-bottom: none; }
.eval-check-icon { font-size: 13px; font-weight: 800; width: 16px; flex-shrink: 0; line-height: 1.4; }
.eval-check.pass .eval-check-icon { color: var(--toss-green-dark); }
.eval-check.warn .eval-check-icon { color: var(--toss-orange); }
.eval-check.fail .eval-check-icon { color: var(--toss-red); }
.eval-check-label { font-size: 12px; font-weight: 700; color: var(--toss-gray-800); margin: 0; }
.eval-check-msg { font-size: 12px; color: var(--toss-gray-600); line-height: 1.55; margin: 2px 0 0; }
.eval-check-hint { font-size: 11px; color: var(--toss-blue); line-height: 1.55; margin: 4px 0 0; }
.eval-check-evidence {
  font-size: 11px; color: var(--toss-red);
  margin: 4px 0 0; font-family: inherit;
}
.eval-check.pass { opacity: 0.65; }

/* ---------- 미비핵 요약 ---------- */
.ident-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--toss-gray-50); }
.ident-row:last-child { border-bottom: none; }
.ident-label { font-size: 12px; font-weight: 700; color: var(--toss-gray-500); width: 66px; flex-shrink: 0; }
.ident-value { font-size: 13px; color: var(--toss-gray-800); line-height: 1.6; flex: 1; }

/* ---------- 소개율 복리 ---------- */
.ref-hero {
  background: linear-gradient(135deg, #00a86b 0%, #00c853 100%);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}
.ref-hero-label { font-size: 12px; opacity: 0.85; margin: 0 0 4px; font-weight: 600; }
.ref-hero-num { font-size: 40px; font-weight: 800; margin: 0; letter-spacing: -1.5px; line-height: 1.1; }
.ref-hero-sub { font-size: 13px; opacity: 0.95; margin: 6px 0 0; line-height: 1.5; }
.ref-actual {
  background: #fff;
  border: 1px solid var(--toss-gray-100);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.ref-actual.warn { background: var(--toss-yellow-bg); border-color: #fde68a; }
.ref-actual-title { font-size: 14px; font-weight: 700; color: var(--toss-gray-900); margin: 0 0 12px; }
.ref-actual-grid { display: flex; gap: 8px; margin-bottom: 10px; }
.ref-actual-grid > div { flex: 1; text-align: center; }
.ref-actual-label { font-size: 11px; color: var(--toss-gray-500); display: block; margin-bottom: 2px; }
.ref-actual-value { font-size: 17px; font-weight: 700; color: var(--toss-gray-900); display: block; }
.ref-actual-note { font-size: 12px; color: var(--toss-gray-600); line-height: 1.6; margin: 0; }
.ref-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ref-input-item { display: flex; flex-direction: column; gap: 5px; }
.ref-input-item > span { font-size: 12px; font-weight: 600; color: var(--toss-gray-600); }
.ref-legend { display: flex; gap: 16px; margin-bottom: 14px; font-size: 12px; color: var(--toss-gray-600); font-weight: 600; }
.ref-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.ref-dot.a { background: var(--toss-gray-300); }
.ref-dot.b { background: var(--toss-green-dark); }
.ref-row { display: flex; gap: 10px; align-items: center; margin-bottom: 9px; }
.ref-row-label {
  width: 62px; flex-shrink: 0;
  font-size: 11px; color: var(--toss-gray-500);
  display: flex; flex-direction: column;
}
.ref-row-year { font-size: 10px; color: var(--toss-blue); font-weight: 700; }
.ref-row-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ref-bar-wrap { display: flex; align-items: center; gap: 6px; }
.ref-bar { height: 12px; border-radius: 3px; transition: width 0.4s ease; }
.ref-bar.a { background: var(--toss-gray-300); }
.ref-bar.b { background: var(--toss-green-dark); }
.ref-bar-val { font-size: 11px; color: var(--toss-gray-600); flex-shrink: 0; min-width: 30px; }
.ref-total {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; margin-top: 12px;
  border-top: 1px solid var(--toss-gray-100);
  font-size: 13px; color: var(--toss-gray-700);
}
.ref-why {
  background: var(--toss-gray-50);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.ref-why-title { font-size: 14px; font-weight: 700; color: var(--toss-gray-900); margin: 0 0 10px; }
.ref-why-list { margin: 0 0 12px; padding-left: 18px; }
.ref-why-list li { font-size: 13px; color: var(--toss-gray-700); line-height: 1.8; }
.ref-why-quote {
  font-size: 12px; color: var(--toss-gray-600);
  line-height: 1.7; margin: 0 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--toss-green-dark);
  font-style: normal;
}
.ref-why-action { font-size: 13px; font-weight: 700; color: var(--toss-green-dark); margin: 0; line-height: 1.6; }

/* ---------- 의사결정 노트 ---------- */
.dec-due {
  background: var(--toss-orange-bg);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.dec-due-title { font-size: 14px; font-weight: 700; color: #9a3412; margin: 0 0 10px; }
.dec-due-item {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%; text-align: left;
  background: #fff; border: 1px solid #fed7aa;
  border-radius: 10px; padding: 11px 13px;
  margin-bottom: 6px; cursor: pointer;
}
.dec-due-item:hover { border-color: var(--toss-orange); }
.dec-due-date { font-size: 11px; color: #9a3412; font-weight: 700; }
.dec-due-text { font-size: 13px; color: var(--toss-gray-800); line-height: 1.5; }
.dec-due-cta { font-size: 12px; color: var(--toss-orange); font-weight: 700; margin-top: 2px; }
.dec-due-note { font-size: 11px; color: #9a3412; line-height: 1.6; margin: 8px 0 0; }
.dec-stats {
  display: flex; gap: 8px;
  background: #fff;
  border: 1px solid var(--toss-gray-100);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 8px;
}
.dec-stat { flex: 1; text-align: center; }
.dec-stat-num { font-size: 24px; font-weight: 800; color: var(--toss-gray-900); display: block; letter-spacing: -0.8px; }
.dec-stat-label { font-size: 11px; color: var(--toss-gray-500); display: block; margin-top: 2px; }
.dec-stat-note { font-size: 12px; color: var(--toss-gray-500); text-align: center; margin: 0 0 16px; }
.dec-card {
  background: #fff;
  border: 1px solid var(--toss-gray-100);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
}
.dec-card.open { border-color: var(--toss-gray-300); }
.dec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.dec-date { font-size: 12px; color: var(--toss-gray-500); font-weight: 600; }
.dec-outcome { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; flex-shrink: 0; }
.dec-situation { font-size: 13px; color: var(--toss-gray-800); line-height: 1.6; margin: 0 0 4px; }
.dec-action { font-size: 13px; color: var(--toss-blue); line-height: 1.6; margin: 0; font-weight: 600; }
.dec-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.dec-tag {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
  background: var(--toss-gray-100); color: var(--toss-gray-600);
}
.dec-more { font-size: 11px; color: var(--toss-gray-400); display: block; margin-top: 9px; }
.dec-detail { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--toss-gray-100); }
.dec-field { display: flex; gap: 10px; padding: 7px 0; }
.dec-field-label { font-size: 11px; font-weight: 700; color: var(--toss-gray-500); width: 62px; flex-shrink: 0; }
.dec-field-value { font-size: 12px; color: var(--toss-gray-700); line-height: 1.6; flex: 1; }
.dec-detail-actions { display: flex; gap: 6px; margin-top: 12px; }
.dec-metrics {
  background: var(--toss-gray-50);
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
}
.dec-metrics-title { font-size: 11px; font-weight: 700; color: var(--toss-gray-500); margin: 0 0 10px; line-height: 1.5; }
.dec-metric-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0;
  gap: 8px;
}
.dec-metric-label { font-size: 12px; color: var(--toss-gray-600); flex-shrink: 0; }
.dec-metric-vals { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.dec-metric-before { color: var(--toss-gray-400); }
.dec-metric-arrow { color: var(--toss-gray-300); }
.dec-metric-after { color: var(--toss-gray-900); font-weight: 700; }
.dec-metric-pct { font-weight: 700; font-size: 11px; }
.dec-form-intro {
  background: #e8f3ff;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.dec-form-intro-title { font-size: 14px; font-weight: 700; color: #1b64da; margin: 0 0 6px; }
.dec-form-intro-body { font-size: 12px; color: var(--toss-gray-700); line-height: 1.7; margin: 0; }
.dec-radio-group { display: flex; flex-wrap: wrap; gap: 6px; }
.dec-radio {
  flex: 1; min-width: 90px;
  padding: 10px 8px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--toss-gray-200);
  border-radius: 10px;
  background: #fff; color: var(--toss-gray-600);
  cursor: pointer;
  text-align: center;
}
.dec-radio.on { background: var(--toss-blue); border-color: var(--toss-blue); color: #fff; }
.dec-review-label { font-size: 11px; font-weight: 700; color: var(--toss-gray-500); margin: 0 0 4px; }
.dec-review-text { font-size: 14px; color: var(--toss-gray-900); line-height: 1.65; margin: 0; }
.dec-guide {
  background: var(--toss-gray-50);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 20px;
}
.dec-guide-title { font-size: 14px; font-weight: 700; color: var(--toss-gray-900); margin: 0 0 8px; }
.dec-guide-body { font-size: 12px; color: var(--toss-gray-600); line-height: 1.75; margin: 0; }

/* ---------- 환경 진단 ---------- */
.env-intro {
  background: var(--toss-gray-50);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 8px;
}
.env-intro-quote {
  font-size: 15px; font-weight: 700; color: var(--toss-gray-900);
  line-height: 1.65; margin: 0 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--toss-blue);
}
.env-intro-body { font-size: 12px; color: var(--toss-gray-600); line-height: 1.75; margin: 0; }
.env-cycle {
  border: 1px solid;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 8px;
}
.env-cycle-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.env-cycle-emoji { font-size: 28px; line-height: 1; }
.env-cycle-label { font-size: 19px; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.env-cycle-days { font-size: 11px; color: var(--toss-gray-500); margin: 2px 0 0; }
.env-cycle-msg { font-size: 13px; color: var(--toss-gray-800); line-height: 1.7; margin: 0 0 8px; }
.env-cycle-hint { font-size: 12px; color: var(--toss-gray-600); line-height: 1.65; margin: 0 0 8px; }
.env-delta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  gap: 8px;
}
.env-delta-label { font-size: 12px; color: var(--toss-gray-600); }
.env-delta-value { font-size: 15px; font-weight: 700; }
.env-signals {
  display: flex; gap: 8px;
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.env-signal { flex: 1; text-align: center; }
.env-signal-label { font-size: 11px; color: var(--toss-gray-500); display: block; margin-bottom: 2px; }
.env-signal-value { font-size: 14px; font-weight: 700; display: block; }
.env-attribution {
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}
.env-attribution-tag {
  font-size: 10px; font-weight: 800;
  color: var(--toss-blue);
  letter-spacing: 0.3px;
  display: block; margin-bottom: 4px;
}
.env-attribution p { font-size: 12px; color: var(--toss-gray-800); line-height: 1.7; margin: 0; }
.env-guide { margin-top: 12px; }
.env-guide-title { font-size: 12px; font-weight: 700; color: var(--toss-gray-700); margin: 0 0 6px; }
.env-guide ul { margin: 0; padding-left: 18px; }
.env-guide li { font-size: 12px; color: var(--toss-gray-700); line-height: 1.75; }
.env-tool {
  border: 1px solid var(--toss-gray-100);
  border-radius: 10px;
  padding: 12px 13px;
  margin-bottom: 8px;
}
.env-tool:last-child { margin-bottom: 0; }
.env-tool-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; gap: 8px; }
.env-tool-name { font-size: 14px; font-weight: 700; color: var(--toss-gray-900); }
.env-tool-link {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 600;
  color: var(--toss-blue);
  text-decoration: none;
  flex-shrink: 0;
}
.env-tool-what { font-size: 12px; color: var(--toss-gray-700); font-weight: 600; margin: 0 0 3px; }
.env-tool-how { font-size: 11px; color: var(--toss-gray-500); line-height: 1.6; margin: 0; }
.env-play {
  background: #fff;
  border: 1px solid var(--toss-gray-100);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  margin-bottom: 8px;
}
.env-play.now { border-color: var(--toss-blue); background: #f5f9ff; }
.env-play-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.env-play-title { font-size: 15px; font-weight: 700; color: var(--toss-gray-900); }
.env-play-now {
  font-size: 10px; font-weight: 800;
  background: var(--toss-blue); color: #fff;
  padding: 2px 7px; border-radius: 999px;
}
.env-play-lead { font-size: 12px; color: var(--toss-gray-600); line-height: 1.6; margin: 0 0 8px; font-weight: 600; }
.env-play-list { margin: 0; padding-left: 18px; }
.env-play-list li { font-size: 12px; color: var(--toss-gray-700); line-height: 1.75; }
.env-note {
  background: var(--toss-gray-50);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 20px;
}
.env-note-title { font-size: 14px; font-weight: 700; color: var(--toss-gray-900); margin: 0 0 8px; }
.env-note-body { font-size: 12px; color: var(--toss-gray-600); line-height: 1.75; margin: 0 0 14px; }
.env-note-actions { display: flex; gap: 6px; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 360px) {
  .ref-inputs { grid-template-columns: 1fr; }
  .ref-hero-num { font-size: 34px; }
  .dec-stat-num { font-size: 21px; }
  .env-signals { flex-direction: column; gap: 6px; }
  .env-signal { display: flex; justify-content: space-between; text-align: left; }
  .task-btn { min-width: 100%; }
}

/* 강의 표 대조 (ref-verify) */
.ref-verify {
  background: var(--toss-gray-50);
  border: 1px solid var(--toss-gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.ref-verify-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--toss-gray-800);
  margin: 0 0 8px;
}
.ref-verify-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--toss-gray-700);
  margin: 0 0 8px;
}
.ref-verify-body strong { color: var(--toss-gray-900); }
.ref-verify-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--toss-gray-600);
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--toss-gray-200);
}
.ref-verify-note strong { color: var(--toss-gray-800); }

/* 장기 외삽 경고 (ref-caveat) */
.ref-caveat {
  background: var(--toss-yellow-bg);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.65;
  color: #8a6d00;
}
.ref-caveat strong { color: #6b5400; }

/* ==========================================================================
   v4.1 열림 계단 (Insight Ladder)
   기록 화면 최상단 배너 · 9단 계단 · 열린 인사이트 카드
   원칙: 잠긴 것도 이름과 남은 일수를 보여준다. 오늘 기록할 이유를 눈에 보이게.
   ========================================================================== */

.lad-banner {
  margin: 0 20px 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--toss-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.lad-banner-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.lad-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--toss-gray-500);
}
.lad-headline {
  margin: 3px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.3px;
}
.lad-toggle {
  flex-shrink: 0;
  padding: 6px 11px;
  background: var(--toss-gray-100);
  border: none;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--toss-gray-700);
  cursor: pointer;
  transition: background 0.15s;
}
.lad-toggle:active { background: var(--toss-gray-200); }

/* 진행 바 */
.lad-bar {
  margin: 12px 0 0;
  height: 6px;
  background: var(--toss-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.lad-bar-fill {
  height: 100%;
  background: var(--gradient-blue);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* 다음에 열리는 것 — 이 배너의 주인공 */
.lad-next {
  margin-top: 14px;
  padding: 13px 14px;
  background: var(--toss-blue-bg);
  border-radius: var(--radius-md);
}
.lad-next-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.lad-next-icon { font-size: 15px; line-height: 1; }
.lad-next-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.2px;
}
.lad-next-dday {
  margin-left: auto;
  padding: 3px 9px;
  background: var(--toss-blue);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.lad-next-promise {
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--toss-gray-700);
  word-break: keep-all;
}

/* 9단 계단 전체 목록 */
.lad-steps {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--toss-gray-100);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lad-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0.55;
}
.lad-step.is-open { opacity: 1; }
.lad-step-mark {
  flex-shrink: 0;
  width: 34px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--toss-gray-100);
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--toss-gray-600);
}
.lad-step.is-open .lad-step-mark {
  background: var(--toss-green-bg);
  color: var(--toss-green-dark);
  font-size: 13px;
}
.lad-step-body { flex: 1; min-width: 0; }
.lad-step-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--toss-gray-900);
  letter-spacing: -0.2px;
  word-break: keep-all;
}
.lad-step-left {
  font-size: 11px;
  font-weight: 500;
  color: var(--toss-gray-500);
}
.lad-step-promise {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--toss-gray-600);
  word-break: keep-all;
}

/* 열린 인사이트 카드 */
.lad-ins {
  margin-top: 10px;
  padding: 14px 15px;
  background: var(--toss-gray-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--toss-gray-300);
}
.lad-ins-good { background: var(--toss-green-bg); border-left-color: var(--toss-green); }
.lad-ins-warn { background: var(--toss-yellow-bg); border-left-color: var(--toss-orange); }
.lad-ins-neutral { background: var(--toss-gray-50); border-left-color: var(--toss-gray-400); }
.lad-ins-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.2px;
  word-break: keep-all;
}
.lad-ins-body {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--toss-gray-700);
  word-break: keep-all;
}
.lad-ins-metric {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.2px;
  word-break: keep-all;
}
.lad-ins-caveat {
  margin: 7px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--toss-gray-500);
  word-break: keep-all;
}

/* 로딩 스켈레톤 */
.lad-skeleton { min-height: 62px; }
.lad-skeleton .lad-bar { margin: 0; animation: lad-pulse 1.2s ease-in-out infinite; }
@keyframes lad-pulse { 0%,100% { opacity: 0.45; } 50% { opacity: 0.9; } }

/* ── 판독지 안의 계단 (readout sheet) ────────────────────────────────── */
.readout-unlock {
  margin: 14px 20px 0;
  padding: 15px 16px;
  background: var(--toss-green-bg);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,200,83,0.22);
}
.readout-unlock-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--toss-green-dark);
  margin-bottom: 9px;
}
.readout-unlock-item + .readout-unlock-item {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid rgba(0,200,83,0.18);
}
.readout-unlock-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.2px;
  word-break: keep-all;
}
.readout-unlock-promise {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--toss-gray-700);
  word-break: keep-all;
}

.readout-next {
  margin: 14px 20px 0;
  padding: 14px 16px;
  background: var(--toss-gray-50);
  border-radius: var(--radius-md);
  border: 1px dashed var(--toss-gray-300);
}
.readout-next-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--toss-gray-500);
  margin-bottom: 7px;
}
.readout-next-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.2px;
  word-break: keep-all;
}
.readout-next-promise {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--toss-gray-600);
  word-break: keep-all;
}
.readout-next-dday {
  display: inline-block;
  margin-top: 9px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--toss-blue);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--toss-blue-dark);
}

.readout-ladder-ins { margin: 14px 20px 0; }
.readout-ladder-ins-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--toss-gray-500);
  margin-bottom: 2px;
}

@media (max-width: 360px) {
  .lad-headline { font-size: 15.5px; }
  .lad-next-dday { margin-left: 0; }
  .lad-step-mark { width: 30px; }
}

@media (prefers-color-scheme: dark) {
  .lad-banner { background: #222; border-color: #333; }
  .lad-headline, .lad-next-title, .lad-step-title,
  .lad-ins-title, .lad-ins-metric { color: #f0f0f0; }
  .lad-next { background: rgba(49,130,246,0.12); }
  .lad-next-promise, .lad-ins-body { color: #d0d0d0; }
  .lad-toggle { background: #333; color: #ddd; }
  .lad-bar { background: #333; }
  .lad-steps { border-top-color: #333; }
  .lad-step-mark { background: #333; color: #bbb; }
  .lad-ins-neutral { background: #2a2a2a; }
  .readout-next { background: #2a2a2a; border-color: #444; }
  .readout-unlock-title, .readout-next-title { color: #f0f0f0; }
}

/* 대시보드 계단 한 줄 */
.lad-line {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--toss-gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s;
}
.lad-line:active { border-color: var(--toss-blue); }
.lad-line-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lad-line-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.2px;
}
.lad-line-dday {
  padding: 3px 9px;
  background: var(--toss-blue-bg);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--toss-blue-dark);
  white-space: nowrap;
}
.lad-line .lad-bar { margin-top: 9px; }
.lad-line-next {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--toss-gray-600);
  word-break: keep-all;
}
@media (prefers-color-scheme: dark) {
  .lad-line { background: #222; border-color: #333; }
  .lad-line-label { color: #f0f0f0; }
  .lad-line-dday { background: rgba(49,130,246,0.15); color: #7ab0ff; }
  .lad-line-next { color: #b0b0b0; }
}
