:root {
  --bg: #fef3c7;
  --card: #fef9e7;
  --accent: #f97316;
  --text: #1f2937;
  --muted: #6b7280;
  --danger: #ef4444;
  --success: #22c55e;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
}

main.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.2);
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.row.small {
  font-size: 12px;
  color: var(--muted);
}

input, button {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #f59e0b;
  background: #fff9e6;
  color: var(--text);
}

button {
  cursor: pointer;
}

button.primary {
  background: linear-gradient(90deg, #f97316, #fb923c);
  color: #fff;
  font-weight: 600;
  border: none;
}

button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

button.scoreable {
  background: rgba(34, 197, 94, 0.15);
  border-color: var(--success);
}

button.scored {
  background: rgba(156,163,175,0.15);
  border-color: rgba(156,163,175,0.4);
  color: var(--muted);
}

.reels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.reel {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #fff9e6 0%, #fef3c7 100%);
  border: 3px solid #f59e0b;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 48px;
  font-weight: 700;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.reel.held {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(251,191,36,0.3);
}

.reel button {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(251,191,36,0.1);
  border-color: rgba(251,191,36,0.3);
  font-size: 12px;
}

.topbar {
  display: none;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.score-card {
  background: #fff9e6;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
}

.score-card header {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  background: #f3f4f6;
  color: var(--text);
}

.badge.me { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.badge.active { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.badge.done { background: #e5e7eb; color: #374151; border: 1px solid #9ca3af; }

.end-screen {
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.end-screen h2 {
  margin: 0 0 12px 0;
  color: var(--accent);
}

.end-screen h3 {
  margin: 8px 0 20px 0;
  color: var(--success);
}

.results {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.results th, .results td {
  padding: 10px;
  border-bottom: 1px solid #f59e0b;
  text-align: left;
  color: var(--text);
}

.results th {
  background: #fef3c7;
  font-weight: 600;
  color: var(--accent);
}

.setup-header {
  margin-bottom: 16px;
}

.setup-header h1 {
  margin: 0;
}

hr.tutorial-divider {
  border: none;
  border-top: 2px solid var(--accent);
  margin: 24px 0;
  opacity: 0.3;
}

.tutorial {
  margin-top: 8px;
}

.tutorial h2 {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: var(--accent);
}

.tutorial-section {
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(249, 115, 22, 0.08);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
}

.tutorial-section h3 {
  margin: 0 0 10px 0;
  color: var(--accent);
}

.tutorial-section p {
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.tutorial-section ul, .tutorial-section ol {
  margin: 8px 0;
  padding-left: 20px;
}

.tutorial-section li {
  margin: 6px 0;
  line-height: 1.5;
}

.tutorial-section strong {
  color: var(--accent);
}
.results tr:hover {
  background: #fff9e6;
}
