/* =====================================================================
   FRIDAY FIT PRO — Editorial UI
   데일리(아이보리 에디토리얼) / VIP(옵시디언 & 골드) 두 테마를 토큰으로 전환
   ===================================================================== */
:root {
  --bg: #F6F3EE;
  --surface: #FFFFFF;
  --surface-2: #FAF8F4;
  --ink: #17171A;
  --ink-2: #3A3835;
  --muted: #77716A;
  --line: #E7E1D7;
  --accent: #9A7B4F;
  --accent-ink: #FFFFFF;
  --accent-soft: #F2EADD;
  --good: #2E7A58;
  --good-soft: #E6F2EC;
  --warn: #B0533A;
  --warn-soft: #F8E9E3;
  --figure-bg: #F1ECE4;
  --shadow: 0 1px 2px rgba(23, 23, 26, .04), 0 8px 28px -14px rgba(23, 23, 26, .14);
  --radius: 16px;
  --serif: "Playfair Display", "Noto Serif KR", Georgia, serif;
  --serif-ko: "Noto Serif KR", "Playfair Display", Georgia, serif;
  --sans: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
body[data-mode="vip"] {
  --bg: #0E0E11;
  --surface: #16161B;
  --surface-2: #1C1C23;
  --ink: #F3EEE6;
  --ink-2: #D9D3C9;
  --muted: #A39E95;
  --line: #2B2B34;
  --accent: #C8A97E;
  --accent-ink: #141417;
  --accent-soft: #2A251D;
  --good: #6FC79B;
  --good-soft: #17271F;
  --warn: #E58E73;
  --warn-soft: #2C1C17;
  --figure-bg: #ECE6DC;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.kicker {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.muted { color: var(--muted); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand h1 { font-family: var(--serif); font-size: 26px; margin: 0; letter-spacing: -.01em; }
.brand .edition { font-size: 10px; letter-spacing: .24em; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 12px; }
.nav button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--muted);
}
.nav button.on { background: var(--ink); color: var(--bg); }
.nav .badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; }
.update-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
/* ---------------- News ticker ---------------- */
.newsbar { border-top: 1px solid var(--line); background: var(--surface-2); }
.newsbar[hidden] { display: none; }
.newsbar-inner { max-width: 1320px; margin: 0 auto; padding: 0 20px; height: 38px; display: flex; align-items: center; gap: 12px; }
.news-label { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--accent); padding-right: 12px; border-right: 1px solid var(--line); }
.news-viewport { flex: 1; min-width: 0; height: 100%; position: relative; overflow: hidden; }
.news-item {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; min-width: 0;
  color: var(--ink-2); text-decoration: none; font-size: 13px; transition: transform .45s ease, opacity .45s ease;
}
.news-item.enter { transform: translateY(100%); opacity: 0; }
.news-item.leave { transform: translateY(-100%); opacity: 0; }
.news-item:hover .news-title, .news-item:focus-visible .news-title { text-decoration: underline; color: var(--ink); }
.news-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.news-tag { flex: none; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.news-tag.mine { background: var(--ink); color: var(--bg); }
.news-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.news-meta { flex: none; font-size: 11.5px; color: var(--muted); }
.news-ctrl { flex: none; display: flex; align-items: center; gap: 2px; }
.news-btn { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; }
.news-btn:hover { background: var(--line); color: var(--ink); }
.news-all { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 8px; font-size: 12px; padding: 4px 9px; margin-left: 4px; }
.news-all:hover { border-color: var(--accent); color: var(--accent); }
.news-list { display: grid; gap: 2px; }
.news-list h4 { margin: 14px 0 6px; font-size: 12px; letter-spacing: .08em; color: var(--accent); }
.news-list h4:first-child { margin-top: 0; }
.news-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.news-row:hover { background: var(--surface-2); }
.news-row .news-title { white-space: normal; font-size: 14px; }
.news-row .news-meta { grid-column: 2; }
.news-row .news-tag { align-self: start; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .news-item { transition: none; } }

.update-pill { margin-left: auto; }
.app-actions { display: flex; gap: 6px; }
.app-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; transition: border-color .15s, color .15s, background .15s;
}
.app-btn:hover { border-color: var(--accent); color: var(--accent); }
.app-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#btnInstall { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#btnInstall:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#btnInstall.ready { box-shadow: 0 0 0 3px var(--accent-soft); }
#btnInstall[hidden] { display: none; }
.app-btn .fs-out { display: none; }
.app-btn[aria-pressed="true"] .fs-in { display: none; }
.app-btn[aria-pressed="true"] .fs-out { display: inline; }
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: window-controls-overlay) {
  #btnInstall { display: none; }
}
.install-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.6; }
.install-steps code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; }
.update-pill i { width: 7px; height: 7px; border-radius: 50%; background: #2fb37a; display: inline-block; box-shadow: 0 0 0 3px rgba(47, 179, 122, .15); }

main { max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px; }

/* ---------------- Studio layout ---------------- */
.studio { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
.panel { position: sticky; top: calc(var(--header-h, 64px) + 12px); max-height: calc(100vh - var(--header-h, 64px) - 28px); overflow: auto; padding: 18px; }
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.mode-switch button { border: 0; background: transparent; border-radius: 9px; padding: 9px 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
.mode-switch button.on { background: var(--ink); color: var(--bg); }
body[data-mode="vip"] .mode-switch button.on { background: var(--accent); color: var(--accent-ink); }
.mode-switch small { display: block; font-weight: 400; font-size: 10.5px; opacity: .75; }

.field { margin-bottom: 16px; }
.field > label, .field-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.field-label b { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink); font-weight: 600; }
.seg { display: grid; gap: 6px; }
.seg.c2 { grid-template-columns: repeat(2, 1fr); }
.seg.c3 { grid-template-columns: repeat(3, 1fr); }
.seg.c4 { grid-template-columns: repeat(4, 1fr); }
.chip {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 8px 6px;
  font-size: 13px; font-weight: 500; text-align: center; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
body[data-mode="vip"] .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip small { display: block; font-size: 10.5px; opacity: .7; font-weight: 400; }
.tpo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tpo-grid .chip { padding: 9px 4px; }
.tpo-grid .chip span { display: block; font-size: 18px; line-height: 1.2; }

.input, select.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 13px;
}
.row2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 6px; }
.weather-card {
  margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2);
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
}
.weather-card .wx-ico { font-size: 26px; }
.weather-card strong { font-size: 15px; }
.weather-card .src { font-size: 11px; color: var(--muted); }
.btn-ghost {
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 6px 10px; font-size: 12px; font-weight: 600;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.manual { margin-top: 8px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.budget-row { display: flex; align-items: flex-start; gap: 12px; }
.budget-slider { flex: 1; min-width: 0; }
.budget-row.is-max .budget-slider { opacity: .35; }
.max-chip { flex: none; margin-top: -2px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 700 12px/1 var(--sans, inherit); letter-spacing: .12em; cursor: pointer; transition: all .15s; }
.max-chip:hover { border-color: #B8964F; color: #B8964F; }
.max-chip.on { background: #1E1E20; color: #D8B970; border-color: #1E1E20; box-shadow: 0 0 0 2px rgba(216, 185, 112, .35); }
.max-note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.cold-hint.max .ico { color: #B8964F; }
.range-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 6px 9px; font-size: 12px; font-weight: 600; }
.toggle.on { background: #2B5D86; color: #fff; border-color: #2B5D86; }

.vip-block { position: relative; border-top: 1px dashed var(--line); padding-top: 16px; margin-top: 4px; }
.vip-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.vip-title strong { font-family: var(--serif); font-size: 15px; }
.vip-lock {
  position: absolute; inset: 40px 0 0 0; display: grid; place-items: center; text-align: center;
  background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(3px); border-radius: 12px; padding: 16px;
}
.vip-lock p { margin: 6px 0 10px; font-size: 12.5px; color: var(--ink-2); }
.btn-primary {
  border: 0; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 12px 16px; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .1s, background .2s;
}
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-primary:active { transform: translateY(1px); }
body[data-mode="vip"] .btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-gold { border: 0; background: linear-gradient(135deg, #C8A97E, #E5CFAF); color: #141417; border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 13px; }
.btn-block { width: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.swatches button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); padding: 0; }
.swatches button.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 500; }
.switch button { width: 42px; height: 24px; border-radius: 12px; border: 0; background: var(--line); position: relative; flex-shrink: 0; }
.switch button::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch button.on { background: var(--accent); }
.switch button.on::after { transform: translateX(18px); }
.anchor-box { margin-top: 10px; display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }

/* ---------------- Results ---------------- */
.results { display: grid; gap: 18px; min-width: 0; }
.brief { padding: 18px 20px; }
.brief h3 { margin: 4px 0 12px; font-size: 18px; font-family: var(--serif-ko); font-weight: 700; }
.brief-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.brief-grid > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.brief-grid b { font-size: 11px; letter-spacing: .06em; color: var(--accent); text-transform: uppercase; }
.brief-grid p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); }
.brief-grid ul { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--ink-2); }

.look-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.look-tab {
  display: grid; grid-template-columns: 64px 1fr; gap: 10px; text-align: left; padding: 10px 12px 10px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, transform .15s;
}
.look-tab:hover { border-color: var(--accent); }
.look-tab.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset, var(--shadow); }
body[data-mode="vip"] .look-tab.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.look-tab .mini { background: var(--figure-bg); border-radius: 10px; display: grid; place-items: center; overflow: hidden; height: 120px; }
.look-tab strong { display: block; font-size: 15px; margin-top: 2px; }
.look-tab em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.tab-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; font-weight: 600; }
.score-chip { display: inline-flex; align-items: baseline; gap: 2px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.score-chip small { font-size: 10px; font-weight: 500; }

.look { padding: 0; overflow: hidden; }
.look-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.figure-pane { background: var(--figure-bg); padding: 18px 16px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; border-right: 1px solid var(--line); color: #17171A; }
.figure-pane .ff-figure { width: 100%; max-width: 250px; height: auto; }
.figure-label { font-family: var(--serif); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #8a7a62; }
.palette { width: 100%; }
.palette-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.palette-bar span { display: block; height: 100%; }
.palette-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 11px; color: #4a453f; }
.palette-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }

.look-copy { padding: 22px 24px; min-width: 0; }
.look-copy h2 { font-family: var(--serif-ko); font-size: 26px; line-height: 1.3; margin: 6px 0 4px; letter-spacing: -.01em; }
.look-copy .headline { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 16px; }
.look-copy .pitch { margin: 10px 0 0; color: var(--ink-2); }
.score-row { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.ring { position: relative; width: 112px; height: 112px; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .val b { font-family: var(--serif); font-size: 34px; line-height: 1; display: block; }
.ring .val small { font-size: 10.5px; color: var(--muted); letter-spacing: .08em; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 82px 1fr 30px; gap: 8px; align-items: center; font-size: 12px; }
.bar .track { height: 7px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }
.bar .fill.lowv { background: var(--warn); }
.bar b { text-align: right; font-weight: 600; }

.why h4, .tips h4, .check h4, .section-title { font-size: 13px; letter-spacing: .04em; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.why ul, .check ul, .tips ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.why li, .check li {
  display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: start; font-size: 13px; line-height: 1.5;
  padding: 8px 10px; border-radius: 10px; background: var(--good-soft);
}
.check li { background: var(--warn-soft); }
.tag { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); white-space: nowrap; }
.check .tag { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.check { margin-top: 14px; }

.items { border-top: 1px solid var(--line); padding: 18px 24px 6px; }
.items ol { list-style: none; margin: 0; padding: 0; }
.item-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.item-row:last-child { border-bottom: 0; }
.item-ico { width: 56px; height: 56px; border-radius: 12px; background: var(--figure-bg); display: grid; place-items: center; color: #17171A; }
.item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.item-top .slot { font-family: var(--serif); letter-spacing: .12em; text-transform: uppercase; font-size: 10.5px; color: var(--accent); font-weight: 700; }
.item-top .brandname { font-weight: 700; }
.tier { font-size: 10px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tier.t-프리미엄 { color: var(--accent); border-color: var(--accent); }
.tier.t-럭셔리 { background: #1E1E20; color: #D8B970; border-color: #1E1E20; letter-spacing: .04em; }
.ref-price { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.cold-hint { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, #7FA6D6 9%, transparent); }
.cold-hint .ico { font-size: 18px; line-height: 1; color: #5E86B8; }
.cold-hint p { margin: 0; flex: 1; font-size: 13px; line-height: 1.55; }
.cold-hint .btn-ghost { white-space: nowrap; }
.cold-hint.lux { border-color: var(--accent); }
@media (max-width: 640px) { .cold-hint { flex-wrap: wrap; } }
.tier.t-소장품 { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.item-name { font-size: 14.5px; font-weight: 600; margin: 2px 0; }
.item-attr { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); vertical-align: -1px; margin-right: 3px; }
.dots { letter-spacing: 1px; color: var(--accent); }
.role { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-left: 2px solid var(--accent); padding: 6px 10px; border-radius: 0 8px 8px 0; }
.item-side { text-align: right; display: grid; gap: 8px; justify-items: end; }
.price s { color: var(--muted); font-size: 11.5px; }
.price .disc { color: #C2410C; font-size: 12px; font-weight: 700; margin-left: 4px; }
body[data-mode="vip"] .price .disc { color: var(--good); }
.price strong { display: block; font-size: 15px; }
.item-btns { display: flex; gap: 6px; }
.item-btns a { text-decoration: none; }

.look-foot { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; padding: 18px 24px 24px; border-top: 1px solid var(--line); }
.tips li { font-size: 13px; padding-left: 18px; position: relative; color: var(--ink-2); }
.tips li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); font-size: 11px; top: 2px; }
.invoice { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface-2); }
.inv-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin: 3px 0; }
.inv-row.save { color: var(--good); }
.inv-total { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 10px; }
.inv-total b { font-family: var(--serif); font-size: 26px; }
.meter { margin: 8px 0; }
.meter .lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.meter .track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; display: flex; }
.meter .track span { display: block; height: 100%; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.actions .btn-primary { grid-column: 1 / -1; }

.atelier { margin: 0 24px 24px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 14px; padding: 16px; background: linear-gradient(135deg, var(--accent-soft), transparent 70%); }
.atelier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.atelier-grid div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); }
.atelier-grid b { display: block; font-size: 11px; color: var(--accent); letter-spacing: .06em; margin-bottom: 4px; }
.upsell { margin: 0 24px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px dashed var(--accent); border-radius: 14px; padding: 12px 16px; font-size: 13px; }

/* ---------------- Modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 12, .55); display: grid; place-items: center; padding: 16px; }
.modal-box { width: min(720px, 100%); max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.modal-head h3 { margin: 4px 0 0; font-size: 18px; }
.modal-body { padding: 10px 20px 16px; overflow: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); }
.alt { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.alt:last-child { border-bottom: 0; }
.alt .item-ico { width: 48px; height: 48px; }
.alt.current { opacity: .6; }
.alt-sep { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 14px; padding: 10px 0 6px; border-top: 2px solid var(--line); font-size: 12px; color: var(--muted); }
.alt-sep b { font-size: 13px; color: var(--ink); letter-spacing: .02em; }
.delta { font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.delta.up { background: var(--good-soft); color: var(--good); }
.delta.down { background: var(--warn-soft); color: var(--warn); }
.delta.eq { background: var(--surface-2); color: var(--muted); }
.link-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* ---------------- Toast ---------------- */
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 80; display: grid; gap: 8px; pointer-events: none; }
.toast div { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 12px; font-size: 13px; box-shadow: var(--shadow); animation: toastIn .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- Lookbook / Brands / Membership ---------------- */
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-family: var(--serif-ko); font-size: 26px; margin: 4px 0 0; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.lb-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.lb-card .fig { background: var(--figure-bg); display: grid; place-items: center; padding: 10px 0; }
.lb-card .meta { padding: 12px 14px; display: grid; gap: 4px; }
.lb-card .meta strong { font-size: 15px; }
.lb-card .meta small { color: var(--muted); }
.lb-card .acts { display: flex; gap: 6px; padding: 0 14px 14px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters .input { width: auto; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.plan.hl { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.plan h3 { margin: 0; font-family: var(--serif); font-size: 22px; }
.plan .price-tag { font-family: var(--serif); font-size: 30px; }
.plan .price-tag small { font-size: 13px; color: var(--muted); font-family: var(--sans); }
.plan ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; display: grid; gap: 4px; }
.method { margin-top: 22px; padding: 22px; }
.method ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.method b { color: var(--ink); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
  .brief-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .look-hero { grid-template-columns: 1fr; }
  .figure-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .look-foot { grid-template-columns: 1fr; }
  .look-tabs { grid-template-columns: 1fr; }
  .atelier-grid, .plans { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  main { padding: 14px 16px 40px; }
  .topbar-inner { padding: 10px 16px; }
  .nav { width: 100%; overflow-x: auto; }
  .nav button { padding: 7px 10px; white-space: nowrap; }
  .update-pill { display: none; }
  .brand small { display: none; }
  .brand h1 { font-size: 22px; }
  .app-actions { margin-left: auto; }
  .app-btn { padding: 0 10px; }
  .app-btn span { display: none; }
  .newsbar-inner { padding: 0 12px; gap: 8px; }
  .news-label, .news-meta, .news-btn { display: none; }
  .brief-grid { grid-template-columns: 1fr; }
  .look-copy, .items, .look-foot { padding-left: 16px; padding-right: 16px; }
  .atelier, .upsell { margin-left: 16px; margin-right: 16px; }
  .score-row { grid-template-columns: 1fr; justify-items: center; }
  .bars { width: 100%; }
  .item-row { grid-template-columns: 48px minmax(0, 1fr); }
  .item-ico { width: 48px; height: 48px; }
  .item-side { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; text-align: left; }
  .look-copy h2 { font-size: 22px; }
}

/* ---------------- Print (룩북 PDF) ---------------- */
@media print {
  body, body[data-mode="vip"] {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #111; --ink-2: #333; --muted: #666; --line: #ddd;
    --accent: #8a6d43; --good-soft: #fff; --warn-soft: #fff; --accent-soft: #fff;
    background: #fff;
  }
  .topbar, .panel, .look-tabs, .brief, .item-btns, .actions, .upsell, .toast, .modal, #view-lookbook, #view-brands, #view-plans { display: none !important; }
  main { padding: 0; max-width: none; }
  .studio { display: block; }
  .card { box-shadow: none; }
  .look { break-inside: avoid-page; }
  .figure-pane { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.item-main{min-width:0}
