:root {
  color-scheme: light;
  --page: #f7f3ea;
  --ink: #082f35;
  --muted: #52706f;
  --surface: #ffffff;
  --line: rgba(8, 47, 53, 0.16);
  --accent: #00bfa6;
  --accent-ink: #ffffff;
  --accent-strong: #008c7a;
  --soft: #c8f3ea;
  --shadow: 0 24px 70px rgba(8, 47, 53, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 38%),
    linear-gradient(315deg, rgba(255, 209, 102, 0.16), transparent 32%),
    var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  min-height: 26vh;
  padding: 22px 0 28px;
}

.eyebrow,
.modal-kicker,
.status__label,
.quest-card span {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.92;
}

.intro {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.status {
  min-width: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.status strong {
  display: block;
  margin-top: 4px;
  font-size: 2.4rem;
}

.wheel-panel {
  display: grid;
  grid-template-columns: minmax(320px, 680px) minmax(260px, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  touch-action: none;
}

.wheel {
  width: 100%;
  height: auto;
  display: block;
  cursor: grab;
  filter: drop-shadow(0 26px 40px rgba(24, 32, 47, 0.22));
  touch-action: none;
  user-select: none;
}

.wheel:active {
  cursor: grabbing;
}

.pointer {
  position: absolute;
  z-index: 2;
  top: -4px;
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 48px solid var(--ink);
  filter: drop-shadow(0 8px 8px rgba(24, 32, 47, 0.22));
}

.spin-button {
  position: absolute;
  width: clamp(104px, 18%, 132px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: var(--accent-strong);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 14px 26px rgba(24, 32, 47, 0.28);
  touch-action: manipulation;
  user-select: none;
}

.spin-button:disabled,
.secondary-button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.side-panel h2,
.quest-list h2 {
  margin-bottom: 12px;
  font-size: 1.7rem;
}

.side-panel p {
  min-height: 86px;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.5;
}

.secondary-button,
.learn-more-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.quest-list {
  padding-top: 38px;
}

.quest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quest-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.quest-card summary {
  min-height: 82px;
  cursor: pointer;
  list-style: none;
}

.quest-card summary::-webkit-details-marker {
  display: none;
}

.quest-card strong {
  display: block;
  margin-top: 10px;
  line-height: 1.25;
}

.quest-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.quest-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quest-card__actions a,
.quest-card__actions button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.quest-modal {
  width: min(760px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.quest-modal::backdrop {
  background: rgba(12, 16, 24, 0.64);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
}

.modal-media {
  min-height: 300px;
  background: var(--soft);
}

.modal-media img,
.modal-media video {
  display: block;
  width: 100%;
  height: min(48vh, 390px);
  object-fit: cover;
}

.modal-media--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.modal-body {
  padding: 28px;
}

.modal-body h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

.modal-body p:not(.modal-kicker) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

@media (hover: hover) {
  .spin-button,
  .secondary-button,
  .learn-more-button,
  .quest-card,
  .modal-close {
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  }

  .spin-button:hover,
  .secondary-button:hover,
  .learn-more-button:hover,
  .quest-card:hover,
  .modal-close:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 860px) {
  .hero,
  .wheel-panel {
    grid-template-columns: 1fr;
  }

  .status {
    width: 100%;
  }

  .wheel-panel {
    padding: 18px;
  }

  .quest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  h1 {
    font-size: 2.4rem;
    line-height: 1;
  }

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

  .pointer {
    border-left-width: 16px;
    border-right-width: 16px;
    border-top-width: 36px;
  }
}
