:root {
  --bg-top: #20101d;
  --bg-bottom: #09060b;
  --ink: #fff5ea;
  --muted: #dbc7b2;
  --panel: rgba(33, 18, 29, 0.74);
  --panel-border: rgba(255, 255, 255, 0.11);
  --panel-strong: rgba(255, 255, 255, 0.16);
  --accent: #ff9d5c;
  --accent-strong: #ff5c76;
  --accent-soft: rgba(255, 157, 92, 0.16);
  --highlight: #7fe2d3;
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.28);
  --wheel-ring: #130b11;
  --page-gutter: clamp(14px, 2.8vw, 28px);
  --panel-radius: clamp(22px, 3vw, 30px);
  --card-padding: clamp(18px, 2.6vw, 24px);
  --wheel-stage-size: clamp(336px, 67.2vw, 651px);
  --wheel-disc-size: min(100%, clamp(294px, 54.6vw, 588px));
}

body[data-wheel="shots"] {
  --accent: #79efc2;
  --accent-strong: #59b7ff;
  --accent-soft: rgba(121, 239, 194, 0.16);
  --highlight: #ffd871;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 173, 96, 0.15), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(99, 185, 255, 0.1), transparent 28%),
    radial-gradient(circle at 50% 120%, rgba(255, 90, 110, 0.16), transparent 34%),
    linear-gradient(180deg, var(--bg-top) 0%, #110910 44%, var(--bg-bottom) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(14px);
  opacity: 0.7;
}

body::before {
  top: 6vh;
  right: -6rem;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(255, 136, 73, 0.3), transparent 68%);
}

body::after {
  left: -7rem;
  bottom: 6vh;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(126, 226, 211, 0.22), transparent 72%);
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding:
    calc(22px + env(safe-area-inset-top))
    calc(var(--page-gutter) + env(safe-area-inset-right))
    calc(30px + env(safe-area-inset-bottom))
    calc(var(--page-gutter) + env(safe-area-inset-left));
}

.hero {
  max-width: 960px;
  display: grid;
  gap: 8px;
  margin-bottom: clamp(14px, 2.6vw, 22px);
  animation: rise-in 720ms ease both;
}

.hero-bar {
  display: flex;
  align-items: baseline;
  gap: 10px 14px;
  flex-wrap: wrap;
}

.eyebrow,
.field span,
.card-kicker,
.pill,
.note-list,
.spin-button,
select {
  font-family: "Trebuchet MS", "Gill Sans", "Avenir Next Condensed", sans-serif;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1,
h2,
p,
ul {
  margin: 0;
}

h1,
.result-card h2,
.wheel-footer h2 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(1.9rem, 5.2vw, 3.5rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.hero-byline {
  color: rgba(255, 245, 234, 0.6);
  font-family: "Trebuchet MS", "Gill Sans", "Avenir Next Condensed", sans-serif;
  font-size: clamp(0.74rem, 1.4vw, 0.92rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-copy {
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.08rem);
  line-height: 1.7;
}

.hero-note {
  max-width: 28rem;
  color: rgba(255, 245, 234, 0.8);
  font-size: 0.95rem;
  line-height: 1.55;
}

.roulette-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  gap: clamp(16px, 2.5vw, 26px);
  align-items: start;
}

.wheel-card,
.result-card,
.lineup-card,
.note-card {
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 34%),
    var(--panel);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}

.wheel-card {
  padding: var(--card-padding);
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  animation: rise-in 860ms ease both;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(12px, 2vw, 18px);
}

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

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span,
.card-kicker {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

select,
.spin-button {
  border-radius: 999px;
  border: 1px solid var(--panel-strong);
  color: var(--ink);
  min-height: 52px;
  font-size: 0.96rem;
  letter-spacing: 0.06em;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

select {
  appearance: none;
  width: 100%;
  padding: 14px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(12, 8, 13, 0.72);
  cursor: pointer;
}

.spin-button {
  min-width: clamp(180px, 20vw, 220px);
  width: 100%;
  padding: 15px 24px;
  background:
    linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 18px 34px rgba(255, 92, 118, 0.18);
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(9, 7, 11, 0.42);
  color: var(--ink);
  font-family: "Trebuchet MS", "Gill Sans", "Avenir Next Condensed", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.action-row .ghost-button {
  flex: 1 1 180px;
}

.spin-button:hover,
.spin-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
select:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.spin-button:hover,
.spin-button:focus-visible {
  box-shadow: 0 20px 38px rgba(255, 92, 118, 0.28);
  filter: saturate(1.08);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
}

.spin-button:disabled,
.ghost-button:disabled,
select:disabled {
  cursor: wait;
  opacity: 0.8;
}

.wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: var(--wheel-stage-size);
  padding: clamp(10px, 2vw, 18px);
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 42%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(8, 6, 9, 0.14));
}

.wheel-stage::before,
.wheel-stage::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.wheel-stage::before {
  width: 68%;
  height: 68%;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  animation: halo-breathe 4.4s ease-in-out infinite;
}

.wheel-stage::after {
  width: 84%;
  height: 84%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pointer {
  position: absolute;
  top: 50%;
  right: calc(50% - (var(--wheel-disc-size) / 2) + clamp(2px, 0.5vw, 8px));
  z-index: 3;
  pointer-events: none;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: clamp(14px, 2vw, 22px) solid transparent;
  border-bottom: clamp(14px, 2vw, 22px) solid transparent;
  border-left: 0;
  border-right: clamp(30px, 4vw, 44px) solid var(--highlight);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.32));
}

.pointer::after {
  content: none;
}

.wheel-disc {
  position: relative;
  z-index: 2;
  width: var(--wheel-disc-size);
  aspect-ratio: 1;
  padding: clamp(10px, 1.8vw, 16px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.22), transparent 28%),
    radial-gradient(circle at 70% 78%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(12, 8, 12, 0.12));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    inset 0 0 0 22px rgba(13, 8, 11, 0.5),
    0 26px 54px rgba(0, 0, 0, 0.32);
  transition: transform 4.8s cubic-bezier(0.12, 0.82, 0.16, 1);
  will-change: transform;
  cursor: pointer;
  touch-action: manipulation;
}

.wheel-disc:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    inset 0 0 0 22px rgba(13, 8, 11, 0.5),
    0 0 0 2px rgba(255, 255, 255, 0.18),
    0 26px 54px rgba(0, 0, 0, 0.32);
}

#roulette-wheel {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
}

.wheel-footer {
  display: grid;
  gap: 8px;
}

.wheel-footer h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  text-transform: uppercase;
}

.wheel-footer p {
  color: var(--muted);
  line-height: 1.65;
}

.sidebar {
  display: grid;
  gap: clamp(14px, 2vw, 18px);
  animation: rise-in 940ms ease both;
  min-width: 0;
}

.result-card,
.lineup-card,
.note-card {
  min-width: 0;
  padding: var(--card-padding);
}

.result-card h2 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.result-style {
  margin-top: 12px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.55;
}

.result-note {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.recipe-toggle {
  margin-top: 16px;
  width: fit-content;
  max-width: 100%;
}

.recipe-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%),
    rgba(9, 7, 11, 0.34);
}

.recipe-panel[hidden] {
  display: none;
}

.recipe-summary {
  color: rgba(255, 245, 234, 0.82);
  line-height: 1.55;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.recipe-block {
  min-width: 0;
}

.recipe-label {
  color: var(--accent);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.recipe-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.recipe-list li + li {
  margin-top: 8px;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.pill-muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 16px;
}

.drink-list,
.note-list {
  list-style: none;
  padding: 0;
}

.drink-list {
  display: grid;
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  margin: 0;
}

.drink-list::-webkit-scrollbar {
  width: 10px;
}

.drink-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.drink-item {
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 34%),
    rgba(7, 5, 9, 0.34);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.drink-item.is-winner {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent),
    var(--accent-soft);
}

.drink-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.drink-row strong {
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  min-width: 0;
}

.drink-row span {
  color: var(--accent);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
}

.drink-item p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.drink-item small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 245, 234, 0.74);
  line-height: 1.45;
}

.note-list {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.note-list li {
  position: relative;
  padding-left: 20px;
}

.note-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

.editor-dialog {
  width: min(760px, calc(100vw - 20px));
  max-height: min(88dvh, 900px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: clamp(24px, 3vw, 32px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    rgba(18, 12, 20, 0.96);
  color: var(--ink);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.46);
}

.editor-dialog::backdrop {
  background: rgba(5, 4, 8, 0.72);
  backdrop-filter: blur(4px);
}

.editor-shell {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 24px);
}

.editor-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.editor-copy-wrap {
  display: grid;
  gap: 8px;
}

.editor-copy-wrap h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  text-transform: uppercase;
}

.editor-copy,
.editor-foot {
  color: var(--muted);
  line-height: 1.6;
}

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

.editor-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  max-height: min(58dvh, 560px);
  overflow: auto;
}

.editor-list::-webkit-scrollbar {
  width: 10px;
}

.editor-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.editor-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 32%),
    rgba(9, 7, 11, 0.48);
}

.editor-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.slot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.editor-item-head strong {
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.editor-controls {
  display: grid;
  gap: 8px;
}

.editor-select,
.editor-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(10, 8, 12, 0.86);
  color: var(--ink);
  font: inherit;
}

.editor-select {
  border-radius: 14px;
  padding-right: 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(10, 8, 12, 0.86);
}

.editor-select:disabled,
.editor-input:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.editor-select:focus-visible,
.editor-input:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.24);
}

.editor-note {
  color: rgba(255, 245, 234, 0.74);
  font-size: 0.94rem;
  line-height: 1.5;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes halo-breathe {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.72;
  }

  50% {
    transform: scale(1.02);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .roulette-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
    align-items: start;
  }

  .result-card {
    grid-column: 1 / -1;
  }

  .drink-list {
    max-height: 320px;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 10px;
    --wheel-stage-size: clamp(360px, 96vw, 470px);
    --wheel-disc-size: min(100%, clamp(353px, 98.7vw, 494px));
  }

  .hero {
    gap: 6px;
    margin-bottom: 10px;
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-note {
    display: none;
  }

  .wheel-card {
    gap: 14px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .wheel-stage {
    order: 1;
    min-height: auto;
    padding: 2px 0 6px;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .control-row {
    order: 2;
  }

  .action-row {
    order: 3;
  }

  .wheel-footer {
    order: 4;
    display: none;
  }

  .editor-head {
    flex-direction: column;
  }

  .wheel-card,
  .result-card,
  .lineup-card,
  .note-card {
    border-radius: 24px;
  }

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

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

  .editor-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  .editor-list {
    max-height: none;
  }

  .card-head {
    flex-direction: column;
    align-items: start;
    gap: 6px;
  }

  .drink-list {
    max-height: none;
    overflow: visible;
  }

  .result-meta {
    gap: 8px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .wheel-stage {
    min-height: auto;
    padding-top: 0;
  }

  .action-row .ghost-button,
  .editor-toolbar .ghost-button {
    flex-basis: 100%;
  }

  .hero-bar {
    gap: 6px 10px;
  }

  .hero-byline {
    font-size: 0.68rem;
    letter-spacing: 0.09em;
  }

  .recipe-toggle {
    width: 100%;
  }

  .result-card h2 {
    font-size: clamp(1.8rem, 11vw, 2.6rem);
  }

  .drink-item {
    padding: 12px;
  }
}

@media (min-width: 1101px) {
  .result-card {
    position: sticky;
    top: 22px;
  }
}
