:root {
  --ink: #172033;
  --muted: #687386;
  --panel: #fffdf8;
  --line: #d8d1c0;
  --accent: #0f766e;
  --red: #d92d20;
  --gold: #d99a20;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(217, 45, 32, 0.11), transparent 34%),
    linear-gradient(315deg, rgba(15, 118, 110, 0.14), transparent 38%),
    #f5f1e9;
  font-family: Arial, Helvetica, sans-serif;
}

.game {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#contextLabel {
  display: inline-block;
  color: var(--accent);
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.25);
  font-size: 15px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  color: white;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  background: #9aa4b2;
  cursor: not-allowed;
}

.table {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.wheel-card {
  position: relative;
  width: min(85vw, 420px);
  height: min(85vw, 420px);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 14px 36px rgba(23, 32, 51, 0.14);
}

.pointer {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 10;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 36px solid var(--red);
  filter: drop-shadow(0 4px 6px rgba(23, 32, 51, 0.3));
  transform: translateX(-50%);
}

.wheel {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 8px solid #3f2b1b;
  border-radius: 50%;
  background: conic-gradient(#d92d20 0deg 60deg, #d99a20 60deg 120deg, #0f766e 120deg 180deg, #2364aa 180deg 240deg, #6d28d9 240deg 300deg, #15803d 300deg 360deg);
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.22),
    0 16px 40px rgba(23, 32, 51, 0.2);
  transform: rotate(var(--rotation, 0deg));
  transition: transform 2.5s cubic-bezier(.12, .72, .08, 1);
}

.wheel-label {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
}

.wheel-label span {
  margin-top: 22px;
  color: white;
  font-weight: 900;
  font-size: clamp(12px, 2.4vw, 16px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: min(34%, 140px);
  height: min(34%, 140px);
  aspect-ratio: 1 / 1;
  border: 5px solid #3f2b1b;
  border-radius: 50%;
  padding: 12px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.25);
  text-align: center;
  transform: translate(-50%, -50%);
}

.hub span {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(16px, 3.5vw, 24px);
  font-weight: 900;
  line-height: 1.1;
}

.side-panel {
  width: 100%;
  max-width: 480px;
}

.entries-card {
  padding: 16px 20px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.06);
}

.eyebrow {
  margin: 0 0 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

ol#entriesList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

ol#entriesList li {
  padding: 6px 14px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 20px;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.08);
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 600px) {
  .game {
    padding: 12px;
  }
}
