/* 全站视觉基础：中性纸白、单一朱红强调色、细线分组。组件以内容而非外框建立层级。 */
@import url('/styles/detail.css');
@import url('/styles/responsive.css');

:root {
  --bg: #fcfcfa;
  --surface: #fcfcfa;
  --surface-2: #f0f0ec;
  --border: #e1e1db;
  --border-strong: #bdbdb4;
  --text: #252620;
  --muted: #73756b;
  --faint: #828479;
  --brand: #b33b32;
  --price: var(--brand);
  --ideal: #52614b;
  --ideal-bg: #edf0e9;
  --buyable: #736852;
  --buyable-bg: #f0ede6;
  --wait: var(--muted);
  --wait-bg: var(--surface-2);
  --floor: var(--text);
  --floor-bg: var(--surface-2);
  --limited: var(--brand);
  --limited-bg: #f6eae7;
  --concessional: var(--muted);
  --concessional-bg: var(--surface-2);
  --ok: var(--ideal);
  --gone: var(--brand);
  --shadow: 0 16px 60px #25262012;
  --radius: 2px;
  --sidebar: 224px;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1d1e1a; --surface: #1d1e1a; --surface-2: #292b25;
    --border: #3a3c34; --border-strong: #62665a; --text: #edeee7;
    --muted: #a8ac9f; --faint: #999e90; --brand: #e58c7e;
    --ideal: #b1c0a3; --ideal-bg: #2d3528; --buyable: #c8bda5;
    --buyable-bg: #353227; --limited-bg: #3b2a27;
    --shadow: 0 16px 60px #11120e40;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-gutter: stable; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.6 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button:not(:disabled):active { transform: translateY(1px); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
input[type='checkbox'] { accent-color: var(--text); width: 16px; height: 16px; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
.muted { color: var(--muted); }
.num, .price, .original, .discount, time { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 50; padding: 10px 20px; background: var(--text); color: var(--surface); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 28px;
  padding: 32px 24px 24px; border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 36px; background: var(--brand); position: relative; flex: none; }
.brand-mark::after { content: 'U'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 600; }
.brand-name { font-size: 15px; font-weight: 650; letter-spacing: .04em; }
.brand-sub { font-size: 10px; color: var(--muted); margin-top: 3px; }
.nav { display: flex; flex-direction: column; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 13px 0; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--border); }
.nav a::before { content: ''; width: 4px; height: 4px; background: transparent; flex: none; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active { font-weight: 650; }
.nav a.active::before { background: var(--brand); }
.nav a.active em { color: var(--brand); }
.nav em { margin-left: auto; font: 11px var(--mono); }
.search { margin: 0; }
.search label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.search input { width: 100%; border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; padding: 8px 0; background: transparent; font-size: 12px; }
.status { display: flex; flex-direction: column; gap: 9px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }
.status-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.status-row strong { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.status .btn { margin-top: 6px; background: transparent; color: var(--text); border-color: var(--border-strong); }
.status.scanning { border-color: var(--brand); }
.rules { font-size: 11px; color: var(--muted); line-height: 1.9; }
.rules b { color: var(--text); font-weight: 500; }
.main { min-width: 0; width: 100%; max-width: 1640px; margin-inline: auto; padding: 34px 44px 72px; }
.page-header { margin-bottom: 22px; }
.page-heading { padding-bottom: 24px; }
.heading-line { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.page-heading h1 { font-size: clamp(26px, 2.5vw, 36px); letter-spacing: -.045em; font-weight: 550; }
.page-notes { position: relative; font-size: 12px; color: var(--muted); flex: none; }
.page-notes summary { cursor: pointer; text-underline-offset: 5px; text-decoration: underline; }
.page-notes p { position: absolute; right: 0; width: min(440px, 75vw); padding: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 5; line-height: 1.9; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; border-block: 1px solid var(--border); padding: 14px 0; }
.toolbar:empty { display: none; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; width: 100%; }
.filter-row + .filter-row { border-top: 1px solid var(--border); padding-top: 12px; }
.filter-row-secondary { gap: 10px 16px; }
.filter-more { width: 100%; }
.filter-more > summary { display: none; }
.filter-more > .filter-row { display: flex; border-top: 1px solid var(--border); padding-top: 12px; }
.filter-spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; min-height: 40px; border: 1px solid var(--text); border-radius: var(--radius); color: var(--surface); background: var(--text); text-decoration: none; font-size: 13px; transition: opacity .15s, transform .15s; }
.btn:hover { opacity: .78; }
.btn-small { padding: 7px 12px; min-height: 34px; font-size: 12px; }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--border-strong); }
.btn-danger { color: var(--gone); background: transparent; border-color: transparent; }
.segmented { display: inline-flex; gap: 16px; min-width: 0; }
.segmented button { position: relative; border: 0; padding: 8px 0; color: var(--muted); background: transparent; white-space: nowrap; font-size: 13px; }
.segmented button.on { color: var(--text); font-weight: 600; }
.segmented button.on::after { content: ''; height: 2px; background: var(--text); position: absolute; bottom: 0; left: 0; right: 0; }
.segmented[data-segment='mode'] { gap: 0; margin-left: auto; }
.segmented[data-segment='mode'] button { padding: 6px 12px; border: 1px solid var(--border); }
.segmented[data-segment='mode'] button + button { border-left: 0; }
.segmented[data-segment='mode'] button.on { background: var(--surface-2); }
.segmented[data-segment='mode'] button.on::after { display: none; }
.select { max-width: 100%; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: var(--surface); font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.summary-line { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.summary-line b { color: var(--text); font: 500 15px var(--mono); margin-inline: 3px; }
.type-chips { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.chip { padding: 7px 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; font-size: 12px; color: var(--muted); }
.chip.on { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.chip em { font: 10px var(--mono); color: var(--muted); margin-left: 5px; }
.type-section { margin-top: 28px; }
.section-title { display: flex; align-items: baseline; gap: 12px; font-size: 15px; font-weight: 550; margin-bottom: 16px; }
.section-title span { font: 11px var(--mono); color: var(--muted); }
.section-title::after { content: ''; height: 1px; background: var(--border); flex: 1; align-self: center; margin-left: 8px; }
.badge { display: inline-flex; align-items: center; padding: 1px 5px; font-size: 10px; font-weight: 500; line-height: 18px; white-space: nowrap; border-radius: 1px; }
.tier-ideal { color: var(--ideal); background: var(--ideal-bg); }
.tier-buyable { color: var(--buyable); background: var(--buyable-bg); }
.tier-wait { color: var(--wait); background: var(--wait-bg); }
.floor { color: var(--floor); background: var(--floor-bg); }
.kind-limited { color: var(--limited); background: var(--limited-bg); }
.kind-concessional, .new-badge { color: var(--muted); background: var(--surface-2); }
.size { font-size: 11px; white-space: nowrap; }
.size.ok { color: var(--ok); }
.size.gone { color: var(--gone); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px 22px; }
.card { display: flex; flex-direction: column; min-width: 0; cursor: pointer; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.card-image { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); }
.card-image img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s ease-out; }
@media (hover: hover) { .card:hover .card-image img { transform: scale(1.025); } .card:hover .card-name { text-decoration: underline; text-underline-offset: 4px; } }
.card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 13px 0 0; flex: 1; }
.card-name { font-size: 13px; font-weight: 550; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card-meta { font-size: 10px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.price-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.price { font-size: 23px; font-weight: 500; letter-spacing: -.05em; color: var(--price); }
.price.regular { color: var(--text); }
.original { font-size: 11px; color: var(--faint); text-decoration: line-through; }
.discount { font-size: 11px; color: var(--text); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; font-size: 11px; color: var(--muted); }
.card-colors { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.until { font-size: 11px; color: var(--muted); }
.live-tag { font-size: 10px; color: var(--ok); border-bottom: 1px dotted currentColor; padding: 0 3px; }
.table-wrap { max-width: 100%; overflow-x: auto; border-top: 1px solid var(--border); scrollbar-width: thin; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th, .table td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.table th { font-size: 11px; font-weight: 400; color: var(--muted); background: var(--surface); }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table tr[data-product], .table tr[data-color] { cursor: pointer; }
.table tr[data-product]:hover td, .table tr[data-color]:hover td { background: var(--surface-2); }
.table tr.picked td { background: var(--surface-2); font-weight: 600; }
.table .wrap { white-space: normal; min-width: 160px; }
.table .wrap-tight { white-space: normal; min-width: 90px; }
.thumb { width: 44px; height: 58px; object-fit: contain; display: block; background: var(--surface-2); }
.down { color: var(--ideal); font-weight: 600; }
.up, .error-text { color: var(--gone); }
.stack { display: flex; flex-direction: column; }
.panel { padding: 0 0 28px; border-bottom: 1px solid var(--border); }
.panel + .panel { margin-top: 28px; }
.panel-head { display: flex; align-items: center; gap: 16px; padding: 0 0 20px; }
.panel-head img { width: 56px; height: 74px; object-fit: contain; cursor: pointer; background: var(--surface-2); }
.panel-title { flex: 1; min-width: 0; }
.panel-title h3 { font-size: 15px; cursor: pointer; }
.panel-title h3:hover { text-decoration: underline; text-underline-offset: 4px; }
.panel-sub { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.restock-line { color: var(--price); font-weight: 600; }
.stock-chip { display: inline-flex; gap: 4px; align-items: center; padding: 2px 5px; font: 11px var(--mono); background: var(--surface-2); }
.stock-chip.low { color: var(--buyable); background: var(--buyable-bg); }
.stock-chip.out { color: var(--gone); background: var(--limited-bg); }
.stock-chip.ok { color: var(--ok); background: var(--ideal-bg); }
.message { padding: 24px 0; }
.message h3 { font-size: 16px; font-weight: 550; margin-bottom: 8px; }
.message time { font-size: 11px; color: var(--muted); }
.message-section { margin-top: 24px; }
.message-section h4 { margin: 0 0 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.message-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.message-item img { width: 44px; height: 58px; object-fit: contain; background: var(--surface-2); }
.message-item .title { font-size: 13px; font-weight: 550; cursor: pointer; }
.message-item ul { margin: 6px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.empty { padding: 56px 0; text-align: left; color: var(--muted); border-bottom: 1px solid var(--border); font-size: 13px; }
.empty::before { content: ''; display: block; width: 32px; height: 2px; background: var(--border-strong); margin-bottom: 24px; }
.empty strong { display: block; color: var(--text); font-size: 18px; font-weight: 500; margin-bottom: 10px; }
.loading { padding: 24px 0; color: var(--muted); font-size: 12px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 20px; }
.skeleton { height: 260px; background: var(--surface-2); }
.skeleton::after { content: ''; display: block; width: 60%; height: 8px; background: var(--border); margin-top: 280px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
