:root {
  --bg: #f7f3ea;
  --ink: #1f2933;
  --muted: #687381;
  --panel: #fffdf8;
  --line: #e4dccf;
  --red: #d83f31;
  --gold: #f4b942;
  --green: #287c69;
  --blue: #275f9f;
  --shadow: 0 24px 70px rgba(31, 41, 51, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Be Vietnam Pro", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(216, 63, 49, 0.13), transparent 34%),
    linear-gradient(315deg, rgba(40, 124, 105, 0.15), transparent 32%),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.promo-slot[hidden] {
  display: none !important;
}

.promo-slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  overflow: hidden;
}

.promo-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-slot a {
  display: block;
  width: 100%;
  height: 100%;
}

.promo-banner {
  width: min(1240px, calc(100% - 28px));
  aspect-ratio: 16 / 9;
  max-height: 300px;
  margin: 0 auto;
}

.promo-header {
  margin-top: -4px;
}

.promo-footer {
  margin-bottom: 18px;
}

.promo-side {
  position: fixed;
  top: 150px;
  z-index: 2;
  width: calc(550px * 9 / 16);
  height: 550px;
  box-shadow: 0 18px 55px rgba(31, 41, 51, 0.08);
}

.promo-side-left {
  left: 14px;
}

.promo-side-right {
  right: 14px;
}

.game-shell {
  width: min(1240px, calc(100% - 28px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 22px 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.site-footer {
  background: #07112a;
  color: #dce7f7;
  padding: 18px 14px;
  font-size: 0.78rem;
}

.site-footer p {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.site-footer a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.game-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.28rem;
  letter-spacing: 0;
}

.status-pill {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.86);
  padding: 12px 16px;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.game-board {
  display: grid;
  grid-template-columns: minmax(420px, 1.2fr) minmax(330px, 0.8fr);
  gap: 22px;
  align-items: stretch;
}

.wheel-panel,
.play-panel {
  min-width: 0;
}

.wheel-panel {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: 0 18px 55px rgba(31, 41, 51, 0.08);
  padding: 24px;
}

.wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 620px, calc(100vh - 230px));
  min-width: 280px;
  aspect-ratio: 1;
  margin: auto;
}

#wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(var(--shadow));
  transform: rotate(0deg);
}

.pointer {
  position: absolute;
  top: -16px;
  z-index: 3;
  width: 70px;
  height: 90px;
  overflow: visible;
  filter: drop-shadow(0 8px 14px rgba(96, 28, 0, 0.4));
}

.spin-button {
  position: absolute;
  z-index: 4;
  width: 132px;
  height: 132px;
  border: 8px solid #ffe89a;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 50% 45%, #8b2b11 0, #531707 68%, #2a0903 100%);
  box-shadow:
    inset 0 0 0 5px rgba(255, 180, 40, 0.45),
    0 14px 26px rgba(116, 48, 0, 0.34);
  font-size: 1.45rem;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.spin-button:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.play-panel {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 16px;
}

.setup-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 18px 55px rgba(31, 41, 51, 0.08);
  padding: 22px;
}

.section-heading.compact h2 {
  margin-bottom: 10px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #334150;
  font-size: 0.9rem;
  font-weight: 700;
}

.preset-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.preset-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 10px;
  font-size: 0.86rem;
  font-weight: 800;
}

.preset-button.is-active {
  border-color: var(--green);
  background: rgba(40, 124, 105, 0.12);
  color: var(--green);
}

input {
  width: 100%;
  border: 1px solid #d8d0c3;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
}

textarea {
  width: 100%;
  border: 1px solid #d8d0c3;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
  line-height: 1.5;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(40, 124, 105, 0.12);
}

.setup-actions {
  display: grid;
}

.primary-action {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 14px 18px;
  font-weight: 800;
}

.form-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--green);
  font-weight: 700;
}

.result-card {
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 20px;
}

.result-label {
  display: block;
  margin-bottom: 8px;
  color: #ffd983;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

#resultText {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.25;
}

#winnerText {
  margin: 8px 0 0;
  color: #d9e1e8;
  line-height: 1.55;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(31, 41, 51, 0.58);
}

.modal.is-open {
  display: grid;
}

.modal-box {
  position: relative;
  width: min(460px, 100%);
  border-radius: 8px;
  background: #fffdf8;
  padding: 34px;
  text-align: center;
  box-shadow: var(--shadow);
}

.modal-box h2 {
  margin-bottom: 14px;
  font-size: 1.35rem;
  font-weight: 500;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
}

.modal-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(244, 185, 66, 0.24);
  color: #8b5a00;
  padding: 7px 12px;
  font-weight: 800;
}

#modalPrize {
  display: block;
  margin: 0 0 22px;
  color: var(--red);
  font-size: 1.6rem;
  line-height: 1.35;
  font-weight: 800;
}

@media (max-width: 940px) {
  .promo-side {
    display: none;
  }

  .game-board {
    grid-template-columns: 1fr;
  }

  .wheel-stage {
    width: min(100%, 520px);
  }
}

@media (max-width: 620px) {
  .promo-banner {
    width: min(100% - 22px, 1240px);
    max-height: 220px;
  }

  .game-shell {
    width: min(100% - 22px, 1240px);
    padding: 16px 0;
  }

  .game-header {
    display: grid;
    align-items: start;
  }

  .status-pill {
    width: 100%;
  }

  h1 {
    font-size: 2.65rem;
  }

  .wheel-panel,
  .setup-panel {
    padding: 16px;
  }

  .preset-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spin-button {
    width: 104px;
    height: 104px;
    border-width: 6px;
    font-size: 1.12rem;
  }
}
