/* 简洁低疲劳 V2 视觉规范：暖白底 / 炭黑字 / 珊瑚红只占 5%-8%
   取消渐变、光晕、厚阴影与玻璃拟态，层级靠字重、对齐、留白和细分隔线建立。
   浅色对战 V4 在此基础上补了次级舞台色与计时数字规则，只作用于大厅/赛事/详情/房间四屏。 */
:root {
  color-scheme: light;
  --bg: #fafaf8;
  --paper: #ffffff;
  /* V4 次级舞台：比页面底色深一档的柔和浅灰，用来承载对战/开赛时间这类主视觉区 */
  --stage: #f2f2ef;
  --ink: #171717;
  --muted: #6b6b68;
  --line: #e3e2dd;
  --accent: #ff5a52;
  --accent-deep: #e6453d;
  --green: #3ea36e;
  --sans: "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: var(--sans);
  --mono: "DM Mono", ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  /* 普通控件 6-8px，弹窗与主要面板 10-14px，仅计数徽标与开关保持胶囊 */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  /* 阴影只用于让弹窗脱离背景 */
  --shadow: 0 14px 40px rgba(23, 23, 23, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* V4 计时数字：主体炭黑、只有冒号是珊瑚红，等宽字形保证秒数跳动时宽度不抖。
   稿子里的时钟是现代无衬线的粗数字，不是打字机等宽，所以走 --sans + tabular-nums；
   规范明令禁止七段数码管、像素和军用模板字，这里不引任何装饰字体。 */
.pb-clock { display: inline-flex; align-items: baseline; color: var(--ink); font-family: var(--sans); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.pb-clock i { padding: 0 .04em; color: var(--accent); font-style: normal; }

/* 圆角基线：普通控件 6-8px，卡片与弹窗 10-14px */
input, select, textarea { border-radius: var(--radius-sm); }
.event-card { overflow: hidden; border-radius: var(--radius-lg); }
.dialog, .artwork-dialog, .friend-dropdown, .account-dropdown, .emoji-picker { border-radius: var(--radius-lg); }

.site-header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; padding: 0 4vw; border-bottom: 1px solid var(--line); background: var(--paper); }
.system-mode-bar { display: grid; grid-template-columns: auto 1fr auto; min-height: 42px; align-items: center; padding: 8px 4vw; border-bottom: 1px solid rgba(255, 80, 72, .25); background: #fff2de; color: #5e4630; gap: 18px; }
.system-mode-bar > span { display: flex; align-items: center; gap: 8px; }
.system-mode-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d49a3b; }
.system-mode-bar.connected i { background: var(--green); }
.system-mode-bar strong { font-size: 13px; }
.system-mode-bar p { margin: 0; font-size: 12px; }
.system-mode-bar button { padding: 5px 11px; border: 1px solid currentColor; border-radius: var(--radius-sm); background: transparent; cursor: pointer; font-size: 11px; }
.brand, .user-button { display: flex; align-items: center; width: max-content; padding: 0; border: 0; background: transparent; cursor: pointer; }
.brand { gap: 11px; text-align: left; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.brand > span:last-child, .user-copy { display: grid; }
.brand strong { font-family: var(--mono); font-size: 15px; letter-spacing: .13em; }
.brand small, .user-copy small { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .13em; }
.main-nav { display: flex; align-self: stretch; gap: 34px; }
.nav-item { position: relative; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; }
.nav-item::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); content: ""; opacity: 0; transform: scaleX(.5); transition: .2s ease; }
.nav-item.active { color: var(--ink); }
.nav-item.active::after { opacity: 1; transform: scaleX(1); }
.nav-live-dot { position: absolute; top: 20px; right: -9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.floating-battle-controls { position: fixed; right: 24px; bottom: 24px; z-index: 75; display: flex; max-width: calc(100vw - 32px); align-items: flex-end; flex-direction: column; gap: 8px; touch-action: none; }
.active-battle-dock { position: static; z-index: 70; display: grid; grid-template-columns: auto auto auto; align-items: center; padding: 10px 11px 10px 15px; border: 1px solid rgba(255,255,255,.13); border-radius: var(--radius-pill); background: #171717; color: #f5f5f3; box-shadow: 0 8px 24px rgba(0,0,0,.16); gap: 18px; }
.active-battle-dock > div { display: flex; align-items: center; gap: 10px; }
.active-battle-dock .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.active-battle-dock span { display: grid; }
.active-battle-dock small { color: #8f8c85; font-family: var(--mono); font-size: 10px; }
.active-battle-dock strong { font-size: 13px; }
.active-battle-dock time { font-family: var(--mono); font-size: 18px; }
.active-battle-dock button { height: 34px; padding: 0 15px; border: 0; border-radius: var(--radius); background: var(--accent); color: white; cursor: pointer; font-size: 13px; }
.test-battle-panel { position: static; z-index: 75; display: grid; grid-template-columns: 1fr repeat(5, auto); align-items: center; max-width: min(720px, calc(100vw - 48px)); padding: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: #171717; color: #f5f5f3; box-shadow: 0 8px 24px rgba(0,0,0,.16); gap: 7px; }
.test-battle-panel > div { display: grid; min-width: 120px; padding: 0 8px; }
.test-battle-panel span { color: #8f8c85; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; }
.test-battle-panel strong { font-size: 14px; }
.test-battle-panel button { height: 32px; padding: 0 11px; border: 1px solid #44443e; border-radius: var(--radius); background: transparent; color: inherit; cursor: pointer; font-size: 13px; white-space: nowrap; }
.test-battle-panel button:hover { border-color: var(--accent); color: var(--accent); }
.user-cluster { position: relative; display: flex; justify-content: flex-end; gap: 12px; }
.friend-menu-wrap { position: relative; }
.friend-menu-button { position: relative; }
.friend-menu-button > span { position: absolute; top: -4px; right: -4px; display: grid; min-width: 17px; height: 17px; padding: 0 4px; place-items: center; border-radius: var(--radius-pill); background: var(--accent); color: white; font-family: var(--mono); font-size: 10px; }
.friend-dropdown { position: absolute; top: 50px; right: 0; z-index: 80; display: flex; overflow: hidden; width: 340px; max-height: min(650px, calc(100vh - 90px)); flex-direction: column; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow); }
.friend-dropdown .friend-list { min-height: 120px; max-height: 310px; }
.icon-button { display: grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.user-button { gap: 9px; text-align: left; }
.avatar { display: inline-grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--sans); font-style: normal; }
/* 自定义头像图：铺满圆形容器，尺寸由外层 .avatar 的各处变体决定 */
.avatar .avatar-image { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.user-copy strong { font-size: 14px; }
.user-copy small b { color: var(--accent); }
.account-dropdown { position: absolute; top: 52px; right: 0; z-index: 85; display: grid; width: 240px; padding: 10px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); gap: 3px; }
.account-dropdown-user { display: flex; align-items: center; padding: 10px; margin-bottom: 5px; border-bottom: 1px solid var(--line); gap: 10px; }
.account-dropdown-user > div { display: grid; }
.account-dropdown-user strong { font-size: 14px; }
.account-dropdown-user small { color: var(--muted); font-size: 11px; }
.account-dropdown > button { padding: 10px; border: 0; background: transparent; cursor: pointer; text-align: left; font-size: 13px; }
.account-dropdown > button:hover { background: var(--bg); }
.account-dropdown .danger-action { color: var(--accent); }
.view { display: none; min-height: calc(100vh - 72px); }
.view.active { display: block; }
.eyebrow { margin: 0; color: var(--accent); font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .17em; }

.home-hero { position: relative; display: grid; grid-template-columns: 1fr minmax(340px, .66fr); min-height: calc(100vh - 72px); align-items: center; padding: 40px 7vw; overflow: hidden; border-bottom: 1px solid var(--line); gap: 6vw; }
.home-hero-copy { position: relative; z-index: 1; }
.home-hero-copy h1 { margin: 12px 0 20px; font-size: clamp(56px, 6.5vw, 104px); letter-spacing: -.07em; line-height: 1.08; }
.home-hero-copy > p:last-of-type { max-width: 590px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.home-featured-art { position: relative; z-index: 1; }
.home-featured-art button { position: relative; display: block; overflow: hidden; width: 100%; padding: 0; border: 0; background: #222; color: white; cursor: pointer; text-align: left; }
.home-featured-art img { display: block; width: 100%; height: clamp(320px, 62vh, 660px); object-fit: cover; }
.home-featured-art button > span { position: absolute; right: 0; bottom: 0; left: 0; display: grid; padding: 45px 25px 22px; background: linear-gradient(transparent, rgba(12,12,10,.78)); }
.home-featured-art small { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }
.home-featured-art strong { margin-top: 5px; font-size: 25px; }
.home-featured-art em { position: absolute; right: 25px; bottom: 25px; font-family: var(--mono); font-size: 12px; font-style: normal; }
.home-featured-section { padding: 50px 7vw 60px; background: var(--paper); }
.home-featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1240px; margin: auto; gap: 16px; }
.home-featured-grid article { overflow: hidden; cursor: pointer; }
.home-featured-grid img { display: block; width: 100%; aspect-ratio: auto; object-fit: contain; background: #181815; transition: transform .4s ease; }
.home-featured-grid article:hover img { transform: scale(1.025); }
.home-featured-grid article > div { padding: 15px; }
.home-featured-grid small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.home-featured-grid h3 { margin: 7px 0 10px; font-size: 17px; }
.home-featured-grid span { color: var(--muted); font-size: 12px; }

/* V4 匹配大厅：首屏收成一整块浅灰「对战舞台」，单局时长、人数、积分和匹配入口都在里面。
   稿子里没有雷达——V4 明令禁止扫描线与瞄准镜，所以原来的 .radar 整块下线。 */
.lobby-hero { padding: 24px 4vw 6px; }
.lobby-stage { max-width: 1400px; margin: auto; padding: 20px 34px 34px; border-radius: var(--radius-lg); background: var(--stage); }
.stage-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 16px; }
.stage-topline .status-pill { margin-bottom: 0; background: var(--paper); }
.stage-online { color: var(--accent); font-family: var(--mono); font-size: 15px; letter-spacing: .08em; }
.stage-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr); align-items: center; gap: 5vw; }
.hero-grid { display: none; }
.hero-copy, .match-console { position: relative; z-index: 1; }
.status-pill, .live-label { display: inline-flex; align-items: center; gap: 9px; color: var(--green); font-family: var(--mono); font-size: 13px; letter-spacing: .08em; }
.status-pill { margin-bottom: 26px; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); border-radius: var(--radius-pill); }
.status-pill i, .live-label i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hero-copy h1 { max-width: 780px; margin: 12px 0 20px; font-size: clamp(46px, 5.5vw, 80px); font-weight: 600; letter-spacing: -.07em; line-height: 1.05; }
.hero-copy h1 em { color: var(--accent); font-style: normal; }
.hero-description { max-width: 610px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; margin-top: 26px; gap: 12px; }
.primary-button, .secondary-button { min-width: 138px; height: 46px; padding: 0 22px; border-radius: var(--radius); cursor: pointer; transition: .2s ease; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: white; }
.primary-button:hover { border-color: var(--accent-deep); background: var(--accent-deep); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.secondary-button:disabled { cursor: default; opacity: .7; }
.primary-button.large { display: flex; min-width: 178px; align-items: center; justify-content: center; gap: 16px; }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.secondary-button { border: 1px solid var(--line); background: transparent; }
.secondary-button:hover { border-color: var(--ink); }
/* 匹配大厅这一块的实心红留给「开始匹配」，建房走珊瑚红描边 */
#createRoomButton { border-color: var(--accent); color: var(--accent); }
.text-button { padding: 8px; border: 0; background: transparent; color: var(--accent); cursor: pointer; }
.match-console { display: grid; align-content: center; }
.match-state { display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.match-state h2 { margin: 24px 0 8px; font-size: 26px; }
.match-state p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.search-orbit { position: relative; display: flex; width: 210px; height: 130px; align-items: center; justify-content: space-between; padding: 0 22px; }
.large-avatar { width: 66px; height: 66px; font-size: 23px; }
.search-question { display: grid; width: 66px; height: 66px; place-items: center; border: 1px dashed var(--muted); border-radius: 50%; color: var(--muted); font-family: var(--mono); font-size: 22px; }
.orbit-ring { position: absolute; inset: -8px 58px; border: 1px solid var(--accent); border-radius: 50%; animation: pulse 1.3s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .2; transform: scale(1.08); } }
.versus-row { display: flex; align-items: center; gap: 30px; }
.versus-row > div { display: grid; justify-items: center; gap: 8px; }
.versus { color: var(--accent); font-family: var(--mono); font-size: 16px; }
.opponent-avatar { background: #637d75; }
/* 单局时长是这块的主视觉，人数与积分收成右侧两栏，靠竖细线分隔而不是三张卡片 */
.console-stats { display: grid; grid-template-columns: auto auto auto; align-items: center; justify-content: center; }
.console-stats div { display: grid; padding: 0 clamp(14px, 1.8vw, 28px); border-right: 1px solid var(--line); text-align: center; gap: 6px; }
.console-stats div:first-child { padding-left: 0; }
.console-stats div:last-child { padding-right: 0; border: 0; }
.console-stats strong { font-size: clamp(24px, 2.4vw, 38px); font-weight: 700; letter-spacing: -.03em; }
.console-stats span { color: var(--muted); font-size: 13px; }
.console-stat-clock strong { font-size: clamp(52px, 6.6vw, 96px); }
/* 中央 VS 轴：两条细线收向中间，替代原来的雷达扫描 */
.versus-axis { display: flex; align-items: center; margin-top: 30px; gap: 16px; }
.versus-axis i { flex: 1; height: 1px; background: color-mix(in srgb, var(--accent) 42%, transparent); }
.versus-axis span { color: var(--accent); font-size: 27px; font-style: italic; font-weight: 700; }

/* 匹配成功的中性提示，替掉原来写死的「亚总 VS Mori」假对阵图 */
.match-ready-mark { display: flex; align-items: center; margin-bottom: 18px; gap: 14px; }
.match-ready-mark i { flex: 1; height: 1px; background: color-mix(in srgb, var(--accent) 42%, transparent); }
.match-ready-mark span { color: var(--accent); font-family: var(--mono); font-size: 13px; letter-spacing: .22em; }

.waiting-rooms-section { padding: 50px 7vw 60px; background: var(--paper); }
.room-heading-actions { display: flex; align-items: center; gap: 22px; }
.room-heading-actions > span { display: flex; align-items: center; color: var(--muted); font-size: 13px; gap: 7px; }
.room-heading-actions > span i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.room-heading-actions > span b { color: var(--ink); font-family: var(--mono); }
/* 等待房间按稿子改成一个面板内的行式列表，不再是三列高卡片 */
.waiting-room-grid { display: grid; max-width: 1240px; margin: auto; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.waiting-room-card { display: grid; grid-template-columns: minmax(170px, auto) minmax(0, 1fr) auto auto auto; align-items: center; padding: 16px 20px; gap: 18px; }
.waiting-room-card + .waiting-room-card { border-top: 1px solid var(--line); }
.waiting-room-card.own-room { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.room-wait { color: var(--muted); font-size: 12px; white-space: nowrap; }
.room-host { display: flex; align-items: center; gap: 11px; }
.room-host > div { display: grid; }
.room-host small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.room-host strong { font-size: 15px; }
.room-host div span { color: var(--accent); font-family: var(--mono); font-size: 11px; }
.room-capacity-control { display: flex; align-items: center; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: 13px; gap: 8px; }
.room-capacity-control select { border: 0; background: transparent; color: var(--ink); font: inherit; outline: none; }
.room-details { display: flex; flex-wrap: wrap; gap: 7px; }
.room-details > span { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 11px; }
.room-seat { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.room-seat .avatar { width: 28px; height: 28px; font-size: 12px; }
.room-seat i { color: var(--accent); font-family: var(--mono); font-size: 13px; font-style: normal; }
.empty-seat { display: grid; width: 28px; height: 28px; place-items: center; border: 1px dashed var(--line); border-radius: 50%; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.room-actions { display: flex; gap: 8px; }
/* 列表里每行都用实心红会互相抢焦点，按规范降成珊瑚红描边 */
.room-actions button { min-width: 108px; height: 40px; padding: 0 16px; }
.room-actions .primary-button { background: transparent; color: var(--accent); }
.room-actions .primary-button:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent-deep); transform: none; }
.rooms-empty { display: flex; max-width: 1240px; min-height: 280px; align-items: center; justify-content: center; margin: auto; flex-direction: column; border: 1px dashed var(--line); color: var(--muted); gap: 8px; }
.rooms-empty strong { color: var(--ink); font-size: 18px; }


.chat-panel { display: flex; min-height: 530px; flex-direction: column; border-right: 1px solid var(--line); background: var(--paper); }
.chat-header, .friends-header { display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.chat-header > div { display: flex; align-items: center; gap: 9px; }
.chat-header strong, .friends-header strong { font-size: 15px; }
.chat-header > span, .friends-header span { color: var(--muted); font-size: 12px; }
.online-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chat-messages { flex: 1; overflow-y: auto; max-height: 405px; padding: 18px 22px; scroll-behavior: smooth; }
.chat-empty { display: grid; min-height: 180px; margin: 0; place-items: center; color: var(--muted); font-size: 13px; }
.chat-message { display: flex; max-width: 78%; margin-bottom: 18px; gap: 11px; }
.chat-message .avatar { width: 34px; height: 34px; font-size: 13px; }
.chat-message-body { min-width: 0; }
.chat-message-body > div { display: flex; align-items: center; gap: 9px; }
.chat-message-body strong { font-size: 13px; }
.chat-message-body time { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.chat-message-body p { margin: 5px 0 0; padding: 10px 13px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.chat-message.own-message { margin-left: auto; flex-direction: row-reverse; }
.chat-message.own-message .chat-message-body > div { justify-content: flex-end; }
.chat-message.own-message p { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.chat-composer { position: relative; display: grid; grid-template-columns: 36px 1fr auto auto; min-height: 62px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); gap: 8px; }
.chat-composer input { min-width: 0; height: 40px; padding: 0 10px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 13px; }
.chat-composer > span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.chat-composer button { height: 36px; border: 0; cursor: pointer; }
.chat-composer button[type="submit"] { min-width: 68px; border-radius: var(--radius); background: var(--accent); color: white; font-size: 13px; }
.chat-composer button[type="submit"]:disabled { opacity: .55; }
.room-chat-panel { max-width: 760px; margin: 28px auto 0; border: 1px solid var(--line); background: var(--paper); }
.room-chat-panel > header { display: flex; min-height: 52px; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); }
.room-chat-panel > header > div { display: flex; align-items: center; gap: 10px; }
.room-chat-panel > header strong { font-size: 14px; }
.room-chat-panel > header span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.battle-room-chat { width: min(760px, calc(100% - 40px)); margin-bottom: 24px; }
.room-chat-messages { overflow-y: auto; height: 190px; padding: 14px 16px; }
.room-chat-message { max-width: 82%; margin-bottom: 11px; }
.room-chat-message.mine { margin-left: auto; text-align: right; }
.room-chat-message > div { display: flex; align-items: center; gap: 8px; }
.room-chat-message.mine > div { justify-content: flex-end; }
.room-chat-message strong { font-size: 13px; }
.room-chat-message time { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.room-chat-message p { display: inline-block; margin: 4px 0 0; padding: 8px 11px; border: 1px solid var(--line); background: var(--bg); font-size: 13px; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
.room-chat-message.mine p { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.room-chat-empty { display: grid; height: 100%; margin: 0; place-items: center; color: var(--muted); font-size: 13px; }
.room-chat-form { display: grid; padding: 10px; border-top: 1px solid var(--line); grid-template-columns: 1fr auto; gap: 8px; }
.room-chat-form input { min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); outline: 0; }
.room-chat-form button { min-width: 70px; border: 0; border-radius: var(--radius); background: var(--ink); color: var(--bg); cursor: pointer; }
.room-chat-form button:disabled { opacity: .55; }
.emoji-button { width: 36px; border-radius: 50%; background: transparent; color: var(--muted); font-size: 19px; }
.emoji-picker { position: absolute; bottom: 56px; left: 12px; z-index: 10; display: grid; grid-template-columns: repeat(6, 34px); padding: 8px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); gap: 5px; }
.emoji-picker button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; font-size: 17px; }
.emoji-picker button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
.friends-panel { display: flex; min-height: 530px; flex-direction: column; background: var(--bg); }
.friends-header > div { display: grid; }
.friends-header button { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); cursor: pointer; font-size: 18px; }
.friend-search-box { padding: 12px; border-bottom: 1px solid var(--line); background: var(--paper); }
.friend-search-box > label { display: flex; height: 40px; align-items: center; padding: 0 11px; border: 1px solid var(--line); background: var(--bg); gap: 8px; }
.friend-search-box svg { width: 16px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.friend-search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.friend-search-results { display: grid; margin-top: 8px; gap: 5px; }
.friend-search-results article, .friend-request { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 8px; background: var(--bg); gap: 8px; }
.friend-search-results .avatar, .friend-request .avatar { width: 30px; height: 30px; font-size: 13px; }
.friend-search-results article > div, .friend-request > div { display: grid; }
.friend-search-results strong, .friend-request strong { font-size: 13px; }
.friend-search-results small, .friend-request small { color: var(--muted); font-size: 11px; }
.friend-search-results button { min-width: 48px; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); cursor: pointer; font-size: 11px; }
.friend-search-results button:disabled { color: var(--muted); cursor: default; }
.friend-search-empty { margin: 8px; color: var(--muted); font-size: 12px; text-align: center; }
.friend-requests { border-bottom: 1px solid var(--line); }
.friend-section-title { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; color: var(--muted); font-size: 12px; }
.friend-section-title b { display: grid; min-width: 18px; height: 18px; padding: 0 5px; place-items: center; border-radius: var(--radius-pill); background: var(--line); color: var(--ink); font-family: var(--mono); font-size: 10px; }
.friend-request { margin: 0 10px 10px; background: var(--paper); }
.request-actions { display: flex; gap: 4px; }
.request-actions button { padding: 5px 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; cursor: pointer; font-size: 11px; }
.request-actions .accept { border-color: var(--accent); background: var(--accent); color: white; }
.friend-list { overflow-y: auto; flex: 1; padding: 0 10px 12px; }
.friend-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); gap: 10px; }
.friend-avatar-wrap { position: relative; }
.friend-avatar-wrap .avatar { width: 36px; height: 36px; font-size: 13px; }
.friend-avatar-wrap b { position: absolute; right: 0; bottom: 1px; width: 9px; height: 9px; border: 2px solid var(--bg); border-radius: 50%; background: #aaa69e; }
.friend-avatar-wrap b.online { background: var(--green); }
.friend-item > div { display: grid; }
.friend-item strong { font-size: 13px; }
.friend-item small { color: var(--muted); font-size: 11px; }
.friend-item > button { position: relative; display: grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.friend-item svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.friend-unread { position: absolute; top: -4px; right: -5px; display: grid; min-width: 16px; height: 16px; padding: 0 4px; place-items: center; border-radius: var(--radius-pill); background: var(--accent); color: white; font-family: var(--mono); font-size: 10px; }

.content-section { padding: 55px 7vw; background: var(--paper); }
.compact-section { padding-top: 45px; padding-bottom: 55px; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; max-width: 1240px; margin: 0 auto 28px; gap: 40px; }
.section-title-row h2, .page-hero h1, .admin-heading h1 { margin: 8px 0 0; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.1; }
.section-title-row > p, .admin-heading > p { max-width: 440px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1240px; margin: auto; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.flow-grid article { position: relative; min-height: 200px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.flow-index { color: var(--accent); font-family: var(--mono); font-size: 14px; }
.flow-time { position: absolute; top: 22px; right: 24px; color: var(--muted); font-family: var(--mono); font-size: 22px; }
.flow-grid h3 { margin: 55px 0 10px; font-size: 21px; }
.flow-grid p { max-width: 300px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

/* 胶囊固定 40px 高，内部文字一旦换行就会溢出并压住导航；
   因此阶段、标题、倒计时都强制单行，空间不够时由标题先省略。 */
.live-event-pill { display: flex; overflow: hidden; align-items: center; height: 40px; max-width: 280px; padding: 0 14px 0 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius-pill); background: color-mix(in srgb, var(--accent) 7%, var(--paper)); cursor: pointer; gap: 9px; }
.live-event-pill > i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.live-event-pill > span { display: grid; text-align: left; }
/* 阶段与轮次是关键信息：只禁止换行，不设 overflow —— 设了 overflow 会把
   自动最小尺寸压成 0，文字反而会被省略号吃掉 */
.live-event-pill small { color: var(--accent); font-family: var(--mono); font-size: 10px; white-space: nowrap; }
/* 只有比赛标题参与省略，避免长标题把胶囊顶到导航上 */
.live-event-pill strong { max-width: 130px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.live-event-pill time { flex: none; font-family: var(--mono); font-size: 15px; }

.official-live-panel { display: flex; min-height: calc(100vh - 72px); align-items: center; justify-content: center; padding: 30px 20px; }
.official-live-card { display: grid; width: min(680px, 100%); padding: 34px 38px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); gap: 16px; }
.official-live-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.official-live-head > span:last-child { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.official-live-card h1 { margin: 0; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.15; }
.official-live-topic { margin: 0; color: var(--muted); font-size: 14px; }
.official-live-clock { display: flex; align-items: flex-end; justify-content: space-between; padding: 14px 0 6px; border-top: 1px solid var(--line); }
.official-live-clock > div { display: grid; }
.official-live-clock span { color: var(--muted); font-size: 13px; }
.official-live-clock strong { font-size: 24px; }
.official-live-clock time { font-family: var(--mono); font-size: clamp(40px, 5vw, 60px); letter-spacing: -.05em; line-height: .85; }
.official-live-phases { max-width: none; margin: 4px 0 2px; }
.official-live-actions { display: flex; margin-top: 6px; gap: 10px; flex-wrap: wrap; }
.empty-battle.suppressed { display: none; }

.empty-battle { display: flex; min-height: calc(100vh - 72px); align-items: center; justify-content: center; padding: 40px; flex-direction: column; text-align: center; }
.empty-symbol { display: grid; width: 120px; height: 120px; margin-bottom: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-family: var(--mono); font-size: 24px; }
.empty-battle h1 { margin: 12px 0; font-size: 38px; }
.empty-battle > p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); }
/* V4 比赛房间：整块落在页面底色上，白色留给下方工作区，中间不再画分隔线 */
.battle-room { display: flex; flex-direction: column; }
.battle-stage-header { padding: 0 6vw; }
.battle-meta { display: flex; align-items: center; padding: 18px 6vw 0; gap: 20px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.connection-state { display: inline-flex; align-items: center; margin-left: auto; gap: 6px; }
.connection-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.connection-state.offline { color: var(--accent); }
.connection-state.offline i { background: var(--accent); }
.live-label { color: var(--accent); }
/* V4 时间优先：当前阶段留在左侧，剩余时间与大字时钟居中，构成整屏的时间中轴 */
.stage-clock { display: grid; grid-template-columns: 1fr auto 1fr; max-width: 1180px; align-items: center; margin: 26px auto 0; gap: 20px; }
.stage-clock span { color: var(--muted); font-size: 13px; }
.stage-phase { display: grid; gap: 7px; }
.stage-phase strong { font-size: clamp(26px, 2.6vw, 38px); }
.stage-countdown { display: grid; grid-column: 2; justify-items: center; gap: 10px; }
.stage-clock time { font-size: clamp(52px, 7vw, 104px); }
.phase-track { display: grid; grid-template-columns: auto 1fr auto 1fr auto; max-width: 720px; align-items: center; margin: 0 auto 36px; }
.phase-step { display: grid; justify-items: center; gap: 3px; }
.phase-step span { display: grid; width: 34px; height: 34px; margin-bottom: 7px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-family: var(--mono); font-size: 13px; }
/* 阶段名始终是炭黑，只有时间跟着当前阶段变珊瑚红；绿色留给在线/连接这类真实状态 */
.phase-step strong { color: var(--ink); font-size: 14px; }
.phase-step small { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.phase-step.active span, .phase-step.complete span { border-color: var(--accent); background: var(--accent); color: white; }
.phase-step.active small { color: var(--accent); }
.phase-line { height: 1px; margin: 0 14px 36px; background: var(--line); }
.phase-line.complete { background: var(--accent); }
.test-battle-inline { display: flex; max-width: 980px; align-items: center; justify-content: center; margin: 28px auto 0; padding: 10px; border: 1px solid var(--line); background: var(--bg); gap: 8px; flex-wrap: wrap; }
.test-battle-inline > div { display: grid; min-width: 160px; margin-right: 6px; }
.test-battle-inline span { color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.test-battle-inline strong { font-size: 14px; }
.test-battle-inline button { height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; cursor: pointer; font-size: 13px; white-space: nowrap; }
.test-battle-inline button:hover { border-color: var(--accent); color: var(--accent); }
.battle-topic { padding: 26px 20px 30px; text-align: center; }
.battle-topic > span { display: block; margin-top: 14px; color: var(--muted); font-size: 13px; letter-spacing: .3em; }
.battle-topic h1 { margin: 5px 0 12px; font-size: clamp(40px, 5.5vw, 64px); line-height: 1.1; }
.battle-topic > p:last-child { margin: 0; color: var(--muted); font-size: 15px; }
.host-battle-actions { display: flex; justify-content: center; margin-top: 22px; }
/* 选手名单按稿子是行式表，不再是一人一张卡片；
   V4 在宽屏把名单劈成左右两阵营，中间空出一条 VS 轴——人数 3-16 不定，
   所以用多列自动均分，而不是写死两个容器。 */
.battle-players { position: relative; max-width: 1180px; margin: 0 auto 32px; padding: 0 6vw; column-count: 2; column-gap: 200px; }
.battle-players.has-versus::after { position: absolute; top: 50%; left: 50%; color: var(--accent); content: "VS"; font-size: 27px; font-style: italic; font-weight: 700; transform: translate(-50%, -50%); }
/* 左右分栏后表头会被劈成两半，宽屏直接收起，只在窄屏单列时显示 */
.battle-players .player-head { display: none; }
.battle-players article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); gap: 2px 16px; break-inside: avoid; }
.battle-players article .player-identity { grid-row: 1; }
.battle-players article .player-points { grid-column: 1; grid-row: 2; padding-left: 48px; text-align: left; }
.battle-players article .ready-state { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.player-identity { display: flex; min-width: 0; align-items: center; gap: 12px; }
.player-identity strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.player-you { flex: 0 0 auto; padding: 2px 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-family: var(--mono); font-size: 10px; font-style: normal; }
.player-avatar { width: 36px; height: 36px; flex: 0 0 auto; font-size: 15px; }
.player-points { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.ready-state { color: var(--green); font-family: var(--mono); font-size: 12px; font-style: normal; text-align: right; }
.battle-versus { font-size: 24px; }
.battle-workspace { padding: 40px 6vw 50px; border-top: 1px solid var(--line); background: var(--paper); }
.stage-panel { display: none; max-width: 1100px; margin: auto; }
.stage-panel.active { display: block; }
#creatingPanel, #finishedPanel { padding: 28px 20px; text-align: center; }
.stage-icon { margin-bottom: 12px; color: var(--accent); font-size: 48px; }
.stage-panel h2 { margin: 10px 0; font-size: 36px; }
.stage-panel > p:not(.eyebrow) { color: var(--muted); font-size: 15px; }
.creation-tips { display: flex; justify-content: center; margin-top: 22px; gap: 10px; }
.creation-tips span { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; }
.upload-zone { display: flex; min-height: 300px; align-items: center; justify-content: center; padding: 32px; flex-direction: column; border: 1px dashed var(--line); background: var(--bg); cursor: pointer; text-align: center; }
.upload-icon svg { width: 64px; fill: none; stroke: var(--muted); stroke-width: 1.2; }
.upload-zone h2 { font-size: 28px; }
.upload-zone p { margin: 0 0 25px; }
.upload-zone.preparing { pointer-events: none; opacity: .65; }
.spectator-upload-note { min-height: 300px; padding: 46px; border: 1px solid var(--line); background: var(--bg); text-align: center; }
.spectator-upload-note h2 { margin: 10px 0 12px; font-size: 28px; }
.spectator-upload-note p:not(.eyebrow) { margin: 0; color: var(--muted); }
.submission-preview { display: grid; grid-template-columns: minmax(260px, .8fr) 1fr; align-items: center; gap: 55px; }
.submission-preview img { width: 100%; max-height: 580px; object-fit: contain; background: var(--bg); }
.submission-meta { margin: 0 0 6px; color: var(--muted); font-size: 13px; letter-spacing: .02em; }
.inline-actions { display: flex; margin-top: 28px; gap: 10px; }
.vote-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.vote-heading h2 { margin-bottom: 0; }
.vote-heading > span { color: var(--muted); font-size: 13px; }
.vote-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: start; }
.vote-empty { grid-column: 1 / -1; margin: 0; padding: 42px; border: 1px dashed var(--line); background: var(--bg); color: var(--muted); text-align: center; }
.vote-card { position: relative; overflow: hidden; border: 2px solid transparent; background: var(--bg); transition: .2s ease; }
.vote-card.selected { border-color: var(--accent); }
.vote-card.own-work { opacity: .82; }
.vote-card img { display: block; width: 100%; height: auto; object-fit: contain; background: transparent; cursor: zoom-in; }
.anonymous-tag { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 7px 11px; border-radius: var(--radius-sm); background: rgba(23,23,23,.72); color: white; font-size: 13px; }
.vote-heart-button { position: absolute; right: 14px; bottom: 14px; display: grid; width: 70px; height: 70px; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; background: rgba(23,23,23,.82); color: white; cursor: pointer; }
.vote-heart-button span { color: #aaa69d; font-size: 26px; line-height: 1; }
.vote-heart-button small { margin-top: -7px; font-size: 12px; }
.vote-heart-button b { position: absolute; top: -6px; right: -6px; display: grid; min-width: 24px; height: 24px; padding: 0 6px; place-items: center; border-radius: var(--radius-pill); background: var(--accent); color: white; font-family: var(--mono); font-size: 12px; }
.vote-heart-button:disabled { cursor: not-allowed; background: rgba(232,227,216,.9); color: var(--muted); }
.vote-heart-button:disabled span { color: var(--muted); }
.selected .vote-heart-button { background: var(--accent); color: white; }
.selected .vote-heart-button span { color: white; }
.selected .vote-heart-button b { background: var(--ink); }
.result-card { width: min(440px, 100%); margin: 32px auto; padding: 34px; border: 1px solid var(--line); background: var(--bg); }
.result-card > span { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.result-card > strong { display: block; margin: 10px; font-size: 34px; }
.result-card div { display: flex; justify-content: center; margin-top: 25px; gap: 10px; }
.result-card div b { color: var(--accent); }
/* BUG-04: 结算排行榜 */
.result-ranking { width: min(440px, 100%); margin: 22px auto 0; text-align: left; }
.result-ranking h3 { margin: 0 0 12px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.result-ranking-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 12px; font-size: 13px; }
.result-ranking-row.winner { color: var(--accent); }
.result-ranking-row.winner .rank-badge { background: var(--accent); color: #fff; }
.rank-badge { padding: 2px 9px; border-radius: var(--radius-pill); background: var(--stage); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.rank-work { font-weight: 600; }
.rank-author { margin-left: auto; color: var(--muted); }
.rank-votes { min-width: 40px; font-family: var(--mono); text-align: right; }
/* P0-2: 结算优胜者大屏 + 进入下一轮。整块靠同特异性后置覆盖生效，删掉即完全复原。
   只用既有 token；刻意不用 --stage，它在两个 body.dark 块里都没被覆盖，暗色下会白底白字。 */
.result-card { width: min(880px, 100%); min-height: clamp(280px, 42vh, 520px); display: grid; align-content: center; margin: 26px auto 0; padding: clamp(28px, 4.4vw, 56px) clamp(20px, 3.4vw, 48px); border-top: 3px solid var(--accent); }
.result-card > span { font-size: clamp(13px, 1.05vw, 17px); letter-spacing: 0.16em; }
/* 用 <p> 不用 <span>：.result-card > span 带珊瑚红 + 等宽字，中文塞进去既难看，
   整行染红也超出 V4 对珊瑚红面积的限制。#resultSummary 证明 <p> 是干净槽位。 */
#resultWinnerCaption { margin: clamp(10px, 1.2vw, 16px) 0 0; color: var(--muted); font-size: clamp(13px, 1.15vw, 18px); letter-spacing: 0.28em; }
/* min(vw, vh)：只按宽度推算的话，笔记本外接投影这种矮工作区会把名字撑出画面 */
.result-card > strong { margin: clamp(8px, 1vw, 14px) 0 4px; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; font-size: clamp(46px, min(7vw, 13vh), 104px); line-height: 1.04; letter-spacing: -0.015em; white-space: pre-line; overflow-wrap: anywhere; }
.result-card > strong[data-state="tie"] { font-size: clamp(32px, min(4.4vw, 8vh), 62px); line-height: 1.2; }
.result-card > strong[data-state="tie-many"] { font-size: clamp(22px, min(2.8vw, 5vh), 40px); line-height: 1.3; }
.result-card > strong[data-state="none"] { color: var(--muted); font-size: clamp(24px, 3vw, 40px); }
#resultSummary { margin: 0; color: var(--muted); font-size: clamp(14px, 1.15vw, 18px); }
.result-card div { margin-top: clamp(22px, 2.6vw, 34px); padding-top: clamp(18px, 2vw, 26px); border-top: 1px solid var(--line); font-size: clamp(14px, 1.05vw, 17px); }
.result-ranking { width: min(880px, 100%); margin: clamp(24px, 3vw, 40px) auto 0; }
#finishedPanel .primary-button { min-width: min(300px, 100%); height: clamp(48px, 4.4vw, 60px); margin-top: clamp(26px, 3vw, 40px); font-size: clamp(15px, 1.1vw, 18px); }
/* 存量缺陷（暗色截图里坐实）：.rank-badge 用了 --stage，而 --stage 在 body.dark 里没有被
   覆盖，非优胜行的名次徽章在暗色下是「白底 + 浅色字」，序号完全看不见。--stage 另有 4 处
   在用（.lobby-stage / .slide-start / .event-detail-summary / 窄屏对战头），改全局 token 会
   一次动到五个地方的夜间观感，超出结算页的范围，所以这里只给结算徽章打补丁。 */
body.dark .rank-badge { background: var(--line); }
@keyframes winner-rise { from { opacity: 0; transform: translateY(10px); } }
.stage-panel.active .result-card { animation: winner-rise 0.26s ease both; }
@media (prefers-reduced-motion: reduce) { .stage-panel.active .result-card { animation: none; } }
.demo-toolbar { display: flex; align-items: center; justify-content: center; padding: 14px; border-top: 1px solid var(--line); background: var(--ink); color: var(--bg); gap: 8px; }
.demo-toolbar span { margin-right: 12px; color: #aaa69d; font-family: var(--mono); font-size: 12px; }
.demo-toolbar button { padding: 6px 10px; border: 1px solid #484842; border-radius: var(--radius-sm); background: transparent; color: inherit; cursor: pointer; font-size: 13px; }

.page-hero { display: flex; min-height: 196px; align-items: flex-end; justify-content: space-between; padding: 26px 7vw 20px; border-bottom: 1px solid var(--line); gap: 40px; }
.page-hero h1 { margin-top: 8px; font-size: clamp(38px, 4.5vw, 58px); }
.page-hero > div:first-child > p:last-child { max-width: 590px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.season-card { display: grid; min-width: 260px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.season-card span, .season-card small { color: var(--muted); font-size: 13px; }
.season-card small + small { margin-top: 4px; }
.season-card strong { margin: 8px 0; font-family: var(--mono); font-size: 24px; }
#view-leaderboard.active { display: flex; height: calc(100vh - 72px); flex-direction: column; }
.leaderboard-content { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 24px 7vw 32px; background: var(--paper); }
.leaderboard-controls { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto 18px; flex-wrap: wrap; gap: 14px 18px; }
.leaderboard-controls > span { color: var(--muted); font-size: 13px; }
.segmented-control { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.segmented-control button { min-width: 75px; padding: 8px 14px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.segmented-control button.active { background: var(--ink); color: var(--bg); }
/* 前三名按稿子改成一行三段、只用竖细线分隔，不再是三张高低不一的卡片 */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1120px; align-items: center; margin: 0 auto 24px; }
.podium-entry { display: flex; min-width: 0; align-items: center; padding: 22px 24px; gap: 15px; }
.podium-entry + .podium-entry { border-left: 1px solid var(--line); }
.podium-rank { flex: 0 0 auto; font-family: var(--mono); font-size: 20px; }
.podium-entry.rank-1 .podium-rank { color: var(--accent); }
.podium-avatar { width: 52px; height: 52px; flex: 0 0 auto; font-size: 20px; }
.podium-entry.rank-1 .podium-avatar { background: var(--accent); }
.podium-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.podium-copy strong { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.podium-copy small { color: var(--muted); font-size: 12px; }
.podium-entry > b { flex: 0 0 auto; font-family: var(--mono); font-size: 22px; }
.podium-entry.rank-1 > b { color: var(--accent); }
.podium-entry > b i { color: var(--muted); font-size: 12px; font-style: normal; }
.ranking-table { overflow-y: auto; width: 100%; max-width: 1120px; min-height: 104px; flex: 1; margin: 0 auto; border-top: 1px solid var(--line); }
.ranking-row { display: grid; grid-template-columns: 90px 1fr 120px 120px 140px; min-height: 72px; align-items: center; border-bottom: 1px solid var(--line); font-size: 14px; }
.ranking-head { min-height: 42px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.ranking-row > span:last-child { text-align: right; }
.ranking-user { display: flex; align-items: center; gap: 12px; }
.ranking-user .avatar { width: 34px; height: 34px; }
.ranking-user em { padding: 3px 6px; border-radius: var(--radius-pill); background: var(--accent); color: white; font-family: var(--mono); font-size: 10px; font-style: normal; }
.ranking-row.current-user { margin: 0 -15px; padding: 0 15px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 5%, transparent); }
/* 封神榜这一块的焦点就是榜单切换，按规范给它唯一的实心珊瑚红 */
.leaderboard-controls .segmented-control button.active { background: var(--accent); color: white; }
/* 看历史月榜时三个实时口径失效，置灰但保留在原位——不隐藏，免得控件跳动 */
.leaderboard-controls .segmented-control button:disabled { opacity: .35; cursor: default; }
.leaderboard-controls .segmented-control button:disabled.active { background: var(--muted); }

/* 历史月榜下拉：紧跟在口径切换右边，右侧的说明文字仍靠边 */
.leaderboard-archive { display: flex; align-items: center; margin-right: auto; gap: 9px; }
.leaderboard-archive > span { color: var(--muted); font-size: 13px; }
.leaderboard-archive select { min-height: 38px; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--radius); outline: none; background: var(--paper); color: var(--ink); font-size: 13px; }

/* 历届月冠军墙：月度结算的最终产出，排在榜单下方 */
.hall-of-champions { padding: 30px 7vw 40px; border-top: 1px solid var(--line); background: var(--paper); }
.hall-of-champions > * { max-width: 1120px; margin-inline: auto; }
.hall-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 24px; }
.hall-heading h2 { margin: 6px 0 0; font-size: clamp(22px, 2.2vw, 30px); }
.hall-heading > span { color: var(--muted); font-size: 13px; }
.champion-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 14px; }
.champion-card { display: grid; padding: 20px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); color: inherit; cursor: pointer; font: inherit; justify-items: center; text-align: center; gap: 8px; }
.champion-card:hover { border-color: var(--accent); }
.champion-period { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
.champion-avatar { width: 46px; height: 46px; background: var(--accent); font-size: 18px; }
.champion-card strong { overflow: hidden; max-width: 100%; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.champion-card small { color: var(--muted); font-size: 12px; }

.event-carousel-section { display: flex; min-height: calc(100vh - 72px); padding: 26px 0 22px; flex-direction: column; border-bottom: 1px solid var(--line); background: var(--paper); }
.event-carousel-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 7vw 18px; gap: 30px; }
.event-carousel-head h1 { margin: 8px 0 0; font-size: clamp(34px, 4vw, 52px); line-height: 1.1; }
.event-carousel-head > span { color: var(--muted); font-size: 13px; }
.event-carousel { position: relative; display: flex; min-height: 0; flex: 1; align-items: center; }
.carousel-viewport { overflow: hidden; width: 100%; height: 100%; }
.carousel-track { display: flex; height: 100%; align-items: center; gap: 26px; will-change: transform; }
.carousel-slide { position: relative; display: flex; overflow: hidden; width: min(760px, 62vw); height: min(74vh, 620px); padding: 26px 30px; flex: 0 0 auto; flex-direction: column; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); cursor: pointer; opacity: .45; transform: scale(.86); transition: transform .45s ease, opacity .45s ease; }
.carousel-slide.active { opacity: 1; transform: scale(1); }
.slide-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.slide-brand { color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: .18em; }
.slide-body h3 { margin: 0 0 8px; font-size: clamp(26px, 2.9vw, 42px); line-height: 1.15; }
.slide-body p { margin: 0; color: var(--muted); font-size: 15px; }
/* V4：开赛时间是推送卡的主视觉，坐在浅灰舞台上，数字炭黑、冒号珊瑚红。
   三栏用 grid：可换行的 flex 会把「7月19日 周日」挤成一列一个字。 */
.slide-start { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 16px 20px; border-radius: var(--radius); background: var(--stage); gap: 18px; }
.slide-start-time { display: grid; gap: 5px; }
.slide-start-time > span { color: var(--muted); font-size: 13px; }
.slide-start-time strong { font-size: clamp(38px, 4.4vw, 60px); }
.slide-start-when { display: grid; justify-items: start; padding-left: 18px; border-left: 1px solid var(--line); gap: 7px; font-size: 14px; }
.slide-start-when > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-registered { display: flex; align-items: center; padding-left: 18px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; gap: 8px; white-space: nowrap; }
.slide-registered i { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; font-style: normal; }
.slide-meta { display: flex; align-items: center; gap: 0 16px; flex-wrap: wrap; }
.slide-meta span { padding-right: 16px; border-right: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.slide-meta span:last-child { padding-right: 0; border-right: 0; }
/* 轮次时间连续排布：轮次名在上、时刻在下，当前轮用珊瑚红点出来 */
.slide-rounds { display: grid; min-height: 0; gap: 10px; }
.slide-rounds > strong { color: var(--muted); font-size: 12px; }
.slide-rounds > div { display: flex; align-items: flex-start; gap: 0; flex-wrap: wrap; }
.slide-rounds span { display: grid; padding-right: 22px; gap: 4px; }
.slide-rounds b { color: var(--muted); font-size: 12px; font-weight: 400; }
.slide-rounds i { font-size: 17px; font-style: normal; }
.slide-rounds span.current b { color: var(--ink); }
.slide-rounds span.current i { color: var(--accent); }
.slide-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; gap: 16px; }
.slide-capacity { color: var(--muted); font-size: 13px; }
.slide-capacity b { color: var(--accent); font-family: var(--mono); font-size: 17px; }
.carousel-slide em { color: var(--muted); font-size: 13px; font-style: normal; opacity: 0; transition: opacity .3s ease; }
.carousel-slide.active em { opacity: .92; }
.carousel-arrow { position: absolute; top: 50%; z-index: 2; display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; font-size: 22px; transform: translateY(-50%); transition: .2s ease; }
.carousel-arrow:hover { border-color: var(--accent); color: var(--accent); }
.carousel-arrow.prev { left: max(18px, 3vw); }
.carousel-arrow.next { right: max(18px, 3vw); }
.carousel-dots { display: flex; justify-content: center; margin-top: 18px; gap: 8px; }
.carousel-dots button { width: 22px; height: 4px; padding: 0; border: 0; background: var(--line); cursor: pointer; transition: .2s ease; }
.carousel-dots button.active { background: var(--accent); }

/* 带上 .dialog 提权：基础 .dialog 的 width:min(460px,100%) 在文件后面，同权重会盖掉这里 */
.dialog.event-detail-dialog { display: grid; width: min(660px, calc(100vw - 40px)); max-height: min(820px, calc(100vh - 60px)); overflow-y: auto; gap: 10px; }
.event-detail-brandline { display: flex; align-items: center; padding-right: 34px; gap: 12px; flex-wrap: wrap; }
.event-detail-brandline .eyebrow { margin: 0; }
.event-detail-dialog h2 { margin: 2px 0 0; font-size: 32px; }
.event-detail-subtitle { margin: 0; color: var(--muted); font-size: 14px; }
/* V4：开赛时间摘要连同赛制一起坐在浅灰舞台上，成为弹窗的第一视觉；
   时钟数字保持炭黑，只有冒号是珊瑚红（见 .pb-clock）。 */
.event-detail-summary { margin-top: 12px; padding: 18px 20px 0; border-radius: var(--radius-lg); background: var(--stage); }
/* 三栏用 grid 而不是可换行的 flex：flex 一换行，「你已报名」的左分隔线会孤零零落在行首 */
.event-detail-start { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding-bottom: 16px; gap: 18px; }
.event-detail-start-time { display: grid; gap: 6px; }
.event-detail-start-label { color: var(--accent); font-size: 13px; }
.event-detail-start-time strong { font-size: clamp(36px, 6vw, 52px); }
.event-detail-start-when { display: grid; justify-items: start; padding-left: 18px; border-left: 1px solid var(--line); gap: 8px; }
.event-detail-start-when > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-detail-start-when > span:first-child { font-size: 14px; }
.event-detail-registered { display: flex; align-items: center; padding-left: 18px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; gap: 9px; white-space: nowrap; }
.event-detail-registered i { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 12px; font-style: normal; }
/* 赛制/计分/奖励并成细线分隔的横排。标签留着——V4 明令禁止为视觉牺牲中文信息。
   用 grid 而不是 wrap 的 flex：换行的 flex 项会在行首留下一条孤立的竖线。 */
.event-detail-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 13px 0 16px; border-top: 1px solid var(--line); gap: 10px 0; }
.event-detail-facts div { display: flex; align-items: baseline; font-size: 13px; gap: 7px; }
.event-detail-facts div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.event-detail-facts dt { flex: 0 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.event-detail-facts dd { margin: 0; }
.event-detail-dialog .event-capacity { margin-top: 16px; padding-top: 0; }
.event-detail-dialog .event-capacity span b { color: var(--accent); font-size: 17px; }
.event-detail-dialog .event-round-preview { margin-top: 8px; padding-top: 12px; gap: 0; }
/* 轮次改成纵向时间轴：序号圆点串一条竖线，最后一行不再往下连 */
.event-detail-dialog .event-round-preview > span { position: relative; align-items: center; padding: 13px 0 13px 40px; border-bottom: 1px solid var(--line); font-size: 13px; }
.event-detail-dialog .event-round-preview > span > i { position: absolute; top: 50%; left: 0; z-index: 1; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 11px; font-style: normal; transform: translateY(-50%); }
.event-detail-dialog .event-round-preview > span:not(:last-child)::after { position: absolute; top: 50%; left: 13px; width: 1px; height: 100%; background: var(--line); content: ""; }
.event-detail-dialog .event-round-preview b { min-width: 58px; }
.event-detail-dialog .event-round-preview small { font-size: 12px; }
/* 主操作按稿子固定在操作路径末端，占满整行 */
.event-detail-dialog .primary-button { width: 100%; height: 54px; margin-top: 20px; }

.event-content { padding: 30px 7vw 45px; }
.official-format-grid { display: grid; grid-template-columns: repeat(2, 1fr); max-width: 1120px; margin: 0 auto 24px; gap: 18px; }
.format-card { position: relative; padding: 20px 24px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.format-card::after { position: absolute; right: -85px; bottom: -85px; width: 230px; height: 230px; border: 1px solid var(--line); border-radius: 50%; content: ""; }
.format-card.regular-format { border-top: 3px solid var(--accent); }
.format-card.arena-format { border-top: 3px solid #587b76; }
.format-number { position: absolute; top: 30px; right: 32px; color: var(--muted); font-family: var(--mono); font-size: 14px; }
.format-card h2 { margin: 6px 0 10px; font-size: 26px; }
.format-card > strong { font-size: 14px; }
.format-card > p:not(.eyebrow) { max-width: 460px; margin: 8px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.format-card dl { position: relative; z-index: 1; display: grid; margin: 0; gap: 10px; }
.format-card dl div { display: flex; justify-content: space-between; max-width: 440px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.format-card dt { color: var(--muted); }
.format-card dd { margin: 0; }
/* 指标栏：一条细线分隔的整体，不再是四张互相堆叠的卡片 */
.event-stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1120px; margin: 0 auto 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.event-stat-strip div { display: grid; padding: 20px 16px; text-align: center; }
.event-stat-strip div + div { border-left: 1px solid var(--line); }
.event-stat-strip strong { font-family: var(--mono); font-size: 22px; }
/* 报名截止是一句运营手填的话，不是数字，按 22px 等宽排会顶出格子 */
.event-stat-strip strong.is-text { font-size: 15px; line-height: 1.5; }
.event-stat-strip span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.event-title-row { align-items: center; }
.event-format-title { margin-top: 44px; }
.event-grid { display: grid; grid-template-columns: repeat(2, 1fr); max-width: 1240px; margin: auto; gap: 20px; }
.event-empty { display: grid; grid-column: 1 / -1; min-height: 180px; margin: 0; place-items: center; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.active-official-notice { display: flex; max-width: 1240px; min-height: 56px; align-items: center; justify-content: space-between; margin: 0 auto 16px; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: var(--radius); background: #171717; color: #f5f5f3; gap: 18px; }
.active-official-notice strong { color: var(--accent); font-family: var(--mono); font-size: 13px; letter-spacing: .12em; }
.active-official-notice span { font-size: 14px; line-height: 1.6; }
.event-card { display: grid; min-height: 330px; border: 1px solid var(--line); background: var(--paper); }
.event-card-copy { display: flex; align-items: flex-start; padding: 24px 26px 26px; flex-direction: column; }
.event-card-head { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.event-card-brand { flex: 0 0 auto; color: var(--accent); font-family: var(--mono); font-size: 11px; letter-spacing: .18em; }
.event-card-labels { display: flex; align-items: center; gap: 7px; }
.event-card-status { padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--radius-pill); font-family: var(--mono); font-size: 11px; }
.event-type-badge { padding: 5px 8px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11px; }
.event-type-badge.type-arena { background: #587b76; color: white; }
.event-midjoin-badge { padding: 5px 8px; border-radius: var(--radius-pill); background: var(--accent); color: white; font-family: var(--mono); font-size: 11px; }
.event-live-alert { width: 100%; margin-top: 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); font-size: 13px; }
.status-registration { color: var(--accent); }
.status-active { color: var(--green); }
.event-card-copy h3 { margin: 0 0 5px; font-size: 21px; }
.event-card-copy > p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.event-card-copy dl { display: grid; width: 100%; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); gap: 8px; }
.event-card-copy dl div { display: flex; justify-content: space-between; font-size: 13px; }
.event-card-copy dt { color: var(--muted); }
.event-card-copy dd { margin: 0; }
.event-round-preview { display: grid; width: 100%; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); gap: 7px; }
.event-round-preview > strong { color: var(--muted); font-family: var(--mono); font-size: 11px; }
/* 轮次名 + 题目 + 时间一行放不下时让时间自己换行，
   用固定列宽会把中间的题目挤成几像素（题目才是这行的主角） */
.event-round-preview > span { display: flex; align-items: baseline; flex-wrap: wrap; font-size: 11px; gap: 4px 8px; }
.event-round-preview b { flex: 0 0 auto; font-weight: 600; }
.event-round-preview em { min-width: 0; flex: 1 1 130px; overflow: hidden; color: var(--ink); font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.event-round-preview small { flex: 0 0 auto; margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.event-capacity { width: 100%; margin-top: auto; padding-top: 22px; }
.event-capacity span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.event-capacity span b { color: var(--ink); }
.event-capacity > i { display: block; height: 3px; background: var(--line); }
.event-capacity > i em { display: block; height: 100%; background: var(--accent); }
/* 卡片内的名额行按稿子改成单行：人数在左，进度条占满右侧 */
.event-card-copy .event-capacity { display: flex; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); gap: 14px; }
.event-card-copy .event-capacity span { margin-bottom: 0; flex: 0 0 auto; }
.event-card-copy .event-capacity > i { flex: 1 1 auto; }
.event-action { width: 100%; margin-top: 18px; }

.history-hero { background: var(--paper); }
.archive-count { display: grid; min-width: 200px; padding: 16px 20px; border-left: 1px solid var(--line); text-align: right; }
.archive-count strong { color: var(--accent); font-family: var(--mono); font-size: 42px; line-height: 1; }
.archive-count span { margin-top: 7px; color: var(--muted); font-size: 13px; }
.history-content { padding: 28px 5vw 50px; }
.history-filters { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(3, 170px); max-width: 1300px; margin: auto; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); gap: 10px; }
.history-filters select, .history-search { height: 48px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.history-filters select { padding: 0 13px; outline: none; font-size: 13px; }
.history-search { display: flex; align-items: center; padding: 0 14px; gap: 10px; }
.history-search svg { width: 18px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.history-search input { width: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 14px; }
.history-summary { display: flex; align-items: center; justify-content: space-between; max-width: 1300px; margin: 14px auto; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.history-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1300px; margin: auto; gap: 16px; }
/* 宽屏按稿子去掉卡片外框，图和文字直接落在页面底色上；窄屏再收回成卡片 */
.history-card { overflow: hidden; cursor: pointer; }
.history-image { position: relative; overflow: hidden; }
.history-image img { display: block; width: 100%; aspect-ratio: auto; object-fit: contain; background: #181815; transition: transform .45s ease; }
.history-card:hover .history-image img { transform: scale(1.025); }
.history-type, .winner-badge { position: absolute; top: 12px; padding: 6px 8px; border-radius: var(--radius-sm); background: rgba(23,23,23,.72); color: white; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.history-type { left: 12px; }
.winner-badge { right: 12px; background: var(--accent); }
.history-image button { position: absolute; right: 14px; bottom: 14px; left: 14px; height: 40px; border: 0; border-radius: var(--radius-sm); background: rgba(255,255,255,.9); color: #171717; cursor: pointer; opacity: 0; transform: translateY(8px); transition: .2s ease; }
.history-card:hover .history-image button { opacity: 1; transform: translateY(0); }
.history-card-copy { padding: 13px 2px 0; }
.history-card-copy small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.history-card-copy h3 { margin: 8px 0 15px; font-size: 17px; }
.history-card-copy > div { display: flex; align-items: center; gap: 8px; }
.history-card-copy .avatar { width: 29px; height: 29px; font-size: 13px; }
.history-card-copy strong { font-size: 13px; }
.history-card-copy em { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 11px; font-style: normal; }
.history-empty { display: flex; max-width: 1300px; min-height: 220px; align-items: center; justify-content: center; margin: auto; flex-direction: column; border: 1px dashed var(--line); color: var(--muted); gap: 8px; }
.history-empty strong { color: var(--ink); font-size: 18px; }
.history-empty span { font-size: 13px; }
.artwork-dialog { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); overflow: hidden; width: min(1050px, 96vw); max-height: 90vh; background: var(--paper); box-shadow: var(--shadow); }
.artwork-dialog-image { display: grid; min-height: 620px; place-items: center; overflow: auto; background: #181815; }
.artwork-dialog-image img { width: 100%; height: 100%; object-fit: contain; }
.artwork-dialog-copy { display: flex; overflow-y: auto; padding: 55px 42px 40px; flex-direction: column; }
.artwork-dialog-copy h2 { margin: 10px 0 28px; font-size: 36px; }
.artwork-author { display: flex; align-items: center; padding-bottom: 25px; border-bottom: 1px solid var(--line); gap: 11px; }
.artwork-author > div { display: grid; }
.artwork-author small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.artwork-dialog-copy > p:not(.eyebrow) { margin: 25px 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.artwork-dialog-copy dl { display: grid; margin: auto 0 0; gap: 12px; }
.artwork-dialog-copy dl div { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.artwork-dialog-copy dt { color: var(--muted); }
.artwork-dialog-copy dd { margin: 0; }

.admin-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-width: 0; min-height: calc(100vh - 72px); }
.admin-sidebar { position: sticky; top: 72px; display: flex; overflow-y: auto; height: calc(100vh - 72px); padding: 26px 22px; flex-direction: column; border-right: 1px solid var(--line); background: var(--ink); color: var(--bg); }
.admin-sidebar h2 { margin: 7px 0 0; font-size: 23px; }
.admin-sidebar nav { display: grid; margin-top: 26px; gap: 3px; }
.admin-sidebar nav button { padding: 10px 14px; border: 0; border-radius: var(--radius-sm); background: transparent; color: #a8a8a4; cursor: pointer; text-align: left; font-size: 14px; }
.admin-sidebar nav button.active { border-radius: var(--radius-sm); background: #2b2b2b; box-shadow: inset 3px 0 0 var(--accent); color: white; }
.admin-user { display: flex; align-items: center; margin-top: auto; gap: 10px; }
.admin-user > div { display: grid; }
.admin-user strong { font-size: 13px; }
.admin-user small { color: #8c8981; font-family: var(--mono); font-size: 10px; }
.admin-content { overflow-y: auto; min-width: 0; height: calc(100vh - 72px); padding: 36px 5vw 55px; }
.admin-panel { display: none; width: 100%; min-width: 0; max-width: 1120px; margin: auto; }
.admin-panel.active { display: block; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; gap: 30px; }
.admin-heading h1 { font-size: 48px; }
/* 两栏之间用一条竖细线分隔，替代原来的两张卡片 */
.admin-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 44px; }
.admin-grid > * + * { padding-left: 44px; border-left: 1px solid var(--line); }
.format-admin-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 44px; }
.format-admin-grid > * + * { padding-left: 44px; border-left: 1px solid var(--line); }
.format-admin-card { display: grid; gap: 17px; }
.format-admin-card label { display: grid; color: var(--muted); font-size: 13px; gap: 7px; }
.format-admin-card input, .format-admin-card textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); outline: none; background: var(--bg); color: var(--ink); }
.format-admin-card textarea { min-height: 88px; resize: vertical; }
.format-admin-title { display: flex; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); gap: 16px; }
.format-admin-title > span { color: var(--accent); font-family: var(--mono); font-size: 28px; }
.format-admin-title h2 { margin-top: 4px; font-size: 25px; }
.format-duration-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
/* 左右两栏各有一个提交按钮，都用实心红会互相抢焦点，按稿子降成满宽珊瑚红描边 */
.format-admin-card .primary-button { width: 100%; margin-top: 6px; background: transparent; color: var(--accent); }
.format-admin-card .primary-button:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent-deep); transform: none; }
.event-admin-grid { display: grid; grid-template-columns: .82fr 1.18fr; align-items: start; gap: 20px; }
.competition-control { margin-bottom: 20px; }
.competition-control-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 20px; }
.competition-control-heading h3 { margin: 5px 0 0; }
.competition-control-heading label { display: grid; min-width: 290px; color: var(--muted); font-size: 13px; gap: 7px; }
.competition-control-heading select { min-height: 42px; padding: 8px 11px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.competition-live-status { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.competition-live-status span { display: grid; min-height: 72px; padding: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); align-content: center; gap: 5px; }
.competition-live-status small { color: var(--muted); font-size: 11px; }
.competition-live-status strong { font-size: 13px; line-height: 1.5; }
.competition-control-actions { display: flex; align-items: end; margin-top: 16px; gap: 8px; }
.competition-control-actions label { display: grid; width: 120px; color: var(--muted); font-size: 12px; gap: 6px; }
.competition-control-actions input { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.danger-button { min-height: 42px; padding: 0 18px; border: 1px solid var(--accent); border-radius: var(--radius-sm); background: transparent; color: var(--accent); cursor: pointer; font-size: 12px; }
.admin-stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-stat-strip span { display: grid; min-height: 84px; padding: 16px 20px; align-content: center; justify-items: center; gap: 6px; text-align: center; }
.admin-stat-strip span + span { border-left: 1px solid var(--line); }
.admin-stat-strip small { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
.admin-stat-strip strong { font-family: var(--mono); font-size: 25px; }
.admin-toolbar { display: flex; align-items: center; margin-bottom: 12px; gap: 8px; }
.admin-toolbar select, .management-row select { min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); outline: none; background: var(--paper); color: var(--ink); font-size: 13px; }
.admin-search { display: flex; min-width: 260px; min-height: 42px; align-items: center; border: 1px solid var(--line); background: var(--paper); }
.admin-search span { padding-left: 13px; color: var(--muted); }
.admin-search input { width: 100%; min-height: 40px; padding: 8px 12px; border: 0; outline: none; background: transparent; color: var(--ink); }
.management-table { overflow-x: auto; width: 100%; max-width: 100%; margin-bottom: 26px; border-top: 1px solid var(--line); background: var(--paper); }
.management-row { display: grid; min-width: 930px; min-height: 72px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; gap: 13px; }
.management-head { min-height: 42px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .07em; }
.event-admin-row { grid-template-columns: minmax(190px, 1.5fr) 85px 115px 95px 50px 70px 135px; }
.registration-count-button { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; cursor: pointer; font-family: var(--mono); font-size: 12px; }
.registration-count-button:hover { border-color: var(--accent); color: var(--accent); }
.feature-toggle { display: inline-flex; align-items: center; cursor: pointer; gap: 6px; font-size: 12px; color: var(--muted); }
.feature-toggle input { accent-color: var(--accent); }
.registration-dialog { display: grid; width: min(460px, calc(100vw - 40px)); max-height: min(640px, calc(100vh - 60px)); gap: 10px; }
.registration-dialog h2 { margin: 0; font-size: 24px; }
.registration-dialog > p { margin: 0; color: var(--muted); font-size: 13px; }
.registration-list { display: grid; overflow-y: auto; min-height: 120px; max-height: 420px; margin-top: 6px; border-top: 1px solid var(--line); }
.registration-list article { display: flex; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); gap: 11px; }
.registration-list article > div { display: grid; flex: 1; }
.registration-list strong { font-size: 14px; }
.registration-list small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.registration-list .registration-empty { display: grid; min-height: 120px; place-items: center; color: var(--muted); font-size: 13px; }
.room-admin-row { grid-template-columns: 150px 145px 100px minmax(150px, 1fr) 90px 145px; }
.user-admin-row { grid-template-columns: minmax(185px, 1.4fr) 105px 125px 135px 70px 135px; }
/* 密码找回：状态一列要放得下「有效至 xx:xx · 已试错 n 次」这种注解 */
.password-reset-row { grid-template-columns: minmax(210px, 1.5fr) 175px minmax(220px, 1.2fr) 175px; }
.password-reset-row > span > small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
/* 月度结算：冠军和结算时间两列文字最长，其余按内容压窄 */
.settlement-row { grid-template-columns: 130px minmax(200px, 1.3fr) 100px minmax(220px, 1.2fr) 118px; }
/* 待结算的月份说明自动结算漏了，标出来让运营一眼看见 */
.settlement-pending { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.settlement-empty { padding: 34px 16px; color: var(--muted); font-size: 13px; text-align: center; }
/* 题库一万题，题面注解最占地方，所以只给它一列弹性宽度，其余按内容压到最窄 */
.topic-bank-row { grid-template-columns: 96px minmax(150px, 1.1fr) 125px minmax(200px, 1.6fr) 82px 72px 90px; }
.topic-bank-row > span > small { display: block; color: var(--muted); font-size: 11px; }
.topic-bank-hint { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.topic-bank-pager { display: flex; align-items: center; margin: -14px 0 26px; gap: 14px; }
.topic-bank-pager small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.topic-bank-pager button:disabled { opacity: .4; cursor: default; }
.management-primary, .management-person > b { display: grid; gap: 4px; }
.management-primary small, .management-person small, .user-admin-row > span > small { color: var(--muted); font-size: 11px; font-weight: 400; }
.management-person { display: flex; align-items: center; gap: 9px; }
.management-person .avatar { width: 31px; height: 31px; font-size: 13px; }
.management-tag, .status-pill { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: var(--radius-pill); background: var(--bg); color: var(--muted); font-style: normal; font-size: 11px; }
.status-waiting { background: rgba(255, 80, 72, .1); color: var(--accent); }
.status-matched { background: rgba(88, 123, 118, .14); color: var(--green); }
.status-closed { color: var(--muted); }
.status-pending { background: rgba(255, 80, 72, .1); color: var(--accent); }
.status-issued { background: rgba(88, 123, 118, .14); color: var(--green); }
.status-used, .status-cancelled { color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #aaa; }
.status-dot.online { background: var(--green); }
.management-actions { display: flex; align-items: center; gap: 6px; }
.management-actions button, .round-actions button { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--ink); cursor: pointer; font-size: 11px; white-space: nowrap; }
.management-actions button:hover, .round-actions button:hover { border-color: var(--ink); }
.management-actions .danger-action, .round-actions .danger-action { color: var(--accent); }
.management-empty { min-width: 930px; padding: 34px; color: var(--muted); text-align: center; }
.form-actions { display: flex; align-items: center; gap: 14px; }
/* 后台十张稿子里内容都是直接落在页面底色上的，不再套白底描边卡片。
   这里刻意不写 padding，好让 .admin-grid 的分栏内边距生效。 */
.admin-card h3 { margin: 0 0 20px; font-size: 18px; }
.score-form { display: grid; gap: 18px; }
.score-form label, .dialog label { display: grid; color: var(--muted); font-size: 13px; gap: 8px; }
.score-form input, .score-form select, .score-form textarea, .dialog input, .dialog textarea { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none; background: var(--bg); color: var(--ink); }
.score-form textarea, .dialog textarea { min-height: 90px; resize: vertical; }
.score-form input:focus, .score-form select:focus, .score-form textarea:focus, .dialog input:focus, .dialog textarea:focus { border-color: var(--accent); }
.form-split { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
/* P1-2: 关联场次的搜索浮层。祖先链上（.form-split / .score-form / .admin-card）
   确认过没有 overflow: hidden，浮层不会被裁。 */
.battle-picker { position: relative; }
.battle-picker-results { position: absolute; z-index: 20; top: calc(100% - 18px); right: 0; left: 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); box-shadow: var(--shadow); }
.battle-picker-results button { display: block; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-align: left; font-size: 13px; }
.battle-picker-results button:last-child { border-bottom: 0; }
.battle-picker-results button:hover:not(:disabled) { background: var(--bg); }
.battle-picker-results button:disabled { color: var(--muted); cursor: default; }
.battle-picker-results code { font-family: var(--mono); font-size: 12px; }
.battle-picker-hint { color: var(--muted); font-size: 12px; }
.battle-picker-hint[data-state="ok"] { color: var(--accent); }
.battle-picker-hint[data-state="error"] { color: #b3453a; }
.score-form .primary-button { justify-self: start; }
.round-manager > label { display: grid; margin-bottom: 18px; color: var(--muted); font-size: 13px; gap: 8px; }
.round-manager select, .round-editor input, .round-editor select, .new-round-form input, .new-round-form select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); outline: none; background: var(--bg); color: var(--ink); font-size: 13px; }
.round-manager-note { margin: -7px 0 17px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.round-list { display: grid; max-height: 410px; overflow-y: auto; gap: 9px; }
.round-editor { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; padding: 11px; border: 1px solid var(--line); background: var(--bg); gap: 10px; }
.round-editor > span { color: var(--accent); font-family: var(--mono); font-size: 12px; }
/* 轮次标题、题目、两个下拉各占一行：下拉框的中文选项（「上一轮晋级者可以参与」）
   放不进窄列会被直接截断，所以不给它们分配固定像素宽，让它们各占半行 */
.round-editor > .round-topic-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 8px 10px; }
.round-topic-head { display: flex; grid-column: 1 / -1; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.round-topic-fields > input { grid-column: 1 / -1; }
.round-topic-fields strong { font-size: 13px; white-space: nowrap; }
.round-topic-fields small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.round-actions { display: grid; grid-template-columns: 1fr; gap: 5px; }
.round-actions .primary-action { grid-column: 1 / -1; border: 0; border-radius: var(--radius); background: var(--ink); color: var(--bg); }
.round-actions .primary-action:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.round-empty { padding: 30px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.score-form .event-setting-toggle { display: flex; min-height: 54px; align-items: center; justify-content: space-between; margin-top: -2px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); cursor: pointer; font-size: 13px; }
.score-form .event-setting-toggle input, .battle-roster-toggle input { position: relative; width: 42px; min-height: 24px; height: 24px; padding: 0; flex: 0 0 42px; border: 1px solid var(--line); border-radius: var(--radius-pill); appearance: none; background: #d8d4ca; cursor: pointer; transition: .18s ease; }
.score-form .event-setting-toggle input::after, .battle-roster-toggle input::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.18); content: ""; transition: .18s ease; }
.score-form .event-setting-toggle input:checked, .battle-roster-toggle input:checked { border-color: var(--accent); background: var(--accent); }
.score-form .event-setting-toggle input:checked::after, .battle-roster-toggle input:checked::after { transform: translateX(18px); }
.score-form .event-setting-toggle input:focus-visible, .battle-roster-toggle input:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
/* P2-2（巧 08-08 第 8 条）：比赛房间的「显示参与人」开关。药丸沿用后台那套，
   但标签要紧凑——后台那版是 54px 高的整行表单样式，塞进 12px 的元信息条会很突兀。
   开关只改本机显示，不落库、不影响其他人。 */
.battle-roster-toggle { display: inline-flex; align-items: center; color: var(--muted); cursor: pointer; font-size: 12px; gap: 8px; }
.battle-roster-toggle input { transform: scale(.82); transform-origin: center; }
#battleRoom.roster-hidden .battle-players { display: none; }
/* 名单连同它自带的 32px 下边距一起消失，主题描述会直接压到阶段轴上，补回一点呼吸 */
#battleRoom.roster-hidden .battle-stage-header { padding-bottom: 24px; }
/* 两个下拉用 auto 轨道按最长选项自适应，写死 160px 会把「上一轮晋级者可以参与」截断 */
.new-round-form { display: grid; grid-template-columns: 90px minmax(150px, 1fr) auto auto auto; align-items: end; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); gap: 7px; }
/* 让浏览器按最长选项自己定宽（width:100% 会被轨道压回去，把选项文字截掉） */
.new-round-form select { width: auto; min-width: max-content; }
.new-round-form > strong { grid-column: 1 / -1; margin-bottom: 2px; font-size: 13px; }
.new-round-form .secondary-button { min-width: 95px; height: 42px; padding: 0 12px; font-size: 12px; }
.selected-user-card { display: flex; align-items: center; flex-direction: column; text-align: center; }
.admin-profile-avatar { width: 82px; height: 82px; margin: 30px 0 12px; font-size: 28px; }
.selected-user-card h2 { margin: 0; font-size: 26px; }
.selected-user-card > strong { margin: 12px 0 28px; color: var(--accent); font-family: var(--mono); font-size: 38px; }
.selected-user-card > strong small { font-size: 13px; }
.user-stat-grid { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.user-stat-grid span { display: grid; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.user-stat-grid b { margin-bottom: 4px; color: var(--ink); font-family: var(--mono); font-size: 18px; }
.selected-user-card > p:last-child { margin-top: 25px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.rule-table { border-top: 1px solid var(--line); }
.rule-row { display: grid; grid-template-columns: 1.2fr 2fr 100px 100px; min-height: 70px; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; gap: 20px; }
.rule-head { min-height: 42px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.positive { color: var(--green); }
.negative { color: var(--accent); }
.enabled-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.ledger-list { border-top: 1px solid var(--line); }
/* 操作流水按稿子拆成列：操作人 / 操作内容 / 操作时间 / 审计日志 / 结果 */
.ledger-entry { display: grid; grid-template-columns: auto minmax(0, 1fr) 170px 120px auto; min-height: 78px; align-items: center; padding: 14px 5px; border-bottom: 1px solid var(--line); gap: 15px; }
.ledger-entry > div { display: grid; min-width: 0; }
.ledger-entry strong { font-size: 15px; }
.ledger-entry p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.ledger-entry small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.ledger-entry .ledger-source { font-family: var(--sans); font-size: 13px; }
.ledger-entry > b { font-family: var(--mono); font-size: 19px; }
/* 结果标签走中性描边，绿色按规范只留给在线/成功这类真实状态 */
.ledger-entry > .audit-log-badge { padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--radius-pill); color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; padding: 20px; place-items: center; background: rgba(23,23,23,.6); backdrop-filter: blur(4px); overflow-y: auto; }
/* 弹窗打开时锁住背景滚动。原来没有这一条，手机上滑弹窗内容会把后面的页面一起带跑。
   position:fixed 是为了 iOS Safari——只写 overflow:hidden 在那儿拦不住真实手势。
   top 由 JS 写成 -scrollY，关闭时还原，滚动位置不丢。
   弹窗自身内容超高时靠 .dialog 的 overflow-y 滚，不受影响。 */
body.modal-open { position: fixed; left: 0; width: 100%; overflow: hidden; }
.modal-backdrop { overscroll-behavior: contain; }
.dialog { position: relative; display: grid; width: min(460px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); padding: 38px; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--paper); box-shadow: var(--shadow); gap: 17px; }
.dialog h2 { margin: -4px 0 8px; font-size: 30px; }
.auth-dialog { width: min(450px, 100%); }
/* 登录/注册按稿子改成下划线式页签，不再是实心黑填充 */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.auth-tabs button { position: relative; min-height: 44px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.auth-tabs button.active { color: var(--accent); }
.auth-tabs button.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); content: ""; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; color: var(--ink); font-size: 13px; gap: 7px; }
.auth-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); outline: none; background: var(--bg); color: var(--ink); }
.auth-form input:focus { border-color: var(--accent); }
.auth-form .primary-button { width: 100%; margin-top: 4px; }
.auth-local-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-consent { grid-template-columns: auto 1fr; align-items: start; line-height: 1.6; }
.auth-consent input { width: 15px; min-height: 15px; margin-top: 2px; }
.form-error { margin: 0; padding: 9px 11px; background: rgba(255, 80, 72, .08); color: var(--accent); font-size: 12px; line-height: 1.6; }
.form-ok { margin: 0; padding: 9px 11px; background: rgba(62, 163, 110, .10); color: var(--green); font-size: 12px; line-height: 1.6; }
/* 忘记密码：入口是链接式按钮，不跟主按钮抢视觉 */
.auth-link { width: 100%; padding: 4px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.auth-link:hover { color: var(--accent); }
.auth-forgot { display: grid; gap: 16px; }
.auth-forgot-intro { margin: 0; padding: 12px 14px; border-left: 2px solid var(--accent); background: rgba(255, 80, 72, .06); color: var(--muted); font-size: 12px; line-height: 1.75; }
.auth-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.auth-divider::before, .auth-divider::after { height: 1px; background: var(--line); content: ""; }
.auth-divider span { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
.admin-inline-check { display: inline-flex; align-items: center; color: var(--muted); font-size: 12px; gap: 7px; }
.admin-inline-check input { width: 15px; height: 15px; }
/* 账号弹窗顶部的身份行：头像 + 昵称与权限标签，积分靠右 */
.account-identity { display: flex; align-items: center; padding: 4px 0 20px; gap: 16px; }
.account-identity-avatar { width: 68px; height: 68px; flex: 0 0 auto; font-size: 25px; }
.account-identity > div:first-of-type { display: grid; min-width: 0; flex: 1; justify-items: start; gap: 8px; }
.account-identity strong { font-size: 20px; }
.account-role-tag { padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius-pill); color: var(--accent); font-size: 12px; font-style: normal; }
.account-identity-points { display: grid; flex: 0 0 auto; justify-items: end; gap: 4px; text-align: right; }
.account-identity-points b { color: var(--accent); font-family: var(--mono); font-size: 24px; }
.account-identity-points small { color: var(--muted); font-size: 12px; }
/* 头像自助修改：上传按钮 + 恢复默认，恢复只在有自定义头像时出现 */
.account-avatar-editor { display: grid; padding-bottom: 18px; border-bottom: 1px solid var(--line); gap: 10px; }
.account-avatar-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.account-avatar-actions button { flex: 1 1 140px; }
.account-avatar-editor small { color: var(--muted); font-size: 12px; line-height: 1.7; }
.account-close-button { width: 100%; margin-top: 18px; }
.account-detail-list { display: grid; border-top: 1px solid var(--line); }
.account-password-form { display: grid; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-password-form .primary-button { width: 100%; margin-top: 4px; }
.account-detail-list span { display: grid; grid-template-columns: 105px 1fr; min-height: 45px; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; gap: 10px; }
.account-detail-list small { color: var(--muted); }
.platform-rules-dialog { width: min(680px, 100%); max-height: 90vh; overflow-y: auto; }
.platform-rule-list { display: grid; gap: 10px; }
.platform-rule-list section { padding: 15px; border: 1px solid var(--line); background: var(--bg); }
.platform-rule-list strong { font-size: 14px; }
.platform-rule-list p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.system-status-dialog { width: min(620px, 100%); }
.system-status-intro, .system-status-footnote { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.system-capability-list { display: grid; border-top: 1px solid var(--line); }
.system-capability-list span { display: grid; grid-template-columns: 1fr auto; min-height: 48px; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; gap: 12px; }
.system-capability-list b { font-family: var(--mono); font-size: 11px; }
.system-capability-list b.ready { color: var(--green); }
.system-capability-list b.pending { color: var(--accent); }
.direct-message-dialog { display: grid; width: min(560px, 94vw); height: min(680px, 88vh); padding: 0; grid-template-rows: auto 1fr auto; }
.direct-message-dialog > header { display: flex; min-height: 78px; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.direct-message-dialog > header > div { display: flex; align-items: center; gap: 12px; }
.direct-message-dialog > header > div > div { display: grid; }
.direct-message-dialog > header small { color: var(--accent); font-family: var(--mono); font-size: 11px; }
.direct-message-dialog .dialog-close { position: static; }
.direct-message-list { display: flex; overflow-y: auto; padding: 22px; flex-direction: column; gap: 12px; }
.direct-message { max-width: 78%; align-self: flex-start; }
.direct-message.mine { align-self: flex-end; text-align: right; }
.direct-message small { color: var(--muted); font-size: 12px; }
.direct-message p { margin: 4px 0 0; padding: 10px 13px; border: 1px solid var(--line); background: var(--bg); line-height: 1.55; text-align: left; }
.direct-message.mine p { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.direct-message-empty { margin: auto; color: var(--muted); }
.direct-message-form { display: grid; padding: 14px; border-top: 1px solid var(--line); grid-template-columns: 1fr auto; gap: 10px; }
.direct-message-form input { min-width: 0; height: 44px; padding: 0 13px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); outline: 0; }
.direct-message-form button { min-width: 86px; }
.dialog-close { position: absolute; top: 18px; right: 18px; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid rgba(255,255,255,.7); border-radius: 50%; background: rgba(18,18,16,.7); color: #fff; cursor: pointer; font-size: 20px; line-height: 1; text-shadow: 0 0 6px rgba(0,0,0,.7); }
.toast { position: fixed; bottom: 30px; left: 50%; z-index: 200; padding: 12px 19px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-size: 14px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.dark { color-scheme: dark; --bg: #121212; --paper: #1b1b1b; --ink: #f2f2f0; --muted: #9a9a96; --line: #2e2e2c; --shadow: 0 14px 40px rgba(0,0,0,.4); }
body.dark .admin-sidebar { background: #0d0d0d; color: #f2f2f0; }
body.dark select, body.dark option { background: #1b1b1b; color: #f2f2f0; }
.upload-zone.dragging { border-color: var(--accent); background: rgba(255,79,73,.06); }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; background: var(--paper); }
  .main-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 60; display: flex; overflow-x: auto; height: 60px; padding: 0 4px; border-top: 1px solid var(--line); background: var(--paper); gap: 0; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav .nav-item { flex: 0 0 76px; }
  .floating-battle-controls { right: 14px; bottom: 74px; }
  .test-battle-panel { grid-template-columns: 1fr repeat(3, auto); }
  .nav-item::after { top: 0; bottom: auto; }
  body { padding-bottom: 60px; }
  .stage-body { grid-template-columns: 1fr; gap: 38px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; overflow: hidden; width: 100%; min-width: 0; height: auto; padding: 25px; }
  .admin-content { overflow: visible; height: auto; }
  #view-leaderboard.active { display: block; height: auto; }
  .ranking-table { overflow: visible; flex: none; }
  .admin-sidebar nav { display: flex; margin-top: 25px; }
  .admin-user { display: none; }
  .competition-live-status { grid-template-columns: repeat(3, 1fr); }
  .carousel-slide { width: 74vw; }
  .event-grid { grid-template-columns: 1fr; }
  .official-format-grid { grid-template-columns: 1fr; }
  .history-grid { grid-template-columns: repeat(3, 1fr); }
  .home-hero { grid-template-columns: 1fr; }
  .home-featured-art { width: min(520px, 100%); }
}

@media (max-width: 720px) {
  /* 窄屏流水收成两列：操作人在左，时间与结果叠在右侧 */
  .ledger-entry { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; }
  .ledger-entry > .avatar, .ledger-entry > div { grid-row: 1 / 3; }
  .ledger-entry .ledger-time { grid-column: 3; grid-row: 1; text-align: right; }
  .ledger-entry .ledger-source { display: none; }
  .ledger-entry > .audit-log-badge { grid-column: 3; grid-row: 2; justify-self: end; }
  .site-header { min-height: 62px; padding: 0 16px; }
  .system-mode-bar { grid-template-columns: 1fr auto; padding: 10px 16px; }
  .system-mode-bar p { display: none; }
  .brand > span:last-child, .user-copy { display: none; }
  .user-cluster { gap: 8px; }
  /* 窄屏按稿子单列：文案在上，三项指标横排在下，两个按钮各占一行 */
  .lobby-hero { padding: 12px 12px 0; }
  .lobby-stage { padding: 16px 18px 24px; }
  .stage-body { gap: 30px; }
  .hero-copy h1 { font-size: clamp(46px, 15vw, 70px); }
  .status-pill { margin-bottom: 0; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .primary-button.large, .hero-actions .secondary-button { width: 100%; }
  /* minmax(0,1fr) 不能省：默认 1fr 的最小尺寸是 min-content，大字时钟会把整行顶到比屏幕还宽 */
  .console-stats { justify-content: stretch; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .console-stats div { padding: 0 8px; }
  .console-stats div span { order: -1; }
  .console-stats strong { font-size: clamp(19px, 5.4vw, 26px); }
  .console-stat-clock strong { font-size: clamp(30px, 8.6vw, 42px); }
  .versus-axis { margin-top: 22px; }
  .friend-dropdown { position: fixed; top: 62px; right: 10px; left: 10px; width: auto; max-height: calc(100vh - 135px); }
  .modal-backdrop { padding: 12px; }
  .dialog { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 26px 20px; }
  .dialog h2 { font-size: 24px; }
  .floating-battle-controls { right: 10px; bottom: 70px; left: 10px; align-items: stretch; }
  .active-battle-dock { grid-template-columns: 1fr auto auto; padding-left: 13px; gap: 10px; }
  .active-battle-dock time { font-size: 16px; }
  .active-battle-dock button { padding: 0 12px; }
  .test-battle-panel { grid-template-columns: repeat(3, 1fr); }
  .test-battle-panel > div { grid-column: 1 / -1; }
  .test-battle-panel button { padding: 0 8px; }
  .home-hero { min-height: auto; padding: 70px 20px; }
  .home-hero-copy h1 { font-size: clamp(55px, 17vw, 76px); }
  .home-featured-section { padding: 70px 20px 85px; }
  .home-featured-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .home-featured-grid article > div { padding: 11px; }
  .home-featured-grid h3 { font-size: 15px; }
  .waiting-rooms-section { padding: 70px 20px 85px; }
  .room-heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
  /* 窄屏把房间行拆成上下几段，按钮独占一行 */
  .waiting-room-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 16px; gap: 12px; }
  .waiting-room-card .room-host { grid-column: 1; grid-row: 1; }
  .waiting-room-card .room-wait { grid-column: 2; grid-row: 1; justify-self: end; }
  .waiting-room-card .room-details { grid-column: 1 / -1; grid-row: 2; }
  .waiting-room-card .room-seat { grid-column: 1 / -1; grid-row: 3; }
  .waiting-room-card .room-actions { grid-column: 1 / -1; grid-row: 4; }
  .waiting-room-card .room-actions button { flex: 1; min-width: 0; }
  .chat-panel { min-height: 540px; border-right: 0; }
  .friends-panel { min-height: 540px; }
  .chat-header > span { display: none; }
  .chat-messages { max-height: 415px; padding: 15px; }
  .chat-message { max-width: 92%; }
  .chat-composer { grid-template-columns: 30px 1fr auto; }
  .chat-composer > span { display: none; }
  .emoji-button { width: 30px; }
  .room-chat-panel { margin: 22px 0 0; }
  .battle-room-chat { width: calc(100% - 24px); margin-right: 12px; margin-left: 12px; }
  .room-chat-messages { height: 165px; padding: 12px; }
  .content-section { padding: 70px 20px; }
  .section-title-row, .page-hero, .admin-heading, .vote-heading { align-items: flex-start; flex-direction: column; }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-grid article { min-height: 220px; }
  .flow-grid h3 { margin-top: 70px; }
  /* V4 移动端：大时间区 + 主题 + 纵向阶段轴合成一张浅灰卡，玩家名单排在卡片下面。
     阶段轴在稿子里位于卡内、名单之上，宽屏却在名单之下，所以这里用 order 换位。 */
  .battle-meta { flex-wrap: wrap; padding: 16px 20px 12px; }
  .battle-stage-header { order: 1; margin: 0 12px; padding: 20px 16px 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--stage); }
  .phase-track { order: 2; margin: 0 12px 26px; padding: 6px 14px 22px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: var(--stage); }
  .battle-players { order: 3; }
  .room-chat-panel { order: 4; }
  .test-battle-inline { order: 5; }
  .battle-workspace { order: 6; }
  .stage-clock { grid-template-columns: 1fr; margin-top: 0; gap: 4px; }
  .stage-countdown { grid-column: 1; justify-items: start; gap: 2px; }
  .stage-countdown span { justify-self: end; margin-top: -22px; }
  .stage-clock time { font-size: clamp(76px, 25vw, 108px); }
  .battle-topic { padding: 22px 0 24px; text-align: left; }
  .test-battle-inline { justify-content: flex-start; }
  .test-battle-inline > div { flex: 1 0 100%; }
  /* 窄屏收回单列：状态在上、积分在下，都靠右；VS 中轴只在宽屏成立 */
  .battle-players { max-width: none; margin: 0 20px 45px; padding: 0; column-count: 1; }
  .battle-players.has-versus::after { display: none; }
  .battle-players .player-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 0 4px 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; gap: 14px; }
  .battle-players .player-head span:last-child { text-align: right; }
  .battle-players article { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; }
  .battle-players article .player-identity { grid-row: 1 / 3; }
  .battle-players article .ready-state { grid-column: 2; grid-row: 1; align-self: end; }
  .battle-players article .player-points { grid-column: 2; grid-row: 2; padding-left: 0; text-align: right; }
  .battle-versus { text-align: center; }
  .battle-workspace { padding: 55px 20px 70px; }
  .creation-tips { flex-wrap: wrap; }
  .submission-preview { grid-template-columns: 1fr; gap: 30px; }
  .vote-grid { grid-template-columns: 1fr; }
  .demo-toolbar { overflow-x: auto; justify-content: flex-start; }
  .demo-toolbar span, .demo-toolbar button { flex: 0 0 auto; }
  /* BUG-09: 移动端报名按钮首屏可见 — 弹窗内 sticky 底部 */
  .event-detail-dialog { display: flex; flex-direction: column; padding-bottom: 0; }
  .event-detail-dialog .primary-button { position: sticky; bottom: 0; z-index: 1; margin-bottom: 0; background: var(--paper); box-shadow: 0 -8px 20px rgba(0,0,0,.12); }
  .page-hero { min-height: 370px; padding: 65px 20px 45px; }
  .season-card { width: 100%; min-width: 0; }
  .leaderboard-content { padding: 45px 20px 75px; }
  .podium { grid-template-columns: 1fr; }
  .podium-entry { padding: 16px 0; }
  .podium-entry + .podium-entry { border-left: 0; border-top: 1px solid var(--line); }
  .ranking-table { overflow-x: auto; }
  .ranking-row { min-width: 650px; }
  .admin-content { padding: 45px 20px 75px; }
  .admin-grid, .format-admin-grid, .event-admin-grid { grid-template-columns: 1fr; gap: 28px; }
  .admin-grid > * + *, .format-admin-grid > * + * { padding-left: 0; padding-top: 28px; border-left: 0; border-top: 1px solid var(--line); }
  .admin-stat-strip { grid-template-columns: repeat(2, 1fr); }
  .admin-stat-strip span:nth-child(odd) { border-left: 0; }
  .admin-stat-strip span:nth-child(n+3) { border-top: 1px solid var(--line); }
  .admin-sidebar nav { overflow-x: auto; width: 100%; min-width: 0; }
  .admin-sidebar nav button { flex: 0 0 auto; }
  .form-split { grid-template-columns: 1fr; }
  .rule-table { overflow-x: auto; }
  .rule-row { min-width: 700px; }
  .nav-item { font-size: 13px; }
  .live-event-pill { height: 34px; padding: 0 10px; gap: 7px; }
  .live-event-pill strong { display: none; }
  .official-live-card { padding: 24px 20px; }
  .event-carousel-section { min-height: auto; padding: 20px 0 18px; }
  .event-carousel-head { align-items: flex-start; padding: 0 20px 14px; flex-direction: column; gap: 6px; }
  .carousel-slide { width: 88vw; height: auto; min-height: 340px; padding: 20px; }
  .carousel-arrow { display: none; }
  /* 窄屏三栏放不下，时钟与日期改成上下两行，「你已报名」贴在右侧竖线外。
     稿子里移动端仍是三栏，但我们的弹窗更窄，硬排会把日期截成省略号——信息完整优先。 */
  .slide-start { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; gap: 10px 14px; }
  .slide-start-when { grid-row: 2; grid-column: 1; display: flex; align-items: center; padding-left: 0; border-left: 0; gap: 10px; }
  .slide-registered { grid-row: 1 / 3; padding-left: 14px; }
  .event-detail-facts { grid-template-columns: 1fr; }
  .event-detail-facts div:nth-child(even) { padding-left: 0; border-left: 0; }
  .event-detail-start { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 14px; }
  .event-detail-start-when { grid-row: 2; grid-column: 1; display: flex; align-items: center; padding-left: 0; border-left: 0; gap: 10px; }
  .event-detail-registered { grid-row: 1 / 3; padding-left: 14px; }
  .event-poster { min-height: 360px; }
  .event-content { padding: 50px 20px 75px; }
  .event-stat-strip { grid-template-columns: repeat(2, 1fr); margin-bottom: 65px; }
  .event-stat-strip div:nth-child(odd) { border-left: 0; }
  .event-stat-strip div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .event-title-row .segmented-control { overflow-x: auto; max-width: 100%; }
  .format-card { min-height: 315px; padding: 28px; }
  /* 窄屏时间固定另起一行，别再跟标题抢同一行 */
  .event-round-preview small { margin-left: 0; flex-basis: 100%; }
  .round-editor { grid-template-columns: 24px 1fr; }
  .round-editor > .round-topic-fields { grid-template-columns: 1fr; }
  .round-editor button { grid-column: 2; }
  .round-actions { grid-column: 2; grid-template-columns: 1fr 1fr; }
  .new-round-form { grid-template-columns: 1fr; }
  /* 单列时行宽足够，改回撑满，避免下拉框缩成一小截 */
  .new-round-form select { width: 100%; }
  .competition-control-heading, .competition-control-actions { align-items: stretch; flex-direction: column; }
  .competition-control-heading label, .competition-control-actions label { width: 100%; min-width: 0; }
  .competition-live-status { grid-template-columns: repeat(2, 1fr); }
  .format-duration-grid { grid-template-columns: 1fr; }
  .admin-toolbar { align-items: stretch; flex-direction: column; }
  .admin-toolbar > * { width: 100%; }
  .admin-search { min-width: 0; }
  .history-filters { grid-template-columns: 1fr 1fr; padding: 0; border: 0; background: transparent; }
  /* 窄屏时件数收成一行：8 │ 件公开作品 */
  .archive-count { display: flex; min-width: 0; padding: 0; align-items: baseline; border-left: 0; text-align: left; gap: 12px; }
  .archive-count strong { font-size: 30px; }
  .archive-count span { padding-left: 12px; margin-top: 0; border-left: 1px solid var(--line); }
  .history-search { grid-column: 1 / -1; }
  .history-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .history-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
  .history-card-copy { padding: 11px; }
  .history-card-copy h3 { font-size: 15px; }
  .history-image button { display: none; }
  .artwork-dialog { grid-template-columns: 1fr; overflow-y: auto; max-height: 92vh; }
  .artwork-dialog-image { min-height: 420px; }
  .artwork-dialog-copy { padding: 35px 24px; }
}

.feedback-fab { position: fixed; bottom: 24px; left: 24px; z-index: 75; display: flex; height: 42px; align-items: center; padding: 0 16px 0 13px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--paper); box-shadow: var(--shadow); color: var(--ink); cursor: pointer; font-size: 13px; gap: 7px; transition: .2s ease; }
.feedback-fab svg { width: 17px; fill: none; stroke: var(--accent); stroke-width: 1.8; }
.feedback-fab:hover { border-color: var(--accent); transform: translateY(-1px); }
.feedback-dialog { width: min(520px, 100%); max-height: 92vh; overflow-y: auto; }
.feedback-dialog input, .feedback-dialog textarea, .feedback-dialog select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); outline: none; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; }
.feedback-dialog input:focus, .feedback-dialog textarea:focus { border-color: var(--accent); }
.feedback-dialog textarea { resize: vertical; }
.feedback-intro { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.feedback-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.admin-nav-badge { display: inline-grid; min-width: 17px; height: 17px; margin-left: 7px; padding: 0 4px; place-items: center; border-radius: var(--radius-pill); background: var(--accent); color: white; font-family: var(--mono); font-size: 10px; font-weight: 400; }
.feedback-admin-list { display: grid; border-top: 1px solid var(--line); }
.feedback-entry { display: grid; padding: 18px 5px; border-bottom: 1px solid var(--line); gap: 8px; }
.feedback-entry header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.feedback-entry header strong { font-size: 15px; }
.feedback-category { padding: 2px 8px; border-radius: var(--radius-pill); font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .08em; border: 1px solid var(--line); color: var(--muted); }
.feedback-category-bug { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent); }
.feedback-status-badge { color: var(--muted); font-family: var(--mono); font-size: 11px; font-style: normal; }
.feedback-entry.feedback-status-open .feedback-status-badge { color: var(--accent); }
.feedback-entry.feedback-status-resolved .feedback-status-badge { color: var(--green); }
.feedback-entry p { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-entry small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.feedback-entry .feedback-client-info { font-family: var(--mono); font-size: 10px; }
.feedback-entry .feedback-steps { padding-left: 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: 12px; }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-actions button { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; }
.feedback-actions button:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 980px) {
  .feedback-fab { bottom: 74px; left: 14px; }
  .feedback-fab span { display: none; }
  .feedback-fab { padding: 0; width: 42px; justify-content: center; }
  /* 对战悬浮 dock 出现时，反馈球让开一层。窄屏下 dock 是通栏的（left:10px right:10px），
     两者原来同在 bottom:70~74px 这条带上、z-index 都是 75，反馈球正好盖住 dock 左端的
     「对战进行中 / 当前阶段」，选手想点 dock 回对战页会点开反馈弹窗。 */
  body.battle-dock-visible .feedback-fab { bottom: 136px; }
}

/* ── 站点页脚：备案信息与公司主体 ─────────────────────────────────────────────
   备案审核要求业务简介 / 深圳实际办公地址 / 联系电话在站内可见，工信部备案号标示于页面
   底部。视觉沿用 V2 规范：纸白底 + 细分隔线，珊瑚红只落在 eyebrow 和链接 hover 上。 */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.site-footer-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); padding: 54px 4vw 40px; gap: 20px 6vw; }
.site-footer h2 { margin: 9px 0 17px; font-size: 19px; letter-spacing: -.02em; }
.site-footer-about > p { margin: 0; max-width: 620px; color: var(--muted); font-size: 13px; line-height: 2; }
.site-footer-facts { display: grid; margin: 0; gap: 12px; }
.site-footer-facts > div { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); align-items: baseline; gap: 14px; }
.site-footer-facts dt { color: var(--muted); font-size: 12px; }
.site-footer-facts dd { margin: 0; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.site-footer-facts dd a { color: inherit; text-decoration: none; }
.site-footer-facts dd a:hover { color: var(--accent); }
/* 反馈悬浮球固定在视口左下（bottom:24px，高 42px），滚到底时正好压住页脚最后一行，
   所以这条备案带的下边距要够它落空，备案号任何时候都不能被浮层盖住。 */
.site-footer-legal { display: flex; align-items: center; flex-wrap: wrap; padding: 17px 4vw 84px; border-top: 1px solid var(--line); gap: 8px 20px; }
.site-footer-legal small { color: var(--muted); font-size: 12px; }
.site-footer-beian { display: flex; align-items: center; flex-wrap: wrap; margin: 0; color: var(--muted); font-size: 12px; gap: 8px 18px; }
.site-footer-beian a { color: var(--muted); text-decoration: none; }
.site-footer-beian a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 980px) {
  .site-footer-main { grid-template-columns: 1fr; padding: 40px 4vw 30px; gap: 32px; }
  /* 窄屏主导航是 fixed 60px（body 已留 padding-bottom），反馈球抬到 bottom:74px，
     这里再让出一段，保证备案号不被底栏或悬浮球遮住。 */
  .site-footer-legal { padding: 16px 4vw 72px; }
}

@media (max-width: 720px) {
  .site-footer-main { padding: 34px 16px 26px; }
  .site-footer-legal { padding: 16px 16px 72px; }
  /* 窄屏标签改成上下排，地址这类长文案不必挤在 4.5em 标签右边 */
  .site-footer-facts > div { grid-template-columns: 1fr; gap: 3px; }
}
