/* === 주안센트럴파라곤 입주 사이트 === */

:root {
  --bg: #f7f7f6;
  --surface: #ffffff;
  --surface-2: #fbfbfa;
  --surface-elev: #ffffff;
  --border: #e7e7e4;
  --border-strong: #d6d6d2;
  --text-1: #121212;
  --text-2: #5a5a57;
  --text-3: #8a8a87;
  --text-disabled: #b8b8b4;
  --accent: #ff5b14;
  --accent-soft: #fff1ea;
  --accent-text: #d24a05;
  --positive: #137a3a;
  --positive-soft: #e7f4ec;
  --warning: #b56b00;
  --warning-soft: #fff4dd;
  --danger: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 6px 24px -8px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 24px 48px -12px rgba(0,0,0,.12);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-display: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --max-w: 1180px;
  --nav-h: 64px;
}

[data-theme="dark"] {
  --bg: #0c0c0d;
  --surface: #161617;
  --surface-2: #1c1c1e;
  --surface-elev: #1f1f21;
  --border: #2a2a2c;
  --border-strong: #3a3a3c;
  --text-1: #f5f5f4;
  --text-2: #a8a8a4;
  --text-3: #7a7a76;
  --text-disabled: #4a4a47;
  --accent: #ff7a3f;
  --accent-soft: #2a1610;
  --accent-text: #ff9870;
  --positive: #43c97a;
  --positive-soft: #0f2418;
  --warning: #f0b14a;
  --warning-soft: #2a1f0a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 6px 24px -8px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg: 0 24px 48px -12px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  transition: background-color .25s ease, color .25s ease;
}
/* 가로 스크롤 방지 — sticky nav 영향 없도록 main에만 적용 */
main { overflow-x: clip; }
button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button.chip, button.btn { -webkit-appearance: none; appearance: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
img { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }

/* === Nav === */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: var(--nav-h); display: flex; align-items: center; gap: 36px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; letter-spacing: -.01em;
}
.nav-logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--text-1); color: var(--bg);
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; letter-spacing: -.02em;
}
.nav-logo small { color: var(--text-3); font-weight: 500; font-size: 11.5px; }
.nav-menu {
  display: flex; gap: 4px; align-items: center; flex: 1;
  overflow-x: auto; scrollbar-width: none;
}
.nav-menu::-webkit-scrollbar { display: none; }
.nav-menu a {
  padding: 8px 14px; border-radius: var(--r-full);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  white-space: nowrap; transition: all .15s;
}
.nav-menu a:hover { color: var(--text-1); background: var(--surface); }
.nav-menu a.active { color: var(--text-1); background: var(--surface); box-shadow: var(--shadow-sm); }

/* 모바일 가로 스크롤 메뉴 */
.nav-menu-mobile {
  display: none;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 16px 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.nav-menu-mobile::-webkit-scrollbar { display: none; }
.nav-menu-mobile a {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: var(--r-full);
  font-size: 12.5px; font-weight: 600;
  color: var(--text-2);
  text-decoration: none; white-space: nowrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: all .15s;
}
.nav-menu-mobile a.active {
  background: var(--accent); color: white;
  border-color: var(--accent);
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-cta {
  padding: 8px 14px; border-radius: var(--r-full);
  background: var(--text-1); color: var(--bg);
  font-size: 13px; font-weight: 600; border: 0;
}

/* === Layout === */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0 32px; scroll-margin-top: var(--nav-h); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-title { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.section-sub { color: var(--text-2); font-size: 14.5px; margin: 0; }
.section-eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  color: var(--accent-text); background: var(--accent-soft);
  padding: 4px 10px; border-radius: var(--r-full);
  margin-bottom: 12px; letter-spacing: .02em;
}

/* === Cards === */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--border-strong); }
.card-lg { padding: 28px; border-radius: var(--r-lg); }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--r-full);
  font-size: 13.5px; font-weight: 600; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-1);
  transition: all .12s ease;
}
.btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--text-1); color: var(--bg); border-color: var(--text-1); }
.btn-accent { background: var(--accent); color: white; border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text-1); background: var(--surface); border-color: var(--border); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 14px 22px; font-size: 14.5px; }

/* === Form === */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.field select, .field textarea,
.task-form-title input {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-1); font-size: 14px;
  font-family: inherit;
  transition: border-color .12s, background .12s;
}
.field input:focus, .field select:focus, .field textarea:focus,
.task-form-title input:focus {
  outline: none; border-color: var(--text-1); background: var(--surface);
}
/* 체크박스/라디오 — 강제로 안전한 크기 (모바일 min-height 영향 방지) */
.field input[type="checkbox"],
.field input[type="radio"] {
  width: 18px; height: 18px; min-width: 18px; min-height: 18px;
  padding: 0; margin: 0; flex-shrink: 0;
  accent-color: var(--text-1);
  cursor: pointer;
}
.field-hint { font-size: 11.5px; color: var(--text-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input-suffix { position: relative; }
.input-suffix span {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 13px; pointer-events: none;
}
/* specificity (0,4,1) — 위 .field input:not(...)와 동일하게 맞춤 */
.input-suffix input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
  padding-right: 40px; text-align: right; font-variant-numeric: tabular-nums;
}

/* === Chip / Pill === */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
}
.chip-accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip-positive { background: var(--positive-soft); color: var(--positive); border-color: transparent; }
.chip-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }

/* === Numeric === */
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* === Utilities === */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.hide-mobile { display: initial; }
.show-mobile { display: none; }

/* === Hero === */
.hero { padding: 56px 0 40px; position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2); margin-bottom: 24px;
}
.hero-eyebrow .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  font-size: 10px; color: white;
}
.hero h1 {
  font-size: clamp(56px, 8vw, 96px); font-weight: 800; letter-spacing: -.045em;
  line-height: .95; margin: 0 0 28px;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .stroked {
  -webkit-text-stroke: 2px var(--text-1); color: transparent;
}
[data-theme="dark"] .hero h1 .stroked { -webkit-text-stroke-color: var(--text-1); }
.hero-sub {
  font-size: 17px; color: var(--text-2); line-height: 1.55;
  max-width: 480px; margin: 0 0 32px;
}
.hero-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-meta-item .label { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.hero-meta-item .value { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; }
.hero-cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* D-day card */
.dday-card {
  background: var(--text-1); color: var(--bg);
  border-radius: var(--r-xl); padding: 28px;
  position: relative; overflow: hidden;
}
.dday-card .label {
  font-size: 11.5px; opacity: .55; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 600;
}
.dday-card .big {
  font-size: 84px; font-weight: 800; letter-spacing: -.04em;
  line-height: .95; margin: 16px 0 8px;
}
.dday-card .undecided {
  font-size: 44px; font-weight: 700; letter-spacing: -.02em;
  margin: 16px 0 8px;
}
.dday-card .sub { font-size: 13px; opacity: .65; }
.dday-card .pulse {
  position: absolute; top: 24px; right: 24px;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; opacity: .7;
}
.dday-card .pulse .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #ff5b14;
  box-shadow: 0 0 0 0 rgba(255,91,20,.6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,91,20,.7); }
  70% { box-shadow: 0 0 0 10px rgba(255,91,20,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,91,20,0); }
}
.dday-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 24px; background: rgba(255,255,255,.08); border-radius: var(--r-md); overflow: hidden; }
.dday-stat { padding: 14px 16px; background: rgba(0,0,0,.2); }
.dday-stat .l { font-size: 10.5px; opacity: .55; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.dday-stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; }

/* === Building grid === */
.bldg-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.bldg-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
}
.bldg-cell {
  aspect-ratio: 1; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  transition: all .12s; cursor: pointer; font-variant-numeric: tabular-nums;
}
.bldg-cell:hover { border-color: var(--text-1); color: var(--text-1); transform: translateY(-2px); }
.bldg-cell.active { background: var(--text-1); color: var(--bg); border-color: var(--text-1); }
.bldg-cell.unit-105 { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }

/* === Type / Plan === */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
  transition: all .15s;
}
.plan-card:hover { border-color: var(--text-1); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.plan-thumb {
  aspect-ratio: 4/3; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: grid; place-items: center; position: relative;
}
.plan-body { padding: 18px 20px; }
.plan-body .name { font-weight: 700; font-size: 15px; margin: 0 0 4px; }
.plan-body .area { color: var(--text-2); font-size: 13px; }
.plan-body .specs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.plan-type-chip { position: absolute; top: 12px; right: 12px; }

/* === Schedule Task Control Bar === */
.task-control { margin-bottom: 24px; }
.task-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: flex-end;
}
.task-form-heading {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--text-1);
  margin: 0 0 2px;
}
.task-form-heading svg { color: var(--accent); flex-shrink: 0; }
.task-form-title { display: flex; flex-direction: column; gap: 6px; }
.task-form-title label,
.task-form-meta .field label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.task-form-title input { width: 100%; }
.task-form-meta { display: contents; }
.task-form-meta .field { display: flex; flex-direction: column; gap: 6px; }
.task-form-meta .field select { width: 100%; }
.task-form-add { white-space: nowrap; }
.task-form-add:disabled {
  opacity: .45; cursor: not-allowed;
  background: var(--surface-2); color: var(--text-3); border-color: var(--border);
}
.task-actions {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.task-actions-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.task-actions-buttons { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.task-reset { color: #dc2626; margin-left: auto; }

/* === Schedule / Checklist === */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border); border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -28px; top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border-strong);
  display: grid; place-items: center;
}
.tl-item.done .tl-dot { background: var(--text-1); border-color: var(--text-1); }
.tl-item.current .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-item .tl-date { font-size: 11.5px; color: var(--text-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tl-item .tl-title { font-size: 16px; font-weight: 700; margin: 4px 0 6px; letter-spacing: -.01em; }
.tl-item .tl-desc { font-size: 13.5px; color: var(--text-2); }

.checklist { display: flex; flex-direction: column; gap: 2px; }
.check-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  transition: all .15s; cursor: pointer;
}
.check-item:hover { border-color: var(--border-strong); }
.check-item.done { background: var(--surface-2); }
.check-item.done .check-title { text-decoration: line-through; color: var(--text-3); }
.check-box {
  width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px solid var(--border-strong); flex-shrink: 0;
  display: grid; place-items: center; margin-top: 1px;
  transition: all .12s;
}
.check-item.done .check-box { background: var(--text-1); border-color: var(--text-1); color: var(--bg); }
.check-title { font-size: 14.5px; font-weight: 600; }
.check-desc { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.check-meta { font-size: 12px; color: var(--text-3); margin-top: 6px; display: flex; gap: 10px; }

.progress-bar {
  height: 6px; background: var(--border); border-radius: 999px; overflow: hidden;
}
.progress-bar > div { height: 100%; background: var(--text-1); border-radius: 999px; transition: width .4s ease; }

/* === Calculator === */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.calc-result {
  background: var(--surface-2); border-radius: var(--r-md);
  padding: 28px; border: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center;
}
.calc-result .label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.calc-result .big {
  font-size: 36px; font-weight: 800; letter-spacing: -.025em;
  margin: 8px 0 4px;
}
.calc-result .big .unit { font-size: 18px; font-weight: 600; color: var(--text-2); margin-left: 4px; }
.calc-result .sub { font-size: 13px; color: var(--text-3); }
.calc-breakdown { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.breakdown-row { display: flex; justify-content: space-between; font-size: 13px; }
.breakdown-row .l { color: var(--text-2); }
.breakdown-row .v { font-weight: 600; }

.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--text-1); }
.slider-row .val { min-width: 64px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }

.tabs { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: var(--r-full); border: 1px solid var(--border); gap: 2px; }
.tabs button {
  padding: 8px 16px; border-radius: var(--r-full); border: 0;
  background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600;
}
.tabs button.active { background: var(--surface); color: var(--text-1); box-shadow: var(--shadow-sm); }

/* === Moving planner === */
.mover-list { display: flex; flex-direction: column; gap: 10px; }
.mover-task {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 14px;
  padding: 14px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  align-items: center; cursor: grab;
}
.mover-task.done .mover-title { color: var(--text-3); text-decoration: line-through; }
.mover-title { font-size: 14px; font-weight: 600; }
.mover-when { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mover-date-input {
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); font-size: 11.5px; font-family: inherit;
  font-variant-numeric: tabular-nums; color: var(--text-2);
  min-height: 24px;
}
.mover-tag {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: var(--r-full); font-size: 11px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
}

/* === Downloads === */
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dl-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border);
  transition: all .15s;
}
.dl-item:hover { border-color: var(--text-1); transform: translateY(-1px); }
.dl-icon {
  width: 40px; height: 48px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  color: var(--text-2); position: relative;
  flex-shrink: 0;
}
.dl-icon::after {
  content: ""; position: absolute; top: -1px; right: -1px;
  width: 10px; height: 10px;
  background: var(--bg); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.dl-meta { flex: 1; min-width: 0; }
.dl-name { font-size: 13.5px; font-weight: 600; }
.dl-info { font-size: 11.5px; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; }

/* === Community === */
.faq-item {
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.faq-q { display: flex; justify-content: space-between; gap: 16px; align-items: center; font-weight: 600; font-size: 15px; }
.faq-q-marker { color: var(--accent); font-weight: 800; }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .25s ease, margin .25s ease;
  color: var(--text-2); font-size: 14px; line-height: 1.6;
}
.faq-item.open .faq-a { max-height: 240px; margin-top: 12px; }

/* === Footer === */
.footer {
  padding: 0; margin-top: 32px;
  border-top: 1px solid var(--border); color: var(--text-2);
  background: var(--surface-2);
}
.footer .copy { padding: 10px 0 !important; margin: 0; border-top: 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-3); }

/* Home — 한 화면에 맞추고 스크롤 제거 */
body.is-home { overflow: hidden; }
body.is-home main { height: calc(100dvh - var(--nav-h)); overflow: hidden; }
body.is-home .hero { padding: 24px 0 0; height: 100%; display: flex; align-items: center; }
body.is-home .hero-inner { gap: 32px; }
body.is-home .marquee { display: none; }
body.is-home .footer { display: none; }
@media (max-width: 880px) {
  body.is-home main { height: auto; min-height: calc(100dvh - var(--nav-h)); }
}

/* === Modal === */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px;
  animation: fadeIn .2s ease;
}
.modal {
  background: var(--surface); border-radius: var(--r-lg);
  width: 100%; max-width: 540px; max-height: 90vh; overflow: auto;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: scaleIn .2s ease;
}
.modal-head { padding: 24px 28px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-head h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.modal-body { padding: 20px 28px 28px; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* === Floor plan SVG === */
.fp-svg { width: 80%; max-width: 280px; opacity: .85; }
.fp-img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 18px; background: var(--surface);
  display: block;
}
.fp-svg .wall { stroke: var(--text-1); stroke-width: 2.5; fill: none; }
.fp-svg .room { stroke: var(--border-strong); stroke-width: 1; fill: var(--surface-2); }
.fp-svg .door { stroke: var(--text-2); stroke-width: 1.2; stroke-dasharray: 3 2; fill: none; }
.fp-svg text { font-size: 9px; fill: var(--text-3); font-weight: 600; letter-spacing: .04em; }

/* === Marquee === */
.marquee {
  overflow: hidden; padding: 14px 0;
  background: var(--text-1); color: var(--bg);
  border-radius: var(--r-full); margin: 32px 0 0;
  position: relative;
}
.marquee-track {
  display: flex; gap: 48px; white-space: nowrap;
  animation: scroll 30s linear infinite;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 12px; }
.marquee-track span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* === Helper classes (Schedule progress / InterimCalc complex layouts) === */
.schedule-progress { min-width: 200px; }
.interim-rounds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.interim-rounds-grid .interim-round-item {
  display: flex; align-items: center; gap: 6px;
}
.interim-rounds-grid .interim-round-item > input[type="date"] {
  flex: 1; min-width: 0;
  padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; font-family: inherit;
}
.interim-tier-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.interim-tier-row .tier-label { font-size: 12px; color: var(--text-2); min-width: 60px; font-weight: 600; }
.interim-tier-row .tier-rate {
  width: 70px; padding: 5px 6px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; font-family: inherit; text-align: right;
}
.interim-tier-row .tier-date {
  flex: 1; min-width: 0;
  padding: 5px 6px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12px; font-family: inherit;
}
.interim-tier-row .tier-date:disabled { background: var(--bg); }

.interim-repay-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: background .15s, border-color .15s;
}
.interim-repay-item.active { background: var(--positive-soft); border-color: var(--positive); }
.interim-repay-item.invalid { background: var(--warning-soft); border-color: var(--warning); }
.interim-repay-item input[type="date"] {
  padding: 5px 8px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12px; font-family: inherit;
}
.interim-repay-item .repay-spacer { flex: 1; min-width: 0; }
.interim-repay-warning {
  width: 100%; font-size: 11px; color: var(--warning); margin-top: 2px;
}

/* === Responsive === */
/* --- 큰 태블릿 (~1024px) --- */
@media (max-width: 1024px) {
  :root { --max-w: 100%; }
  .wrap, .nav-inner { padding: 0 24px; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
  .footer-inner > div:nth-child(4) { display: none; }
}

/* --- 태블릿 / 작은 데스크톱 (~880px) --- */
@media (max-width: 880px) {
  .section { padding: 56px 0 20px; scroll-margin-top: calc(var(--nav-h) + 56px); }
  .section-title { font-size: 22px; }
  /* 모바일에서 nav 높이 해제 → 로고바(64px) + 메뉴 스트립이 자연스럽게 쌓임 */
  .nav { height: auto; }
  .hero { padding: 32px 0 20px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero h1 { font-size: clamp(44px, 10vw, 72px); line-height: .98; }
  .hero-sub { font-size: 15.5px; }
  .dday-card { padding: 24px; }
  .dday-card .big { font-size: 56px; }
  .plan-grid { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; gap: 16px; }
  .dl-grid { grid-template-columns: 1fr; }
  .schedule-grid { grid-template-columns: 1fr !important; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:nth-child(4) { display: block; }
  .hide-mobile { display: none; }
  .show-mobile { display: initial; }
  .nav-inner { gap: 12px; padding: 0 16px; }
  .nav-menu { font-size: 13px; }
  .nav-menu-mobile { display: flex; }
  .nav-menu-mobile a {
    padding: 9px 14px; font-size: 13px;
    min-height: 36px; display: inline-flex; align-items: center;
  }
  .wrap { padding: 0 16px; }
  .hero-meta { gap: 18px; }
  .hero-meta-item .value { font-size: 15px; }
  .section-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 20px; }
  .schedule-progress { min-width: 0; width: 100%; }
  .modal { width: 96%; max-height: 92vh; }

  /* 카드 패딩 축소 */
  .card { padding: 16px; }
  .card-lg { padding: 18px; }

  /* 입력 요소 패딩 + 터치 영역 — iOS 자동 줌 방지를 위해 폼 입력은 16px
     체크박스/라디오/range는 제외 (base에서 18px 고정 처리됨) */
  .field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  .field select, .field textarea,
  .task-form-title input {
    padding: 11px 12px; font-size: 16px;
    min-height: 44px;
  }
  /* input-suffix는 우측에 단위(만원/%/원) 들어가므로 padding-right 유지
     — 위 .field input:not(...) 룰의 specificity (0,4,1)와 맞춤 */
  .input-suffix input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
    padding-right: 40px;
  }
  /* 보조 입력(좁은 인라인) — 16px 유지하되 패딩 축소 */
  .interim-rounds-grid .interim-round-item input[type="date"],
  .interim-tier-row .tier-rate,
  .interim-tier-row .tier-date,
  .interim-repay-item input[type="date"] { font-size: 14px; min-height: 36px; }

  /* === Section 02 입주·이사 일정 폼 (모바일 통합 ≤880) ===
     구조: 헤딩 → 할 일 → 시점·카테고리(2-col) → 일정 추가
     일관된 12px 리듬, 헤딩 하단에 구분선으로 정체성 명확화
     align-items: stretch는 데스크톱 grid의 flex-end 상속 차단 (없으면 자식들이 우측 정렬됨) */
  .task-form {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .task-form-heading {
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
  }
  .task-form-title { gap: 6px; }
  .task-form-title label,
  .task-form-meta .field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    letter-spacing: 0;
    text-transform: none;
  }
  .task-form-meta {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .task-form-meta .field { gap: 6px; }
  .task-form-add {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 14.5px;
    font-weight: 700;
    min-height: 52px;
    margin-top: 4px;
  }

  /* 버튼 터치 영역 확보 (Android/iOS 권장 44×44) */
  .btn { padding: 11px 16px; min-height: 44px; }
  .btn-sm { padding: 9px 13px; font-size: 12.5px; min-height: 38px; }
  .btn-lg { padding: 14px 22px; font-size: 14.5px; min-height: 48px; }

  /* tabs 가로 스크롤 가능하도록 */
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { white-space: nowrap; flex-shrink: 0; min-height: 36px; }

  /* Marquee 모바일 크기 축소 */
  .marquee { padding: 12px 0; margin-top: 24px; }
  .marquee-track { font-size: 13px; gap: 32px; animation-duration: 24s; }

  /* Schedule mover-task 삭제 버튼 터치 영역 */
  .mover-task { grid-template-columns: 24px 1fr 40px; padding: 12px 14px; gap: 12px; }
  .mover-task .btn-ghost { padding: 8px !important; min-height: 36px; min-width: 36px; justify-content: center; }

  /* FAQ open height 확장 */
  .faq-item.open .faq-a { max-height: 600px; }

  /* InterimCalc 좁은 화면 정리 */
  .interim-rounds-grid { grid-template-columns: 1fr; gap: 6px; }
  .interim-tier-row .tier-label { min-width: 52px; font-size: 11.5px; }
}

/* --- 모바일 (~540px) --- */
@media (max-width: 540px) {
  .footer-inner { grid-template-columns: 1fr; }
  .bldg-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
  .field-row { grid-template-columns: 1fr; gap: 10px; }
  .hero { padding: 24px 0 16px; }
  .hero h1 { font-size: clamp(38px, 12vw, 60px); margin-bottom: 20px; }
  .hero-sub { font-size: 14.5px; margin-bottom: 24px; }
  .dday-card { padding: 22px; border-radius: var(--r-lg); }
  .dday-card .big { font-size: 52px; }
  .dday-card .undecided { font-size: 34px; }
  .dday-card .pulse { top: 18px; right: 18px; font-size: 10px; }
  .calc-result { padding: 22px; }
  .calc-result .big { font-size: 30px; }
  .section { padding: 44px 0 16px; }
  .section-title { font-size: 20px; line-height: 1.25; }
  .wrap { padding: 0 14px; }
  .nav-inner { gap: 10px; padding: 0 14px; }
  .nav-logo { font-size: 13.5px; }
  .nav-logo-mark { width: 30px; height: 30px; font-size: 12px; }

  /* 평면도 카드 — 모바일에서 가로 리스트 레이아웃 (썸네일 + 정보) */
  .plan-grid { gap: 8px; }
  .plan-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: stretch;
  }
  .plan-thumb {
    width: 100px; height: 100px;
    aspect-ratio: unset;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .fp-img { padding: 4px; }
  .plan-body { padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
  .plan-body .name { font-size: 14.5px; margin: 0; font-weight: 700; }
  .plan-body .area { font-size: 11.5px; line-height: 1.4; color: var(--text-2); }
  .plan-body .specs { margin-top: 6px; gap: 5px; }
  .plan-body .specs .chip { font-size: 10.5px; padding: 3px 8px; }
  .plan-type-chip { top: 5px; right: 5px; font-size: 10px; padding: 2px 7px; }

  .mover-task { padding: 12px; grid-template-columns: 22px 1fr 36px; gap: 10px; }
  .mover-title { font-size: 13.5px; }
  .mover-when { font-size: 11.5px; }
  .mover-tag { font-size: 10.5px; }

  /* Schedule 폼 — 580px 이하 카드 패딩만 축소 (그 외는 ≤880 규칙 상속) */
  .task-control { padding: 14px; }

  /* 다운로드 액션 — 3개 균등 + 초기화는 분리(아래 별도 행, 작게) */
  .task-actions { gap: 10px; padding-top: 14px; margin-top: 14px; flex-direction: column; align-items: stretch; }
  .task-actions-label { width: 100%; margin: 0; }
  .task-actions-buttons {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .task-actions-buttons .btn-sm {
    flex: unset;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 9px 4px;
    font-size: 12px;
  }
  .task-actions-buttons .task-reset {
    grid-column: 1 / -1;
    margin-left: 0 !important;
    margin-top: 4px;
    background: transparent;
    border: 1px dashed var(--border-strong);
    color: var(--text-3) !important;
    min-height: 36px;
    font-size: 11.5px;
  }
  .task-actions-buttons .task-reset:hover { color: var(--danger) !important; border-color: var(--danger); }

  /* Section header sub text 줄바꿈 정리 */
  .section-sub { font-size: 13px; line-height: 1.5; }
  .section-eyebrow { font-size: 11px; }

  /* Footer 모바일 정리 */
  .footer { padding: 0 !important; margin-top: 24px; }
  .footer .copy { padding: 8px 0 !important; gap: 4px; font-size: 10.5px; }

  /* Hero eyebrow — 좁은 화면에서 자동 줄바꿈 */
  .hero-eyebrow {
    display: flex; align-items: flex-start;
    font-size: 11.5px; line-height: 1.4;
    margin-bottom: 18px;
    padding: 8px 12px 8px 6px;
  }
  .hero-eyebrow .dot { flex-shrink: 0; margin-top: 1px; }
  .hero-eyebrow > span:last-child { word-break: keep-all; }

  /* DdayCard stats — 2-col + 첫칸 풀폭 (긴 날짜 "2025.12.31" 잘림 방지) */
  .dday-stats { grid-template-columns: 1fr 1fr; }
  .dday-stat:first-child { grid-column: 1 / -1; }
  .dday-stat { padding: 10px 12px; }
  .dday-stat .l { font-size: 10px; }
  .dday-stat .v { font-size: 16px; }

  /* Hero meta — 깔끔한 세로 정렬 */
  .hero-meta { gap: 12px; flex-direction: column; align-items: flex-start; margin-bottom: 24px; }
  .hero-meta-item { width: 100%; }
  .hero-meta-item .label { font-size: 11px; }
  .hero-meta-item .value { font-size: 14px; }

  /* Hero CTA — primary 풀폭, 나머지 2개는 가로 분할 (위계 + 공간 절약) */
  .hero-cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-cta-row .btn { width: 100%; justify-content: center; padding: 12px 8px; font-size: 13.5px; }
  .hero-cta-row .btn-primary { grid-column: 1 / -1; padding: 14px; font-size: 14.5px; }

  /* 동호수 그리드 — 더 촘촘하게 */
  .bldg-grid { gap: 4px; }
  .bldg-cell { font-size: 11px; }

  /* Modal 본문 패딩 축소 */
  .modal-backdrop { padding: 12px; }
  .modal-body { padding: 16px !important; }
  .modal-head { padding: 16px !important; }
  .modal-head h3 { font-size: 17px; }

  /* 자료실 카테고리 칩들 가로 스크롤 + 시각적 힌트 */
  .section-head .row {
    overflow-x: auto; scrollbar-width: none;
    padding-bottom: 4px; margin: 0 -14px; padding-left: 14px; padding-right: 14px;
    flex-wrap: nowrap !important;
  }
  .section-head .row::-webkit-scrollbar { display: none; }
  .section-head .row .chip { flex-shrink: 0; min-height: 30px; padding: 6px 12px; }

  /* dl-item 모바일 정리 */
  .dl-item { padding: 12px 14px; gap: 12px; }
  .dl-icon { width: 36px; height: 44px; font-size: 9.5px; }
  .dl-name { font-size: 13px; line-height: 1.3; }
  .dl-info { font-size: 11px; flex-wrap: wrap; gap: 6px; }

  /* FAQ 모바일 패딩 */
  .faq-item { padding: 16px; }
  .faq-q { font-size: 14px; }
  .faq-a { font-size: 13.5px; line-height: 1.6; }

  /* DelayCalc 평형 타입 라디오 grid */
  .calc-result .big { font-size: 28px; }
  .calc-result .label { font-size: 12px; }
  .calc-result .sub { font-size: 12.5px; }

  /* tabs — 가로 스크롤 그라데이션 힌트 */
  .tabs { padding: 3px; }
  .tabs button { padding: 8px 14px; font-size: 12.5px; min-height: 38px; }
}

/* --- 매우 좁은 화면 (~380px) --- */
@media (max-width: 380px) {
  .wrap { padding: 0 12px; }
  .nav-inner { padding: 0 12px; }
  .nav-logo small { display: none; }
  .hero h1 { font-size: clamp(32px, 14vw, 44px); }
  .dday-card { padding: 18px; }
  .dday-card .big { font-size: 44px; }
  .dday-card .undecided { font-size: 28px; }
  .dday-stat .v { font-size: 14px; }
  .section-title { font-size: 18px; }
  .calc-result .big { font-size: 24px; }
  .plan-card { grid-template-columns: 84px 1fr; }
  .plan-thumb { width: 84px; height: 84px; }
  .plan-body { padding: 10px 12px; }
  .task-actions-buttons { grid-template-columns: 1fr 1fr; }
  .hero-cta-row { grid-template-columns: 1fr; }
  .hero-cta-row .btn { padding: 13px 12px; }
}

/* --- 가로 모드 / 짧은 높이 --- */
@media (max-width: 880px) and (max-height: 480px) and (orientation: landscape) {
  .hero { padding: 16px 0 12px; }
  .hero h1 { font-size: clamp(32px, 7vw, 48px); margin-bottom: 12px; }
  .hero-sub { margin-bottom: 16px; }
  .section { padding: 32px 0 16px; }
}

/* --- 모션 감소 선호 사용자 --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track { animation: none !important; }
}
