:root {
  color-scheme: light;
  --ink: #332019; --muted: #675147; --base: #f8efe4; --paper: #fff9f0;
  --brick: #8f3026; --red-dark: #682319; --line: #d8beab; --tint: #f4e2d4;
  font: 16px/1.55 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
  color: var(--ink); background: var(--base);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .7; }
:focus-visible { outline: 3px solid #0b6380; outline-offset: 3px; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: 8px; padding: 8px; background: var(--paper); color: var(--red-dark); transform: translateY(-180%); z-index: 2; }
.skip:focus { transform: none; }
.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { min-height: 64px; display: flex; align-items: center; gap: 11px; font-weight: 750; }
.edition { margin-left: auto; font-size: .86rem; color: var(--muted); }
.hero { margin: 22px 0; min-height: 194px; padding: 24px 32px; border-radius: 22px; background: var(--brick); color: #fff6eb; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.hero .eyebrow { color: #ffe1ca; }
.hero-copy { max-width: 620px; }
.hero h1 { font-size: clamp(2.45rem, 5vw, 4.4rem); line-height: 1.08; margin-block: 6px 11px; letter-spacing: .015em; }
.bridge { width: clamp(140px, 28vw, 320px); flex: none; }
.bridge-deck, .bridge-support, .bridge-guides { fill: none; stroke: #fff3de; stroke-linecap: round; stroke-linejoin: round; }
.bridge-deck { stroke-width: 6; }
.bridge-support { stroke-width: 3; opacity: .85; }
.bridge-guides { stroke-width: 2; stroke: #f9c9a1; }
.board { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.panel-heading { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.eyebrow { color: var(--brick); font-size: .77rem; letter-spacing: .13em; font-weight: 800; }
h2 { font-size: 1.55rem; line-height: 1.25; margin-block: 2px 5px; }
.notice { margin: 10px 0 5px; padding: 8px 10px; border-inline-start: 3px solid var(--brick); background: var(--tint); font-size: .88rem; }
.trial { min-inline-size: 0; margin: 8px 0 0; padding: 4px 10px 9px; border: 1px solid var(--line); border-radius: 10px; }
.trial legend { padding: 0 5px; font-size: .82rem; font-weight: 750; color: var(--red-dark); }
.trial-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.trial label, .purchase label { min-width: 0; display: grid; gap: 3px; font-size: .82rem; font-weight: 650; }
input, select { min-width: 0; width: 100%; min-height: 40px; border: 1px solid #a98976; border-radius: 7px; background: #fffdf8; padding: 5px 8px; font-size: 1rem; }
input[aria-invalid="true"] { border: 2px solid var(--brick); }
button { min-height: 40px; border-radius: 8px; border: 1px solid transparent; padding: 6px 10px; font-weight: 700; }
.primary { color: #fff; background: var(--brick); }
.primary:hover { background: var(--red-dark); }
.secondary { background: var(--tint); color: var(--red-dark); border-color: var(--line); }
.quiet, .remove { color: var(--red-dark); background: transparent; }
.quiet:hover, .remove:hover, .secondary:hover { background: #eed3c2; }
.remove { font-size: .82rem; }
.trial-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.small { font-size: .86rem; color: var(--muted); }
.error { color: var(--red-dark); font-size: .86rem; font-weight: 700; }
.row-error { padding-top: 6px; }
p[role]:empty { display: none; }
#entry-status { margin-top: 8px; }
.winner { margin: 13px 0; padding: 13px 15px; color: #fff6eb; background: var(--brick); border-radius: 12px; overflow-wrap: anywhere; }
.winner p { font-size: .89rem; }
.winner strong { font-size: clamp(2.4rem, 5vw, 3.65rem); line-height: 1.18; font-variant-numeric: tabular-nums; }
.rank { margin: 7px 0 13px; padding: 0; list-style: none; }
.rank li { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: center; gap: 4px 8px; border-bottom: 1px solid var(--line); padding: 7px 0; }
.rank span { overflow-wrap: anywhere; }
.rank strong { color: var(--brick); font-variant-numeric: tabular-nums; }
.rank meter { grid-column: 1 / -1; appearance: none; width: 100%; height: 8px; }
.rank meter::-webkit-meter-bar { background: var(--tint); border: 0; }
.rank meter::-webkit-meter-optimum-value { background: var(--brick); border-radius: 9px; }
.rank meter::-moz-meter-bar { background: var(--brick); }
.note { border-top: 1px solid var(--line); padding-top: 10px; }
.delivery { margin: 20px 0 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }
.delivery p:not(.price, .eyebrow) { max-width: 46ch; }
.purchase { display: grid; align-content: start; justify-items: start; gap: 8px; }
.price { font-size: 1.65rem; line-height: 1.2; font-weight: 850; color: var(--brick); }
.price span { font-size: .83rem; font-weight: 600; }
#delivery-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
#delivery-controls select { width: auto; max-width: 100%; }
.foot { padding-block: 15px 24px; font-size: .84rem; color: var(--muted); }
@media (max-width: 760px) {
  .board, .delivery { grid-template-columns: minmax(0, 1fr); }
  .shell { width: calc(100% - 32px); }
  .hero { min-height: 0; padding: 22px; }
}
@media (max-width: 470px) {
  .brand { min-height: 54px; }
  .hero { margin-block: 14px; gap: 3px; padding: 16px; align-items: start; }
  .hero h1 { font-size: clamp(1.65rem, 8.1vw, 2.4rem); }
  .hero-copy > p:last-child { font-size: .88rem; }
  .bridge { width: clamp(62px, 19vw, 90px); margin-top: 16px; }
  .panel { padding: 13px; }
  .board { gap: 13px; }
  .trial-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .trial label:first-child { grid-column: 1 / -1; }
  .remove { grid-column: 2; justify-self: end; }
  .trial label { font-size: .76rem; }
}
