:root {
  color-scheme: light;
  --lh-bg: #f7f6f2;
  --lh-surface: #fff;
  --lh-text: #202624;
  --lh-text-muted: #53635e;
  --lh-border: #dce5df;
  --lh-accent: #116155;
  --market-tint: #e3f1eb;
}
:root[data-lh-theme="dark"] {
  color-scheme: dark;
  --lh-bg: #141b1a;
  --lh-surface: #1c2624;
  --lh-text: #eff7f3;
  --lh-text-muted: #becdc7;
  --lh-border: #3a4a45;
  --lh-accent: #9adbc8;
  --market-tint: #293d36;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 78px; scrollbar-color: var(--lh-border) transparent; }
.model-detail-page { margin: 0; background: var(--lh-bg); color: var(--lh-text); font: 16px/1.65 system-ui, sans-serif; }
.market-detail, .market-header > div { width: min(1160px, 100% - 2 * clamp(16px, 4vw, 42px)); margin-inline: auto; }
.market-header { background: var(--lh-surface); border-bottom: 1px solid var(--lh-border); padding-top: env(safe-area-inset-top); }
.market-header > div { display: flex; align-items: center; gap: clamp(12px, 4vw, 28px); min-height: 60px; }
.market-header a { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding-inline: 6px; }
.market-header a:first-child { margin-right: auto; font-weight: 750; font-size: 18px; }
.market-header img { object-fit: contain; }
.market-header a, .market-jump a, .market-button { color: inherit; text-decoration: none; border-radius: 10px; }
.market-header a:is(:hover,:focus,:focus-visible), .market-jump a:is(:hover,:focus,:focus-visible) { outline: none; background: var(--market-tint); color: var(--lh-accent); }
.market-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 20px; color: var(--lh-text-muted); font-size: 14px; overflow-wrap: anywhere; }
.market-breadcrumb a, .market-section a:not(.market-button) { color: var(--lh-accent); text-underline-offset: 3px; }
.market-hero h1 { margin: 6px 0 12px; font-size: clamp(32px, 5vw, 58px); line-height: 1.08; letter-spacing: -.035em; overflow-wrap: anywhere; }
.market-kicker { font-size: 14px; font-weight: 700; }
.market-experience-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.market-hero .market-experience-actions { margin-top: 22px; }
.market-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 8px 16px; border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer; background: #b6ebd8; color: #123832; }
.market-button[hidden] { display: none; }
.market-button:is(:hover,:focus,:focus-visible) { outline: none; background: #d9f8ed; color: #123832; }
.market-button.secondary { color: var(--lh-text); border-color: var(--lh-border); background: var(--lh-surface); }
.market-button.secondary:is(:hover,:focus,:focus-visible) { color: var(--lh-accent); background: var(--market-tint); }
.market-facts { display: grid; gap: 1px; margin: 0; border-radius: 14px; background: var(--lh-border); overflow: hidden; }
.market-facts > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 16px; padding: 11px 15px; background: var(--lh-surface); }
.market-facts dt { font-size: 14px; color: var(--lh-text-muted); }
.market-facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.market-price { max-width: 640px; border: 1px solid var(--lh-border); }
.market-price dd { color: var(--lh-accent); }
.market-jump { display: flex; flex-wrap: wrap; gap: 4px; position: sticky; top: 0; z-index: 2; padding: 10px 0; background: var(--lh-bg); }
.market-jump a { padding: 10px; font-size: 14px; }
.market-section { padding: clamp(18px, 4vw, 36px); margin: 0 0 16px; border: 1px solid var(--lh-border); border-radius: 18px; background: var(--lh-surface); }
.market-section h2 { margin: 0 0 14px; font-size: clamp(22px, 3vw, 28px); }
.market-section p, .market-section li { color: var(--lh-text-muted); }
.market-section code { overflow-wrap: anywhere; }
.market-section details + details { border-top: 1px solid var(--lh-border); }
.market-section summary { cursor: pointer; padding: 12px 0; font-weight: 650; }
.market-section summary:is(:focus,:focus-visible) { outline: none; color: var(--lh-accent); background: var(--market-tint); }
@media (max-width: 740px) {
  .market-detail { width: calc(100% - 24px); }
}
@media (max-height: 480px) { .market-jump { position: static; } }

/* 独立体验区与正文共享页面滚动，输入和结果保持各自的信息层级。 */
.market-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: clamp(20px, 4vw, 48px) 0 0;
  color: var(--lh-text);
  background: none;
  text-align: center;
}
.market-kicker, .market-lead { margin: 0; color: var(--lh-text-muted); }
.market-kicker { color: var(--lh-accent); }
.market-lead { max-width: 760px; margin-inline: auto; }
.market-hero .market-experience-actions { justify-content: center; }
.market-hero .market-facts {
  display: flex;
  flex-wrap: wrap;
  background: var(--lh-border);
  border: 1px solid var(--lh-border);
  text-align: left;
}
.market-hero .market-facts > div { flex: 1 0 min(100%, 164px); min-width: 0; display: block; padding: 14px 18px; background: var(--lh-surface); }
.market-hero dt { color: var(--lh-text-muted); }
.market-hero dd { margin-top: 4px; }
.market-jump { margin-block: 10px; border-bottom: 1px solid var(--lh-border); }
#experience { background: transparent; padding: 8px 0 0; border: 0; }
.market-playground { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 14px; }
.market-panel { min-width: 0; padding: clamp(16px, 2.4vw, 26px); background: var(--lh-surface); border: 1px solid var(--lh-border); border-radius: 16px; }
.market-panel h3 { margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--lh-border); font-size: 17px; }
.market-form fieldset { min-inline-size: 0; margin: 0 0 16px; padding: 0; border: 0; }
.market-form label { display: block; color: var(--lh-text-muted); font-size: 14px; font-weight: 650; }
.market-form [hidden] { display: none; }
.market-form textarea, .market-form select {
  display: block; width: 100%; min-height: 44px; margin: 5px 0 12px; padding: 9px 11px;
  border: 1px solid var(--lh-border); border-radius: 9px; background: var(--lh-bg); color: var(--lh-text); font: 16px/1.5 system-ui, sans-serif;
}
.market-form textarea { resize: vertical; }
.market-form :is(textarea,select,input):is(:focus,:focus-visible) { outline: none; background: var(--market-tint); }
.market-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.market-fields .market-switch { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.market-form-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.market-form-actions output { color: var(--lh-accent); font-weight: 670; }
.market-button:disabled { opacity: .58; cursor: default; }
.market-result { min-height: 310px; }
.market-result [role="status"] { color: var(--lh-text-muted); font-size: 14px; }
#marketOutput { display: grid; gap: 10px; }
#marketOutput :is(img,video) { display: block; max-width: 100%; max-height: 650px; border-radius: 10px; }
#marketOutput p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#marketOutput .market-question { justify-self: end; padding: 8px 14px; border-radius: 12px; background: var(--market-tint); color: var(--lh-text); }
@media (max-width: 740px) {
  .market-playground { grid-template-columns: minmax(0, 1fr); }
  .market-hero .market-facts > div { flex-basis: 45%; }
  .market-result { min-height: 170px; }
}
.market-result:has(#marketOutput:empty) [role="status"] {
  display: grid;
  min-height: 205px;
  place-items: center;
  margin: 0;
  padding: 20px;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 0%, var(--market-tint), transparent 72%), var(--lh-bg);
  text-align: center;
}

.market-price-summary { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; margin-bottom: 20px; }
.market-price-summary > div { padding: 16px; background: var(--market-tint); border-radius: 12px; }
.market-price-summary strong { display: block; color: var(--lh-accent); font-size: clamp(22px, 4vw, 34px); }
.market-price-summary small { display: block; color: var(--lh-text-muted); }
.market-price-summary ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 7px 0 0; padding: 0; gap: 8px; list-style: none; }
.market-price-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.market-price-table caption { text-align: left; font-weight: 700; margin-bottom: 8px; }
.market-price-table :is(th,td) { padding: 9px 5px; text-align: right; border-bottom: 1px solid var(--lh-border); overflow-wrap: anywhere; }
.market-price-table th:first-child { text-align: left; width: 48%; }
.market-price-table tbody th { font-weight: 500; }
@media (max-width: 600px) {
  .market-price-summary { grid-template-columns: 1fr; }
  .market-price-table { font-size: 14px; }
}
.market-reference-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.market-reference-price strong { color: var(--lh-text); }
.market-reference-price small { font-size: 13px; }
.market-video-prices th:first-child { width: 25%; }
.market-video-prices td small { display: block; color: var(--lh-text-muted); }

.market-file-field { position: relative; margin: 4px 0 12px; }
.market-file-field > span { display: block; margin-bottom: 5px; color: var(--lh-text-muted); font-size: 14px; font-weight: 650; }
.market-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; font-size: 16px; }
.market-file-field > small { margin-inline-start: 8px; color: var(--lh-text-muted); }
.market-file-field > small:empty { display: none; }
