/* 设计变量照搬 career.lebron.eu.org（lebronweb/src/home.ts、leaders.ts），改那边配色时这里要手动同步 */
@font-face { font-family: "Anton"; src: url("/fonts/anton.woff2") format("woff2"); font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #0b0907; --line: #2a231c; --ink: #f3ebdd; --ink2: #c8bca8; --mute: #8a7f6e;
  --gold: #ecc97f; --gold2: #b8914a; --champ: #f4e2b8;
  --card: #14100d; --field: #1b1612; --edge: #3b3127; --goldline: #6b5733;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.23, 1, .32, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; }
body.in-room { height: 100vh; height: 100dvh; overflow: hidden; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* ───────── 顶栏（同 career 子页面） ───────── */
.top { display: flex; align-items: center; gap: 18px; padding: max(14px, env(safe-area-inset-top)) clamp(16px, 3vw, 32px) 14px; border-bottom: 1px solid var(--line); }
.brand img { height: 20px; display: block; }
.sep { width: 1px; height: 30px; background: var(--line); flex: 0 0 auto; }
.ttl { min-width: 0; flex: 1; }
.ttl h1 { font-size: 17px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttl p { margin-top: 3px; font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.in-room .ttl p { white-space: normal; }
.ttl p button { background: none; border: 0; color: var(--gold2); font-size: 13px; padding: 0; margin-left: 4px; }
.chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; white-space: nowrap; flex: 0 0 auto; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px #ecc97f22; }
.chip.off i { background: var(--mute); box-shadow: none; }
.chip.warn i { background: #e2412f; box-shadow: 0 0 0 3px #e2412f22; }
.chip b { color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }

main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 32px) 40px; }
body.in-room main { display: flex; flex-direction: column; min-height: 0; padding: 0 clamp(12px, 3vw, 24px); position: relative; }
.foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--mute); padding: 6px clamp(16px, 4vw, 48px) max(16px, env(safe-area-inset-bottom)); }
.foot a { color: var(--mute); text-decoration: none; }
.foot a:hover, .foot a:focus-visible { color: var(--gold); outline: none; }
body.in-room .foot { display: none; }

/* ───────── 首页 ───────── */
.eyebrow { font-size: 13px; letter-spacing: .14em; color: var(--gold2); font-weight: 600; }
.lede { margin-top: 6px; font-size: 15px; color: var(--ink2); line-height: 1.7; }
.games { list-style: none; display: grid; gap: 10px; margin-top: 18px; }
.day { margin-top: 26px; font-size: 13px; color: var(--mute); letter-spacing: .08em; }
.card { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; transition: border-color .15s, transform .16s var(--ease); }
.card.open { border-color: var(--goldline); }
.card:hover, .card:focus-visible { border-color: var(--gold2); outline: none; }
.card:active { transform: scale(.985); }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.vs { font-size: 16px; font-weight: 700; }
.vs small { font-size: 12px; font-weight: 400; color: var(--mute); margin-left: 8px; }
.card.closed .vs, .card.unavailable .vs { color: var(--ink2); }
.tag { font-size: 12px; border-radius: 99px; padding: 3px 10px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.tag.open { background: var(--gold); border-color: var(--gold); color: #1a1208; font-weight: 600; }
.tag.upcoming { color: var(--gold); border-color: var(--goldline); }
.meta { margin-top: 6px; font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.meta b { color: var(--gold); font-weight: 600; }
.card.closed .meta, .card.unavailable .meta { color: var(--mute); }
.empty { margin-top: 40px; text-align: center; color: var(--ink2); line-height: 1.8; font-size: 15px; }
.empty a { color: var(--gold); }

/* ───────── 房间 ───────── */
.log { flex: 1; min-height: 0; overflow-y: auto; list-style: none; padding: 16px 2px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.msg { max-width: 92%; }
.msg .h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.msg .n { color: var(--gold2); font-size: 12px; font-weight: 600; }
.msg .t { color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.msg .b { font-size: 15px; line-height: 1.55; margin-top: 2px; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.mine { align-self: flex-end; text-align: right; max-width: 85%; }
.msg.mine .h { justify-content: flex-end; }
.msg.mine .n { color: var(--gold); }
.msg.mine .b { display: inline-block; text-align: left; background: var(--field); border: 1px solid var(--edge); border-radius: 10px; padding: 7px 11px; }
.ops { display: inline-flex; gap: 6px; }
.ops button { font-size: 11px; color: var(--mute); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.ops button:hover, .ops button:focus-visible { color: #e2412f; border-color: #e2412f; outline: none; }
.sys { align-self: center; text-align: center; font-size: 12px; color: var(--mute); line-height: 1.6; }
.older { align-self: center; font-size: 13px; color: var(--ink2); background: none; border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; }
.older:hover, .older:focus-visible { color: var(--gold); border-color: var(--gold2); outline: none; }
.newpill { position: absolute; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 13px; font-weight: 600; color: #1a1208; background: var(--gold); border: 0; border-radius: 99px; padding: 6px 14px; box-shadow: 0 8px 24px #000a; }
.notice { min-height: 18px; font-size: 12px; color: var(--mute); text-align: center; padding-top: 6px; }
.notice.bad { color: #e2412f; }
.composer { display: flex; gap: 8px; padding: 6px 0 max(14px, env(safe-area-inset-bottom)); }
.composer input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.composer input:focus { outline: none; border-color: var(--gold2); }
.composer input::placeholder { color: var(--mute); }
.composer button, dialog form button { font-size: 15px; font-weight: 600; color: #1a1208; background: var(--gold); border: 0; border-radius: 10px; padding: 0 18px; transition: transform .16s var(--ease); }
.composer button:active, dialog form button:active, .older:active, .newpill:active { transform: scale(.97); }
.composer button[disabled] { opacity: .5; cursor: default; }
.count-hint { font-size: 12px; color: var(--mute); align-self: center; font-variant-numeric: tabular-nums; }
.count-hint.over { color: #e2412f; }
.adminbar { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.adminbar button { font-size: 12px; color: var(--ink2); background: none; border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; }
.adminbar button.danger:hover { color: #e2412f; border-color: #e2412f; }

/* 未开放 / 已结束 / 不可用 的大字提示 */
.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 40px 0; }
.stage .k { font-size: 13px; letter-spacing: .14em; color: var(--gold2); font-weight: 600; }
.stage .big { font-family: Anton, Impact, "Arial Narrow Bold", sans-serif; font-size: clamp(56px, 16vw, 96px); line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.stage p { font-size: 15px; color: var(--ink2); line-height: 1.7; }
.stage a { color: var(--gold); text-decoration: none; }
.banner { margin-top: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 13px; color: var(--ink2); text-align: center; }

/* ───────── 弹窗（同 career 生日弹窗） ───────── */
dialog { background: var(--card); color: var(--ink); border: 1px solid #3a3027; border-radius: 16px; padding: 22px; width: min(420px, calc(100vw - 32px)); margin: auto; box-shadow: 0 30px 80px #000c; }
dialog::backdrop { background: #000a; backdrop-filter: blur(4px); }
dialog { transition: opacity .2s var(--ease), transform .2s var(--ease), overlay .2s allow-discrete, display .2s allow-discrete; }
dialog:not([open]) { opacity: 0; transform: scale(.97); }
@starting-style { dialog[open] { opacity: 0; transform: scale(.97); } }
dialog h2 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
dialog .hint { font-size: 13px; color: var(--ink2); margin-bottom: 14px; line-height: 1.6; }
dialog form { display: flex; gap: 8px; }
dialog input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
dialog input:focus { outline: none; border-color: var(--gold2); }
dialog .err { min-height: 18px; margin-top: 8px; font-size: 13px; color: #e2412f; }
.x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink2); font-size: 18px; }

@media (max-width: 820px) {
  .sep { display: none; }
  .top { gap: 12px; }
  .ttl h1 { font-size: 15px; }
  .foot { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
