:root {
  --ink: #1e2430;
  --muted: #5c6678;
  --panel: rgba(255, 255, 255, 0.94);
  --accent: #ff5a3d;
  --accent-deep: #d93a20;
  --pass: #1a9b8e;
  --pass-deep: #0f6f66;
  --chip: #f0b429;
  --font-d: "ZCOOL KuaiLe", "Noto Sans SC", sans-serif;
  --font-b: "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-b);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
  background: #1a2838;
}
.scene {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 65% 45% at 15% 0%, rgba(255, 90, 61, 0.28), transparent 55%),
    radial-gradient(ellipse 55% 40% at 90% 15%, rgba(26, 155, 142, 0.22), transparent 50%),
    linear-gradient(165deg, #243848 0%, #1a2838 45%, #121c28 100%);
}
.topbar {
  max-width: 1200px; margin: 0 auto; padding: 1rem 1.2rem 0.4rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; color: #eef4fa;
}
.back { color: #7de8d8; text-decoration: none; font-weight: 700; }
.brand { display: flex; gap: 0.7rem; align-items: center; flex: 1; }
.mark {
  width: 2.6rem; height: 2.6rem; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #ff8a6a, #ff5a3d);
  color: #fff; font-family: var(--font-d); font-size: 1.3rem;
}
.brand h1 { margin: 0; font-family: var(--font-d); font-size: 1.5rem; }
.brand p { margin: 0; font-size: 0.85rem; opacity: 0.75; }
main { max-width: 1200px; margin: 0 auto; padding: 0.5rem 1.2rem 3rem; }
.panel {
  background: var(--panel); border-radius: 18px; padding: 1.3rem;
  max-width: 480px; box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}
.panel h2 { margin: 0 0 1rem; font-family: var(--font-d); font-size: 1.8rem; }
.field { display: grid; gap: 0.4rem; }
.field > span { font-size: 0.9rem; color: var(--muted); font-weight: 700; }
.row { display: flex; gap: 0.5rem; }
.row input {
  flex: 1; border: 1px solid #cfd8e6; border-radius: 12px;
  padding: 0.7rem 0.85rem; font: inherit; background: #fff;
}
.name-list { list-style: none; margin: 0.8rem 0; padding: 0; display: grid; gap: 0.35rem; }
.name-list li {
  display: flex; justify-content: space-between;
  padding: 0.5rem 0.7rem; background: #eef3f8; border-radius: 10px; font-weight: 700;
}
.name-list button { border: 0; background: transparent; color: var(--accent-deep); cursor: pointer; font: inherit; }
.hint { color: var(--muted); font-size: 0.9rem; }
.btn {
  border: 0; cursor: pointer; font: inherit; font-weight: 700;
  border-radius: 14px; padding: 0.75rem 1.3rem;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(145deg, #ff8a6a, #ff5a3d); color: #fff; }
.btn.pass { background: linear-gradient(145deg, #3ecfbf, #1a9b8e); color: #fff; font-size: 1.15rem; padding: 0.9rem 1.6rem; }
.btn.ghost { background: rgba(255,255,255,0.12); color: #eef4fa; border: 1px solid rgba(255,255,255,0.25); }
.btn.wide { width: 100%; }
.layout { display: grid; gap: 1rem; }
@media (min-width: 900px) { .layout { grid-template-columns: 1fr 280px; } }
.status {
  display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem;
  padding: 0.85rem 1rem; border-radius: 14px;
  background: rgba(255,255,255,0.1); color: #eef4fa; font-size: 1.1rem;
}
.status strong { color: #fff; font-size: 1.25rem; }
.offer {
  margin-top: 0.9rem; padding: 1.2rem 1rem 1.4rem; border-radius: 22px; text-align: center;
  background: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  border: 2px solid rgba(255,255,255,0.16); color: #eef4fa;
  animation: offerIn 0.35s ease;
}
.offer.is-empty .card-face { opacity: 0.45; }
@keyframes offerIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.offer .kicker { margin: 0; font-size: 1rem; opacity: 0.75; font-weight: 700; }
.card-face {
  margin: 0.75rem auto 0.9rem;
  width: 8.2rem; height: 10rem; border-radius: 18px;
  display: grid; place-items: center;
  font-family: var(--font-d); font-size: 3.6rem; font-weight: 700;
  color: #1e2430;
  background:
    linear-gradient(145deg, #fff8f0, #ffe8d8);
  border: 4px solid #ff5a3d;
  box-shadow: 0 10px 0 rgba(0,0,0,0.25), 0 0 24px rgba(255, 90, 61, 0.35);
}
.chip-pile {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.9rem; border-radius: 999px;
  background: rgba(0,0,0,0.28); font-size: 0.95rem;
}
.chip-pile strong { font-size: 1.5rem; color: var(--chip); }
.chip-ico {
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, #e0a020 55%, #b87810);
  border: 2px solid #fff3c0;
  box-shadow: 0 2px 0 rgba(0,0,0,0.25);
}
.offer .who { margin: 0.85rem 0 0; font-size: 1.25rem; font-weight: 700; }
.msg {
  text-align: center; font-family: var(--font-d); font-size: 1.45rem;
  color: #7de8d8; min-height: 1.6em; margin: 0.85rem 0;
}
.actions {
  margin: 0.3rem auto 0; max-width: 520px; padding: 1rem;
  background: var(--panel); border-radius: 16px; text-align: center;
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; align-items: center;
}
.actions .decide-hint {
  flex: 1 1 100%; margin: 0.15rem 0 0;
  font-size: 0.88rem; color: var(--muted); font-weight: 500;
}
.controls { display: flex; justify-content: center; gap: 0.55rem; flex-wrap: wrap; margin-top: 0.8rem; min-height: 3rem; }
.table {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
}
.seat {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 0.75rem;
  color: #eef4fa;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.seat.is-turn {
  border-color: #7de8d8;
  box-shadow: 0 0 0 3px rgba(125, 232, 216, 0.25);
  transform: translateY(-2px);
}
.seat.is-winner {
  border-color: var(--chip);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.35);
}
.seat .head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.4rem;
  margin-bottom: 0.45rem;
}
.seat .nm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 1.1rem;
}
.seat .nm .meeple-fig { width: 1.45rem; height: 1.75rem; }
.seat .chips {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--chip);
  white-space: nowrap;
}
.seat .chips .disk-stack {
  width: 1.6rem;
}
.seat .cards {
  display: flex; flex-wrap: wrap; gap: 0.3rem; min-height: 2.2rem;
}
.mini {
  min-width: 2rem; height: 2.2rem; padding: 0 0.35rem;
  border-radius: 8px; display: grid; place-items: center;
  font-weight: 800; font-size: 0.95rem; color: #1e2430;
  background: #ffe8d8; border: 2px solid #ff8a6a;
  box-shadow: 0 3px 0 rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.5);
  transform: perspective(200px) rotateX(6deg);
}
.mini.run { background: #d4f5f0; border-color: #1a9b8e; }
.seat .empty { font-size: 0.85rem; opacity: 0.55; }
.side {
  background: var(--panel); border-radius: 18px; padding: 1rem;
  color: var(--ink); position: sticky; top: 0.6rem;
}
.side h2 { margin: 0; font-family: var(--font-d); font-size: 1.5rem; }
.side-note { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--muted); }
.scores { list-style: none; margin: 0.8rem 0; padding: 0; display: grid; gap: 0.4rem; }
.scores li {
  display: grid; grid-template-columns: 1fr auto; gap: 0.25rem;
  padding: 0.55rem 0.65rem; background: #eef3f8; border-radius: 10px;
  border-left: 4px solid #cfd8e6;
}
.scores li.is-turn { box-shadow: inset 0 0 0 2px rgba(26, 155, 142, 0.35); }
.scores li.is-best .pts { color: var(--pass-deep); }
.scores .nm { font-weight: 700; font-size: 1.05rem; }
.scores .pts { font-weight: 700; font-size: 1.25rem; color: var(--accent-deep); }
.scores .sub { grid-column: 1 / -1; font-size: 0.85rem; color: var(--muted); }
.rules { border-top: 1px solid #d8e0ea; padding-top: 0.7rem; }
.rules .t { margin: 0 0 0.35rem; font-weight: 700; }
.rules ul { margin: 0; padding-left: 1.1rem; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
[hidden] { display: none !important; }
