:root {
  color-scheme: light;
  --ink: #172540;
  --muted: #53627a;
  --border: #dbe3ef;
  --blue: #204fbb;
  --focus: #4e75d6;
  --paper: #fff;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f3f6fc; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 34px; min-height: 67px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.03rem; font-weight: 750; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #1b3674; color: #e5efff; font-size: 1.2rem; }
.brand-divider { display: inline-block; vertical-align: middle; width: 1px; height: 13px; background: #bac7e0; margin: 0 7px; }
.navigation { display: flex; align-self: stretch; gap: 21px; }
.nav-button { border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: .9rem; padding: 0 3px; white-space: nowrap; }
.nav-button[aria-current] { border-bottom-color: var(--blue); color: var(--blue); font-weight: 700; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 42px; padding: 8px 15px; border: 1px solid transparent; border-radius: 10px; text-align: center; text-decoration: none; font-size: .9rem; font-weight: 700; white-space: nowrap; }
.primary { color: #fff; background: var(--blue); }
.primary:hover { background: #173e9e; }
.quiet { color: var(--ink); background: #fff; border-color: var(--border); }
.quiet:hover { background: #edf3ff; }
.danger { background: #a62840; color: #fff; }
.danger:hover { background: #8d1e35; }
.top-publish { margin-left: auto; }
.top-publish span { font-size: 1.1rem; line-height: 1; }
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 250px; margin-top: 28px; padding: clamp(23px, 5vw, 52px); overflow: hidden; border: 1px solid #293e68; border-radius: 22px; background: radial-gradient(ellipse at 83% 110%, #364c98 0, transparent 56%), linear-gradient(110deg, #111e3a 10%, #233b76 100%); color: #fff; box-shadow: 0 10px 25px #20356613; }
.hero::after { content: ""; z-index: -1; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #d3e2ff11 0 1px, transparent 1px 30px); mask-image: linear-gradient(90deg, transparent 40%, black); }
.hero-text { position: relative; z-index: 1; }
.hero-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 17px; color: #c1d5ff; font-size: .9rem; font-weight: 650; }
.hero-star { color: #9bbaff; }
.hero h1 { font-size: clamp(1.85rem, 5vw, 3.25rem); letter-spacing: .025em; font-weight: 800; line-height: 1.18; }
.hero p { margin-top: 14px; color: #d0def7; font-size: clamp(1rem, 2vw, 1.12rem); line-height: 1.6; }
.hero-art { position: absolute; width: 300px; height: 210px; top: 50%; right: 6%; transform: translateY(-50%); }
.orbit { position: absolute; border: 1px solid #9dbeff4f; border-radius: 50%; transform: rotate(-22deg); }
.orbit-outer { inset: 15px -16px 24px -16px; }
.orbit-inner { inset: 40px 14px 44px 13px; }
.spark { position: absolute; color: #dae7ff; }
.spark-one { top: 12px; right: 19px; font-size: 1.7rem; }
.spark-two { bottom: 27px; left: 4px; font-size: 1.45rem; }
.spark-three { bottom: 24px; right: 35px; font-size: .85rem; color: #a5bcf5; }
.ticket { position: absolute; border-radius: 15px; width: 197px; height: 108px; }
.ticket-back { left: 62px; top: 56px; transform: rotate(12deg); background: #5374bc; border: 1px solid #a6c3ff; }
.ticket-front { left: 40px; top: 50px; transform: rotate(-12deg); background: linear-gradient(135deg, #edf4ff, #b8cbff); box-shadow: 0 9px 24px #111e3a80; border: 1px solid #edf3ff; }
.ticket-ornament { position: absolute; left: 17px; top: 15px; display: grid; place-items: center; width: 26px; height: 26px; background: #d3e2ff; border: 1px solid #8ca8dd; border-radius: 8px; color: #284381; }
.ticket-bars { position: absolute; left: 17px; top: 58px; width: 72px; height: 7px; border-radius: 4px; background: #5876b6; }
.ticket-bars.short { top: 74px; width: 46px; opacity: .54; }
.ticket-perforation { position: absolute; top: 11px; bottom: 11px; right: 49px; border-left: 1px dashed #5573b5; }
.ticket-stripes { position: absolute; inset: 22px 15px 23px auto; width: 19px; background: repeating-linear-gradient(0deg, #42609e 0 2px, transparent 2px 4px, #42609e 4px 5px, transparent 5px 9px); }
.market-layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 24px; align-items: start; margin-top: 25px; }
.results, .help { border: 1px solid var(--border); border-radius: 17px; background: var(--paper); }
.results { padding: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.section-heading h2, .dialog-heading h2 { font-size: 1.32rem; }
.section-heading p, .dialog-heading p { margin-top: 5px; color: var(--muted); font-size: .9rem; }
.refresh { min-height: 38px; }
.refresh span { font-size: 1.15rem; line-height: 1; }
.filters { margin-bottom: 16px; }
.select-field select, .dialog-fields input { border: 1px solid var(--border); background: #f7f9fd; border-radius: 9px; min-height: 44px; color: var(--ink); }
.select-field { position: relative; display: inline-block; }
.select-field::after { content: ""; position: absolute; width: 7px; height: 7px; right: 14px; top: calc(50% - 5px); border: solid #53627a; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.select-field select { appearance: none; padding: 8px 33px 8px 12px; font-size: .9rem; cursor: pointer; }
.result-list { display: grid; gap: 10px; }
.empty { display: grid; justify-items: center; align-content: center; min-height: 204px; gap: 9px; padding: 24px 12px; text-align: center; background: #f8faff; border: 1px dashed #cbd8ee; border-radius: 12px; }
.empty-icon { width: 40px; height: 37px; border-radius: 10px; display: grid; place-items: center; color: #345cac; background: #e8efff; font-size: 1.25rem; font-weight: 700; }
.empty p { color: var(--muted); font-size: .9rem; }
.empty .button { margin-top: 6px; }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; }
.offer h3 { overflow-wrap: anywhere; font-size: 1rem; }
.offer-meta { display: flex; flex-wrap: wrap; column-gap: 9px; row-gap: 3px; margin-top: 5px; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.offer-price { color: #214496; font-weight: 800; font-size: 1.18rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.offer-action { display: grid; justify-items: end; gap: 5px; }
.offer-action .button { min-height: 36px; font-size: .82rem; color: var(--blue); }
.code { font-family: ui-monospace, "Cascadia Code", monospace; color: #263e6c; overflow-wrap: anywhere; word-break: break-all; }
.offer.mine { grid-template-columns: minmax(0, 1fr); }
.mine-heading { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.mine-actions { display: flex; gap: 6px; }
.mine-actions .button { min-height: 36px; padding-inline: 9px; }
.mine-items { display: flex; flex-wrap: wrap; gap: 6px; }
.mine-item { border-radius: 6px; padding: 4px 8px; background: #edf3ff; color: #304d84; font-size: .88rem; overflow-wrap: anywhere; }
.more { margin: 12px auto 0; display: flex; }
.help { padding: 20px; background: #f9fbff; }
.help-heading { display: flex; align-items: center; gap: 9px; }
.help-heading > span { display: grid; place-items: center; flex: none; border-radius: 8px; width: 28px; height: 28px; color: #2952a5; background: #e4edff; }
.help h2 { font-size: 1rem; }
.guide { counter-reset: guide; list-style: none; padding: 0; margin: 17px 0; display: grid; gap: 15px; }
.guide li { position: relative; padding-left: 34px; counter-increment: guide; }
.guide li::before { content: counter(guide); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #cbdaf6; border-radius: 50%; color: #345cac; font-size: .8rem; font-weight: 750; }
.guide strong, .guide span { display: block; font-size: .9rem; line-height: 1.55; }
.guide span { margin-top: 2px; color: var(--muted); }
.help-foot { border-top: 1px solid var(--border); padding-top: 13px; color: var(--muted); font-size: .85rem; line-height: 1.55; }
.footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 25px; padding-block: 15px 25px; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem; }
dialog { padding: 0; width: min(510px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow: auto; border: 1px solid var(--border); border-radius: 17px; background: white; color: var(--ink); box-shadow: 0 18px 56px #14264b45; }
dialog::backdrop { background: #13234c8c; }
.dialog-heading, .dialog-footer { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 18px 21px; }
.dialog-heading { border-bottom: 1px solid var(--border); }
.dialog-footer { justify-content: end; border-top: 1px solid var(--border); }
.dialog-fields { display: grid; gap: 13px; padding: 18px 21px; }
.dialog-fields label { display: grid; gap: 6px; font-size: .9rem; font-weight: 700; }
.dialog-fields label:has(.optional) { display: block; }
.dialog-fields label:has(.optional) input { display: block; margin-top: 6px; }
.dialog-fields input { width: 100%; padding: 8px 11px; font-size: 1rem; font-weight: 400; min-width: 0; }
.optional, .field-hint { color: var(--muted); font-size: .82rem; font-weight: 400; }
.field-hint { line-height: 1.5; }
.icon-button { width: 37px; padding: 0; min-height: 40px; color: var(--muted); background: #edf3fb; font-size: 1.25rem; }
.icon-button:hover { background: #e0e9fb; }
.form-error { color: #a62840; font-size: .9rem; font-weight: 650; }
.confirm-content { display: grid; gap: 12px; padding: 22px; }
.confirm-content h2 { font-size: 1.12rem; }
.confirm-content > p { line-height: 1.5; }
.confirm-actions { display: flex; gap: 8px; justify-content: end; }
.toast { position: fixed; z-index: 2; bottom: 20px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 12px 17px; border-radius: 10px; color: #fff; background: #13254c; box-shadow: 0 8px 20px #18265030; font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 820px) {
  .hero-art { right: 3%; scale: .76; transform-origin: right top; }
  .market-layout { grid-template-columns: minmax(0, 1fr) 238px; gap: 14px; }
  .results, .help { padding: 16px; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 28px); }
  .topbar-inner { flex-wrap: wrap; gap: 0 8px; min-height: 0; padding-top: 10px; }
  .brand { gap: 6px; font-size: .95rem; }
  .brand-icon { width: 29px; height: 29px; }
  .top-publish { min-height: 38px; padding-inline: 9px; font-size: .85rem; }
  .navigation { order: 3; width: 100%; min-height: 43px; gap: 17px; }
  .hero { margin-top: 13px; min-height: 173px; border-radius: 16px; }
  .hero-kicker { margin-bottom: 10px; }
  .hero p { margin-top: 9px; }
  .hero-art { display: none; }
  .market-layout { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
  .results { padding: 13px; }
  .filters select { padding-left: 8px; padding-right: 25px; }
  .filters .select-field::after { right: 11px; }
  .footer { font-size: .78rem; }
}
