:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2333;
  --bg-overlay: rgba(13, 17, 23, 0.92);
  --bg-ghost: #0a0e14;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --text-inverse: #0d1117;

  --accent-coral: #ff6b6b;
  --accent-coral-dim: #ff8a8a;
  --accent-coral-glow: rgba(255, 107, 107, 0.15);
  --accent-blue: #58a6ff;
  --accent-blue-dim: #388bfd;
  --accent-peach: #ffb4a2;
  --accent-green: #3fb950;
  --accent-yellow: #d29922;

  --color-danger: #ff6b6b;
  --accent-red: #ff6b6b;

  --status-alive: #58a6ff;
  --status-ghost: #484f58;
  --status-reported: #f85149;
  --status-connecting: #484f58;
  --status-connected: #58a6ff;

  --border-default: #21262d;
  --border-highlight: #30363d;
  --border-accent: #ff6b6b;
  --border-accent-blue: #58a6ff;

  --text-display: 3.5rem;
  --text-h1: 1.75rem;
  --text-h2: 1.25rem;
  --text-h3: 1rem;
  --text-body: 0.938rem;
  --text-label: 0.75rem;
  --text-caption: 0.688rem;
  --text-button: 1rem;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-glow-coral: 0 0 12px rgba(255, 107, 107, 0.3);
  --shadow-glow-blue: 0 0 8px rgba(88, 166, 255, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  color: var(--accent-blue-dim);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

h1 {
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.4;
}

.section-label {
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.page-content {
  padding: var(--space-4) var(--space-4) calc(var(--space-12) + var(--space-4));
  max-width: 480px;
  margin: 0 auto;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, #ff8a8a, #ff6b6b);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-button);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 56px;
  width: 100%;
  transition: opacity 0.1s ease;
}

.btn-primary:active {
  opacity: 0.85;
}

.btn-primary:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-button);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 56px;
  width: 100%;
  transition: border-color 0.15s ease;
}

.btn-secondary:active {
  border-color: var(--border-highlight);
}

.btn-secondary:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.btn-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--bg-tertiary);
  color: var(--accent-peach);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-button);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 56px;
  width: 100%;
  transition: border-color 0.15s ease;
}

.btn-danger:active {
  border-color: var(--accent-coral);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-alive {
  background: rgba(88, 166, 255, 0.15);
  color: var(--status-alive);
}

.badge-ghost {
  background: rgba(72, 79, 88, 0.3);
  color: var(--text-secondary);
}

.badge-reported {
  background: rgba(248, 81, 73, 0.15);
  color: var(--status-reported);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.progress-bar {
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #58a6ff, #79c0ff);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.timer-display {
  font-size: var(--text-display);
  font-weight: 700;
  color: var(--accent-peach);
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: var(--bg-primary);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  display: inline-block;
}

.join-code {
  font-size: var(--text-display);
  font-weight: 700;
  color: var(--accent-peach);
  letter-spacing: 0.04em;
  text-align: center;
  background: var(--bg-tertiary);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  display: inline-block;
  text-shadow: 0 0 20px rgba(255, 180, 162, 0.3);
}

.input,
.input-field,
.config-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  font-size: 16px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.input:focus,
.input-field:focus,
.config-input:focus {
  border-color: var(--accent-blue);
}

.input::placeholder,
.input-field::placeholder,
.config-input::placeholder {
  color: var(--text-secondary);
}

select.input-field,
select.config-input {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: var(--space-8);
}

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

@media (max-width: 360px) {
  .config-grid {
    grid-template-columns: 1fr;
  }
}

.config-item {
  display: flex;
  flex-direction: column;
}

.config-item label {
  display: block;
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.config-input {
  padding: var(--space-2) var(--space-3);
}

.config-saved-indicator {
  display: inline-block;
  margin-top: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: rgba(63, 185, 80, 0.15);
  color: var(--accent-green);
  border-radius: var(--radius-sm);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: configSavedFade 2s ease forwards;
}

@keyframes configSavedFade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

.error-msg {
  display: inline-block;
  color: var(--accent-coral);
  font-size: var(--text-body);
}

.connection-warning {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: var(--space-2);
  padding: 2px var(--space-2);
  background: rgba(210, 153, 34, 0.15);
  color: var(--accent-yellow);
  border-radius: var(--radius-sm);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.emergency-result {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-body);
  font-weight: 500;
  text-align: center;
}

.emergency-result.success {
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
}

.emergency-result.error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid var(--accent-coral);
  color: var(--accent-coral);
}

.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.meeting-body-info {
  font-size: var(--text-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.role-reveal-page {
  padding-top: var(--space-4);
}

.role-banner {
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: var(--space-6);
}

.role-impostor {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.22), rgba(255, 107, 107, 0.06));
  border: 1px solid var(--accent-coral);
  box-shadow: var(--shadow-glow-coral);
}

.role-impostor .role-title {
  color: var(--accent-coral);
  text-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
}

.role-crewmate {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.22), rgba(88, 166, 255, 0.06));
  border: 1px solid var(--accent-blue);
  box-shadow: var(--shadow-glow-blue);
}

.role-crewmate .role-title {
  color: var(--accent-blue);
  text-shadow: 0 0 20px rgba(88, 166, 255, 0.4);
}

.role-title {
  font-size: var(--text-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
}

.role-subtitle {
  font-size: var(--text-body);
  color: var(--text-secondary);
  margin-top: var(--space-3);
  letter-spacing: 0.02em;
}

.impostor-tutorial {
  border-color: rgba(255, 107, 107, 0.35);
}

.task-item {
  padding: var(--space-2) 0;
}

.player-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.player-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.player-card:active {
  border-color: var(--border-accent);
}

.player-card.selected {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow-coral);
}

.player-card.ghost {
  opacity: 0.4;
  filter: grayscale(1);
  pointer-events: none;
}

.player-card .player-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.player-card .player-name {
  font-size: var(--text-h2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.player-card .player-id {
  font-size: var(--text-caption);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.task-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--border-accent-blue);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.task-card.completed {
  opacity: 0.5;
  border-left-color: var(--status-ghost);
}

.task-card .task-icon {
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 2px;
}

.task-card .task-location-label {
  font-size: var(--text-label);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.task-card .task-name {
  font-size: var(--text-h3);
  font-weight: 600;
  margin: var(--space-1) 0;
}

.task-card .task-desc {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.4;
}

.meeting-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-top: 3px solid var(--accent-coral);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.meeting-card .meeting-title {
  font-size: var(--text-h1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-2);
}

.meeting-card .meeting-reason {
  font-size: var(--text-body);
  color: var(--accent-peach);
  margin-bottom: var(--space-4);
}

.meeting-card .meeting-timer {
  text-align: center;
}

.spacer {
  height: var(--space-6);
}

.spacer-sm {
  height: var(--space-3);
}

.spacer-lg {
  height: var(--space-8);
}

.text-center {
  text-align: center;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-coral {
  color: var(--accent-coral);
}

.text-blue {
  color: var(--accent-blue);
}

.text-peach {
  color: var(--accent-peach);
}

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.w-full { width: 100%; }

.task-page {
  padding: var(--space-4);
  max-width: 480px;
  margin: 0 auto;
}

.task-header {
  margin-bottom: var(--space-6);
}

.task-location-badge {
  display: inline-block;
  background: var(--bg-tertiary);
  color: var(--accent-blue);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.task-title {
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--text-primary);
}

.task-nothing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: var(--space-8);
}

.task-nothing-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.task-nothing-title {
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.task-nothing-desc {
  font-size: var(--text-body);
  color: var(--text-muted);
  line-height: 1.5;
}

.body-report-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid var(--accent-coral);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  color: var(--accent-coral);
}

.body-report-banner svg {
  flex-shrink: 0;
}

.body-report-banner span {
  flex: 1;
  font-weight: 600;
  font-size: var(--text-h3);
}

.btn-report-body {
  background: var(--accent-coral);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.btn-report-body:active {
  opacity: 0.85;
}

.wire-match-game {
  display: flex;
  gap: var(--space-4);
  align-items: stretch;
  min-height: 300px;
  margin-bottom: var(--space-6);
}

.wire-column {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: var(--space-4);
  flex: 0 0 60px;
}

.wire-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: none;
}

.wire-dot:active {
  transform: scale(1.15);
}

.wire-canvas-container {
  flex: 1;
  position: relative;
}

.wire-canvas-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.pattern-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.pattern-status {
  font-size: var(--text-h2);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.pattern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
}

.pattern-quadrant {
  border-radius: var(--radius-lg);
  border: 3px solid;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease;
  touch-action: none;
}

.pattern-quadrant:active {
  transform: scale(0.95);
}

.pattern-attempts {
  font-size: var(--text-body);
  color: var(--text-secondary);
}

.calibration-game {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.calibration-area {
  position: relative;
  width: 100%;
  height: 300px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  touch-action: none;
}

.calibration-target {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.4);
  transition: left 0.1s linear, top 0.1s linear;
  touch-action: none;
}

.calibration-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.calibration-progress-bar {
  height: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.calibration-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  border-radius: var(--radius-sm);
  transition: width 0.1s linear;
  width: 0%;
}

.calibration-status {
  font-size: var(--text-body);
  color: var(--text-secondary);
  text-align: center;
}

.task-submit-area {
  margin-top: var(--space-6);
}

.task-complete-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 17, 23, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.task-complete-overlay svg {
  width: 80px;
  height: 80px;
  color: var(--accent-green);
}

.task-complete-overlay h3 {
  font-size: var(--text-h1);
  color: var(--text-primary);
}

.task-error-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent-coral);
  color: var(--text-inverse);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  font-size: var(--text-h3);
  font-weight: 600;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-elevated);
}

.modal-content.modal-large {
  max-width: 480px;
}

.modal-title {
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.modal-desc {
  font-size: var(--text-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.modal-actions button {
  flex: 1;
}

.hud-header {
  margin-bottom: var(--space-6);
}

.hud-player-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hud-player-name {
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-impostor {
  background: rgba(255, 107, 107, 0.15);
  color: var(--accent-coral);
}

.hud-progress-text {
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--accent-blue);
}

.task-completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.meeting-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: var(--accent-coral);
  color: var(--text-inverse);
  font-size: var(--text-label);
  font-weight: 700;
  margin-left: var(--space-2);
}

.body-report-section {
  margin-top: var(--space-4);
}

.body-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: var(--space-4);
}

.body-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.body-card:active {
  border-color: var(--accent-coral);
}

.body-card-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.body-card-victim {
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
}

.body-card-location {
  font-size: var(--text-label);
  color: var(--text-secondary);
}

.meeting-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.3s ease;
}

.meeting-overlay-content {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-coral);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-glow-coral);
}

.meeting-overlay-content h2 {
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--accent-coral);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.meeting-overlay-content p {
  font-size: var(--text-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.meeting-overlay-content .btn-primary {
  margin-top: var(--space-6);
}

.game-end-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.3s ease;
}

.game-end-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.game-end-content h2 {
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.game-end-content p {
  font-size: var(--text-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.text-green {
  color: var(--accent-green);
}

.meeting-page .meeting-discussion-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--text-body);
  padding: var(--space-4) 0;
}

.meeting-player-grid .player-card.votable {
  cursor: pointer;
  border-color: var(--border-highlight);
}

.meeting-player-grid .player-card.votable:active {
  border-color: var(--accent-coral);
  box-shadow: var(--shadow-glow-coral);
}

.meeting-player-grid .player-card.selected {
  border-color: var(--accent-coral);
  box-shadow: var(--shadow-glow-coral);
}

.meeting-player-grid .player-card.ejected {
  border-color: var(--accent-coral);
  opacity: 0.5;
  filter: grayscale(1);
}

.badge-ejected {
  background: rgba(255, 107, 107, 0.15);
  color: var(--accent-coral);
}

.timer-urgent {
  color: var(--accent-coral) !important;
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.timer-label {
  text-align: center;
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

.vote-count {
  text-align: center;
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--accent-blue);
  margin-top: var(--space-3);
}

.vote-confirmation {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  color: var(--accent-blue);
  font-size: var(--text-label);
  font-weight: 600;
  text-align: center;
}

.reveal-summary {
  text-align: center;
  margin-bottom: var(--space-6);
}

.reveal-ejected-name {
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--accent-coral);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.reveal-no-eject {
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.reveal-ejected-label {
  font-size: var(--text-body);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.reveal-role {
  font-size: var(--text-h2);
  font-weight: 600;
  margin-top: var(--space-4);
}

.reveal-vote-breakdown {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}

.reveal-breakdown-title {
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.reveal-vote-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-default);
}

.reveal-vote-row:last-child {
  border-bottom: none;
}

.reveal-vote-target {
  font-weight: 600;
  min-width: 80px;
}

.reveal-vote-count {
  background: var(--bg-primary);
  color: var(--accent-blue);
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-label);
}

.reveal-vote-voters {
  color: var(--text-secondary);
  font-size: var(--text-caption);
  flex: 1;
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
