/* ==========================================================================
   Recoverylab 2026 Mobile-First Design System (design-system-2026.css)
   Target: CWV Performance, CLS=0, High Readability, Naver Search Standards
   ========================================================================== */

:root {
  --primary-color: #0b7a69;
  --primary-hover: #085f52;
  --primary-surface: #ecfdf5;
  --primary-border: #a7f3d0;
  
  --navy-dark: #0f2438;
  --navy-light: #1e3a5f;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-sub: #475569;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  
  --accent-red: #dc2626;
  --accent-blue: #2563eb;
  --accent-amber: #d97706;

  --font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 74px; /* Space for sticky action bar on mobile */
}

/* Tabular Numerals for Price & Metric Alignment */
.tabular-nums, .price, .amount, .rate, .date, table td, .state-strip strong, .sim-val {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* 16:9 Aspect-Ratio Locked Hero Gallery (Zero CLS) */
.gallery, .hero-gallery, .gallery-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #e2e8f0;
  overflow: hidden;
  border-radius: 12px;
}

.gallery img, .hero-gallery img, .gallery-frame img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

/* Modern Card Layouts */
.card-2026, .direct-answer, .jauction-comment, .sim-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.direct-answer h2, .jauction-comment-head strong, .sim-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy-dark);
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* State Strip Modernization */
.state-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0;
}

@media (max-width: 640px) {
  .state-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.state-strip > div {
  display: flex;
  flex-direction: column;
}

.state-strip span {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.state-strip strong {
  font-size: 15px;
  color: var(--navy-dark);
  font-weight: 800;
}

/* Table Responsive Scrolling */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.table-scroll th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.table-scroll td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

/* Interactive Simulator Widget Styles */
.sim-card {
  background: linear-gradient(180deg, #f0fdf9 0%, #ffffff 100%);
  border: 1.5px solid var(--primary-border);
}

.sim-header {
  border-bottom: 1px solid #d1fae5;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.sim-tag {
  display: inline-block;
  background: var(--primary-color);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.sim-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.sim-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-dark);
}

.sim-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-slider {
  flex: 1;
  accent-color: var(--primary-color);
  cursor: pointer;
  height: 6px;
}

.sim-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sim-chip-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-sub);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-chip-btn:hover, .sim-chip-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.sim-result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}

.sim-res-item {
  display: flex;
  flex-direction: column;
}

.sim-res-item.highlight {
  grid-column: span 2;
  border-top: 1px dashed #cbd5e1;
  padding-top: 8px;
  margin-top: 2px;
}

.sim-res-item label {
  font-size: 12px;
  color: var(--text-muted);
}

.sim-res-item span {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy-dark);
}

.sim-res-item.highlight span {
  font-size: 18px;
  color: var(--primary-color);
}

.sim-consult-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  margin-top: 10px;
}

.sim-consult-cta:hover {
  background: #1e293b;
}

/* Sticky Bottom Action Bar on Mobile */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid #cbd5e1;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.sticky-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sticky-info .price-tag {
  font-size: 15px;
  font-weight: 900;
  color: var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-info .case-tag {
  font-size: 11px;
  color: var(--text-muted);
}

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

.sticky-btn-tel {
  background: var(--primary-color);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.sticky-btn-tel:hover {
  background: var(--primary-hover);
}
