/* ============================================================
   WHEEL OF NAMES – One UI 7 Design System
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --font-sans: 'Be Vietnam Pro', 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 1px 4px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.18), 0 6px 18px rgba(0,0,0,.10);

  --transition-fast: 140ms cubic-bezier(.25,.46,.45,.94);
  --transition-base: 240ms cubic-bezier(.25,.46,.45,.94);
  --transition-slow: 400ms cubic-bezier(.25,.46,.45,.94);
  --transition-spring: 360ms cubic-bezier(.34,1.56,.64,1);

  --pointer-color: #FF4545;
}

/* ---------- LIGHT THEME ---------- */
[data-theme="light"],
[data-theme="system"] {
  --bg-base: #F4F6FA;
  --bg-surface: #FFFFFF;
  --bg-surface-2: #F0F2F8;
  --bg-elevated: #FFFFFF;
  --bg-overlay: rgba(0,0,0,.48);

  --text-primary: #1A1A2E;
  --text-secondary: #5A6070;
  --text-tertiary: #9AA0B0;
  --text-on-accent: #FFFFFF;

  --accent: #1259C3;
  --accent-hover: #0E44A0;
  --accent-light: rgba(18,89,195,.10);
  --accent-gradient: linear-gradient(135deg, #1259C3 0%, #4A8CFF 100%);

  --success: #1CA67A;
  --warning: #E8930A;
  --danger: #E53535;

  --border: rgba(0,0,0,.08);
  --border-focus: rgba(18,89,195,.40);

  --skeleton-base: #E8EAF0;
  --skeleton-shine: #F4F6FA;

  --toggle-track: #C8D0E0;
  --toggle-thumb: #FFFFFF;
  --toggle-active: #1259C3;

  --count-badge-bg: #1259C3;
  --count-badge-text: #FFFFFF;
}

/* ---------- DARK THEME ---------- */
[data-theme="dark"] {
  --bg-base: #0E0E18;
  --bg-surface: #17172A;
  --bg-surface-2: #1E1E32;
  --bg-elevated: #22223A;
  --bg-overlay: rgba(0,0,0,.70);

  --text-primary: #E8EAF6;
  --text-secondary: #9299B8;
  --text-tertiary: #5C6280;
  --text-on-accent: #FFFFFF;

  --accent: #4A8CFF;
  --accent-hover: #6BA3FF;
  --accent-light: rgba(74,140,255,.15);
  --accent-gradient: linear-gradient(135deg, #4A8CFF 0%, #8AB8FF 100%);

  --success: #2ECC9C;
  --warning: #FFB830;
  --danger: #FF5555;

  --border: rgba(255,255,255,.08);
  --border-focus: rgba(74,140,255,.50);

  --skeleton-base: #22223A;
  --skeleton-shine: #2A2A48;

  --toggle-track: #3A3A5C;
  --toggle-thumb: #FFFFFF;
  --toggle-active: #4A8CFF;

  --count-badge-bg: #4A8CFF;
  --count-badge-text: #FFFFFF;

  --shadow-sm: 0 1px 4px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.25);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.35);
}

/* ---------- SYSTEM PREFERENCE FALLBACK ---------- */
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --bg-base: #0E0E18;
    --bg-surface: #17172A;
    --bg-surface-2: #1E1E32;
    --bg-elevated: #22223A;
    --bg-overlay: rgba(0,0,0,.70);
    --text-primary: #E8EAF6;
    --text-secondary: #9299B8;
    --text-tertiary: #5C6280;
    --text-on-accent: #FFFFFF;
    --accent: #4A8CFF;
    --accent-hover: #6BA3FF;
    --accent-light: rgba(74,140,255,.15);
    --accent-gradient: linear-gradient(135deg, #4A8CFF 0%, #8AB8FF 100%);
    --success: #2ECC9C;
    --warning: #FFB830;
    --danger: #FF5555;
    --border: rgba(255,255,255,.08);
    --border-focus: rgba(74,140,255,.50);
    --skeleton-base: #22223A;
    --skeleton-shine: #2A2A48;
    --toggle-track: #3A3A5C;
    --toggle-thumb: #FFFFFF;
    --toggle-active: #4A8CFF;
    --count-badge-bg: #4A8CFF;
    --count-badge-text: #FFFFFF;
    --shadow-sm: 0 1px 4px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.25);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
    --shadow-xl: 0 16px 48px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.35);
  }
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  line-height: 1.5;
  transition: background var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
}

/* ---------- UTILITIES ---------- */
.hidden { display: none !important; }

/* ---------- SKELETON ---------- */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-textarea {
  width: 100%;
  height: 100%;
  min-height: 240px;
  border-radius: var(--radius-sm);
}

.skeleton-wheel {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  max-width: 520px;
}

/* ---------- HEADER ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(var(--_bg-surface-rgb, 255,255,255), .88);
}

[data-theme="dark"] .header,
[data-theme="system"] .header {
  background: rgba(23,23,42,.88);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] .header {
    background: rgba(23,23,42,.88);
  }
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(18,89,195,.35);
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.3px;
}

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

/* ---------- ICON BUTTON ---------- */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.icon-btn:active {
  transform: scale(.92);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  user-select: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; pointer-events: none; }

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-on-accent);
  padding: 12px 24px;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(18,89,195,.30);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(18,89,195,.45);
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  padding: 12px 24px;
  font-size: 15px;
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg-elevated); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }

/* ---------- MAIN LAYOUT ---------- */
.main-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
  min-height: calc(100dvh - 60px);
}

/* ---------- PANEL ---------- */
.panel {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-base), background var(--transition-base);
}

.panel:hover { box-shadow: var(--shadow-md); }

.panel-header {
  padding: 18px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title i {
  color: var(--accent);
  font-size: 14px;
}

.panel-meta {
  display: flex;
  align-items: center;
  gap: 5px;
}

.count-badge {
  background: var(--count-badge-bg);
  color: var(--count-badge-text);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  min-width: 28px;
  text-align: center;
  transition: all var(--transition-base);
}

.count-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---------- INPUT AREA ---------- */
.input-area-wrap {
  position: relative;
  padding: 14px 14px 0;
  min-height: 240px;
}

.names-textarea {
  width: 100%;
  min-height: 240px;
  max-height: 320px;
  resize: none;
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-base);
  position: relative;
  z-index: 1;
}

.names-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-focus);
  background: var(--bg-surface);
}

.names-textarea::placeholder { color: transparent; }

.textarea-placeholder {
  position: absolute;
  inset: 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 13px;
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--transition-fast);
}

.textarea-placeholder i { font-size: 22px; }
.textarea-placeholder.hidden { opacity: 0; }

/* ---------- INPUT FOOTER ---------- */
.input-footer {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.input-hint.warn {
  color: var(--warning);
}

.input-hint.error {
  color: var(--danger);
}

.input-hint.ok {
  color: var(--success);
}

.input-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- HISTORY ---------- */
.history-section {
  border-top: 1px solid var(--border);
  padding: 14px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.history-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-title i { font-size: 12px; }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
  cursor: default;
  animation: fadeSlideIn var(--transition-base) ease both;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.history-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.history-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time {
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* ---------- WHEEL PANEL ---------- */
.panel-wheel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 24px;
  gap: 24px;
}

.wheel-container {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: var(--shadow-xl), 0 0 0 6px var(--bg-surface-2), 0 0 0 8px var(--border);
  display: block;
  transition: box-shadow var(--transition-base);
}

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 48px;
  z-index: 10;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}

/* ---------- SPIN BUTTON ---------- */
.spin-btn-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.spin-btn {
  width: 200px;
  height: 56px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--accent-gradient);
  color: white;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(18,89,195,.38);
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.spin-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.2), transparent);
  border-radius: inherit;
}

.spin-btn:hover:not(:disabled) {
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(18,89,195,.50);
}

.spin-btn:active:not(:disabled) {
  transform: scale(.97);
}

.spin-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}

.spin-btn.spinning {
  animation: spinBtnPulse 1.2s ease-in-out infinite;
}

@keyframes spinBtnPulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(18,89,195,.38); }
  50% { box-shadow: 0 8px 30px rgba(18,89,195,.60); }
}

.spin-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

/* ---------- WHEEL OPTIONS ---------- */
.wheel-options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 16px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
  user-select: none;
}

.toggle-option:hover { background: var(--bg-elevated); border-color: var(--accent); }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.toggle-label i { font-size: 13px; color: var(--accent); }

.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-thumb {
  position: absolute;
  inset: 0;
  background: var(--toggle-track);
  border-radius: var(--radius-full);
  transition: background var(--transition-base);
  cursor: pointer;
}

.toggle-thumb::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--toggle-thumb);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform var(--transition-spring);
}

.toggle-switch input:checked + .toggle-thumb {
  background: var(--toggle-active);
}

.toggle-switch input:checked + .toggle-thumb::after {
  transform: translateX(18px);
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 9999;
  opacity: 0;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  transform: scale(.9) translateY(12px);
  transition: transform var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  to { transform: translateY(600px) rotate(720deg); opacity: 0; }
}

.modal-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 6px 20px rgba(255,165,0,.4);
  animation: popIn var(--transition-spring) both;
}

@keyframes popIn {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.modal-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.modal-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.2;
  word-break: break-word;
  animation: slideUp var(--transition-slow) .15s ease both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions .btn { flex: 1; justify-content: center; }

/* ---------- INFO MODAL ---------- */
.modal-info-card {
  text-align: left;
  max-width: 420px;
  padding: 28px 28px 24px;
}

.modal-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-info-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.info-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.info-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- SCROLLBAR ---------- */
.names-textarea::-webkit-scrollbar { width: 4px; }
.names-textarea::-webkit-scrollbar-track { background: transparent; }
.names-textarea::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ---------- RESPONSIVE: TABLET ---------- */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
    padding: 16px 16px 100px;
    gap: 16px;
  }

  .panel-input { order: 2; }
  .panel-wheel { order: 1; }

  .wheel-wrap { padding: 20px 16px 20px; }

  .wheel-container { max-width: 380px; }

  .names-textarea { min-height: 180px; }
  .input-area-wrap { min-height: 180px; }
}

/* ---------- RESPONSIVE: MOBILE ---------- */
@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .brand-title { font-size: 15px; }

  .main-layout { padding: 12px 12px 90px; gap: 12px; }

  .wheel-container { max-width: 300px; }

  .wheel-options { gap: 8px; }
  .toggle-option { padding: 8px 12px; }

  .spin-btn { width: 160px; height: 50px; font-size: 15px; }

  .modal-card { padding: 28px 20px 24px; }
  .modal-name { font-size: 24px; }

  .input-actions { gap: 4px; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
}

/* ---------- SAFE AREA ---------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .main-layout {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}
