:root {
  --bg: #fffaf7;
  --surface: #ffffff;
  --soft: #fbefea;
  --ink: #2b1d1a;
  --muted: #7a6560;
  --line: #efdcd5;
  --rose: #c2577a;
  --rose-d: #9e3d5f;
  --gold: #b8873b;
  --good: #2f7d5b;
  --good-bg: #edf7f1;
  --warn: #a35a1d;
  --warn-bg: #fdf3e8;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(120, 60, 50, 0.08);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
img { max-width: 100%; }
a { color: var(--rose-d); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { margin: 1.2em 0 .4em; font-size: 1rem; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.fine { font-size: .8rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--rose); font-weight: 600; margin: 0 0 .5em; }
.section { padding: 64px 0; }
.section-alt { background: var(--soft); }
.section-head { max-width: 680px; margin-bottom: 28px; }

/* header */
#site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 250, 247, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo-dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f7c6d4, var(--rose)); }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { border-color: var(--rose); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; font-size: 1.2rem; padding: 4px 10px; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  #site-header.open .nav { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px; border-radius: 999px; font: 600 .92rem var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: .15s; }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-d); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--rose); color: var(--rose-d); }
.btn-store { background: var(--ink); color: #fff; flex: 1 1 180px; }
.btn-store:hover { background: var(--rose-d); }

/* hero */
.hero { overflow: hidden; padding: 64px 0 48px;background: radial-gradient(ellipse at 85% 10%, #fbdde6 0, transparent 55%), radial-gradient(ellipse at 0% 100%, #fbe9d8 0, transparent 50%); }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.hero-points { display: flex; gap: 18px; flex-wrap: wrap; padding: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.hero-points li::before { content: "✓ "; color: var(--good); font-weight: 700; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.hero-art .ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#f3d9c6, #e8c4a6, #d6a77f, #bf8b62, #f3d9c6); filter: saturate(1.05); }
.hero-art .ring::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: var(--bg); }
.hero-art .label { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .85rem; box-shadow: var(--shadow); }
.hero-art .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-family: var(--serif); font-size: 1.3rem; padding: 26%; }
@media (max-width: 820px) { .hero-in { grid-template-columns: 1fr; } .hero-art { max-width: 300px; } }

/* type / tone cards */
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.type-card, .tone-chip { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: .15s; }
.type-card:hover, .tone-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--rose); }
.type-card .ico { font-size: 1.8rem; }
.type-card small, .tone-chip small { color: var(--muted); }
.type-card .go { margin-top: auto; padding-top: 8px; color: var(--rose-d); font-weight: 600; font-size: .9rem; }
.tone-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .type-grid, .tone-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .type-grid, .tone-grid { grid-template-columns: 1fr; } }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(0, 0, 0, .08); }
.dot.big { width: 28px; height: 28px; vertical-align: middle; }

/* quiz */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.quiz fieldset { border: 0; padding: 0; margin: 0 0 26px; }
.quiz legend { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; }
.quiz legend small { font-family: var(--sans); font-size: .85rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.opts.three { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .opts, .opts.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .opts, .opts.three { grid-template-columns: 1fr; } }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.opt > span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; transition: .15s; }
.opt small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.opt input:checked + span { border-color: var(--rose); background: #fff3f6; box-shadow: 0 0 0 3px rgba(194, 87, 122, .12); }
.opt input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--rose); }

/* product cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .15s; }
.card:hover { box-shadow: var(--shadow); }
.art { position: relative; height: 130px; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.art-brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: rgba(43, 29, 26, .82); }
.art-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(43, 29, 26, .6); }
.art-swatch { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 0; }
.brand { color: var(--rose-d); }
.meta { color: var(--muted); font-size: .85rem; margin: 0; }
.shade { font-size: .87rem; margin: 0; background: var(--soft); padding: 6px 10px; border-radius: 10px; }
.benefit { font-size: .88rem; margin: 0; color: var(--good); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.price { font-weight: 700; }
.lw { font-size: .8rem; color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.lw-label { color: var(--muted); letter-spacing: 0; margin-right: 4px; }
.lw-off { color: #e8dcd2; }
.card .btn-ghost { width: 100%; font-size: .85rem; padding: 9px 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .72rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.chip-oily { background: #e6f2fb; color: #2b6a99; }
.chip-dry { background: #fbf0e3; color: #95601f; }
.chip-normal { background: #fbe9ef; color: #a2416a; }
.chip-sensitive { background: #eaf5ec; color: #2f7d4a; }
.chip-hair { background: #f1eafb; color: #6a3fa0; }
.chip-body { background: #e9f4f6; color: #22707c; }
.hb-result:not(:empty) { margin-top: 28px; }
.result-head h3 { font-size: 1.5rem; }

/* shop */
.shop-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; background: var(--surface); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.filters label.check { flex-direction: row; font-size: .9rem; color: var(--ink); padding-bottom: 8px; }
.filters select { font: .92rem var(--sans); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-width: 150px; }
@media (max-width: 600px) { .filters label:not(.check) { flex: 1 1 45%; } .filters select { min-width: 0; width: 100%; } }
.tip-bar { background: #fff3f6; border-left: 4px solid var(--rose); padding: 12px 16px; border-radius: 10px; margin-bottom: 24px; font-size: .93rem; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px; }

/* dialog */
dialog#product-dialog { border: 0; padding: 0; border-radius: 22px; max-width: 760px; width: calc(100% - 24px); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(43, 29, 26, .45); }
.dlg { position: relative; }
.dlg .art { height: 150px; }
.dlg-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 1.4rem; cursor: pointer; }
.dlg-body { padding: 22px 26px 26px; }
.dlg-body h2 { font-family: var(--sans); font-size: 1.35rem; font-weight: 700; margin: 8px 0 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } .dlg-body { padding: 18px; } }
.box { border-radius: 14px; padding: 4px 16px 10px; }
.box ul { padding-left: 18px; margin: 0; font-size: .92rem; }
.box li { margin-bottom: 4px; }
.box-good { background: var(--good-bg); }
.box-good h4 { color: var(--good); }
.box-warn { background: var(--warn-bg); }
.box-warn h4 { color: var(--warn); }
.shades { width: 100%; border-collapse: collapse; font-size: .92rem; }
.shades td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.shades tr.hl td { background: #fff3f6; font-weight: 600; }
.buy { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* routine */
.routine-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.routine-head h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.head-actions { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 700px) { .head-actions { flex-direction: row; flex-wrap: wrap; } }
.undertone { background: var(--surface); border: 1px dashed var(--gold); padding: 10px 14px; border-radius: 12px; font-size: .93rem; max-width: 640px; }
.tips-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 28px; }
.tips-box ul { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.tips-box li { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 700px) { .tips-box ul { columns: 1; } }
.routine-sec { margin-bottom: 36px; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.step.skipped { opacity: .75; background: transparent; border-style: dashed; }
.step-n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--rose-d); display: grid; place-items: center; font-weight: 700; }
.step-main { flex: 1; min-width: 0; }
.step h4 { margin: 4px 0 8px; }
.pick { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pick > div:first-child { flex: 1 1 300px; }
.pick .shade { margin: 6px 0; display: inline-block; }
.why { color: var(--good); font-size: .9rem; }
.watch { color: var(--warn); font-size: .9rem; }
.pick-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 600px) { .pick-side { align-items: flex-start; } }
.alts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.alts-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.alt-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font: .84rem var(--sans); color: var(--ink); cursor: pointer; text-align: left; }
.alt-chip:hover { border-color: var(--rose); }
.alt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.alt-price { font-weight: 700; white-space: nowrap; }
.tier { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.tier-budget { background: #e8f5ee; color: #2f7d5b; }
.tier-mid { background: #fff1dc; color: #95601f; }
.tier-premium { background: #f3e6f7; color: #7a3b8f; }
@media (max-width: 600px) { .alt-name { max-width: 160px; } }

/* brands */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.brand-chip { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: .15s; }
.brand-chip:hover { border-color: var(--rose); box-shadow: var(--shadow); }
.brand-chip b { font-family: var(--serif); font-size: 1.1rem; }
.brand-chip small { color: var(--muted); }
.brand-chip.featured { background: linear-gradient(135deg, #fff3f6, #fde8ef); border-color: #f2c4d3; }
.total { font-size: 1.05rem; background: var(--soft); padding: 14px 18px; border-radius: 12px; }
.empty-state { text-align: center; padding: 60px 20px; }

/* guides */
.guide-nav { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 0; }
.guide-nav a { text-decoration: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .9rem; }
.guide-nav a:hover { border-color: var(--rose); }
.prose { max-width: 760px; }
.prose p, .prose li { color: #3e2e2a; }
.guide-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 20px; scroll-margin-top: 80px; }
.guide-card h3 { display: flex; align-items: center; gap: 10px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .cols { grid-template-columns: 1fr; } .guide-card { padding: 20px; } }
.cols ul { padding-left: 18px; }
.do h4 { color: var(--good); }
.dont h4 { color: var(--warn); }
.anchor { scroll-margin-top: 80px; }
.tone-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.tone-table th, .tone-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tone-table th { background: var(--soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.steps-num { counter-reset: s; list-style: none; padding: 0; }
.steps-num li { counter-increment: s; position: relative; padding: 0 0 14px 44px; }
.steps-num li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--rose); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: #3e2e2a; }

/* footer */
#site-footer { background: #2b1d1a; color: #e9dcd7; padding: 48px 0 24px; margin-top: 40px; }
#site-footer .logo { color: #fff; }
#site-footer .muted, #site-footer .fine { color: #b9a6a0; }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.footer-in h4 { color: #fff; margin-top: 0; }
.footer-in a { display: block; color: #e9dcd7; text-decoration: none; font-size: .9rem; margin-bottom: 6px; }
.footer-in a:hover { color: #f7c6d4; }
@media (max-width: 800px) { .footer-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-in { grid-template-columns: 1fr; } }
.fine a { color: inherit; }

/* brand-site buy button */
.btn-store.btn-brand { background: var(--rose); }
.btn-store.btn-brand:hover { background: var(--rose-d); }

/* link export (links.html) */
.links-table { width: 100%; border-collapse: collapse; font-size: .85rem; background: var(--surface); }
.links-table th, .links-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.links-table th { background: var(--soft); }
.links-table td.url { word-break: break-all; max-width: 420px; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.status { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.status b { display: block; }
.status.on { border-color: #9fd3b8; background: var(--good-bg); }
.status.off { border-color: #f1cfae; background: var(--warn-bg); }
