.mode-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.mode-toggle button {
  font-family: var(--font-ar);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(200,146,42,0.45);
  background: transparent;
  color: var(--teal);
  cursor: pointer;
}

.mode-toggle button.active {
  background: var(--teal);
  color: var(--parchment);
  border-color: var(--gold);
}

.name-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.name-row input {
  width: 100%;
  font-family: var(--font-ar);
  font-size: 1rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(200,146,42,0.45);
  border-radius: var(--radius);
  background: #fff;
  direction: rtl;
}

.count-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-family: var(--font-ar);
}

.count-row button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--teal);
  font-size: 1.2rem;
  cursor: pointer;
}

.start-wrap { text-align: center; }

.score-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.score-chip {
  font-family: var(--font-ar);
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(200,146,42,0.35);
  background: var(--parchment2);
}

.score-chip.active {
  background: var(--teal);
  color: var(--parchment);
  border-color: var(--gold);
}

.turn-banner {
  font-family: var(--font-ar);
  text-align: center;
  color: var(--crimson);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.category-hint {
  font-family: var(--font-ar);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.word-board {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  direction: rtl;
}

.letter-slot {
  width: 2.2rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ar);
  font-size: 1.35rem;
  font-weight: 600;
  border-bottom: 3px solid var(--teal);
  color: var(--ink);
}

.letter-slot.hidden-char {
  color: transparent;
  border-bottom-color: var(--gold);
}

.wheel-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.wheel-wrap {
  position: relative;
  width: min(260px, 70vw);
  height: min(260px, 70vw);
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--gold);
  background: conic-gradient(
    #1b5e6b 0deg 45deg,
    #c8922a 45deg 90deg,
    #1b5e6b 90deg 135deg,
    #8b2020 135deg 180deg,
    #1b5e6b 180deg 225deg,
    #c8922a 225deg 270deg,
    #1b5e6b 270deg 315deg,
    #6b5d4a 315deg 360deg
  );
  transition: transform 3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.wheel.spinning { transition-duration: 3s; }
.wheel.instant { transition: none; }

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid var(--crimson);
  z-index: 2;
}

.wheel-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wheel-label {
  position: absolute;
  font-family: var(--font-ar);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--parchment);
  transform-origin: center;
  white-space: nowrap;
}

.wheel-result {
  font-family: var(--font-ar);
  font-size: 1rem;
  color: var(--teal);
  min-height: 1.5rem;
  text-align: center;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.letter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.letter-btn {
  font-family: var(--font-ar);
  font-size: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius);
  border: 1px solid rgba(200,146,42,0.45);
  background: #fff;
  color: var(--teal);
  cursor: pointer;
  touch-action: manipulation;
}

.letter-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.letter-btn.used {
  background: var(--parchment2);
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26,16,8,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal {
  background: var(--parchment);
  border-radius: var(--radius);
  padding: 1.25rem;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow);
}

.modal h3 {
  font-family: var(--font-ar);
  color: var(--teal);
  margin: 0 0 0.75rem;
  text-align: center;
}

.solve-input {
  width: 100%;
  font-family: var(--font-ar);
  font-size: 1.15rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(200,146,42,0.45);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.win-banner {
  font-family: var(--font-ar);
  text-align: center;
  font-size: 1.2rem;
  color: var(--crimson);
  margin-bottom: 1rem;
}
