/* 种子杯平台：赛事霓虹风格的单一深色主题（斜切面板、发光描边和弹道），强调色用 Dian 橙。
   现场投屏和直播都按暗场设计。斜切面板用 clip-path，外发光会被裁掉，所以描边一律用 inset 阴影。 */
:root {
  color-scheme: dark;
  --ground: #07060f;
  --deck: #100e21;
  --deck-2: #191536;
  --rule: #2d2858;
  --ink: #f3f1ff;
  --ink-2: #aaa4d8;
  --ink-3: #7c76b0;
  --red: #ff3d68;
  --blue: #23c4ff;
  --accent: #ff9904; /* Dian 橙 */
  --on-accent: #1a0f00;
  --heal: #3ddc84; /* 种子班嫩芽绿 */
  --down: #ff7a59;
  --neon: #7b6cff;
  --floor: #0b0a1a;
  --floor-2: #0d0c1f;
  --floor-line: rgba(120, 104, 255, 0.11);
  --wall: #1a1640;
  --wall-hi: #7b6cff;
  --wall-lo: #0f0c28;
  --scrim: rgba(5, 4, 14, 0.88);
  /* 斜切角面板：右上、左下各切一个角 */
  --cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --edge: inset 0 0 0 1px var(--rule), inset 0 0 28px rgba(123, 108, 255, 0.07);
  --f-display: "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-body: "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  /* 不从外网加载字体：比赛服务器在校园网里，外网字体可能加载不到。数字优先用系统自带的窄体 */
  --f-num: "Bahnschrift", "DIN Alternate", "Chakra Petch", "Roboto Mono", ui-monospace, monospace;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 16px 32px;
  background-image: radial-gradient(1200px 520px at 50% -240px, rgba(123, 108, 255, 0.16), transparent 70%);
  background-repeat: no-repeat;
}
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app { max-width: 1480px; margin: 0 auto; display: grid; gap: 14px; }
.narrow { max-width: 1100px; }

/* 顶栏 */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.stripe { width: 6px; align-self: stretch; min-height: 38px; background: linear-gradient(180deg, var(--red), var(--blue)); flex: none; }
.dian-logo { height: 40px; width: auto; display: block; flex: none; filter: drop-shadow(0 0 10px rgba(255, 153, 4, 0.65)); }
.seed-ico { height: 1.15em; width: auto; vertical-align: -0.2em; margin-right: 4px; }
.logo {
  margin: 0; font-family: var(--f-display); font-weight: 900; font-style: italic; font-size: 36px; line-height: 1;
  letter-spacing: 6px; white-space: nowrap; text-shadow: 0 0 18px rgba(123, 108, 255, 0.8);
}
.event { display: grid; font-size: 12px; color: var(--ink-2); letter-spacing: 0.08em; line-height: 1.4; }
.event b { color: var(--ink); font-weight: 700; letter-spacing: 0.04em; }
.status { display: grid; gap: 2px; min-width: 0; }
.round { font-family: var(--f-num); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.round b { color: var(--accent); font-weight: 700; }
.phase { color: var(--ink-2); font-size: 13px; }
.top-right { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.live {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; transform: skewX(-12deg);
  background: var(--red); color: #fff; font-weight: 700; font-style: italic; letter-spacing: 0.12em; white-space: nowrap;
  box-shadow: 0 0 18px rgba(255, 61, 104, 0.6);
}
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-in-out infinite; }
.live .delay { font-weight: 500; color: #ffe0e8; letter-spacing: 0.02em; }
.live.off { background: var(--deck-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule); }
.live.off .dot { background: var(--ink-3); animation: none; }
.live.off .delay { color: var(--ink-3); }
@keyframes pulse { 50% { opacity: 0.25; } }
.who-am-i { font-size: 13px; color: var(--ink-2); }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px;
  background: var(--deck); box-shadow: var(--edge); clip-path: var(--cut);
}
.motto { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.motto b { color: var(--accent); margin-right: 6px; }
.motto-values { display: flex; gap: 8px; }
.motto-values i {
  font-style: italic; font-weight: 700; padding: 2px 10px; transform: skewX(-12deg);
  background: var(--deck-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent);
}
.wall-section { display: grid; gap: 10px; }

/* 按钮、表单 */
.btn, .seg button {
  font-size: 13px; font-weight: 500; line-height: 1; padding: 8px 12px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--deck-2); border: 1px solid var(--rule); border-radius: 0; color: var(--ink);
}
.btn:hover, .seg button:hover { border-color: var(--neon); box-shadow: 0 0 10px rgba(123, 108, 255, 0.35); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary, .btn[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.primary:hover, .btn[aria-pressed="true"]:hover, .seg button[aria-pressed="true"]:hover { border-color: var(--accent); box-shadow: 0 0 14px rgba(255, 153, 4, 0.5); }
.btn.danger { color: var(--down); }
.panel > .btn { justify-content: center; }
.btn.small { padding: 5px 9px; font-size: 12px; }
.seg { display: inline-flex; }
.seg button { border-radius: 0; margin-left: -1px; font-family: var(--f-num); }
.seg button:first-child { margin-left: 0; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; color: var(--ink-2); }
input[type="text"], input[type="password"], input[type="number"], input[type="datetime-local"], input[type="date"], select, textarea {
  width: 100%; padding: 8px 10px; border-radius: 0; border: 1px solid var(--rule); background: var(--ground); color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; font-family: var(--f-num); font-size: 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 10px rgba(255, 153, 4, 0.3); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.form-row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; }
.form-row > .field { flex: 1 1 160px; }
.hint { font-size: 12px; color: var(--ink-3); margin: 0; }
.error-text { color: var(--down); font-size: 13px; margin: 0; }

/* 面板、表格 */
.panel {
  padding: 14px 18px; background: var(--deck); box-shadow: var(--edge); clip-path: var(--cut);
  min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start;
}
.panel h2 { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px; font-style: italic; letter-spacing: 0.14em; color: var(--accent); }
.panel h2 small { font-size: 12px; font-weight: 500; font-style: normal; color: var(--ink-3); letter-spacing: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.tbl-wrap { overflow: auto; max-width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.data th { position: sticky; top: 0; z-index: 1; padding: 5px 8px; text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-3); background: var(--deck); white-space: nowrap; }
table.data td { padding: 6px 8px; border-top: 1px solid var(--rule); vertical-align: middle; }
table.data .num { text-align: right; font-family: var(--f-num); white-space: nowrap; }
table.data th.num { text-align: right; }
table.data .nowrap { white-space: nowrap; }
table.data .actions { display: flex; gap: 6px; flex-wrap: wrap; }
table.data .btn { white-space: nowrap; }
#tab-events { grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr); }
#tab-events #standPanel { grid-column: 1 / -1; } /* 积分榜占整行，场次列表不被挤窄 */
@media (max-width: 900px) { #tab-events { grid-template-columns: minmax(0, 1fr); } }
.empty { color: var(--ink-3); font-size: 13px; padding: 8px 0; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 2px; background: var(--ground); color: var(--ink-2); font-size: 12px; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--rule); }
.chip.good { color: var(--heal); }
.chip.warn { color: var(--accent); }
.chip.bad { color: var(--down); }
.chip.red { color: var(--red); }
.chip.blue { color: var(--blue); }
code, .mono { font-family: var(--f-num); }
pre.code { margin: 0; padding: 10px 12px; background: var(--ground); border: 1px solid var(--rule); border-radius: 0; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.copy-row { display: flex; gap: 8px; align-items: flex-start; }
.copy-row pre { flex: 1; min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 7px 12px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--accent); font-style: italic; font-weight: 700; border-bottom-color: var(--accent); background: linear-gradient(0deg, rgba(255, 153, 4, 0.14), transparent); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
b.r, .r { color: var(--red); } b.b, .b { color: var(--blue); }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50;
  padding: 10px 16px; background: var(--deck-2); border: 1px solid var(--neon); max-width: calc(100% - 32px);
  box-shadow: 0 0 20px rgba(123, 108, 255, 0.35);
}
.toast.bad { border-color: var(--down); color: var(--down); }

/* 看板：焦点大屏 */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.focus { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; background: var(--deck); box-shadow: var(--edge); clip-path: var(--cut); min-width: 0; }
.bug { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; }
.side {
  --c: var(--red); display: grid; gap: 5px; padding: 8px 14px 10px; min-width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 34%, transparent), transparent 75%); border-left: 4px solid var(--c);
}
.side.blue { --c: var(--blue); text-align: right; background: linear-gradient(270deg, color-mix(in srgb, var(--c) 34%, transparent), transparent 75%); border-left: 0; border-right: 4px solid var(--c); }
.side .who { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.side.blue .who { flex-direction: row-reverse; }
.side .tagc { font-size: 12px; font-weight: 700; font-style: italic; color: var(--c); flex: none; }
.side .name { font-size: 22px; font-weight: 800; font-style: italic; letter-spacing: 0.04em; padding-right: 0.15em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.side .meta { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px; }
.hp { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 8px; }
.side.blue .hp { grid-template-columns: 34px minmax(0, 1fr); }
.side.blue .hp .track { order: 2; }
.track {
  position: relative; height: 12px; background: var(--ground); overflow: hidden; transform: skewX(-20deg);
  box-shadow: inset 0 0 0 1px var(--rule), 0 0 10px color-mix(in srgb, var(--c) 35%, transparent);
}
.track i { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; background: var(--c); box-shadow: 0 0 12px var(--c); transition: width 0.2s linear; }
.side.blue .track i { left: auto; right: 0; }
.hpn { font-family: var(--f-num); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.side .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.side.blue .row { flex-direction: row-reverse; }
.side .chip.heal { color: var(--heal); }
.side .chip.fire { color: var(--accent); }
.side .chip.dead { color: var(--down); }
.mid { display: grid; align-content: center; justify-items: center; gap: 2px; padding: 0 4px; text-align: center; }
.clock {
  font-family: var(--f-num); font-size: 54px; font-weight: 700; font-style: italic; line-height: 1; padding-right: 0.08em;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(255, 153, 4, 0.55);
}
.clock.low { color: var(--accent); }
.duel { font-family: var(--f-num); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tabletag { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.screen {
  position: relative; width: min(100%, calc((100vh - 340px) * 4 / 3)); min-width: min(100%, 360px);
  aspect-ratio: 4 / 3; max-width: 100%; margin-inline: auto; overflow: hidden; background: var(--floor);
  box-shadow: 0 0 0 1px #3b3480, 0 0 40px rgba(123, 108, 255, 0.25);
}
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.banner {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); max-width: calc(100% - 24px);
  padding: 8px 16px; background: var(--scrim); border: 1px solid var(--neon); box-shadow: 0 0 16px rgba(123, 108, 255, 0.4);
  font-weight: 700; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.screen:has(.overlay:not([hidden])) .banner { display: none; } /* 轮间积分榜盖住画面时，不再叠一条击毁横幅 */
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: var(--scrim); overflow: auto; }
.ov-card { width: min(100%, 460px); display: grid; gap: 10px; }
.ov-kick { margin: 0; font-size: 12px; letter-spacing: 0.14em; color: var(--accent); font-weight: 700; font-style: italic; }
.ov-title { margin: 0; font-size: 28px; font-style: italic; line-height: 1.2; text-wrap: balance; text-shadow: 0 0 18px rgba(123, 108, 255, 0.6); }
.ov-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.ov-list li { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; background: var(--deck-2); box-shadow: inset 3px 0 0 var(--neon); }
.ov-list .rk { font-family: var(--f-num); font-weight: 700; color: var(--ink-2); }
.ov-list .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.ov-list .pt { font-family: var(--f-num); font-weight: 700; }
.ov-foot { margin: 0; font-size: 13px; color: var(--ink-2); }
.legend { margin: 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.idle { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.idle h3 { margin: 0 0 6px; font-size: 24px; font-style: italic; text-shadow: 0 0 18px rgba(123, 108, 255, 0.7); }
.idle p { margin: 0; color: var(--ink-2); }

/* 看板：右栏 */
.rail { display: grid; gap: 14px; min-width: 0; }
.rail .tbl-wrap { max-height: 430px; }
.standings .team { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings .pts { font-weight: 700; color: var(--ink); }
.standings tr.in-focus td { background: color-mix(in srgb, var(--c, var(--neon)) 14%, var(--deck-2)); }
.standings tr.in-focus td:first-child { box-shadow: inset 3px 0 0 var(--c); }
.delta { font-family: var(--f-num); font-size: 12px; white-space: nowrap; }
.delta.up { color: var(--heal); } .delta.down { color: var(--down); } .delta.same { color: var(--ink-3); }
.feed { list-style: none; margin: 0; padding: 0; max-height: 250px; overflow: auto; font-size: 13px; }
.feed li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 5px 0; border-top: 1px solid var(--rule); }
.feed li:first-child { border-top: 0; }
.feed time { font-family: var(--f-num); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.feed .t { margin-left: 6px; font-family: var(--f-num); font-size: 12px; color: var(--ink-3); }
.feed li.sep span { color: var(--accent); font-weight: 700; }

/* 看板：小窗墙 */
.wall-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wall-head h2 { margin: 0; font-size: 15px; font-style: italic; letter-spacing: 0.14em; color: var(--accent); }
.wall-head small { font-size: 12px; color: var(--ink-3); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; }
.thumb {
  display: grid; gap: 6px; padding: 9px; min-width: 0; cursor: pointer; text-align: left; color: inherit;
  background: var(--deck); border: 0; box-shadow: var(--edge); clip-path: var(--cut);
}
.thumb:hover { box-shadow: inset 0 0 0 1px var(--neon), inset 0 0 22px rgba(123, 108, 255, 0.18); }
.thumb:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.thumb.is-focus { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 22px rgba(255, 153, 4, 0.3); }
.thumb .tv { position: relative; display: block; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; background: var(--floor); box-shadow: 0 0 0 1px #2a2560; }
.thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.thumb .badge { position: absolute; left: 6px; top: 6px; padding: 1px 7px; transform: skewX(-12deg); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; }
.thumb .res { position: absolute; inset: auto 6px 6px 6px; padding: 3px 6px; background: var(--scrim); font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .cap { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.thumb .tno { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .tst { font-family: var(--f-num); white-space: nowrap; }
.thumb .vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px; align-items: baseline; font-size: 13px; }
.thumb .vs b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .vs b.b { text-align: right; }
.thumb .vs i { font-style: normal; font-size: 11px; color: var(--ink-3); font-family: var(--f-num); }
.thumb .bars { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.thumb .bar { height: 4px; transform: skewX(-20deg); background: var(--ground); overflow: hidden; display: flex; }
.thumb .bar i { display: block; height: 100%; background: var(--red); }
.thumb .bar.b { justify-content: flex-end; }
.thumb .bar.b i { background: var(--blue); }
.thumb.flash-0 { animation: flashR 1.4s ease-out; }
.thumb.flash-1 { animation: flashB 1.4s ease-out; }
/* 斜切面板会裁掉外发光，闪光用内发光 */
@keyframes flashR { 0%, 55% { box-shadow: inset 0 0 0 2px var(--red), inset 0 0 26px var(--red); } }
@keyframes flashB { 0%, 55% { box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 26px var(--blue); } }

/* 回放 */
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.player input[type="range"] { flex: 1 1 240px; accent-color: var(--accent); }
.player .mono { min-width: 92px; text-align: right; color: var(--ink-2); }

/* 登录 */
.login-wrap { min-height: calc(100vh - 48px); display: grid; place-items: center; }
.login-card { width: min(100%, 480px); display: grid; gap: 16px; }
.login-card .brand { flex-wrap: wrap; justify-content: center; }
.login-foot { margin: 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.login-foot b { color: var(--accent); font-weight: 700; margin-right: 6px; }

/* 公告 */
.notice-bar {
  display: flex; align-items: center; gap: 10px 14px; padding: 9px 16px; min-width: 0;
  background: linear-gradient(90deg, rgba(255, 153, 4, 0.18), var(--deck) 40%); box-shadow: inset 3px 0 0 var(--accent), var(--edge); clip-path: var(--cut);
}
.notice-bar .tag {
  flex: none; padding: 2px 12px; transform: skewX(-12deg); background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 700; font-style: italic; letter-spacing: 0.14em; box-shadow: 0 0 14px rgba(255, 153, 4, 0.45);
}
.notice-bar .txt { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; }
.notice-bar .ttl { color: var(--ink); font-weight: 700; text-decoration: none; }
.notice-bar .ttl:hover { color: var(--accent); }
.notice-bar .bd { flex: 1 1 320px; min-width: 0; color: var(--ink-2); font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notice-bar .when { flex: none; font-family: var(--f-num); font-size: 12px; color: var(--ink-3); }
.notice-bar .more { flex: none; font-size: 12px; white-space: nowrap; }
.notice-bar .x { flex: none; background: none; border: 0; color: var(--ink-3); font-size: 18px; line-height: 1; padding: 2px 4px; cursor: pointer; }
.notice-bar .x:hover { color: var(--ink); }
.notice-list { display: grid; gap: 14px; }
.notice h2 > span { min-width: 0; overflow-wrap: anywhere; }
.notice h2 small { font-family: var(--f-num); white-space: nowrap; }
.notice .bd, .rich { line-height: 1.75; overflow-wrap: anywhere; color: var(--ink); }
.notice.pinned { box-shadow: inset 3px 0 0 var(--accent), var(--edge); }
.notice.is-target { box-shadow: inset 0 0 0 1px var(--accent), inset 0 0 26px rgba(255, 153, 4, 0.18); }
.preview { padding: 10px 12px; background: var(--ground); border: 1px dashed var(--rule); min-height: 44px; font-size: 13px; }
.preview:empty::before { content: "正文预览"; color: var(--ink-3); }
/* 对话框（申诉等） */
dialog.dlg { border: 0; padding: 0; background: transparent; color: var(--ink); width: min(600px, calc(100% - 32px)); max-height: calc(100% - 32px); }
dialog.dlg::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
dialog.dlg > .panel { box-shadow: inset 0 0 0 1px var(--neon), inset 0 0 32px rgba(123, 108, 255, 0.16); }
.pre { white-space: pre-wrap; }
td .rich { max-width: 380px; font-size: 13px; line-height: 1.6; }
.seg .n { font-size: 11px; opacity: 0.75; }
/* 报名表导入预览 */
.map-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.map { font-size: 12px; padding: 2px 8px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--neon); color: var(--ink-2); white-space: nowrap; }
.map b { color: var(--ink); }
.map.skip { box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-3); }
.map.skip b { color: var(--ink-3); }
.map.unknown { box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-3); border-style: dashed; }
.map.unknown b { color: var(--down); }
.ok-n { color: var(--heal); } .warn-n { color: var(--accent); } .bad-n { color: var(--down); }
table.data tr.pv-error td { color: var(--ink-3); }
table.data tr.pv-error td:first-child { box-shadow: inset 3px 0 0 var(--down); }
table.data tr.pv-warn td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
/* 队伍信息、忘记密码 */
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.people span { padding: 2px 10px; background: var(--deck-2); box-shadow: inset 0 0 0 1px var(--rule); font-size: 13px; }
.people span.cap { box-shadow: inset 0 0 0 1px var(--accent); }
.people span.cap::after { content: "队长"; margin-left: 6px; font-size: 11px; color: var(--accent); font-weight: 700; }
details.forgot { font-size: 13px; color: var(--ink-2); }
details.forgot summary { cursor: pointer; color: var(--blue); width: max-content; }
details.forgot summary:hover { color: var(--ink); }
details.forgot[open] summary { margin-bottom: 6px; }
details.forgot p { margin: 0; padding: 10px 12px; background: var(--ground); box-shadow: inset 3px 0 0 var(--accent); line-height: 1.7; }
details.forgot b { color: var(--accent); }
/* 新公告、公开答疑的弹出提示（右下角，不挡操作，15 秒后消失） */
.ntoasts { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: grid; gap: 10px; width: min(380px, calc(100% - 32px)); }
.ntoast {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--deck-2); clip-path: var(--cut);
  box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--rule), inset 0 0 24px rgba(255, 153, 4, 0.14);
  animation: ntoast-in 0.25s ease-out;
}
.ntoast.clarification { box-shadow: inset 3px 0 0 var(--heal), inset 0 0 0 1px var(--rule), inset 0 0 24px rgba(61, 220, 132, 0.12); }
.ntoast.out { opacity: 0; transform: translateX(16px); transition: opacity 0.25s, transform 0.25s; }
.ntoast .tag { flex: none; padding: 1px 8px; transform: skewX(-12deg); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; font-style: italic; }
.ntoast.clarification .tag { background: var(--heal); }
.ntoast .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ntoast .ttl { color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.ntoast .ttl:hover { color: var(--accent); }
.ntoast .bd { font-size: 12px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: pre-line; }
.ntoast .x { flex: none; background: none; border: 0; color: var(--ink-3); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.ntoast .x:hover { color: var(--ink); }
@keyframes ntoast-in { from { opacity: 0; transform: translateX(16px); } }
@media (prefers-reduced-motion: reduce) { .ntoast { animation: none; } .ntoast.out { transition: none; } }

/* 积分榜冻结提示 */
.freeze-note { margin: 0; padding: 6px 10px; font-size: 12px; color: var(--ink-2); background: var(--ground); box-shadow: inset 3px 0 0 var(--blue); }
.freeze-note b { color: var(--blue); margin-right: 6px; font-style: italic; letter-spacing: 0.08em; }

/* 公开答疑 */
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: 14px; align-items: start; }
@media (max-width: 1080px) { .grid-side { grid-template-columns: minmax(0, 1fr); } }
.qa-list { display: grid; gap: 10px; }
.qa { display: grid; gap: 6px; padding: 10px 14px; background: var(--ground); box-shadow: inset 3px 0 0 var(--neon); }
.qa:target { box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--accent); }
.qa-q { display: flex; align-items: baseline; gap: 10px; }
.qa-q b { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.qa-q time { flex: none; font-family: var(--f-num); font-size: 12px; color: var(--ink-3); }
.qa-a { font-size: 13px; color: var(--ink-2); }
.qa-a b { color: var(--heal); }
.panel h2 small .btn { font-style: normal; }
.clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1080px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .rail { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
  .screen { width: 100%; }
}
@media (max-width: 600px) {
  .logo { font-size: 28px; letter-spacing: 3px; }
  .dian-logo { height: 32px; }
  .motto { margin-left: 0; }
  .top-right { margin-left: 0; }
  .bug { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mid { grid-column: 1 / -1; order: -1; grid-auto-flow: column; justify-content: center; align-items: baseline; gap: 12px; }
  .clock { font-size: 32px; }
  .side .name { font-size: 17px; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .live .dot { animation: none; }
  .thumb.flash-0, .thumb.flash-1 { animation: none; }
  .track i { transition: none; }
}
