@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Noto+Sans+TC:wght@400;500;700;900&display=swap");

:root {
  --bg: #07080b;
  --bg-2: #10131a;
  --paper: #161b24;
  --paper-2: #1c2330;
  --line: rgba(212, 175, 80, 0.32);
  --gold: #d4af50;
  --gold-2: #f0d78c;
  --ink: #f4efe4;
  --mute: #9aa3b2;
  --dpp: #1b9431;
  --kmt: #2450a8;
  --tpp: #2ab3c4;
  --npp: #d4a017;
  --danger: #c7564c;
  --ok: #7dcea0;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(36, 80, 168, 0.18), transparent 55%),
    radial-gradient(900px 500px at -10% 110%, rgba(27, 148, 49, 0.12), transparent 50%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
.grain, .vignette { display: none !important; }
.wordmark {
  display: block;
  width: min(100%, 420px);
  margin: 0 auto 16px;
  padding: 16px 18px 14px;
  border: 1px solid var(--gold);
  background: #07080b;
  text-align: left;
  line-height: 1.15;
  box-sizing: border-box;
}
.wordmark small {
  display: block;
  letter-spacing: .28em;
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
}
.wordmark b {
  display: block;
  font-family: "Cormorant Garamond", "Noto Serif TC", "WenQuanYi Zen Hei", serif;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .08em;
  margin: 8px 0 6px;
}
.wordmark em {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mute);
}
img.wordmark {
  width: min(100%, 420px);
  height: auto;
  display: block;
  margin: 0 auto 16px;
  image-rendering: auto;
}
.lyceum-kicker {
  letter-spacing: .28em;
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}
.lyceum-title {
  font-family: "Cormorant Garamond", "Noto Serif TC", serif;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 8px 0 10px;
}
.gold-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border: 0;
  margin: 14px 0 18px;
}
.lyceum-foot {
  position: relative;
  z-index: 3;
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  color: var(--mute);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  border-top: 1px solid var(--line);
}
.lyceum-foot a { color: var(--gold-2); text-decoration: none; }
.lyceum-foot a:hover { text-decoration: underline; }
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #2a3140, #1a2030);
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: 15px/1.45 "Noto Sans TC", sans-serif;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: scale(.985); }
.btn.primary {
  background: #c4a04a;
  border-color: #e6c56a;
  color: #1a1408;
  text-align: center;
  font-weight: 800;
  letter-spacing: .08em;
  box-shadow: inset 0 1px 0 rgba(255, 236, 190, 0.35);
}
.btn.primary:active { filter: brightness(.92); }
.howto {
  list-style: none;
  margin: 6px auto 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  max-width: 420px;
  width: 100%;
  background: rgba(10, 12, 18, 0.62);
}
.howto li {
  font-size: 14px;
  color: var(--ink);
  padding: 5px 0;
  line-height: 1.45;
}
.howto li + li { border-top: 1px solid rgba(212, 175, 80, 0.12); }
.howto b { color: var(--gold-2); margin-right: 6px; font-weight: 800; }
.fx-bit { z-index: 0 !important; pointer-events: none; }
.wordmark, .lyceum-title, .lyceum-kicker, .lyceum-board, .holo-stage, .card-orbit, .verdict,
#overlay h1, #overlay p, #overlay .btn {
  position: relative;
  z-index: 2;
}
.chip {
  display: inline-block;
  border: 1px solid var(--line);
  color: var(--gold-2);
  font-size: 11px;
  letter-spacing: .12em;
  padding: 4px 8px;
  border-radius: 999px;
}
.portrait {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  display: block;
  background: #0e1218;
}

.btn.ghost {
  background: transparent;
  text-align: center;
  color: var(--gold-2);
}
.board-host {
  width: 100%;
  max-width: 420px;
  margin: 8px auto 0;
}
.lyceum-board {
  position: relative;
  margin: 14px auto 8px;
  padding: 18px 16px 16px;
  width: 100%;
  max-width: 420px;
  text-align: left;
  color: var(--ink);
  border: 1px solid rgba(212, 175, 80, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(212, 175, 80, 0.1), transparent 30%),
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(212, 175, 80, 0.14), transparent 60%),
    #10141c;
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(240, 215, 140, 0.1);
}
.lyceum-board::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(212, 175, 80, 0.16);
  border-radius: 12px;
  pointer-events: none;
}
.lyceum-board header {
  text-align: center;
  padding: 0 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(212, 175, 80, 0.22);
}
.lyceum-board header h2 {
  font-family: "Cormorant Garamond", "Noto Serif TC", serif;
  font-size: 26px;
  margin: 6px 0 4px;
  letter-spacing: 0.06em;
  color: var(--gold-2);
}
.board-sub {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mute);
}
.board-versus {
  display: grid;
  gap: 4px;
  margin: 0 4px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(212, 175, 80, 0.08);
  border: 1px solid rgba(212, 175, 80, 0.18);
  font-size: 13px;
}
.board-versus .vs-lead strong { color: var(--gold-2); }
.board-versus em { font-style: normal; font-weight: 800; color: var(--gold); }
.vs-count { font-size: 11px; letter-spacing: 0.12em; color: var(--mute); }
.vs-you { color: var(--ink); }
.vs-gap { display: block; font-size: 12px; color: var(--gold-2); margin-top: 2px; }
.board-cols {
  display: grid;
  grid-template-columns: 48px 1fr 72px;
  gap: 8px;
  padding: 8px 12px 6px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.board-list {
  list-style: none;
  margin: 0;
  padding: 0 4px 4px;
  max-height: 248px;
  overflow: auto;
}
.board-list::-webkit-scrollbar { width: 6px; }
.board-list::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 80, 0.35);
  border-radius: 99px;
}
.board-list li {
  display: grid;
  grid-template-columns: 48px 1fr 72px;
  gap: 4px 8px;
  align-items: center;
  margin: 5px 0;
  padding: 9px 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 80, 0.08);
  font-size: 14px;
}
.board-list li b {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: #1a2030;
  color: var(--gold-2);
  border: 1px solid rgba(212, 175, 80, 0.2);
}
.who-wrap { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.board-list li .who { font-weight: 700; }
.board-bar {
  display: block;
  height: 5px;
  border-radius: 99px;
  background: rgba(212, 175, 80, 0.12);
  overflow: hidden;
}
.board-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a6a1e, var(--gold-2));
}
.rank-1 .board-bar i { background: linear-gradient(90deg, #c4a04a, #f0d78c); }
.is-preview { opacity: 0.78; border-style: dashed !important; }
.board-list li em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 800;
  color: var(--gold-2);
}
.board-list li small {
  color: var(--mute);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.board-list li.rank-1 {
  background: linear-gradient(90deg, rgba(212, 175, 80, 0.18), rgba(212, 175, 80, 0.04));
  border-color: rgba(240, 215, 140, 0.45);
}
.board-list li.rank-1 b {
  background: linear-gradient(180deg, #f0d78c, #c4a04a);
  color: #1a1408;
  border-color: #e6c56a;
}
.board-list li.rank-2 b {
  background: linear-gradient(180deg, #e8edf4, #9aa3b2);
  color: #1a1c20;
  border-color: #cfd6e0;
}
.board-list li.rank-3 b {
  background: linear-gradient(180deg, #e0b07a, #8a5a32);
  color: #1a1408;
  border-color: #c9925a;
}
.board-list li.is-me {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(240, 215, 140, 0.25);
  color: #fff;
}
.board-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 12px;
  color: var(--mute);
  font-size: 13px;
  text-align: center;
  background: transparent;
  border: 0;
}
.board-empty-mark {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  letter-spacing: 0.18em;
  color: var(--gold);
}
.lyceum-board,
.lyceum-board input,
.lyceum-board button,
.lyceum-board label {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  touch-action: manipulation;
}
.board-form[hidden],
.board-versus[hidden],
.board-msg[hidden] {
  display: none !important;
}
.board-form {
  display: block;
  margin-top: 12px;
  padding: 12px 10px 4px;
  border-top: 1px solid rgba(212, 175, 80, 0.22);
  position: relative;
  z-index: 5;
}
.board-score-line {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink);
}
.board-score-line em {
  font-style: normal;
  font-weight: 800;
  color: var(--gold-2);
}
.board-form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 8px;
}
.board-form-row { display: flex; gap: 8px; }
.board-form input {
  flex: 1;
  border: 1px solid var(--line);
  background: #0c0f14;
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font: 14px inherit;
}
.board-form .btn { width: auto; padding: 10px 14px; }
.board-msg { color: #e6c56a; font-size: 13px; margin: 8px 2px 0; }
.board-msg.ok { color: var(--ok); }
