:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #fff6d6;
  background: #bf0c16;
  --gold: #ffe186;
  --muted: #ffdda1;
  --border: #ffdb7466;
  --panel: #bc101b;
}
.auth-panel { max-width: 480px; margin: 0 auto 24px; }
.auth-hint { font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.auth-panel input { font-size: 16px; }
* { box-sizing: border-box; }
body { display: flex; flex-direction: column; margin: 0; min-height: 100vh; min-height: 100dvh; background: radial-gradient(ellipse at 50% 0%, #f43b27, transparent 64%), #bf0c16; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #ffdb9f; outline-offset: 3px; }
.topbar {
  min-height: 61px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center;
  padding: 0 clamp(16px, 3vw, 54px); background: #af0d17; border-bottom: 1px solid var(--border);
}
.brand { display: flex; gap: 11px; align-items: center; font-size: 14px; font-weight: 650; letter-spacing: .07em; white-space: nowrap; }
.brand b { color: #f0aa68; padding: 0 2px; }
.seal { width: 31px; height: 31px; display: grid; place-items: center; color: #ffd89a; border: 1px solid #f8ba765c; border-radius: 8px; background: #ce1a21; }
.seal svg, button svg { width: 18px; height: 18px; }
nav { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid #ffd4695c; background: #930a18; border-radius: 9px; }
nav a { font-size: 13px; border-radius: 5px; padding: 7px 16px; color: var(--muted); white-space: nowrap; }
nav a:hover, nav a[aria-current] { background: #d41c23; color: var(--gold); }
.fullscreen, .outline { display: inline-flex; gap: 7px; align-items: center; justify-content: center; color: var(--gold); background: #bd111b; border: 1px solid var(--border); border-radius: 7px; padding: 8px 12px; font-size: 13px; white-space: nowrap; }
.fullscreen { justify-self: end; }
.fullscreen:hover, .outline:hover { background: #e32026; }
.shell { width: min(1740px, 100%); margin: 0 auto; padding: 22px clamp(16px, 3vw, 54px) 0; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 20px;
  min-height: 150px; padding: 23px clamp(21px, 3vw, 48px); border: 1px solid #ffcf69bf; border-radius: 13px;
  background: linear-gradient(110deg, #e51d20 0%, #d71119 40%, #b90c18 100%);
}
.hero::before { position: absolute; content: ""; inset: 5px; border: 1px solid #ffdb7470; border-radius: 9px; pointer-events: none; }
.hero-art { position: absolute; z-index: -1; right: 0; top: 0; width: min(58%, 780px); height: 100%; pointer-events: none; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .12em; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.eyebrow i { display: block; width: 5px; height: 5px; background: #f6bf7e; transform: rotate(45deg); }
h1, h2, p { margin: 0; }
h1 { font-family: "Songti SC", "Noto Serif CJK SC", SimSun, serif; font-size: clamp(32px, 4vw, 59px); font-weight: 800; letter-spacing: .09em; line-height: 1.12; color: #ffe8a7; }
.hero-copy { width: 100%; text-align: center; }
.hero h1 { margin: 8px 0 9px; font-size: clamp(35px, 4.2vw, 68px); filter: drop-shadow(0 1px 0 #a75609) drop-shadow(0 2px 0 #85350b) drop-shadow(0 4px 4px #750910b3); }
.hero h1 span { display: inline-block; white-space: nowrap; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero h1 span {
    background: linear-gradient(180deg, #fff8cf 7%, #ffe58a 32%, #fff0aa 43%, #e7a62f 54%, #ffdc6f 75%, #d48a21 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: .55px #ffe49e;
    color: transparent;
  }
}
@media (forced-colors: active) {
  .hero h1 { filter: none; }
  .hero h1 span { background: none; -webkit-text-stroke: 0; color: CanvasText; }
}
.hero-subtitle { display: flex; align-items: center; justify-content: center; gap: 12px; color: #ffecad; font-size: clamp(14px, 1.5vw, 21px); font-weight: 700; letter-spacing: .15em; }
.hero-subtitle::before, .hero-subtitle::after { content: ""; width: clamp(14px, 3vw, 45px); height: 1px; background: #ffdc83aa; }
.entry-intro p { font-size: 13px; color: #ffe5a7; letter-spacing: .11em; }
.live { position: absolute; right: clamp(21px, 3vw, 48px); display: grid; justify-items: end; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.connection { color: #ffe0af; font-size: 12px; padding: 5px 8px; border: 1px solid #f5ca8452; background: #9d0d1bdc; border-radius: 5px; }
.connection::before { content: ""; width: 6px; height: 6px; display: inline-block; vertical-align: 2px; border-radius: 50%; background: #e7ab68; margin-right: 6px; }
.connection[data-online="true"]::before { background: #9ae3a8; box-shadow: 0 0 8px #9ae3a87c; }
.live time { font-size: clamp(20px, 2.35vw, 34px); line-height: 1.2; font-weight: 650; letter-spacing: .025em; text-shadow: 0 2px 8px #940b15; }
#date { color: #ffe5a3; font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.metric { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(140deg, #e12624, #c90e1a 75%); }
.metric-label { display: flex; align-items: center; gap: 8px; padding: 8px 14px; color: #fff0b2; font-size: 13px; white-space: nowrap; }
.metric-label svg { width: 18px; height: 18px; stroke: var(--gold); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.metric strong { color: #a40816; font-size: clamp(24px, 3vw, 43px); font-variant-numeric: tabular-nums; font-weight: 720; line-height: 1.2; overflow-wrap: anywhere; }
.metric div + div { padding: 3px 14px 6px; background: linear-gradient(110deg, #ffdd72, #ffed9e); }
.metric span { color: #861019; font-size: 12px; margin-left: 7px; white-space: nowrap; }
.dashboard-grid, .entry-grid { display: grid; align-items: start; gap: 14px; }
.dashboard-grid { --row-height: clamp(29px, 4.1vh, 43px); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.panel { border: 1px solid var(--border); border-radius: 11px; background: var(--panel); overflow: hidden; min-width: 0; }
.panel-heading { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 17px; background: linear-gradient(110deg, #d91a22, #c10b18); border-bottom: 1px solid var(--border); }
.section-kicker { display: block; color: #ffdd7c; letter-spacing: .2em; font-size: 9px; font-weight: 700; margin-bottom: 4px; }
h2 { font-size: 19px; line-height: 1.25; letter-spacing: .04em; }
h2 em { display: inline-block; font-style: normal; font-size: 11px; letter-spacing: .07em; color: #ffdb9d; padding: 2px 6px; border: 1px solid #ffce8458; background: #a60b16; border-radius: 4px; margin-left: 3px; vertical-align: 2px; white-space: nowrap; }
.panel-note { color: var(--muted); font-size: 12px; white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0 13px; }
th:first-child, td:first-child { padding-left: 17px; }
th { height: 33px; background: #a70b17; color: #ffe49d; font-weight: 550; font-size: 12px; white-space: nowrap; }
td { height: var(--row-height, 44px); font-size: 14px; border-top: 1px solid #ffda6f3b; }
tbody tr:nth-child(even) { background: #ffc6610f; }
.rank-table th:first-child { width: 17%; }
.rank-table th:nth-child(2) { width: 35%; }
.rank-table th:nth-child(3), .rank-table td:nth-child(3) { text-align: right; }
.rank-table th:last-child, .rank-table td:last-child { text-align: center; width: 22%; }
.rank-number { width: 25px; height: 23px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #ffe29b; background: #ffd87925; border-radius: 4px; }
.rank-1 { background: #ffdc65; color: #7b0e16; }
.rank-2 { background: #ffe5ac; color: #751019; }
.rank-3 { background: #f4b958; color: #77121a; }
.amount { color: var(--gold); font-weight: 680; }
.placeholder { color: #f7bf86; }
.feed-count { padding: 4px 8px; color: var(--gold); background: #a80c16; border: 1px solid #f9bd7755; border-radius: 5px; font-size: 12px; white-space: nowrap; }
.feed-content { min-height: calc(33px + 10 * var(--row-height)); }
.feed-empty { min-height: inherit; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 14px; }
.feed-empty svg { width: 51px; height: 51px; margin-bottom: 6px; color: #ffdc83; background: #ffce7421; border: 1px solid #ffce7464; padding: 12px; border-radius: 13px; }
.feed-empty strong { font-size: 15px; font-weight: 600; }
.feed-empty p { color: var(--muted); font-size: 12px; }
.feed-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 4em 5em; align-items: center; gap: 8px; padding-inline: 14px; font-variant-numeric: tabular-nums; }
.feed-columns > :not(:first-child) { text-align: right; white-space: nowrap; }
.feed-heading { height: 33px; background: #a70b17; color: #ffe49d; font-size: 12px; }
.feed-list { max-height: calc(10 * var(--row-height)); overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.feed-row { height: var(--row-height); border-top: 1px solid #ffda6f3b; font-size: 14px; }
.feed-row:nth-child(even) { background: #ffc6610f; }
.feed-row:first-child { background: #ffda6f14; }
.feed-row time { color: var(--muted); }
.feed-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row.feed-new { animation: new-intent 1.25s ease-out; }
@keyframes new-intent {
  0% { transform: translateY(-10px); background: #ffe185; color: #7b0e16; }
  30% { transform: translateY(3px); background: #f8bb514f; }
  100% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .feed-row.feed-new { animation: none; background: #ffd97d3d; }
}
.footer { display: flex; justify-content: space-between; gap: 8px; padding: 12px 0; color: #ffe3a5; font-size: 11px; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 14px; margin-top: auto; padding-block: 12px 14px; color: #ffd8b8b8; font-size: 10px; line-height: 1.6; }
.site-footer > span { white-space: nowrap; }
.entry-intro { position: relative; padding: 23px 0 24px; }
.entry-intro h1 { margin: 10px 0 8px; }
.entry-intro .outline { position: absolute; bottom: 25px; right: 0; }
.entry-grid { grid-template-columns: minmax(275px, .75fr) minmax(0, 1.6fr); }
form { padding: 18px; }
.form-field { color: #ffe5ab; font-size: 13px; font-weight: 600; }
.form-field { display: block; margin: 0 0 15px; }
.form-field input { display: block; width: 100%; padding: 10px 11px; margin-top: 6px; border: 1px solid var(--border); background: #9d0d19; border-radius: 7px; color: #fff1da; }
.form-field input::placeholder { color: #f4bb98; }
.input-unit { position: relative; display: block; }
.input-unit input { padding-right: 48px; }
.input-unit b { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); font-size: 13px; color: var(--muted); }
.form-actions { display: flex; gap: 8px; }
.primary { background: #ffdc73; color: #841019; border: 1px solid #ffdc73; border-radius: 7px; padding: 9px 16px; font-size: 14px; font-weight: 750; }
.primary:hover { background: #fff1b1; }
button:disabled { opacity: .55; cursor: wait; }
.message { margin-top: 10px; min-height: 1.3em; color: #f5cf96; font-size: 13px; }
.message[data-error="true"], .records-message[data-error="true"] { color: #ffb6ab; }
.table-scroll { overflow: auto; }
.records td, .records th { white-space: nowrap; }
.records td { height: 44px; }
.record-action { color: var(--gold); background: transparent; border: 0; font-size: 13px; padding: 6px; }
.record-action:hover { text-decoration: underline; }
.record-action + .record-action { color: #f3aaa1; }
.records-message { padding: 20px 17px; color: var(--muted); font-size: 13px; }
.records-heading, .records-tools { flex-wrap: wrap; }
.records-tools { display: flex; align-items: center; gap: 8px; }
.clear-orders { color: #ffe2d3; border-color: #ffc2a68c; }
:fullscreen .screen { padding-top: 14px; }
:fullscreen .topbar { display: none; }
.million-celebration {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #a71823a3, #200409dc 74%);
  pointer-events: none;
  animation: celebration-fade 5s both;
}
.celebration-confetti { position: absolute; inset: 0; width: 100%; height: 100%; }
.confetti-left, .confetti-right {
  transform-box: view-box;
  transform-origin: center;
  animation: celebration-confetti-fall 5s cubic-bezier(.17,.75,.35,1) both;
}
.confetti-right { animation-delay: 70ms; }
.celebration-card {
  position: relative;
  isolation: isolate;
  width: min(740px, 100%);
  padding: clamp(30px, 6vh, 64px) 12px;
  border: 1px solid #f1c76e;
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 45%, #b92025, #790c19 75%);
  box-shadow: 0 0 80px #ffb93b61, inset 0 0 48px #f5a94c40;
  text-align: center;
  color: #fff1bc;
  animation: celebration-arrive 320ms cubic-bezier(.2,.8,.25,1) both;
}
.celebration-card::before {
  position: absolute;
  inset: 10px;
  border: 1px solid #f7cc7c69;
  border-radius: 11px;
  content: '';
}
.celebration-card::after {
  position: absolute;
  z-index: -1;
  inset: -18%;
  background: repeating-conic-gradient(from -6deg, #ffd27424 0deg 3deg, transparent 4deg 21deg);
  mask-image: radial-gradient(ellipse, transparent 36%, black 55%, transparent 73%);
  content: '';
  animation: celebration-rays 5s ease-out both;
}
.celebration-spark { display: block; color: #ffdf88; font-size: clamp(23px, 4vw, 40px); }
.celebration-card p { margin: .45em 0 0; font-size: clamp(17px, 4vw, 39px); font-weight: 700; letter-spacing: .13em; }
.celebration-card strong {
  display: block;
  font-size: clamp(24px, 6.6vw, 68px);
  line-height: 1.25;
  letter-spacing: .035em;
  color: #ffe08e;
  text-shadow: 0 3px 0 #993b20, 0 0 28px #ffc44e8c;
}
@keyframes celebration-fade { 0%, 100% { opacity: 0; } 4%, 93% { opacity: 1; } }
@keyframes celebration-arrive { from { transform: scale(.82); } to { transform: scale(1); } }
@keyframes celebration-rays { from { transform: rotate(-8deg) scale(.8); } to { transform: rotate(10deg) scale(1.1); } }
@keyframes celebration-confetti-fall {
  0% { opacity: 0; transform: translate(19%, -8%) rotate(18deg) scale(.32); }
  12% { opacity: 1; }
  100% { opacity: .7; transform: translate(-6%, 17%) rotate(-10deg) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .million-celebration, .celebration-card, .celebration-card::after, .confetti-left, .confetti-right { animation: none; }
}
@media (min-width: 1500px) {
  .hero { min-height: 180px; }
  .metric-label { padding-block: 10px; }
  h2 { font-size: 22px; }
  th { font-size: 14px; }
  td { font-size: 17px; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .hero-copy { padding-inline: 140px; }
  .hero h1 { font-size: 39px; }
}
@media (max-width: 820px) {
  .dashboard-grid, .entry-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; gap: 12px; }
  .live { position: static; display: flex; align-items: center; gap: 8px; }
  .metric-label, .metric div + div { padding-inline: 10px; }
  .feed-content { min-height: 210px; }
  .feed { grid-row: 1; }
  .feed-list { max-height: min(290px, calc(10 * var(--row-height))); }
  .entry-intro .outline { position: static; margin-top: 14px; }
}
@media (max-width: 540px) {
  .topbar { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  .brand { margin-right: auto; }
  .fullscreen { margin-left: auto; }
  nav a { padding: 5px 8px; }
  .hero { gap: 8px; padding: 16px 11px; min-height: 125px; }
  .hero h1 { font-size: clamp(24px, 7.6vw, 36px); letter-spacing: .02em; }
  .live time { font-size: 18px; }
  #date { font-size: 10px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rank-table td, .rank-table th { padding: 0 6px; }
  .feed-columns { gap: 5px; padding-inline: 8px; }
  .feed-row { font-size: 12px; }
  .panel-heading { padding-inline: 11px; }
  .panel-note { font-size: 10px; }
  h2 { font-size: 17px; }
}
