@font-face {
  font-family: "Pretendard";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/PretendardVariable.woff2") format("woff2");
}

/* ==========================================================================
   Recoverylab 2026 Clean UI & Space Engineering Design System v3
   8:4 Asymmetric Grid + Height-Budgeted Sticky Rail + 2-Col Bento + Zero CLS
   ========================================================================== */

:root {
  --sim-primary: #0b7a69;
  --sim-primary-hover: #085f52;
  --sim-primary-surface: #ecfdf5;
  --sim-primary-border: #a7f3d0;
  --sim-navy-dark: #0f2438;
  --sim-navy-light: #1e3a5f;
  --sim-text-main: #1e293b;
  --sim-text-muted: #64748b;
  --sim-text-sub: #475569;
  --sim-border-light: #e2e8f0;
  --sim-accent-blue: #2563eb;
  --sim-font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

html, body {
  overflow-x: clip;
  font-family: var(--sim-font);
  word-break: keep-all;
}
button, input, select, textarea {
  font-family: inherit;
}
button, input, select, textarea {
  font-family: inherit;
}

.sim-val, .tabular-nums, .price-tabular {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* 8:4 Asymmetric Master Grid on Desktop */
@media (min-width: 1025px) {
  .jx26-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
  }
  .jx26-main-col {
    min-width: 0;
  }
  .jx26-sticky-rail {
    position: sticky;
    top: 68px;
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 1024px) {
  .jx26-body-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .jx26-sticky-rail {
    position: static;
    max-height: none;
  }
}

/* 2-Col Bento Grid for Short Spec Sections */
.jx26-bento-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.jx26-bento-2col > * {
  min-width: 0;
}
@media (max-width: 768px) {
  .jx26-bento-2col {
    grid-template-columns: 1fr;
  }
}

/* Adaptive Photo Mosaic (0 / 1 / 2~5 / 6+ images, Zero CLS) */
.jx26-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.jx26-mosaic[data-mode="zero"] {
  grid-template-columns: 1fr;
}
.jx26-mosaic[data-mode="compact"] {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
.jx26-shot {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
  cursor: pointer;
}
.jx26-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.jx26-more-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 36, 56, 0.72);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
}

/* Progressive Disclosure (<details>) for Oversized Sections */
details.jx26-collapse {
  margin-top: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}
details.jx26-collapse > summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--sim-navy-dark);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details.jx26-collapse > summary::after {
  content: "펼치기 ▾";
  font-size: 12px;
  color: var(--sim-primary);
}
details.jx26-collapse[open] > summary::after {
  content: "접기 ▴";
}
.jx26-collapse-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding: 10px 14px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}
.jx26-extra-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.jx26-extra-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.jx26-extra-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
}

/* Sticky Utility Rail Widgets */
.jx26-rail-card {
  font-family: var(--sim-font);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(15, 36, 56, 0.05);
}
.jx26-rail-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--sim-navy-dark);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jx26-toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.jx26-toc-list a {
  display: inline-block;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  border-radius: 6px;
  text-decoration: none;
}
.jx26-toc-list a:hover {
  background: #e2e8f0;
  color: var(--sim-navy-dark);
}

/* Korean Won Hover Tooltip */
[data-kr-money] {
  position: relative;
  border-bottom: 1px dotted #94a3b8;
  cursor: help;
}
[data-kr-money]:hover::after {
  content: attr(data-kr-money);
  position: absolute;
  left: 0;
  bottom: calc(100% + 5px);
  background: #0f172a;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 90;
  pointer-events: none;
}

/* Dark Photo Lightbox Modal */
.jx26-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(9, 15, 26, 0.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.jx26-lightbox.is-open {
  display: flex;
}
.jx26-lightbox-img {
  max-width: min(92vw, 960px);
  max-height: 76vh;
  object-fit: contain;
  border-radius: 8px;
}
.jx26-lightbox-bar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #f8fafc;
  font-size: 13.5px;
  font-weight: 700;
}
.jx26-lb-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 700;
}
.jx26-lb-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Simulator Card */
.sim-card {
  font-family: var(--sim-font);
  background: linear-gradient(180deg, #f0fdf9 0%, #ffffff 100%);
  border: 1.5px solid var(--sim-primary-border);
  border-radius: 14px;
  padding: 16px;
  margin: 0;
  box-shadow: 0 4px 12px rgba(11, 122, 105, 0.06);
  color: var(--sim-text-main);
  line-height: 1.45;
  box-sizing: border-box;
}
.sim-header {
  border-bottom: 1px solid #d1fae5;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.sim-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--sim-navy-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sim-tag {
  display: inline-block;
  background: var(--sim-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}
.sim-input-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.sim-label-bar { display: flex; justify-content: space-between; align-items: center; }
.sim-label { font-size: 12.5px; font-weight: 700; color: var(--sim-navy-dark); }
.sim-slider { width: 100%; accent-color: var(--sim-primary); cursor: pointer; height: 6px; margin: 4px 0; }
.sim-slider-limits { display: flex; justify-content: space-between; font-size: 11px; color: var(--sim-text-muted); }
.sim-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.sim-chip-btn {
  background: #ffffff; border: 1px solid #cbd5e1; color: var(--sim-text-sub);
  padding: 5px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.sim-chip-btn.active { background: var(--sim-primary); color: #ffffff !important; border-color: var(--sim-primary); font-weight: 700; }
.sim-result-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0;
  background: #ffffff; border: 1px solid var(--sim-border-light); border-radius: 10px; padding: 10px;
}
.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: 11px; color: var(--sim-text-muted); margin-bottom: 2px; }
.sim-res-item span { font-size: 13.5px; font-weight: 800; color: var(--sim-navy-dark); }
.sim-res-item.highlight span { font-size: 16px; color: var(--sim-primary); }
.sim-consult-cta {
  display: flex; justify-content: space-between; align-items: center;
  background: #0f172a; color: #ffffff !important; padding: 11px 14px;
  border-radius: 9px; text-decoration: none; font-weight: 700; font-size: 13px; margin-top: 8px;
}
.mobile-sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  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); font-family: var(--sim-font); box-sizing: border-box;
}
@media (min-width: 1025px) {
  .mobile-sticky-bar { display: none; }
}
.sticky-info { display: flex; flex-direction: column; min-width: 0; }
.sticky-info .price-tag { font-size: 15px; font-weight: 900; color: var(--sim-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-info .case-tag { font-size: 11px; color: var(--sim-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-btn-tel {
  background: var(--sim-primary); color: #ffffff !important; font-weight: 800; font-size: 13.5px;
  padding: 9px 15px; border-radius: 8px; text-decoration: none; white-space: nowrap;
}
