@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

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

:root {
  --bg-darkest: #141416;
  --bg-dark: #1a1a1e;
  --bg-mid: #222228;
  --bg-light: #2a2a32;
  --bg-lighter: #35353f;
  --border: #3a3a44;
  --border-light: #4a4a56;
  --text: #e0e0e6;
  --text-dim: #8888a0;
  --text-muted: #5a5a70;

  --patch-orange: #d76b2b;
  --patch-orange-deep: #b55a23;
  --patch-yellow: #e8a020;
  --patch-green: #6aa15c;
  --patch-green-deep: #4e7c43;
  --patch-blue: #3a6bc5;
  --patch-red: #c14a3a;
  --patch-teal: #3b8a8a;
  --patch-cream: #fae7cd;
  --patch-pink: #d6588f;

  --panel-bg: #1d1d22;
  --panel-stitch: #8a7a5a;
  --panel-shadow: 0 8px 22px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.35);

  --topbar-h: 68px;
  --radius: 14px;
}

[data-theme="light"] {
  --bg-darkest: #fae7cd;
  --bg-dark: #f5dbb8;
  --bg-mid: #eedcbe;
  --bg-light: #e8d2b0;
  --bg-lighter: #dfc8a2;
  --border: #d4b896;
  --border-light: #c9a97e;
  --text: #2a1f14;
  --text-dim: #6b5a45;
  --text-muted: #a08a70;

  --panel-bg: #f1dfbf;
  --panel-stitch: #b59566;
  --panel-shadow: 0 8px 22px rgba(120,80,40,0.2), 0 2px 4px rgba(120,80,40,0.12);
}

html, body {
  height: 100%;
  background: var(--bg-darkest);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  background-color: var(--bg-darkest);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(58,107,197,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(215,107,43,0.05) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-darkest) 0%, #101016 100%);
  position: relative;
  padding-bottom: 60px;
}
[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(215,107,43,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(232,160,32,0.05) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-darkest) 0%, #f0d4ac 100%);
}

/* Animated grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain 0.18s steps(1) infinite;
  mix-blend-mode: overlay;
}
[data-theme="light"] body::after { opacity: 0.12; mix-blend-mode: multiply; }

@keyframes grain {
  0%   { background-position: 0% 0%; }
  10%  { background-position: -5% -10%; }
  20%  { background-position: -15% 5%; }
  30%  { background-position: 7% -25%; }
  40%  { background-position: -5% 25%; }
  50%  { background-position: -15% 10%; }
  60%  { background-position: 15% 0%; }
  70%  { background-position: 0% 15%; }
  80%  { background-position: 3% 35%; }
  90%  { background-position: -10% 10%; }
  100% { background-position: 0% 5%; }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

/* TOPBAR */
.topbar {
  position: sticky; top: 0; z-index: 10;
  min-height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px;
  background: linear-gradient(180deg, var(--bg-dark), rgba(26,26,30,0.9));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
[data-theme="light"] .topbar {
  background: linear-gradient(180deg, var(--bg-dark), rgba(245,219,184,0.9));
}

.logo-patch {
  position: relative;
  width: 56px; height: 56px;
  background: var(--panel-bg);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.35);
  padding: 4px;
  flex-shrink: 0;
  transform: rotate(-2deg);
  transition: transform 0.2s;
  isolation: isolate;
}
.logo-patch:hover { transform: rotate(0deg) scale(1.04); }
.logo-patch::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1.5px dashed var(--panel-stitch);
  border-radius: 6px;
  pointer-events: none;
  opacity: 0.6;
}
.logo-patch::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  opacity: 0.08;
  mix-blend-mode: overlay;
  z-index: -1;
}
.logo-patch img { width: 100%; height: 100%; object-fit: contain; display: block; }

.topbar .brand { display: flex; flex-direction: column; justify-content: center; line-height: 1.1; }
.topbar .app-name {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--patch-orange);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  text-transform: uppercase;
}
[data-theme="light"] .topbar .app-name {
  color: var(--patch-orange-deep);
  text-shadow: 0 1px 1px rgba(255,255,255,0.4);
}
.topbar .tagline {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  margin-top: 2px;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}
.topbar .tagline:hover { color: var(--patch-orange); }

.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.theme-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-mid); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; font-size: 15px;
  transition: all 0.15s;
}
.theme-btn:hover {
  background: var(--bg-light); color: var(--patch-orange);
  border-color: var(--patch-orange); box-shadow: 0 0 10px rgba(215,107,43,0.3);
}

/* Back to Game Night kit */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-mid);
  color: var(--text-dim);
  border: 1.5px dashed var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  font-family: inherit;
  flex-shrink: 0;
  transition: all 0.15s;
}
.back-btn:hover {
  border-color: var(--patch-orange);
  color: var(--patch-orange);
  border-style: solid;
  box-shadow: 0 0 10px rgba(215,107,43,0.25);
}
.back-btn-arrow { font-size: 14px; line-height: 1; }
@media (max-width: 640px) {
  .back-btn { padding: 7px 9px; }
  .back-btn-text { display: none; }
}

.ctrl-toggle {
  background: var(--bg-mid);
  color: var(--text-dim);
  border: 1px solid var(--border);
  width: 34px; height: 34px;
  font-size: 14px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.ctrl-toggle:hover { border-color: var(--patch-orange); color: var(--patch-orange); }
.ctrl-toggle.active {
  background: var(--patch-orange);
  color: #fff;
  border-color: var(--patch-orange);
  box-shadow: 0 0 10px rgba(215,107,43,0.4);
}

/* LAYOUT */
.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px 60px;
  position: relative;
  z-index: 2;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 22px;
  align-items: stretch;
}
@media (max-width: 880px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .wheel-patch { order: -1; }
}

/* PATCH */
.patch {
  position: relative;
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
  padding: 22px 20px 20px;
  margin-top: 28px;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}
.patch::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 2px dashed var(--panel-stitch);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
  opacity: 0.55;
}
.patch::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.05;
  mix-blend-mode: overlay;
  z-index: -1;
}
.patch > * { position: relative; z-index: 1; }

.patch-tag {
  position: absolute;
  top: -14px; left: 20px;
  padding: 5px 14px 6px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--tag-color, var(--patch-orange));
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
  z-index: 2;
}
.patch-tag::before {
  content: '';
  position: absolute;
  inset: 3px 5px;
  border: 1px dashed rgba(255,255,255,0.45);
  border-radius: 3px;
  pointer-events: none;
}
.tag-orange { --tag-color: var(--patch-orange); }
.tag-yellow { --tag-color: var(--patch-yellow); color: #2a1f14; }
.tag-yellow::before { border-color: rgba(42,31,20,0.4); }
.tag-green  { --tag-color: var(--patch-green-deep); }
.tag-blue   { --tag-color: var(--patch-blue); }
.tag-red    { --tag-color: var(--patch-red); }
.tag-teal   { --tag-color: var(--patch-teal); }

[hidden] { display: none !important; }

/* OPTIONS PANEL */
.saved-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
  margin-bottom: 12px;
}
.saved-select {
  flex: 1;
  background: var(--bg-darkest);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.saved-select:focus { border-color: var(--patch-orange); }
.saved-select option { background: var(--bg-darkest); color: var(--text); text-transform: none; letter-spacing: 0; }

.options-input {
  flex: 1;
  min-height: 240px;
  background: var(--bg-darkest);
  color: var(--text);
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.55;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.options-input::placeholder {
  color: var(--text-muted);
  font-weight: 600;
  white-space: pre-line;
}
.options-input:focus {
  border-color: var(--patch-orange);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(215,107,43,0.18);
}

.options-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.options-meta .spacer { flex: 1; }

.opt-count {
  font-size: 11px;
  font-weight: 800;
  color: var(--patch-orange);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  background: rgba(215,107,43,0.10);
  border: 1px dashed rgba(215,107,43,0.35);
  border-radius: 5px;
}
.opt-count.warn { color: var(--patch-red); background: rgba(193,74,58,0.1); border-color: rgba(193,74,58,0.4); }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 7px 10px;
  font-size: 11px;
  border-radius: 5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--patch-orange); color: var(--patch-orange); }
.btn-ghost:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost.btn-danger-ghost:hover:not(:disabled) { border-color: var(--patch-red); color: var(--patch-red); }

/* WHEEL */
.wheel-patch { padding: 26px 18px 22px; }

.wheel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  margin: 8px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 44px;
  z-index: 3;
  color: var(--patch-orange);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
[data-theme="light"] .wheel-pointer { color: var(--patch-orange-deep); }
.wheel-pointer svg { width: 100%; height: 100%; display: block; }

.wheel-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wheel-wrap::before {
  /* Outer dashed stitch ring around the wheel, like a patch */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px dashed var(--panel-stitch);
  pointer-events: none;
  opacity: 0.6;
}
.wheel-wrap::after {
  /* Hard outer rim */
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid var(--bg-mid);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), inset 0 0 0 6px var(--bg-mid);
  pointer-events: none;
}
[data-theme="light"] .wheel-wrap::after {
  box-shadow: 0 6px 24px rgba(120,80,40,0.25), inset 0 0 0 6px var(--bg-mid);
}

#wheel {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  will-change: transform;
}
#wheel.spinning {
  /* Long, satisfying spin: ~5s with cubic-bezier deceleration tuned for "wheel of fortune" feel */
  transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel-slice {
  stroke: rgba(0,0,0,0.25);
  stroke-width: 0.4;
  transition: filter 0.15s;
}
[data-theme="light"] .wheel-slice { stroke: rgba(0,0,0,0.18); }

.wheel-slice-label {
  fill: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 7px;
  letter-spacing: 0.4px;
  text-anchor: middle;
  dominant-baseline: middle;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  pointer-events: none;
  user-select: none;
}
.wheel-slice-label.dark { fill: #2a1f14; text-shadow: none; }

.wheel-hub {
  fill: var(--panel-bg);
  stroke: var(--patch-orange);
  stroke-width: 1.5;
  stroke-dasharray: 2 1.6;
}
.wheel-hub-inner {
  fill: var(--patch-orange);
}

.wheel-empty {
  position: absolute;
  inset: 12%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  border: 2px dashed var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  padding: 30px;
}
.wheel-empty p {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 800;
  line-height: 1.4;
}

/* SPIN BUTTON */
.spin-btn {
  width: 100%;
  background: var(--patch-orange);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 18px 22px;
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: filter 0.15s, transform 0.05s;
}
.spin-btn::before {
  content: '';
  position: absolute; inset: 5px;
  border: 2px dashed rgba(255,255,255,0.4);
  border-radius: 8px;
  pointer-events: none;
}
.spin-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(215,107,43,0.55), inset 0 1px 0 rgba(255,255,255,0.18);
}
.spin-btn:active:not(:disabled) { transform: scale(0.98); }
.spin-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.spin-btn.spinning { pointer-events: none; opacity: 0.7; }
.spin-btn-icon {
  font-size: 22px;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.spin-btn:hover:not(:disabled) .spin-btn-icon { transform: rotate(15deg) scale(1.1); }

/* WINNER CARD */
.winner-card {
  margin-top: 16px;
  padding: 18px 16px 14px;
  background: var(--bg-mid);
  border: 2px dashed var(--patch-yellow);
  border-radius: 12px;
  text-align: center;
  position: relative;
  isolation: isolate;
  animation: winnerPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 28px rgba(232,160,32,0.35);
}
@keyframes winnerPop {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.winner-label {
  font-size: 11px;
  color: var(--patch-yellow);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 800;
  margin-bottom: 4px;
}
[data-theme="light"] .winner-label { color: #8a6418; }

.winner-name {
  font-family: 'Nunito', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.5px;
  line-height: 1.15;
  padding: 4px 0 12px;
  word-break: break-word;
}

.winner-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

/* CONFETTI */
.confetti-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9998;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translate3d(0,0,0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(var(--dx, 0), 110vh, 0) rotate(var(--rot, 720deg)); opacity: 0.9; }
}

/* TOAST */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-160px);
  background: var(--panel-bg);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px dashed var(--patch-orange);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 100;
  pointer-events: none;
  box-shadow: var(--panel-shadow);
  opacity: 0;
  visibility: hidden;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* TOUR / HELP MODAL */
.picker-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.tour-modal {
  position: relative;
  background: var(--panel-bg);
  border-radius: var(--radius);
  padding: 28px 22px 22px;
  box-shadow: var(--panel-shadow);
  isolation: isolate;
  max-width: 460px;
  width: 100%;
}
.tour-modal::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 2px dashed var(--panel-stitch);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
  opacity: 0.55;
}
.tour-modal-tag {
  position: absolute;
  top: -14px; left: 20px;
  padding: 5px 14px 6px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--patch-orange);
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
  z-index: 2;
}
.tour-modal-tag::before {
  content: '';
  position: absolute;
  inset: 3px 5px;
  border: 1px dashed rgba(255,255,255,0.45);
  border-radius: 3px;
  pointer-events: none;
}
.tour-modal-close {
  position: absolute;
  top: 6px; right: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 26px; height: 26px;
  font-size: 16px;
  border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 2;
  cursor: pointer;
  font-family: inherit;
}
.tour-modal-close:hover { color: var(--patch-red); border-color: var(--patch-red); }

.tour-slide {
  text-align: center;
  padding: 10px 4px 18px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.tour-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
}
.tour-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--patch-orange);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
[data-theme="light"] .tour-title { color: var(--patch-orange-deep); text-shadow: none; }
.tour-body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  font-weight: 600;
  max-width: 380px;
  letter-spacing: 0.2px;
}
.tour-body strong { color: var(--patch-orange); }
[data-theme="light"] .tour-body strong { color: var(--patch-orange-deep); }

.tour-dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 14px; }
.tour-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg-light);
  border: 1px solid var(--border);
  transition: all 0.15s;
  cursor: pointer;
  padding: 0;
}
.tour-dot.active {
  background: var(--patch-orange);
  border-color: var(--patch-orange);
  width: 22px;
  border-radius: 4px;
}
.tour-dot:hover:not(.active) { border-color: var(--patch-orange); }

.tour-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.tour-skip {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: inherit;
  cursor: pointer;
}
.tour-skip:hover { color: var(--patch-red); }
.tour-nav-btns { display: flex; gap: 6px; }

.btn {
  background: var(--patch-blue);
  color: #fff;
  border: none;
  padding: 9px 18px;
  font-size: 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, transform 0.05s;
}
.btn::before {
  content: '';
  position: absolute; inset: 3px;
  border: 1px dashed rgba(255,255,255,0.35);
  border-radius: 3px;
  pointer-events: none;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.btn-primary { background: var(--patch-orange); }

/* PROMPT MODAL (save name) */
.prompt-modal {
  position: relative;
  background: var(--panel-bg);
  border-radius: var(--radius);
  padding: 28px 22px 22px;
  box-shadow: var(--panel-shadow);
  isolation: isolate;
  max-width: 380px;
  width: 100%;
}
.prompt-modal::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 2px dashed var(--panel-stitch);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
  opacity: 0.55;
}
.prompt-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--patch-orange);
  margin-bottom: 10px;
  text-align: center;
}
.prompt-input {
  width: 100%;
  background: var(--bg-darkest);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  margin-bottom: 14px;
}
.prompt-input:focus { border-color: var(--patch-orange); box-shadow: 0 0 0 2px rgba(215,107,43,0.25); }
.prompt-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--patch-orange);
  border-radius: 5px;
  border: 2px solid var(--bg-darkest);
}
::-webkit-scrollbar-thumb:hover { background: var(--patch-orange-deep); }

/* Responsive */
@media (max-width: 640px) {
  .topbar { padding: 8px 12px; gap: 10px; }
  .logo-patch { width: 48px; height: 48px; }
  .topbar .app-name { font-size: 18px; letter-spacing: 1.5px; }
  .topbar .right { gap: 4px; }
  .ctrl-toggle, .theme-btn { width: 32px; height: 32px; font-size: 13px; }
  .app { padding: 18px 10px 60px; }
  .patch { padding: 22px 14px 16px; }
  .wheel-patch { padding: 26px 14px 18px; }
  .options-input { min-height: 180px; font-size: 13px; }
  .winner-name { font-size: 26px; }
  .spin-btn { padding: 14px 16px; font-size: 16px; }
}
