:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172026;
  background: #f6f7f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f7f9;
}

.hero {
  display: grid;
  min-height: 56vh;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(75, 12, 44, 0.92), rgba(20, 108, 95, 0.7)),
    url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.content,
.details-grid,
.app-tool {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.content {
  padding: 46px 0 54px;
}

.logo-panel {
  display: flex;
  width: min(100%, 980px);
  margin-bottom: 32px;
  padding: 18px 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.logo-panel img {
  display: block;
  width: 100%;
  max-height: 78px;
  object-fit: contain;
  object-position: left center;
}

.eyebrow {
  margin: 0 0 12px;
  color: #f2b544;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.intro {
  max-width: 640px;
  margin: 18px 0 26px;
  color: #eef3f6;
  font-size: 18px;
  line-height: 1.55;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.primary {
  background: #f2b544;
  color: #13212c;
}

.small {
  margin: 14px 0 0;
  color: #dfe9ee;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.details-band {
  padding: 34px 0;
  background: #f6f7f9;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.details-grid article {
  min-height: 168px;
  padding: 22px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 38, 0.06);
}

.details-grid span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #0d7769;
  color: #ffffff;
  font-weight: 800;
}

.details-grid h2 {
  margin: 18px 0 8px;
  color: #172026;
  font-size: 20px;
}

.details-grid p {
  margin: 0;
  color: #51606d;
  font-size: 15px;
  line-height: 1.55;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 18px;
  padding-top: 34px;
  padding-bottom: 36px;
}

.workspace[hidden] {
  display: none;
}

.roulette,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.roulette {
  display: grid;
  gap: 22px;
  justify-items: center;
  padding: 28px;
}

.wheel-wrap {
  position: relative;
  width: min(68vh, 500px);
  aspect-ratio: 1;
}

.wheel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border: 10px solid #ffffff;
  border-radius: 50%;
  background: conic-gradient(#9b124d 0 25%, #0d7769 25% 50%, #f2b544 50% 75%, #243b6b 75% 100%);
  box-shadow: 0 16px 34px rgba(23, 32, 38, 0.22);
  transition: transform 4s cubic-bezier(.14,.76,.16,1);
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #dce3e7;
}

.wheel-label {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 32%;
  color: #ffffff;
  font-size: clamp(9px, 1.05vw, 13px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.42);
  transform-origin: center;
  pointer-events: none;
}

.wheel-label.light {
  color: #13212c;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.7);
}

.pointer {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 0;
  height: 0;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-right: 34px solid #172026;
  transform: translateY(-50%);
}

.winner {
  display: grid;
  gap: 6px;
  min-height: 94px;
  text-align: center;
}

.winner span {
  color: #51606d;
  font-weight: 800;
  text-transform: uppercase;
}

.winner strong {
  color: #841349;
  font-size: clamp(30px, 5vw, 62px);
  line-height: 1;
}

.controls,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.controls button,
.panel-actions button {
  padding: 0 18px;
}

#spinButton,
#saveButton {
  background: #9b124d;
  color: #ffffff;
}

#resetButton,
#sampleButton {
  background: #f2b544;
  color: #13212c;
}

#fullscreenButton,
#clearButton {
  background: #172026;
  color: #ffffff;
}

.panel {
  padding: 22px;
}

.panel h2 {
  margin: 0 0 12px;
  color: #841349;
  font-size: 22px;
}

textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #d1d9de;
  border-radius: 8px;
  color: #172026;
  font: inherit;
  line-height: 1.45;
}

.toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  color: #34424d;
  font-weight: 750;
  line-height: 1.35;
}

.toggle input {
  width: 18px;
  height: 18px;
}

ol {
  min-height: 110px;
  margin: 0;
  padding-left: 22px;
  color: #51606d;
  line-height: 1.6;
}

#tooltip {
  position: fixed;
  z-index: 10;
  display: none;
  max-width: 240px;
  padding: 7px 9px;
  border-radius: 7px;
  background: #172026;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  font: 700 12px/1.3 system-ui, sans-serif;
  pointer-events: none;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: -18px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confettiFall var(--fall-duration, 2.8s) linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0, -20px, 0) rotate(0deg);
  }

  100% {
    transform: translate3d(var(--fall-drift, 0), calc(100vh + 40px), 0) rotate(var(--fall-spin, 540deg));
  }
}

@media (max-width: 920px) {
  .intro-card {
    grid-template-columns: 1fr;
  }

  .intro-card button {
    width: 100%;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
  }
}
