:root {
  color-scheme: dark;
  --night: #07141e;
  --deep-sea: #0b1d29;
  --sea: #102b38;
  --sea-light: #173744;
  --ivory: #f3eee4;
  --muted: #afbdc0;
  --subtle: #71858b;
  --champagne: #d9b878;
  --champagne-bright: #f3dca6;
  --champagne-soft: rgba(217, 184, 120, 0.12);
  --rarity-gold: #f3dca6;
  --rarity-gold-soft: rgba(243, 220, 166, 0.18);
  --rarity-silver: #d9e0e2;
  --rarity-silver-soft: rgba(217, 224, 226, 0.15);
  --rarity-copper: #cf8c5e;
  --rarity-copper-soft: rgba(207, 140, 94, 0.16);
  --red: #d96c60;
  --green: #8cc8b2;
  --line: rgba(216, 229, 226, 0.13);
  --line-strong: rgba(216, 229, 226, 0.24);
  --shadow: 0 22px 65px rgba(0, 0, 0, 0.22);
  --radius-xl: 26px;
  --radius-lg: 19px;
  --radius-md: 13px;
  --radius-sm: 9px;
  font-family: Inter, "Avenir Next", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--night);
  color: var(--ivory);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 78% 2%, rgba(47, 108, 118, 0.18), transparent 34rem),
    radial-gradient(ellipse at 15% 42%, rgba(30, 83, 93, 0.12), transparent 30rem),
    linear-gradient(180deg, #07141e 0%, #091923 53%, #07131c 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(rgba(217, 184, 120, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(217, 184, 120, 0.025) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 62%);
  content: "";
  pointer-events: none;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--champagne-bright);
  outline-offset: 3px;
}

a { color: inherit; }

.ambient { position: fixed; z-index: -1; pointer-events: none; }
.ambient-one { top: 25%; left: -18rem; width: 32rem; height: 12rem; border: 1px solid rgba(119, 174, 177, 0.09); border-radius: 50%; transform: rotate(-16deg); }
.ambient-two { top: 60%; right: -20rem; width: 34rem; height: 15rem; border: 1px solid rgba(217, 184, 120, 0.07); border-radius: 50%; transform: rotate(12deg); }

.site-header, .page-shell, .site-footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-bottom: 1px solid rgba(216, 229, 226, 0.08);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.brand strong, .brand small { display: block; }
.brand strong { color: var(--ivory); font-size: 15px; letter-spacing: 0.16em; }
.brand small { margin-top: 3px; color: var(--champagne); font-size: 10px; letter-spacing: 0.12em; }
.header-orbit { display: flex; align-items: center; gap: 13px; color: var(--subtle); font-size: 10px; letter-spacing: 0.18em; }
.header-orbit strong { color: var(--champagne); font-size: 10px; font-weight: 700; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: clamp(40px, 8vw, 110px);
  align-items: center;
  min-height: 510px;
  padding: 82px 0 70px;
}

.hero-kicker, .section-label, .results-overline, .panel-kicker, .wish-kicker {
  color: var(--champagne);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-kicker { display: flex; align-items: center; gap: 9px; }
.eyebrow-dot, .status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--champagne); box-shadow: 0 0 13px rgba(243, 220, 166, 0.68); }
.hero h1 { max-width: 760px; margin: 19px 0 17px; color: var(--ivory); font-size: clamp(48px, 6.4vw, 82px); font-weight: 500; letter-spacing: -0.075em; line-height: 0.99; }
.hero h1 em { color: var(--champagne-bright); font-family: Georgia, "Songti SC", serif; font-style: normal; font-weight: 400; }
.hero-copy { max-width: 545px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; border-radius: var(--radius-sm); padding: 0 17px; font-size: 12px; font-weight: 750; text-decoration: none; transition: border-color .2s ease, background .2s ease, transform .2s ease, color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { border: 1px solid var(--champagne); background: var(--champagne); color: #16252a; box-shadow: 0 10px 26px rgba(217, 184, 120, 0.12); }
.button-primary:hover { border-color: var(--champagne-bright); background: var(--champagne-bright); }
.button-secondary { border: 1px solid var(--line-strong); background: rgba(16, 43, 56, 0.62); color: var(--ivory); }
.button-secondary:hover { border-color: rgba(243, 220, 166, 0.5); color: var(--champagne-bright); }
.source-line { display: flex; flex-wrap: wrap; align-items: center; gap: 13px 24px; margin-top: 32px; color: var(--subtle); font-size: 11px; }
.source-line a { color: var(--muted); text-underline-offset: 4px; }
.source-line a:hover { color: var(--champagne-bright); }
.source-status { display: inline-flex; align-items: center; gap: 8px; }
.source-status.is-error .status-dot { background: var(--red); box-shadow: 0 0 13px rgba(217, 108, 96, 0.55); }

.hero-side { position: relative; }
.rotation-plaque { position: relative; overflow: hidden; border: 1px solid rgba(216, 229, 226, 0.18); border-radius: var(--radius-xl); padding: 27px; background: linear-gradient(145deg, rgba(23, 55, 68, 0.92), rgba(9, 28, 39, 0.92)); box-shadow: var(--shadow); }
.rotation-plaque::before { position: absolute; right: -50px; bottom: -90px; width: 230px; height: 230px; border: 1px solid rgba(243, 220, 166, 0.17); border-radius: 50%; content: ""; }
.rotation-plaque::after { position: absolute; right: -6px; bottom: -34px; width: 160px; height: 160px; border: 1px solid rgba(243, 220, 166, 0.1); border-radius: 50%; content: ""; }
.plaque-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plaque-index { color: var(--subtle); font-size: 10px; letter-spacing: 0.12em; }
.rotation-plaque h2 { position: relative; z-index: 1; max-width: 350px; margin: 18px 0 8px; color: var(--ivory); font-size: 25px; font-weight: 550; letter-spacing: -0.04em; }
.rotation-plaque p { position: relative; z-index: 1; max-width: 330px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.rotation-featured { position: relative; z-index: 1; display: grid; gap: 14px; margin-top: 24px; }
.rotation-group { display: grid; gap: 7px; }
.rotation-group-label { color: var(--champagne); font-size: 9px; font-weight: 750; letter-spacing: .11em; }
.rotation-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rotation-chip { display: grid; gap: 5px; min-height: 58px; border: 1px solid rgba(216, 229, 226, 0.12); border-radius: var(--radius-sm); padding: 10px; background: rgba(7, 20, 30, 0.38); color: var(--ivory); font-size: 11px; font-weight: 650; }
.rotation-chip::before { width: 20px; height: 1px; background: var(--champagne); content: ""; }
.rotation-chip em { color: var(--subtle); font-size: 10px; font-style: normal; font-weight: 400; }
.plaque-route { position: relative; z-index: 1; display: flex; align-items: center; gap: 0; margin-top: 28px; opacity: .75; }
.plaque-route span { width: 5px; height: 5px; border: 1px solid var(--champagne); border-radius: 50%; }
.plaque-route i { width: 88px; height: 1px; background: linear-gradient(90deg, var(--champagne), rgba(243, 220, 166, 0.12)); transform: skewX(-30deg); }
.hero-side-note { display: flex; align-items: center; gap: 9px; margin-top: 15px; color: var(--subtle); font-size: 10px; letter-spacing: .08em; }
.note-mark { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid rgba(243, 220, 166, .5); border-radius: 50%; color: var(--champagne); font-family: Georgia, serif; font-size: 11px; }

.workbench { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); gap: 16px; scroll-margin-top: 24px; }
.panel, .results, .boundary-note { border: 1px solid var(--line); background: rgba(12, 35, 47, 0.82); box-shadow: var(--shadow); }
.panel { border-radius: var(--radius-xl); padding: clamp(22px, 3vw, 31px); }
.panel-heading, .results-header, .breakdown-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-kicker { display: block; color: var(--champagne); }
.panel h2, .results h2 { margin: 8px 0 0; color: var(--ivory); font-size: 22px; font-weight: 560; letter-spacing: -0.045em; }
.panel-count { padding-top: 5px; color: var(--champagne); font-size: 11px; white-space: nowrap; }
.panel-seal { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(243, 220, 166, 0.45); border-radius: 50%; color: var(--champagne); font-size: 9px; letter-spacing: .08em; }
.panel-intro { max-width: 440px; margin: 10px 0 0; color: var(--subtle); font-size: 12px; line-height: 1.65; }
.target-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 26px; }
.target-toolbar .field-label { margin: 0; }
.toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 11px; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--champagne); font-size: 11px; }
.text-button:hover { color: var(--champagne-bright); }
.target-options { display: grid; gap: 18px; margin-top: 13px; }
.item-option-group { display: grid; gap: 9px; }
.item-option-group-heading { display: flex; align-items: center; justify-content: space-between; color: var(--ivory); font-size: 11px; font-weight: 700; }
.item-option-group-heading em { color: var(--subtle); font-size: 9px; font-style: normal; font-weight: 500; }
.target-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.target-option { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto auto; gap: 7px 10px; min-height: 143px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 15px; background: rgba(7, 20, 30, 0.38); cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.target-option:hover { border-color: var(--line-strong); background: rgba(23, 55, 68, 0.55); transform: translateY(-2px); }
.target-option.is-selected { border-color: rgba(243, 220, 166, 0.66); background: linear-gradient(145deg, rgba(70, 61, 43, 0.48), rgba(14, 43, 54, 0.72)); }
.target-option input { grid-row: 1 / span 2; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--champagne); }
.target-option-main { min-width: 0; }
.target-option-name { display: block; overflow: hidden; color: var(--ivory); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.target-option-meta { display: block; margin-top: 3px; color: var(--subtle); font-size: 10px; }
.target-option-progress { align-self: start; color: var(--champagne); font-size: 11px; white-space: nowrap; }
.target-option-status { grid-column: 2 / span 2; color: var(--muted); font-size: 11px; }
.target-option-status strong { color: var(--ivory); font-weight: 600; }
.target-option-meter { grid-column: 2 / span 2; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(216, 229, 226, 0.12); }
.target-option-meter span { display: block; height: 100%; border-radius: inherit; background: var(--champagne); }
.parts-heading { display: flex; align-items: center; justify-content: space-between; margin: 27px 0 10px; color: var(--muted); font-size: 12px; }
.parts-legend { color: var(--subtle); font-size: 10px; }
.legend-check { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 4px; border: 1px solid rgba(140, 200, 178, .35); border-radius: 50%; color: var(--green); font-size: 10px; }
.collection-list { display: grid; gap: 10px; }
.collection-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(7, 20, 30, 0.38); }
.collection-card.is-complete { border-color: rgba(140, 200, 178, .42); }
.collection-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 14px 11px; }
.collection-card-title { color: var(--ivory); font-size: 13px; font-weight: 700; }
.collection-card-subtitle { display: block; margin-top: 4px; color: var(--subtle); font-size: 10px; }
.complete-button { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; background: transparent; color: var(--champagne); font-size: 10px; white-space: nowrap; }
.complete-button:hover { border-color: var(--champagne); }
.collection-card .part-row { border-width: 1px 0 0; border-radius: 0; padding: 10px 14px; }
.part-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(7, 20, 30, .36); transition: border-color .2s ease, background .2s ease; }
.part-row:hover { border-color: var(--line-strong); background: rgba(23, 55, 68, .52); }
.part-row.is-owned { border-color: rgba(140, 200, 178, .28); background: rgba(31, 70, 67, .2); }
.part-row input { width: 17px; height: 17px; accent-color: var(--green); }
.part-name { flex: 1; min-width: 0; color: var(--ivory); font-size: 12px; }
.part-quantity { display: inline-flex; align-items: center; gap: 4px; color: var(--champagne-bright); font-size: 10px; white-space: nowrap; }
.part-quantity button { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: rgba(7, 20, 30, .55); color: var(--champagne); }
.part-quantity button:hover { border-color: var(--champagne); }
.part-meta { color: var(--subtle); font-size: 10px; white-space: nowrap; }
.rarity { padding: 3px 7px; border-radius: 999px; font-size: 10px; white-space: nowrap; }
.rarity-common { color: var(--rarity-copper); background: var(--rarity-copper-soft); }
.rarity-uncommon { color: var(--rarity-silver); background: var(--rarity-silver-soft); }
.rarity-rare { color: var(--rarity-gold); background: var(--rarity-gold-soft); }

.settings-grid { display: grid; gap: 19px; margin-top: 25px; }
.mode-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin-top: 25px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(7, 20, 30, .55); }
.mode-picker button { min-height: 38px; border: 0; border-radius: 7px; background: transparent; color: var(--subtle); font-size: 11px; }
.mode-picker button[aria-pressed="true"] { background: var(--champagne-soft); color: var(--champagne-bright); }
.goal-line-field[hidden] { display: none; }
.field-group { display: block; }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.select-wrap { position: relative; }
.select-wrap::after { position: absolute; top: 50%; right: 15px; color: var(--champagne); content: "⌄"; pointer-events: none; transform: translateY(-57%); }
select, input[type="number"] { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: rgba(7, 20, 30, .68); color: var(--ivory); }
select { appearance: none; padding: 13px 40px 13px 13px; }
select:hover, input[type="number"]:hover { border-color: rgba(243, 220, 166, .52); }
.number-input-wrap { position: relative; display: block; }
.number-input-wrap input { padding: 12px 45px 12px 14px; color: var(--champagne-bright); font-size: 23px; font-weight: 700; }
.number-input-wrap > span { position: absolute; top: 50%; right: 15px; color: var(--subtle); font-size: 11px; pointer-events: none; transform: translateY(-50%); }
input[type=number]::-webkit-inner-spin-button { opacity: .45; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(7, 20, 30, .55); }
.segmented button { min-height: 39px; border: 0; border-radius: 7px; background: transparent; color: var(--subtle); font-size: 11px; }
.segmented button[aria-pressed="true"] { background: var(--sea-light); color: var(--champagne-bright); }
.strategy-note { margin-top: 22px; padding: 12px 14px; border-left: 2px solid var(--champagne); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: rgba(217, 184, 120, .07); color: var(--muted); font-size: 11px; line-height: 1.65; }
.run-area { display: grid; gap: 9px; margin-top: 27px; }
.run-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 53px; border: 1px solid var(--champagne); border-radius: var(--radius-sm); background: var(--champagne); color: #16252a; font-weight: 800; box-shadow: 0 10px 26px rgba(217, 184, 120, .12); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.run-button:hover { background: var(--champagne-bright); box-shadow: 0 14px 32px rgba(217, 184, 120, .18); transform: translateY(-2px); }
.run-button:disabled { cursor: progress; opacity: .7; transform: none; }
.run-icon { font-size: 18px; transform: rotate(-35deg); }
.run-arrow { margin-left: 4px; font-size: 19px; }
.run-caption { color: var(--subtle); text-align: center; font-size: 10px; }

.results { margin-top: 16px; border-radius: var(--radius-xl); padding: clamp(22px, 3vw, 32px); }
.results-overline { display: block; color: var(--champagne); }
.results h2 { margin-top: 8px; }
.results-subline { margin: 8px 0 0; color: var(--subtle); font-size: 11px; }
.trial-badge { margin-top: 5px; color: var(--champagne); font-size: 10px; letter-spacing: .07em; white-space: nowrap; }
.results-summary { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(230px, .75fr); gap: 12px; margin-top: 26px; }
.result-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(7, 20, 30, .42); }
.result-primary { min-height: 185px; padding: 22px; border-color: rgba(243, 220, 166, .5); background: linear-gradient(145deg, rgba(67, 61, 44, .54), rgba(14, 43, 54, .78)); }
.result-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-label, .metric-label { color: var(--muted); font-size: 11px; }
.result-status { padding: 5px 8px; border: 1px solid rgba(243, 220, 166, .35); border-radius: 999px; color: var(--champagne-bright); font-size: 10px; white-space: nowrap; }
.result-value { display: block; margin-top: 22px; color: var(--champagne-bright); font-family: Georgia, "Songti SC", serif; font-size: clamp(53px, 7vw, 84px); font-weight: 500; letter-spacing: -0.08em; line-height: .9; }
.result-detail { display: block; margin-top: 11px; color: var(--muted); font-size: 11px; }
.probability-track { height: 4px; margin-top: 23px; overflow: hidden; border-radius: 99px; background: rgba(216, 229, 226, .12); }
.probability-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--champagne-bright); transition: width .6s ease; }
.result-aside { display: grid; gap: 12px; }
.result-sentence { display: flex; align-items: center; min-height: 88px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: rgba(23, 55, 68, .54); color: var(--ivory); font-size: 13px; line-height: 1.65; }
.metric-card { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: end; gap: 4px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; background: rgba(7, 20, 30, .42); }
.metric-card .metric-label { grid-column: 1 / span 2; }
.metric-card strong { color: var(--champagne-bright); font-family: Georgia, "Songti SC", serif; font-size: 32px; font-weight: 500; letter-spacing: -.05em; }
.metric-card > span:last-child { padding-bottom: 4px; color: var(--subtle); font-size: 10px; }
.rotation-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.rotation-summary article { display: grid; gap: 5px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 13px 14px; background: rgba(7, 20, 30, .34); }
.rotation-summary span { color: var(--subtle); font-size: 9px; }
.rotation-summary strong { overflow: hidden; color: var(--champagne-bright); font-family: Georgia, "Songti SC", serif; font-size: 23px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.rotation-summary em { color: var(--muted); font-size: 9px; font-style: normal; }

.probability-section { margin-top: 28px; padding: 24px 0 4px; border-top: 1px solid var(--line); }
.section-heading-inline { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.section-heading-inline h3 { margin: 7px 0 0; color: var(--ivory); font-size: 18px; font-weight: 600; letter-spacing: -.04em; }
.race-budget { color: var(--champagne); font-size: 11px; white-space: nowrap; }
.probability-race { padding: 25px 12px 7px; }
.race-track { position: relative; height: 100px; margin: 0 20px; }
.race-line, .race-fill { position: absolute; top: 50%; left: 0; height: 2px; border-radius: 99px; transform: translateY(-50%); }
.race-line { width: 100%; background: rgba(216, 229, 226, .18); }
.race-fill { width: 0; background: linear-gradient(90deg, var(--champagne), var(--champagne-bright)); transition: width .7s ease; }
.race-dot { position: absolute; top: 50%; width: 7px; height: 7px; border: 1px solid var(--champagne); border-radius: 50%; background: var(--night); transform: translate(-50%, -50%); }
.race-dot-start { left: 0; }
.race-dot-end { left: 100%; }
.race-marker { position: absolute; top: 50%; display: grid; gap: 5px; min-width: 46px; color: var(--muted); text-align: center; transform: translate(-50%, -50%); transition: left .7s ease; }
.race-marker::after { position: absolute; top: 100%; left: 50%; width: 1px; height: 13px; background: rgba(216, 229, 226, .32); content: ""; transform: translateX(-50%); }
.race-marker > span { color: var(--subtle); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.race-marker > strong { color: var(--ivory); font-size: 11px; font-weight: 650; white-space: nowrap; }
.marker-p50 { top: 31%; }
.marker-p90 { top: 69%; }
.marker-p95 { top: 31%; }
.marker-p99 { top: 69%; }
.race-you { top: 50%; z-index: 2; min-width: 52px; }
.race-you > span { color: var(--red); }
.race-you > strong { color: var(--red); }
.race-you::before { position: absolute; top: 50%; left: 50%; width: 19px; height: 19px; border: 1px solid rgba(217, 108, 96, .65); border-radius: 50%; content: ""; transform: translate(-50%, -50%); }
.race-you::after { display: none; }
.race-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--subtle); font-size: 10px; }
.race-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-line, .legend-you { display: inline-block; width: 18px; height: 2px; background: var(--champagne); }
.legend-you { width: 8px; height: 8px; border: 1px solid var(--red); border-radius: 50%; background: transparent; }

.verdict { display: flex; align-items: flex-start; gap: 10px; margin: 25px 0 28px; padding: 15px 17px; border: 1px solid rgba(217, 184, 120, .17); border-radius: var(--radius-md); background: rgba(217, 184, 120, .06); color: var(--muted); font-size: 12px; line-height: 1.65; }
.verdict-mark { flex: 0 0 auto; color: var(--champagne); }
.verdict-status { flex: 0 0 auto; color: var(--champagne-bright); white-space: nowrap; }
.verdict-tail { margin-left: auto; color: var(--champagne); font-size: 10px; white-space: nowrap; }
.timeline-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 29px; padding: 18px 20px; border: 1px solid rgba(119, 174, 177, .24); border-radius: var(--radius-lg); background: linear-gradient(100deg, rgba(23, 55, 68, .72), rgba(7, 20, 30, .45)); }
.timeline-copy { display: grid; gap: 5px; }
.timeline-kicker { color: var(--subtle); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.timeline-copy strong { color: var(--ivory); font-size: 13px; }
.timeline-copy span:last-child { color: var(--muted); font-size: 11px; }
.timeline-number { color: var(--champagne-bright); font-family: Georgia, "Songti SC", serif; font-size: 32px; letter-spacing: -.06em; white-space: nowrap; }
.breakdown-panel { border-top: 1px solid var(--line); padding-top: 26px; }
.breakdown-heading h3 { margin: 7px 0 0; color: var(--ivory); font-size: 17px; font-weight: 600; }
.breakdown-heading p { margin: 6px 0 0; color: var(--subtle); font-size: 11px; }
.trace-total { color: var(--champagne); font-size: 10px; white-space: nowrap; }
.table-wrap { margin-top: 18px; overflow-x: auto; }
table { width: 100%; min-width: 600px; border-collapse: collapse; }
th { padding: 0 10px 10px; color: var(--subtle); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-align: left; white-space: nowrap; }
td { padding: 13px 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; white-space: nowrap; }
td:first-child { color: var(--ivory); font-weight: 650; }
td:not(:first-child):last-child { color: var(--champagne-bright); }
.table-route { display: block; margin-top: 3px; color: var(--subtle); font-size: 9px; font-weight: 400; }
.empty-row { color: var(--green) !important; }
.secondary-results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 17px; }
.secondary-panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(7, 20, 30, .36); }
.target-result-list, .recommendation-list, .curve-list { display: grid; gap: 9px; margin-top: 17px; }
.target-result-row, .recommendation-row, .curve-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.target-result-row:last-child, .recommendation-row:last-child, .curve-row:last-child { border-bottom: 0; padding-bottom: 0; }
.target-result-name { color: var(--ivory); font-weight: 700; }
.target-result-probability { color: var(--champagne-bright); }
.recommendation-row { align-items: flex-start; }
.recommendation-main { display: grid; gap: 4px; min-width: 0; }
.recommendation-main strong { overflow: hidden; color: var(--ivory); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.recommendation-main span { color: var(--subtle); font-size: 10px; }
.aya-stack { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.aya-tokens { display: flex; gap: 3px; }
.aya-token { display: inline-block; width: 8px; height: 8px; border: 1px solid var(--champagne); border-radius: 50%; background: rgba(217, 184, 120, .22); }
.aya-stack > span:last-child { color: var(--champagne); font-size: 10px; white-space: nowrap; }
.curve-row span:last-child { color: var(--green); }
.curve-heading { margin: 18px 0 0; color: var(--subtle); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.boundary-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 16px 18px; border-radius: var(--radius-lg); background: rgba(7, 20, 30, .55); box-shadow: none; }
.boundary-icon { display: grid; place-items: center; flex: 0 0 auto; width: 18px; height: 18px; border: 1px solid var(--subtle); border-radius: 50%; color: var(--muted); font-family: Georgia, serif; font-size: 12px; }
.boundary-note p { margin: 0; color: var(--subtle); font-size: 10px; line-height: 1.75; }
.boundary-note strong { color: var(--muted); }
.wish-entry { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 18px 20px; border: 1px solid rgba(217, 184, 120, .24); border-radius: var(--radius-lg); background: rgba(217, 184, 120, .06); }
.wish-entry p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.wish-entry a { border: 1px solid rgba(217, 184, 120, .5); border-radius: var(--radius-sm); padding: 10px 13px; color: var(--champagne-bright); font-size: 11px; text-decoration: none; white-space: nowrap; }
.wish-entry a:hover { background: rgba(217, 184, 120, .1); }
.data-sources { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 15px; color: var(--subtle); font-size: 9px; line-height: 1.6; }
.data-sources a { color: var(--muted); text-underline-offset: 3px; }
.data-sources strong { color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 31px 0 42px; color: var(--subtle); font-size: 10px; line-height: 1.5; }
.site-footer strong { color: var(--champagne); letter-spacing: .14em; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; min-height: auto; padding-top: 62px; }
  .hero-side { max-width: 650px; }
  .workbench { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .site-header, .page-shell, .site-footer { width: min(100% - 28px, 1180px); }
  .site-header { min-height: 70px; }
  .header-orbit { display: none; }
  .hero { gap: 30px; padding: 48px 0 38px; }
  .hero h1 { font-size: clamp(46px, 14vw, 64px); }
  .hero-copy { font-size: 14px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .source-line { display: grid; gap: 10px; margin-top: 24px; }
  .rotation-plaque { padding: 21px; border-radius: var(--radius-lg); }
  .rotation-plaque h2 { font-size: 22px; }
  .target-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .text-button { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: rgba(7, 20, 30, .32); }
  .target-option-grid { grid-template-columns: 1fr; }
  .complete-button { min-height: 34px; }
  .part-quantity button { width: 30px; height: 30px; }
  .mode-picker button, .segmented button { min-height: 44px; }
  .panel, .results { border-radius: var(--radius-lg); padding: 21px 17px; }
  .panel h2, .results h2 { font-size: 20px; }
  .results-summary { grid-template-columns: 1fr; margin-top: 20px; }
  .result-primary { min-height: 165px; padding: 19px; }
  .result-value { margin-top: 19px; font-size: 58px; }
  .result-sentence { min-height: 72px; }
  .rotation-summary { grid-template-columns: 1fr 1fr; }
  .probability-section { margin-top: 23px; padding-top: 21px; }
  .section-heading-inline { align-items: flex-start; flex-direction: column; gap: 8px; }
  .probability-race { padding: 22px 4px 0; }
  .race-track { height: 112px; margin: 0 13px; }
  .race-marker { min-width: 42px; }
  .race-legend { gap: 7px 12px; line-height: 1.5; }
  .verdict { flex-wrap: wrap; margin: 21px 0; }
  .verdict-tail { width: 100%; margin-left: 28px; }
  .timeline-panel { align-items: flex-start; flex-direction: column; gap: 12px; }
  .timeline-number { font-size: 28px; }
  .table-wrap { margin-top: 14px; overflow: visible; }
  table { display: block; min-width: 0; }
  thead { display: none; }
  tbody { display: grid; gap: 8px; }
  tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 14px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(7, 20, 30, .42); }
  tbody td { display: block; padding: 0; border: 0; white-space: normal; }
  tbody td:first-child { grid-column: 1 / -1; }
  tbody td:not(:first-child)::before { display: block; margin-bottom: 4px; color: var(--subtle); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
  tbody td:nth-child(2)::before { content: "奖励稀有度"; }
  tbody td:nth-child(3)::before { content: "精炼"; }
  tbody td:nth-child(4)::before { content: "本队命中率"; }
  tbody td:nth-child(5)::before { content: "平均遗物数"; }
  tbody td.empty-row { grid-column: 1 / -1; }
  tbody td.empty-row::before { display: none; }
  .secondary-results { grid-template-columns: 1fr; }
  .wish-entry { align-items: flex-start; flex-direction: column; }
  .wish-entry a { width: 100%; text-align: center; }
  .site-footer { flex-direction: column; gap: 8px; padding-bottom: 28px; }
}

@media (max-width: 380px) {
  .brand small { font-size: 9px; }
  .hero h1 { font-size: 45px; }
  .target-option { padding: 13px; }
  .target-option-name { font-size: 13px; }
  .race-marker { min-width: 37px; }
  .race-marker > span { font-size: 8px; }
  .race-marker > strong { font-size: 10px; }
  .aya-stack { gap: 4px; }
  .aya-tokens { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
