* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101216;
  color: #e9eef7;
}
.app { display: grid; grid-template-columns: 340px 1fr; min-height: 100vh; }
.panel { padding: 16px; background: #171b22; border-right: 1px solid #2c3440; overflow-y: auto; }
h1 { margin: 0 0 6px; font-size: 26px; }
h2 { margin: 0 0 10px; font-size: 16px; }
.card { background: #202631; border: 1px solid #313a48; border-radius: 12px; padding: 12px; margin: 12px 0; }
label { display: block; margin: 8px 0; color: #c7d2e3; font-size: 14px; }
input, select { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid #3c4654; background: #11161d; color: #fff; outline: none; }
button { border: 0; border-radius: 8px; background: #4a78ff; color: white; padding: 8px 10px; cursor: pointer; }
button:hover { filter: brightness(1.08); }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.join-row { display: flex; gap: 8px; margin-top: 8px; }
.join-row input { flex: 1; }
.hidden { display: none; }
.muted { color: #94a3b8; line-height: 1.45; }
.small { font-size: 12px; }
.info { line-height: 1.6; color: #d8e1ef; }
.player-card { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid #313a48; }
.player-card.current { color: #8ee6a7; font-weight: 700; }
.player-card.dead { color: #778294; text-decoration: line-through; }
.player-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.self-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 6px; border-radius: 999px; background: #4a78ff; color: #fff; font-size: 12px; line-height: 1; text-decoration: none; }
.message { min-height: 22px; margin-top: 8px; color: #ffd166; font-size: 13px; }
.log { font-size: 13px; color: #bdc8d8; line-height: 1.55; max-height: 160px; overflow-y: auto; }
.examples { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.examples button { background: #374151; font-size: 12px; padding: 6px 8px; }
.stage-wrap { display: flex; align-items: flex-start; justify-content: center; padding: 18px; overflow: auto; }
canvas { display: block; background: #eef2f7; border: 2px solid #475569; border-radius: 10px; width: min(var(--stage-size, 900px), 100%); height: auto; aspect-ratio: 1 / 1; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; } .stage-wrap { justify-content: flex-start; } }

.hardcore .assistive-tools { display: none !important; }
.timer { color: #ffd166; font-weight: 700; }
.timer.low { color: #ff7b7b; }

button.danger { background: #dc2626; }
button.secondary { background: #475569; }
.room-actions, .status-actions { margin-top: 8px; }
.waiting-count { display: inline-block; margin-top: 6px; padding: 4px 8px; border-radius: 999px; background: #334155; color: #e0f2fe; font-weight: 700; }
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(2, 6, 23, .72); z-index: 20; padding: 20px; }
.modal.hidden { display: none; }
.modal-card { width: min(420px, 100%); background: #202631; border: 1px solid #475569; border-radius: 16px; padding: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.modal-card h2 { font-size: 22px; margin-bottom: 8px; }
.modal-card p { color: #d8e1ef; line-height: 1.6; }

.axis-note { color: #e0f2fe; font-weight: 700; }
