:root {
  --page: #f5f6f7;
  --surface: #ffffff;
  --surface-soft: #fafbfb;
  --ink: #202326;
  --muted: #697078;
  --line: #e1e4e7;
  --accent: #d95b4b;
  --accent-dark: #ad3d31;
  --success: #327052;
  --naver-green: #00e66b;
  --shadow: 0 2px 10px rgba(28, 35, 42, .06);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; min-width: 320px; max-width: 100%; overflow-x: hidden; background: var(--page); line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(217, 91, 75, .55); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%); border-radius: 8px; background: var(--ink); padding: 10px 14px; color: white; }
.skip-link:focus { transform: translateY(0); }
.topbar { position: sticky; z-index: 50; top: 0; min-height: 68px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background-color: var(--surface); padding: 10px clamp(12px, 3vw, 36px); }
.site-menu { position: static; flex: 0 0 auto; }
.menu-toggle { width: 44px; min-height: 44px; display: inline-grid; place-content: center; gap: 4px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.menu-toggle:hover { background: var(--page); }
.menu-toggle span { width: 20px; height: 2px; display: block; border-radius: 2px; background: var(--ink); }
.menu-panel { position: absolute; z-index: 30; top: calc(100% + 8px); left: clamp(12px, 3vw, 36px); width: 210px; display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 30px rgba(28, 35, 42, .15); padding: 6px; }
.menu-panel a { min-height: 44px; display: flex; align-items: center; gap: 8px; border-radius: 7px; padding: 9px 12px; font-size: 14px; font-weight: 700; text-decoration: none; }
.menu-panel a:hover { background: var(--page); }
.topbar-home { width: 44px; height: 44px; display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; border-radius: 8px; font-size: 20px; text-decoration: none; }
.topbar-home:hover { background: var(--page); }
.complex-selector { position: relative; min-width: 0; flex: 1 1 auto; }
.complex-selector > summary { min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; border-radius: 8px; padding: 8px 28px 8px 10px; font-size: 14px; font-weight: 780; letter-spacing: -.025em; }
.complex-selector > summary::-webkit-details-marker { display: none; }
.complex-selector > summary::after { position: absolute; right: 10px; width: 7px; height: 7px; transform: translateY(-2px) rotate(45deg); border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); content: ""; }
.complex-selector[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.complex-selector > summary .complex-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo { width: 64px; max-width: 64px; height: 24px; display: inline-block; flex: 0 0 auto; background-position: center; background-repeat: no-repeat; background-size: contain; }
.brand-logo.brand-logo--lotte-castle { background-image: url("/static/brand-logos/lotte-castle.png"); }
.brand-logo.brand-logo--sk-view { background-image: url("/static/brand-logos/sk-view.svg"); }
.brand-logo.brand-logo--elife { background-image: url("/static/brand-logos/elife.png"); }
.complex-selector-panel { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: min(320px, calc(100vw - 28px)); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 30px rgba(28, 35, 42, .15); padding: 6px; }
.complex-selector:not([open]) .complex-selector-panel { display: none; }
.complex-selector-panel nav { display: grid; }
.complex-selector-panel a { min-height: 44px; display: flex; align-items: center; border-radius: 7px; padding: 9px 12px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.complex-selector-panel a:hover { background: var(--page); }
.complex-selector-panel a[aria-current="page"] { background: rgba(217, 91, 75, .11); color: var(--accent-dark); }
.button.naver-action { min-width: 44px; min-height: 44px; margin-left: auto; border-color: var(--naver-green); background: var(--naver-green); padding-inline: 10px; color: #fff; font-size: 18px; font-weight: 900; line-height: 1; white-space: nowrap; }
.button.naver-action:hover { border-color: #00cc5f; background: #00cc5f; }
.button.naver-action:focus-visible, .listing-naver-link:focus-visible { outline-color: #006b32; }

main { width: min(100%, 1240px); margin: 0 auto; padding: 24px clamp(14px, 3vw, 36px) 72px; }
main:focus { outline: 0; }
footer { padding: 22px clamp(14px, 3vw, 36px); color: var(--muted); font-size: 11px; }
footer p { width: min(100%, 1168px); margin: 0 auto; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; padding: 9px 15px; cursor: pointer; font-weight: 730; text-decoration: none; transition: background-color .16s ease, border-color .16s ease; }
.button-accent { border-color: var(--accent); background: var(--accent); color: white; }
.button-accent:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.button-ink { border-color: var(--ink); background: var(--ink); color: white; }
.button-quiet { background: var(--surface); color: var(--ink); }
.button.compact { min-height: 44px; font-size: 13px; }
.button.compact.naver-action { font-size: 18px; font-weight: 900; line-height: 1; }
.card, .dashboard-panel, .settings-section, .preview-head, .error-state { border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 6px; color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.045em; }
h2 { letter-spacing: -.03em; }

.notice { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); padding: 13px 16px; }
.notice.success { border-color: rgba(50, 112, 82, .4); color: var(--success); }
.notice.error { border-color: rgba(217, 91, 75, .45); color: var(--accent-dark); }

#dashboard-region { display: grid; gap: 14px; }
.dashboard-heading { display: flex; align-items: start; justify-content: space-between; gap: 28px; padding: 10px 2px 6px; }
.dashboard-heading-copy { min-width: 0; }
.dashboard-heading-copy > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.browser-refresh-form { display: grid; flex: 0 0 auto; justify-items: end; gap: 4px; }
.browser-refresh-form .button { min-height: 42px; }
.browser-refresh-form small { color: var(--muted); font-size: 10px; }
.filter-disclosure { overflow: clip; }
.filter-disclosure > summary { min-height: 60px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 18px; cursor: pointer; list-style: none; }
.filter-disclosure > summary::-webkit-details-marker { display: none; }
.filter-disclosure > summary > span:first-child { color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-disclosure > summary strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; text-align: right; }
.disclosure-mark { width: 9px; height: 9px; transform: rotate(45deg); border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transition: transform .15s ease; }
.filter-disclosure[open] .disclosure-mark { transform: rotate(225deg); }
.filter-panel { border-top: 1px solid var(--line); padding: 16px 18px 18px; }
.dashboard-filters { display: grid; gap: 14px; }
.filter-fields { display: grid; gap: 10px; }
.current-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-filters label, .settings-form > label { min-width: 0; color: var(--muted); font-size: 11px; font-weight: 720; }
.filter-fields label, .settings-form > label { display: grid; gap: 5px; }
.filter-fields select, .settings-form input, .settings-form select, .settings-form textarea { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #d7dade; border-radius: 8px; background: var(--surface); color: var(--ink); padding: 9px 11px; }
.boolean-chips, .event-chips, .filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.boolean-chips label { position: relative; }
.boolean-chips input { position: absolute; opacity: 0; pointer-events: none; }
.boolean-chips span, .event-chips button { min-height: 44px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 8px 12px; color: var(--muted); cursor: pointer; font-size: 12px; }
.boolean-chips input:checked + span, .event-chips button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: white; }
.boolean-chips input:focus-visible + span { outline: 3px solid rgba(217, 91, 75, .55); outline-offset: 3px; }
.filter-actions > a:not(.button) { min-height: 44px; display: inline-flex; align-items: center; padding: 8px; color: var(--muted); font-size: 12px; }
.filter-default-link { font-size: 12px; }

.empty-state { padding: clamp(24px, 5vw, 46px); }
.empty-state h2, .error-state h1 { margin: 0 0 12px; font-size: clamp(25px, 4vw, 38px); }
.empty-state p:not(.eyebrow), .error-state p:not(.eyebrow) { color: var(--muted); }

.display-tabs { display: flex; gap: 3px; overflow-x: auto; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); padding: 5px; scrollbar-width: thin; }
.display-tabs button { min-width: max-content; min-height: 50px; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); padding: 7px 14px; cursor: pointer; font-size: 13px; font-weight: 760; }
.tab-copy { display: grid; justify-items: start; line-height: 1.15; }
.tab-count { font-size: 10px; font-weight: 700; opacity: .72; }
.display-tabs button[aria-selected="true"] { background: rgba(217, 91, 75, .11); color: var(--accent-dark); }
[data-tab-panel][hidden] { display: none !important; }
.dashboard-panel { min-width: 0; padding: clamp(18px, 3vw, 28px); }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card-heading .eyebrow { margin-bottom: 4px; }
.card-heading h2, .card-heading h3 { margin: 0; font-size: clamp(20px, 3vw, 25px); }
.card-heading > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.period-control { display: grid; flex: 0 0 auto; justify-items: end; gap: 6px; }
.period-control label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 720; }
.period-control select, .period-control input { min-height: 44px; border: 1px solid #d7dade; border-radius: 8px; background: var(--surface); color: var(--ink); padding: 8px 10px; }
.period-control select { padding-right: 30px; }
.period-metadata { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: -8px 0 16px; color: var(--muted); font-size: 11px; }
.period-metadata span { display: block; }
.inventory-summary { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border-radius: 10px; background: var(--surface-soft); }
.inventory-summary div { padding: 14px; }
.inventory-summary div + div { border-left: 1px solid var(--line); }
.inventory-summary span, .inventory-summary small { display: block; color: var(--muted); font-size: 10px; }
.inventory-summary strong { display: block; margin-top: 2px; font-size: 23px; }
.event-chips { flex-wrap: nowrap; overflow-x: auto; margin-top: 16px; padding-bottom: 3px; }
.event-chips button { flex: 0 0 auto; }
.change-feed, .candidate-list { margin: 16px 0 0; padding: 0; list-style: none; }
.change-feed li { display: grid; grid-template-columns: 88px 1fr auto; gap: 12px; align-items: start; padding: 13px 4px; font-size: 12px; }
.change-feed li + li { border-top: 1px solid var(--line); }
.event-label { width: fit-content; border-radius: 6px; background: var(--page); padding: 4px 7px; color: var(--muted); font-size: 10px; }
.event-price_down .event-label { color: var(--success); }
.event-price_up .event-label, .event-candidate .event-label { color: var(--accent-dark); }
.change-feed p { margin: 2px 0 0; color: var(--muted); }
.change-feed time { color: var(--muted); font-size: 10px; }
.quiet-empty, .candidate-explain { color: var(--muted); font-size: 12px; }
.comparison-unavailable { min-height: 120px; display: grid; place-items: center; margin: 0; border-radius: 10px; background: var(--surface-soft); padding: 20px; color: var(--muted); text-align: center; }

.summary-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border-radius: 10px; background: var(--surface-soft); }
.summary-metrics > div { min-width: 0; padding: 14px; }
.summary-metrics > div + div { border-left: 1px solid var(--line); }
.summary-metrics span, .summary-metrics small { display: block; color: var(--muted); font-size: 10px; }
.summary-metrics strong { display: block; margin-top: 3px; font-size: clamp(15px, 2vw, 20px); }
.summary-metrics .summary-rate { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
.summary-status-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 0 !important; padding: 0 !important; }
.summary-status-item { min-width: 0; padding: 12px 10px; text-align: center; }
.summary-status-item + .summary-status-item { border-left: 1px solid var(--line); }
.summary-status-item > span > span { display: inline; }
.summary-status-item strong { overflow-wrap: anywhere; font-size: clamp(14px, 2vw, 18px); }
.summary-formula { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.summary-distribution { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 24px; }

.tracking-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.tracking-card { position: relative; min-width: 0; border-radius: 10px; background: var(--surface-soft); padding: 15px 64px 15px 15px; }
.tracking-card header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.tracking-card header strong { font-size: 13px; }
.tracking-card header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.tracking-price { margin: 14px 0 4px; font-size: 15px; font-weight: 780; letter-spacing: -.02em; }
.tracking-price small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 650; }
.tracking-card details { color: var(--muted); font-size: 11px; }
.tracking-card details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 730; }
.tracking-card details ol { margin: 0; padding: 0; list-style: none; }
.tracking-card details li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 8px 0; }
.tracking-card details li + li { border-top: 1px solid var(--line); }
.tracking-card details time { font-size: 10px; }
.tracking-card details span { font-size: 10px; white-space: nowrap; }

.analysis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); gap: 14px; }
.analysis-card { min-width: 0; border-radius: 10px; background: var(--surface-soft); padding: 18px; }
.snapshot-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.snapshot-strip li { display: grid; gap: 3px; border-radius: 8px; background: var(--surface); padding: 13px; }
.snapshot-strip time, .snapshot-strip span { color: var(--muted); font-size: 10px; }
.snapshot-strip strong { font-size: 13px; }
.band-list { margin: 0; padding: 0; list-style: none; }
.band-list li { display: grid; gap: 5px; padding: 10px 0; }
.band-list li + li { border-top: 1px solid var(--line); }
.band-list li > div { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.paired-bands label { display: grid; grid-template-columns: 35px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.band-list meter { width: 100%; height: 9px; border: 0; background: var(--line); }
.band-list meter::-webkit-meter-bar { border: 0; border-radius: 4px; background: var(--line); }
.band-list meter::-webkit-meter-optimum-value { border-radius: 4px; background: var(--accent); }
.band-list meter::-moz-meter-bar { background: var(--accent); }
.distribution-copy { margin: -8px 0 16px; color: var(--muted); font-size: 12px; }
.summary-distribution { min-width: 0; }
.price-chart { min-width: 0; max-width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: 236px auto; overflow: hidden; margin: 0; border-radius: 10px; background: var(--surface-soft); padding: 16px 0 10px; }
.price-chart-y-axis { position: relative; width: 46px; height: 236px; color: var(--muted); font-size: 10px; }
.price-chart-y-axis::after { position: absolute; top: 28px; right: 0; bottom: 28px; width: 1px; background: var(--line); content: ""; }
.price-chart-axis-title { color: var(--muted); font-size: 10px; font-weight: 720; }
.price-chart-y-title { position: absolute; top: 50%; left: 5px; transform: translateY(-50%); writing-mode: vertical-rl; }
.price-chart-y-tick { position: absolute; z-index: 1; right: 7px; line-height: 1; }
.price-chart-y-tick--max { top: 24px; }
.price-chart-y-tick--zero { bottom: 25px; }
.price-chart-plot-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-gutter: stable; }
.price-chart-plot-scroll:focus-visible { outline-offset: -3px; }
.price-chart-columns { height: 236px; display: flex; min-width: max-content; margin: 0; padding: 0 22px; list-style: none; }
.price-chart-column { position: relative; min-width: 0; display: grid; flex: 0 0 44px; grid-template-rows: 28px 180px 28px; }
.price-chart-count { align-self: end; color: var(--ink); font-size: 10px; font-weight: 760; line-height: 1; text-align: center; }
.price-chart-bar-slot { width: 100%; height: 180px; display: flex; align-items: flex-end; justify-content: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.price-chart-bar { width: 26px; display: block; flex: 0 0 auto; border-radius: 5px 5px 1px 1px; background: var(--accent); }
.price-chart-x-tick, .price-chart-x-end-tick { position: absolute; bottom: 7px; color: var(--muted); font-size: 10px; line-height: 1; white-space: nowrap; }
.price-chart-x-tick { left: 50%; transform: translateX(-50%); }
.price-chart-x-end-tick { right: 0; transform: translateX(50%); }
.price-chart-x-title { grid-column: 2; padding-top: 5px; text-align: center; }
.bar-height-0 { height: 0%; }
.bar-height-1 { height: 1%; }
.bar-height-2 { height: 2%; }
.bar-height-3 { height: 3%; }
.bar-height-4 { height: 4%; }
.bar-height-5 { height: 5%; }
.bar-height-6 { height: 6%; }
.bar-height-7 { height: 7%; }
.bar-height-8 { height: 8%; }
.bar-height-9 { height: 9%; }
.bar-height-10 { height: 10%; }
.bar-height-11 { height: 11%; }
.bar-height-12 { height: 12%; }
.bar-height-13 { height: 13%; }
.bar-height-14 { height: 14%; }
.bar-height-15 { height: 15%; }
.bar-height-16 { height: 16%; }
.bar-height-17 { height: 17%; }
.bar-height-18 { height: 18%; }
.bar-height-19 { height: 19%; }
.bar-height-20 { height: 20%; }
.bar-height-21 { height: 21%; }
.bar-height-22 { height: 22%; }
.bar-height-23 { height: 23%; }
.bar-height-24 { height: 24%; }
.bar-height-25 { height: 25%; }
.bar-height-26 { height: 26%; }
.bar-height-27 { height: 27%; }
.bar-height-28 { height: 28%; }
.bar-height-29 { height: 29%; }
.bar-height-30 { height: 30%; }
.bar-height-31 { height: 31%; }
.bar-height-32 { height: 32%; }
.bar-height-33 { height: 33%; }
.bar-height-34 { height: 34%; }
.bar-height-35 { height: 35%; }
.bar-height-36 { height: 36%; }
.bar-height-37 { height: 37%; }
.bar-height-38 { height: 38%; }
.bar-height-39 { height: 39%; }
.bar-height-40 { height: 40%; }
.bar-height-41 { height: 41%; }
.bar-height-42 { height: 42%; }
.bar-height-43 { height: 43%; }
.bar-height-44 { height: 44%; }
.bar-height-45 { height: 45%; }
.bar-height-46 { height: 46%; }
.bar-height-47 { height: 47%; }
.bar-height-48 { height: 48%; }
.bar-height-49 { height: 49%; }
.bar-height-50 { height: 50%; }
.bar-height-51 { height: 51%; }
.bar-height-52 { height: 52%; }
.bar-height-53 { height: 53%; }
.bar-height-54 { height: 54%; }
.bar-height-55 { height: 55%; }
.bar-height-56 { height: 56%; }
.bar-height-57 { height: 57%; }
.bar-height-58 { height: 58%; }
.bar-height-59 { height: 59%; }
.bar-height-60 { height: 60%; }
.bar-height-61 { height: 61%; }
.bar-height-62 { height: 62%; }
.bar-height-63 { height: 63%; }
.bar-height-64 { height: 64%; }
.bar-height-65 { height: 65%; }
.bar-height-66 { height: 66%; }
.bar-height-67 { height: 67%; }
.bar-height-68 { height: 68%; }
.bar-height-69 { height: 69%; }
.bar-height-70 { height: 70%; }
.bar-height-71 { height: 71%; }
.bar-height-72 { height: 72%; }
.bar-height-73 { height: 73%; }
.bar-height-74 { height: 74%; }
.bar-height-75 { height: 75%; }
.bar-height-76 { height: 76%; }
.bar-height-77 { height: 77%; }
.bar-height-78 { height: 78%; }
.bar-height-79 { height: 79%; }
.bar-height-80 { height: 80%; }
.bar-height-81 { height: 81%; }
.bar-height-82 { height: 82%; }
.bar-height-83 { height: 83%; }
.bar-height-84 { height: 84%; }
.bar-height-85 { height: 85%; }
.bar-height-86 { height: 86%; }
.bar-height-87 { height: 87%; }
.bar-height-88 { height: 88%; }
.bar-height-89 { height: 89%; }
.bar-height-90 { height: 90%; }
.bar-height-91 { height: 91%; }
.bar-height-92 { height: 92%; }
.bar-height-93 { height: 93%; }
.bar-height-94 { height: 94%; }
.bar-height-95 { height: 95%; }
.bar-height-96 { height: 96%; }
.bar-height-97 { height: 97%; }
.bar-height-98 { height: 98%; }
.bar-height-99 { height: 99%; }
.bar-height-100 { height: 100%; }

.listing-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.listing-row { position: relative; min-width: 0; border-radius: 10px; background: var(--surface-soft); padding: 17px; }
.listing-main { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.building { margin-right: 8px; font-weight: 800; }
.meta, .listing-foot { color: var(--muted); font-size: 11px; }
.listing-price { color: var(--accent-dark); font-size: 19px; white-space: nowrap; letter-spacing: -.025em; }
.area { margin: 12px 0 0; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { border-radius: 6px; background: #eceff1; padding: 4px 7px; color: var(--muted); font-size: 10px; }
.listing-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-right: 50px; }
.delete-update summary, .install-panel summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
pre { max-height: 180px; overflow: auto; white-space: pre-wrap; word-break: break-word; border-radius: 8px; background: #eef0f2; margin: 3px 0 10px; padding: 10px; color: var(--muted); font: 10px/1.6 ui-monospace, monospace; }
.card-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--accent-dark); font-size: 12px; font-weight: 730; }
.listing-naver-link { min-width: 42px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--naver-green); color: #fff; font-size: 18px; font-weight: 900; line-height: 1; text-decoration: none; }
.listing-naver-link:hover { background: #00cc5f; }
.listing-row .listing-naver-link { position: absolute; right: 12px; bottom: 12px; }
.tracking-card .listing-naver-link { position: absolute; top: 12px; right: 12px; }
.no-results { grid-column: 1 / -1; border-radius: 10px; background: var(--surface-soft); padding: 36px; text-align: center; }
.candidate-list li { display: grid; gap: 3px; border-radius: 8px; background: var(--surface-soft); padding: 12px; font-size: 12px; }
.candidate-list li + li { margin-top: 7px; }
.candidate-list li span { color: var(--muted); }

.page-heading { max-width: none; margin-bottom: 14px; padding: 18px 2px 10px; }
.page-heading > p:last-child { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 13px; }
.settings-section { margin-top: 14px; padding: clamp(18px, 3vw, 30px); }
.settings-section > h2, .install-section h2 { margin: 0 0 20px; font-size: 24px; }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.complex-registration { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 24px; align-items: end; }
.complex-registration ol { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.registration-form { display: grid; gap: 9px; }
.registration-form label { font-size: 12px; font-weight: 750; }
.registration-form input { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #d7dade; border-radius: 8px; padding: 9px 11px; }
.settings-form .wide { grid-column: 1 / -1; }
.settings-form textarea { resize: vertical; }
.settings-form small { font-weight: 400; }
.binary { min-width: 0; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 9px 12px; }
.binary legend { color: var(--muted); font-size: 11px; font-weight: 720; }
.binary label { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.install-section { display: grid; grid-template-columns: 1fr minmax(300px, .75fr); gap: 28px; }
.install-section > div:first-child p:not(.eyebrow) { color: var(--muted); }
.install-panel { border-radius: 10px; background: var(--surface-soft); padding: 16px; }
.bookmarklet { min-height: 54px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--accent); border-radius: 8px; color: var(--accent-dark); font-weight: 800; text-decoration: none; }
.install-panel .button { width: 100%; margin-top: 9px; }
.source-links { display: grid; gap: 7px; margin: 16px 0 0; padding-left: 20px; color: var(--accent-dark); font-size: 12px; }
.install-panel details, .copy-status { color: var(--muted); font-size: 11px; }
.copy-status { min-height: 18px; color: var(--accent-dark); }

.updates-list { display: grid; gap: 12px; }
.update-row { display: grid; grid-template-columns: minmax(150px, .4fr) minmax(0, 1fr); gap: 14px 26px; padding: 20px; }
.update-id h2 { margin: 0; font-size: 20px; }
.update-row dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.update-row dl div { border-radius: 8px; background: var(--surface-soft); padding: 9px; }
.update-row dt { color: var(--muted); font-size: 9px; }
.update-row dd { margin: 2px 0 0; font-size: 11px; }
.update-counts, .delete-update { grid-column: 2; margin: 0; color: var(--muted); font-size: 11px; }
.delete-update form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-left: 2px solid var(--accent); padding-left: 12px; }
.delete-update label { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }

.preview-head, .error-state { padding: clamp(24px, 5vw, 48px); }
.preview-head > p:not(.eyebrow), .error-state p { max-width: 760px; color: var(--muted); }
.apply-form { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.preview-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.preview-list article { min-width: 0; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); padding: 18px; }
.preview-list article > div { display: flex; justify-content: space-between; gap: 12px; }
.preview-list p, .preview-list small { color: var(--muted); font-size: 11px; }
.error-state { max-width: 740px; margin: 24px auto; }
.error-state .button { margin-top: 14px; }

.is-loading { opacity: .62; }

@media (max-width: 760px) {
  .topbar { gap: 6px; }
  .complex-selector > summary { padding-inline: 8px 24px; font-size: 13px; }
  .complex-selector > summary::after { right: 8px; }
  .complex-selector-panel { position: fixed; top: 68px; right: 14px; left: 14px; width: auto; max-height: calc(100vh - 82px); overflow-y: auto; }
  .naver-action { padding-inline: 10px; font-size: 12px; }
  main { padding-top: 16px; padding-bottom: 52px; }
  .dashboard-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding-top: 5px; }
  .dashboard-heading-copy > p:last-child { font-size: 11px; }
  .browser-refresh-form small { max-width: 120px; text-align: right; }
  .filter-disclosure > summary { grid-template-columns: auto minmax(0, 1fr) auto; padding-inline: 14px; }
  .filter-panel { padding: 14px; }
  .current-filter-fields { grid-template-columns: 1fr; }
  .filter-actions .button { flex: 1; }
  .dashboard-panel { padding: 17px 14px; }
  .card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .card-heading > span { display: block; margin-top: 5px; }
  .inventory-summary { grid-template-columns: 1fr 1fr; }
  .inventory-summary div:nth-child(3) { border-left: 0; }
  .inventory-summary div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .change-feed li { grid-template-columns: auto minmax(0, 1fr); gap: 7px 10px; }
  .change-feed time { grid-column: 2; }
  .analysis-grid { grid-template-columns: 1fr; }
  .summary-metrics { grid-template-columns: 1fr 1fr; }
  .summary-metrics > div:nth-child(odd) { border-left: 0; }
  .summary-metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .summary-metrics .summary-rate { grid-column: 1 / -1; border-left: 0; }
  .summary-status-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-status-item { padding: 10px 3px; }
  .summary-status-item > span { font-size: 9px; white-space: nowrap; }
  .price-chart { grid-template-columns: 38px minmax(0, 1fr); }
  .price-chart-y-axis { width: 38px; }
  .price-chart-y-title { left: 2px; }
  .price-chart-y-tick { right: 5px; }
  .price-chart-column { flex: 0 0 42px; }
  .price-chart-bar { width: 24px; }
  .tracking-list { grid-template-columns: 1fr; }
  .tracking-card details li { grid-template-columns: minmax(0, 1fr) auto; }
  .tracking-card details li span { grid-column: 2; }
  .analysis-card { padding: 14px; }
  .snapshot-strip { display: flex; overflow-x: auto; }
  .snapshot-strip li { min-width: 170px; }
  .listing-list, .preview-list { grid-template-columns: 1fr; }
  .listing-row { padding: 15px; }
  .listing-main { align-items: center; }
  .listing-foot { align-items: start; flex-direction: column; gap: 2px; }
  .settings-form, .install-section, .complex-registration { grid-template-columns: 1fr; }
  .registration-form .button { width: 100%; min-height: 48px; }
  .settings-form .wide { grid-column: auto; }
  .install-section { gap: 20px; }
  .update-row { grid-template-columns: 1fr; }
  .update-row dl { grid-template-columns: 1fr 1fr; }
  .update-counts, .delete-update { grid-column: 1; }
  .delete-update form { align-items: stretch; flex-direction: column; }
  .apply-form { display: grid; }
}

@media (max-width: 360px) {
  .complex-selector > summary { font-size: 12px; }
  .brand-logo { width: 48px; max-width: 48px; height: 20px; }
  .naver-action { padding-inline: 8px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
/* Standalone authentication */
.auth-page {
  min-height: 100vh;
  background: #f6f2eb;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.auth-card {
  width: min(100%, 28rem);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid #ded5c9;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1rem 3rem rgb(57 42 31 / 8%);
}

.auth-card h1 {
  margin: .35rem 0 .6rem;
}

.auth-intro {
  color: #675e56;
}

.auth-error {
  padding: .8rem 1rem;
  border-radius: .65rem;
  background: #fff0ed;
  color: #8f2f22;
}

.auth-form {
  display: grid;
  gap: .75rem;
  margin-top: 1.25rem;
}

.auth-form input[type="password"] {
  width: 100%;
  min-height: 3rem;
  padding: .7rem .8rem;
  border: 1px solid #b9afa4;
  border-radius: .55rem;
  font: inherit;
}

.auth-form .button {
  min-height: 3rem;
  margin-top: .35rem;
}

.logout-form,
.logout-form button {
  width: 100%;
}

.logout-form button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
