@font-face {
  font-family: 'Gmarket Sans';
  src: url('https://cdn.jsdelivr.net/gh/fonts-archive/GmarketSans/GmarketSansBold.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  color: #25211f;
  background: #fffdfa;
  font-synthesis: none;
  --accent: #c4472c;
  --accent-hover: #a83721;
  --accent-light: #fff2ea;
  --accent-border: #f2d7ca;
  --dark: #25211f;
  --muted: #736c66;
  --line: #eae3dc;
  --card-border: #e2dad2;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, p { margin: 0; }
h1, h2, .brand, .guide h3, .empty-state h3, .reset-dialog h2, .privacy-dialog h2, .faq-head h2 {
  font-family: 'Gmarket Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.8rem);
  line-height: 1.25;
}
h1 em {
  color: var(--accent);
  font-style: normal;
}

.site-shell {
  max-width: 1280px;
  margin: auto;
  padding: 0 clamp(16px, 3.5vw, 44px);
}

/* Header */
.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dark);
  text-decoration: none;
  font-size: 1.15rem;
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-family: 'Pretendard', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}
.header-note, .eyebrow, .section-index, .group-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.header-note { color: var(--muted); }

/* Intro */
.intro {
  padding: clamp(38px, 5vw, 68px) 0 clamp(24px, 3.2vw, 38px);
  max-width: 820px;
  width: 100%;
  text-align: left;
}
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 16px 0;
  padding: 0;
  text-align: left;
}
.eyebrow-line {
  width: 24px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
#page-title {
  margin: 0;
  padding: 0;
  text-align: left;
  font-family: 'Gmarket Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  line-height: 1.28;
  letter-spacing: -0.035em;
  color: var(--dark);
}
#page-title em {
  color: var(--accent);
  font-style: normal;
}
.intro p {
  font-family: 'Pretendard', sans-serif;
  font-weight: 500;
  font-size: clamp(0.98rem, 1.25vw, 1.1rem);
  line-height: 1.68;
  color: #5c5550;
  margin: 14px 0 0 0;
  padding: 0;
  letter-spacing: -0.02em;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.intro-phrase {
  display: inline-block;
}

/* 슬림한 추천 비교 예시 바 */
.preset-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  background: #faf6f0;
  border: 1px solid #ece4dc;
  border-radius: 8px;
  margin-bottom: clamp(26px, 3vw, 42px);
}
.preset-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}
.preset-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #59514b;
  flex: none;
}
.preset-disclaimer {
  font-size: 0.72rem;
  color: #8c827a;
  margin: 0;
  flex: 1;
}
.preset-chips {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 100%;
}
.preset-chip {
  background: #ffffff;
  border: 1px solid #dcd2c9;
  border-radius: 12px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  text-align: center;
  transition: all 0.15s ease;
  cursor: pointer;
}
.preset-chip:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}
.preset-chip:hover .preset-chip-title {
  color: var(--accent);
}
.preset-chip-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #3d342f;
  line-height: 1.2;
}
.preset-chip-desc {
  font-size: 0.70rem;
  font-weight: 500;
  color: #8c827a;
  line-height: 1.1;
  font-family: 'Pretendard', sans-serif;
}
.restore-chip {
  background: var(--accent);
  color: #ffffff;
  border: 0;
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: auto;
  cursor: pointer;
}
.restore-chip:hover {
  background: var(--accent-hover);
}

/* Workspace */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(22px, 3vw, 46px);
  align-items: start;
}
.section-head {
  min-height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.section-head h2 {
  font-size: 1.35rem;
  margin-top: 4px;
}
.section-caption {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 20px;
  white-space: nowrap;
}

/* Product List & Card */
.product-list {
  display: grid;
  gap: 14px;
}
.product-card {
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 18px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.card-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.card-badge {
  width: 24px;
  height: 24px;
  border: 1px solid #e7b9aa;
  background: #fff8f4;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  flex: none;
}
.prod-name-input {
  width: 100%;
  height: 34px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dark);
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 4px;
}
.prod-name-input:hover {
  background: #faf7f3;
  border-color: #ded6cd;
}
.prod-name-input:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(196, 71, 44, 0.12);
}
.prod-delete-btn {
  border: 0;
  background: none;
  padding: 6px 4px;
  color: #948c85;
  font-size: 0.76rem;
  white-space: nowrap;
  flex: none;
}
.prod-delete-btn:not(:disabled):hover {
  color: var(--accent);
  text-decoration: underline;
}
.prod-delete-btn:disabled {
  opacity: 0.3;
}

/* Spec Line (Compact & Clean) */
.spec-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 10px;
  background: #faf7f2;
  border: 1px solid #eee6dc;
  border-radius: 6px;
}
.spec-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #554d47;
  white-space: nowrap;
}
.spec-amount-input {
  flex: 1;
  height: 32px;
  border: 1px solid #dcd2c7;
  border-radius: 4px;
  background: #ffffff;
  padding: 0 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
}
.spec-amount-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(196, 71, 44, 0.12);
}
.spec-unit-select {
  width: 72px;
  height: 32px;
  border: 1px solid #dcd2c7;
  border-radius: 4px;
  background: #ffffff;
  padding: 0 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
}
.opt-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.opt-name-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #655c56;
  white-space: nowrap;
}

.card-hint {
  min-height: 12px;
  color: var(--accent);
  font-size: 0.71rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

/* Options Container (Horizontal rows) */
.options-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.opt-row {
  background: #ffffff;
  border: 1px solid #e7ded5;
  border-radius: 6px;
  padding: 7px 9px;
  transition: border-color 0.15s ease;
}
.opt-row:hover {
  border-color: #d6cac0;
}
.opt-main-line {
  display: flex;
  align-items: center;
  gap: 7px;
}
.opt-num-tag {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4eae3;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  flex: none;
}
.mini-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.mini-count { width: 110px; flex: none; }
.mini-price { flex: 1; }
.mini-field input {
  width: 100%;
  height: 35px;
  border: 1px solid #dcd2c8;
  border-radius: 4px;
  background: #fafaf8;
  color: var(--dark);
  font-size: 0.89rem;
  font-weight: 600;
  padding: 0 26px 0 9px;
  outline: none;
}
.mini-field input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(196, 71, 44, 0.12);
}
.mini-field input[aria-invalid="true"] {
  border-color: #d15642;
}
.mini-suffix {
  position: absolute;
  right: 8px;
  font-size: 0.74rem;
  color: #847b74;
  pointer-events: none;
}
.opt-del-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #9d948d;
  font-size: 0.82rem;
  border-radius: 4px;
  flex: none;
}
.opt-del-btn:not(:disabled):hover {
  background: #f5eae4;
  color: var(--accent);
}
.opt-del-btn:disabled {
  opacity: 0.25;
}

/* Optional details accordion */
.opt-extra-details {
  border-top: 1px dashed #ede5dc;
  margin-top: 6px;
  padding-top: 2px;
}
.opt-extra-details summary {
  list-style: none;
  font-size: 0.71rem;
  font-weight: 600;
  color: #79716b;
  cursor: pointer;
  padding: 4px 2px;
}
.opt-extra-details summary::-webkit-details-marker { display: none; }
.opt-extra-details summary:hover { color: var(--accent); }
.opt-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px 2px 4px;
}
.extra-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.extra-name { grid-column: 1 / -1; }
.extra-label {
  font-size: 0.69rem;
  font-weight: 600;
  color: #6a625d;
}
.extra-field input {
  height: 30px;
  border: 1px solid #ddd3c9;
  border-radius: 4px;
  background: #ffffff;
  padding: 0 8px;
  font-size: 0.82rem;
  font-weight: 500;
}
.extra-field input:focus {
  border-color: var(--accent);
  outline: none;
}
.opt-hint {
  min-height: 12px;
  color: var(--accent);
  font-size: 0.7rem;
  margin-top: 4px;
}

/* Add Buttons */
.opt-add-btn {
  height: 36px;
  width: 100%;
  border: 1px dashed #d5c8be;
  border-radius: 6px;
  background: #fbf9f6;
  color: var(--accent);
  font-size: 0.79rem;
  font-weight: 700;
  margin-top: 3px;
  transition: all 0.15s ease;
}
.opt-add-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.add-button {
  height: 48px;
  width: 100%;
  margin-top: 14px;
  border: 1px dashed #cfc2b7;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.15s ease;
}
.add-button:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

/* Result Section */
.result-section { min-width: 0; }
.result-summary {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0 0 10px;
}
.empty-state {
  min-height: 320px;
  background: #faf6f0;
  border: 1px solid #ebdcd0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px;
}
.empty-symbol {
  font-size: 1.7rem;
  line-height: 1;
  color: var(--accent);
  border: 1px solid #e7b5a5;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.empty-state h3 { font-size: 1.1rem; }
.empty-state p {
  color: #6d6660;
  font-size: 0.82rem;
  line-height: 1.55;
  margin-top: 6px;
}

.result-group {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 18px 18px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.group-kicker { font-size: 0.62rem; }
.group-head h3 {
  font-family: 'Pretendard', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 3px;
}
.base-label {
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.base-select {
  border: 0;
  border-bottom: 1px solid #d8aa9b;
  border-radius: 0;
  background: white;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 2px;
}

/* 슬림한 비교 결과 해설 (Legacy & Fallback) */
.insight-banner {
  background: #fff6f0;
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 11px 14px;
  margin-bottom: 12px;
}
.insight-lead {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.45;
  display: block;
}
.insight-sub {
  font-size: 0.74rem;
  color: #6b635e;
  line-height: 1.4;
  margin-top: 3px;
}

/* Layer 1: Hero Recommendation / Insight Card */
.hero-insight-card {
  background: #fff8f4;
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.hero-insight-card.tie {
  border-left-color: #887a70;
  background: #faf7f4;
  border-color: #e4ddd6;
}
.hero-insight-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}
.hero-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-insight-card.tie .hero-kicker {
  color: #7a6e66;
}
.hero-title {
  font-family: 'Gmarket Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}
.hero-price-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}
.hero-price-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero-insight-card.tie .hero-price-val {
  color: var(--dark);
}
.hero-price-unit {
  font-size: 0.92rem;
  font-weight: 600;
  color: #726860;
}
.hero-comparison-box {
  padding-top: 10px;
  border-top: 1px dashed #e9dbd2;
}
.hero-comp-line {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}
.hero-savings-line {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.4;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
.hero-sub {
  font-size: 0.82rem;
  color: #756a62;
  margin: 0;
  line-height: 1.45;
}
.hero-adj-tag {
  font-size: 0.74rem;
  font-weight: 500;
  color: #8c8075;
}

/* Layer 2: Product-by-Product Best Options */
.product-bests-section {
  margin-bottom: 22px;
}
.result-subhead {
  font-size: 0.88rem;
  font-weight: 700;
  color: #635850;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.product-bests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.product-best-card {
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.15s ease;
}
.product-best-card.winner {
  border-color: var(--accent-border);
  background: #fffbfa;
}
.prod-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7d726a;
}
.product-best-card.winner .prod-badge {
  color: var(--accent);
}
.prod-opt-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.prod-opt-price {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 2px;
}
.prod-opt-price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: #7d726a;
}
.prod-opt-status {
  font-size: 0.76rem;
  font-weight: 600;
  color: #82766d;
  margin-top: 2px;
}
.product-best-card.winner .prod-opt-status {
  color: var(--accent);
}

/* Layer 3: All Options Ranking */
.all-options-section {
  margin-top: 4px;
}

.group-note {
  font-size: 0.76rem;
  color: #79716b;
  margin-bottom: 10px;
}

/* Rank List */
.rank-list { display: grid; gap: 4px; }
.rank-row {
  padding: 13px 10px;
  border-top: 1px solid #f1e9e3;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.rank-row.best {
  background: #fff2ea;
  border: 1px solid var(--accent-border);
  padding: 14px 12px;
  margin-bottom: 5px;
}
.rank-row.best + .rank-row { border-top: 0; }
.rank-top, .rank-left, .rank-price, .rank-bottom {
  display: flex;
  align-items: center;
}
.rank-top { justify-content: space-between; gap: 10px; }
.rank-left { min-width: 0; gap: 7px; flex-wrap: wrap; }
.rank-number {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.rank-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 230px;
}
.best-tag {
  color: var(--accent);
  background: #f8d7c7;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.63rem;
  font-weight: 700;
  white-space: nowrap;
}
.rank-price {
  gap: 3px;
  white-space: nowrap;
  color: var(--accent);
}
.rank-price strong {
  font-size: 1.22rem;
  letter-spacing: -0.05em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rank-price span {
  font-size: 0.72rem;
  color: #776e68;
}
.bar-track {
  height: 4px;
  background: #f2e8e2;
  margin: 11px 0 8px;
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  background: #d7b5a9;
  border-radius: 2px;
}
.best .bar-fill { background: var(--accent); }
.rank-bottom {
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  color: #776f68;
  font-size: 0.72rem;
  line-height: 1.45;
}
.total-info { color: #6e6761; }
.difference { font-weight: 600; color: #635b55; }
.compare-note {
  font-size: 0.75rem;
  color: #776f68;
  line-height: 1.55;
  margin: 10px 2px;
}

/* Result Actions */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.action-button, .danger-button {
  border: 1px solid #ded3cc;
  background: #ffffff;
  color: var(--dark);
  border-radius: 6px;
  min-height: 40px;
  padding: 0 15px;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.15s ease;
}
.action-button:hover { background: #fff2ea; }
.result-actions .action-button:first-child {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.result-actions .action-button:first-child:hover { background: var(--accent-hover); }
.text-button {
  border: 0;
  background: none;
  color: #807873;
  font-size: 0.75rem;
  padding: 0 8px;
  min-height: 40px;
}
.text-button:hover { text-decoration: underline; }
.action-status {
  font-size: 0.75rem;
  color: var(--accent);
  min-height: 18px;
  margin-top: 6px;
}

/* Guide Section */
.guide {
  margin-top: clamp(48px, 6vw, 90px);
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
}
.guide h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  margin-top: 8px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 26px;
}
.guide-grid > div {
  border-top: 1px solid #e7d8ce;
  padding-top: 14px;
}
.guide-number {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
}
.guide h3 {
  font-size: 0.94rem;
  margin: 8px 0;
}
.guide p {
  color: #716964;
  line-height: 1.62;
  font-size: 0.82rem;
  letter-spacing: -0.015em;
}

/* FAQ Section */
.faq-section {
  padding: 32px 0 54px;
  border-top: 1px solid var(--line);
}
.faq-head h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  margin-top: 8px;
}
.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.faq-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.faq-item[open] {
  border-color: #dfcfbe;
}
.faq-question {
  list-style: none;
  padding: 14px 18px;
  font-size: 0.89rem;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fffdfa;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '＋';
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 400;
}
.faq-item[open] .faq-question::after {
  content: '−';
}
.faq-answer {
  padding: 0 18px 16px;
  background: #fffdfa;
}
.faq-answer p {
  font-size: 0.83rem;
  line-height: 1.65;
  color: #635b56;
}
.faq-answer code {
  background: #f2e9e2;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--accent);
}

/* Footer */
.site-footer {
  min-height: 68px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #8c847e;
  font-size: 0.72rem;
  padding: 16px 0;
  flex-wrap: wrap;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-title {
  font-weight: 700;
  color: var(--accent);
}
.footer-desc { color: #8c847e; }
.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #665f5a;
  font-size: 0.72rem;
  text-decoration: underline;
  cursor: pointer;
}
.footer-link-btn:hover { color: var(--accent); }
.footer-link {
  color: #665f5a;
  text-decoration: underline;
}
.footer-link:hover { color: var(--accent); }
.footer-sep { color: #d0c5bc; }

/* Dialogs */
.reset-dialog, .privacy-dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(54, 36, 27, 0.22);
}
.reset-dialog::backdrop, .privacy-dialog::backdrop {
  background: rgba(40, 27, 22, 0.72);
  backdrop-filter: blur(2px);
}
.reset-dialog {
  max-width: 350px;
  width: calc(100% - 32px);
}
.reset-dialog h2 { font-size: 1.12rem; }
.reset-dialog p {
  font-size: 0.82rem;
  color: #706b67;
  margin: 10px 0 22px;
  line-height: 1.5;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.danger-button {
  background: #9e3124;
  color: #ffffff;
  border-color: #9e3124;
}

/* Privacy Modal */
.privacy-dialog {
  max-width: 600px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow-y: auto;
}
.privacy-content { display: flex; flex-direction: column; }
.privacy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.close-modal-btn {
  background: none;
  border: 0;
  font-size: 1.2rem;
  color: #8c827c;
  cursor: pointer;
  padding: 4px 8px;
}
.close-modal-btn:hover { color: var(--accent); }
.privacy-body h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 14px 0 6px;
  color: var(--dark);
}
.privacy-body p {
  font-size: 0.81rem;
  line-height: 1.65;
  color: #635b56;
}
.privacy-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* Responsive */
@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .intro { padding-bottom: 36px; }
  .guide { margin-top: 54px; }
}

@media (max-width: 640px) {
  .site-shell { padding: 0 15px; }
  .site-header { height: 60px; }
  .header-note { display: none; }
  .brand { font-size: 1rem; }
  .preset-bar { padding: 8px 10px; }
  .product-card { padding: 14px 12px 10px; }
  .mini-count { width: 95px; }
  .rank-price strong { font-size: 1.08rem; }
  .rank-name { max-width: 150px; }
  .guide-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 20px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .result-actions .text-button { margin-left: auto; }
}

@media (max-width: 370px) {
  .section-caption { display: none; }
  .rank-top { align-items: flex-start; }
  .rank-price { flex-direction: column; align-items: flex-end; }
  .rank-name { max-width: 120px; }
  .mini-count { width: 85px; }
}

/* Readable product → option hierarchy */
.site-shell { max-width: 1380px; }
.preset-bar { padding: 14px 16px; gap: 12px; margin-bottom: 42px; }
.preset-label { font-size: 0.88rem; }
.preset-chips { gap: 8px; }
.restore-chip { min-height: 36px; padding: 7px 13px; font-size: 0.82rem; }
.workspace { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(28px, 3.5vw, 52px); }
.section-head { min-height: 74px; }
.section-head h2 { font-size: 1.5rem; }
.section-caption { font-size: 0.82rem; }
.product-list { gap: 22px; }
.product-card { padding: 24px 26px 22px; border-radius: 12px; box-shadow: none; }
.card-head { margin-bottom: 22px; }
.card-title-wrap { gap: 12px; }
.card-badge { width: 34px; height: 34px; font-size: 0.92rem; }
.prod-name-input { height: 44px; font-size: 1.1rem; padding: 0 10px; }
.prod-delete-btn { min-height: 40px; padding: 6px 10px; font-size: 0.84rem; }
.spec-line { background: transparent; border: 0; border-radius: 0; padding: 0; margin-bottom: 4px; gap: 8px; flex-wrap: wrap; }
.spec-label { width: 100%; font-size: 0.87rem; color: var(--dark); }
.spec-amount-input { height: 44px; min-width: 0; font-size: 1rem; padding: 0 12px; }
.spec-unit-select { width: 94px; height: 44px; font-size: 0.96rem; padding: 0 10px; }
.card-hint { min-height: 0; margin: 0; font-size: 0.82rem; }
.card-hint:empty, .opt-hint:empty { display: none; }
.options-wrap { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); gap: 0; }
.options-heading { font-size: 0.9rem; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.opt-row { padding: 16px 0 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.opt-row:hover { border-color: var(--line); }
.opt-head { min-height: 32px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.opt-title { font-size: 0.86rem; color: #655c56; }
.opt-main-line { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 12px; }
.mini-field { display: block; width: auto; }
.mini-count, .mini-price { width: auto; flex: none; }
.mini-label { display: block; margin-bottom: 7px; color: #5e5651; font-size: 0.82rem; font-weight: 600; }
.mini-field input { height: 44px; padding: 0 37px 0 12px; background: #fff; font-size: 1rem; }
.mini-suffix { top: 37px; right: 12px; font-size: 0.86rem; }
.opt-del-btn { width: 38px; height: 38px; font-size: 0.92rem; }
.opt-extra-details { border-top: 0; margin-top: 8px; padding-top: 0; }
.opt-extra-details summary { min-height: 38px; display: flex; align-items: center; color: #6d625c; font-size: 0.83rem; }
.opt-extra-grid { gap: 12px; padding: 10px 0 2px; }
.extra-field { gap: 6px; }
.extra-label { font-size: 0.81rem; }
.extra-field input { height: 42px; font-size: 0.94rem; padding: 0 11px; }
.opt-hint { min-height: 0; margin-top: 6px; font-size: 0.8rem; }
.opt-add-btn { margin-top: 18px; height: 44px; font-size: 0.9rem; background: #fff; }
.add-button { margin-top: 18px; height: 52px; font-size: 0.94rem; }
.empty-state { min-height: 260px; }
.empty-state p { font-size: 0.9rem; }
.result-summary { font-size: 0.86rem; }
.result-group { padding: 22px; border-radius: 12px; box-shadow: none; }
.group-head h3 { font-size: 1.14rem; }
.base-label { font-size: 0.82rem; }
.base-select { font-size: 0.9rem; }
.insight-banner { padding: 14px 16px; }
.insight-lead { font-size: 0.96rem; }
.insight-sub { font-size: 0.83rem; line-height: 1.5; }
.rank-row { padding: 16px 8px; }
.rank-row.best { padding: 18px 14px; }
.rank-name { max-width: none; white-space: normal; font-size: 0.98rem; }
.rank-price strong { font-size: 1.32rem; }
.rank-bottom { font-size: 0.8rem; }
.action-button, .danger-button { min-height: 44px; font-size: 0.86rem; }
.text-button, .prod-delete-btn, .restore-chip, .footer-link-btn { min-height: 44px; }
.opt-del-btn, .close-modal-btn { width: 44px; height: 44px; }
.opt-extra-details summary { min-height: 44px; }

@media (max-width: 1080px) {
  .workspace { grid-template-columns: 1fr; gap: 44px; }
  .entry-section, .result-section { min-width: 0; }
}

@media (max-width: 640px) {
  .site-shell { padding: 0 16px; }
  .intro { padding: 28px 0 24px; text-align: left; }
  .eyebrow { margin-bottom: 12px; }
  #page-title { font-size: 2.15rem; line-height: 1.28; text-align: left; }
  .intro p { font-size: 0.95rem; line-height: 1.65; margin-top: 12px; text-align: left; }
  .preset-bar { padding: 12px; margin-bottom: 30px; }
  .preset-header-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .preset-disclaimer { width: 100%; font-size: 0.7rem; }
  .preset-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .preset-chip { min-height: 48px; width: 100%; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
  .preset-chip-title { font-size: 0.80rem; }
  .preset-chip-desc { font-size: 0.67rem; }
  .section-head { min-height: 70px; }
  .section-head h2 { font-size: 1.3rem; }
  .section-caption { display: none; }
  .product-card { padding: 20px 16px; }
  .card-head { gap: 6px; margin-bottom: 18px; }
  .card-title-wrap { gap: 8px; }
  .card-badge { width: 30px; height: 30px; }
  .prod-name-input { font-size: 1rem; }
  .options-wrap { margin-top: 24px; padding-top: 18px; }
  .opt-main-line { gap: 9px; }
  .mini-field input { font-size: 0.94rem; }
  .result-group { padding: 18px 15px; }
  .rank-top { align-items: flex-start; flex-direction: column; }
  .rank-price { align-self: flex-end; }
}

/* Mobile input and result navigation */
.opt-head { gap: 10px; }
.opt-name-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid #e2d8cf;
  border-radius: 5px;
  background: #fff;
  color: var(--dark);
  padding: 0 11px;
  font-size: 0.88rem;
  font-weight: 500;
}
.opt-name-input::placeholder { color: #887e76; }
.opt-name-input:focus { border-color: var(--accent); }
.opt-extra-details summary { gap: 8px; flex-wrap: wrap; }
.opt-extra-details summary::before {
  content: '＋';
  font-size: 1rem;
  line-height: 1;
  color: var(--accent);
}
.opt-extra-details[open] summary::before { content: '−'; }
.opt-extra-label { font-weight: 700; }
.opt-extra-status {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.opt-extra-grid { animation: reveal-settings 180ms ease-out; }
.opt-extra-help { grid-column: 1 / -1; color: #756b64; font-size: 0.78rem; line-height: 1.45; }
@keyframes reveal-settings {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .opt-extra-grid { animation: none; }
}
.mobile-nav-button { display: none; }
.rank-name, .insight-lead, .insight-sub, .rank-bottom { overflow-wrap: anywhere; }
.rank-price { min-width: 0; max-width: 100%; }
.rank-price strong { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .mobile-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    background: none;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
  }
  .mobile-jump-top, .mobile-return { padding: 0 2px; }
  .mobile-jump-bottom {
    width: 100%;
    margin-top: 10px;
    border: 1px solid var(--accent-border);
    border-radius: 6px;
    background: #fff8f4;
  }
  .section-head h2 { scroll-margin-top: 14px; }
  .opt-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
  .opt-title { white-space: nowrap; font-size: 0.84rem; }
  .opt-del-btn { margin-left: auto; }
  .opt-name-wrap {
    width: 100%;
    flex-basis: 100%;
    order: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
  }
  .opt-name-label {
    font-size: 0.76rem;
    color: #655c56;
    white-space: nowrap;
  }
  .opt-name-input { font-size: 0.83rem; height: 40px; }
  .opt-extra-status { font-size: 0.75rem; }
  .insight-sub { font-size: 0.87rem; }
  .rank-bottom { font-size: 0.85rem; }
  .rank-price strong { font-size: clamp(1.08rem, 5vw, 1.32rem); }
  .rank-price { white-space: normal; text-align: right; }
  .hero-insight-card { padding: 14px 14px; }
  .hero-title { font-size: 1.15rem; }
  .hero-price-val { font-size: 1.35rem; }
  .hero-comp-line { font-size: 0.88rem; }
  .hero-savings-line { font-size: 0.82rem; }
  .product-bests-grid { grid-template-columns: 1fr; }
  .result-subhead { font-size: 0.84rem; }
}

/* Hero Card Additional Info (추가 정보: 타 쇼핑몰 최저 옵션 대비) */
.hero-extra-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #eedcd2;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero-extra-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #7b6f66;
  letter-spacing: 0.02em;
}
.hero-extra-line {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  overflow-wrap: anywhere;
}

/* Result Subhead Caption */
.result-subhead-desc {
  font-size: 0.8rem;
  color: #7a7068;
  margin: -6px 0 14px 0;
  line-height: 1.4;
}

