:root {
  color-scheme: light;
  --wine: #651d34;
  --ink: #481d2c;
  --ivory: #fff8ef;
  --nude: #efcaca;
  --gold: #b98948;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 80% 20%, #f3d4d3, transparent 57%), var(--ivory);
  color: var(--ink);
  font-family: system-ui, sans-serif;
  min-height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: 1.2rem .8rem;
  border-bottom: 1px solid #a264593d;
  color: var(--wine);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .15em;
}
.brand i { font-family: Georgia, serif; }
.brand img { width: auto; max-width: 7rem; height: 2.5rem; object-fit: contain; }
main { width: min(100% - 2rem, 64rem); margin: auto; padding: 2.1rem 0 2.6rem; }
.game { display: grid; gap: 1.5rem; text-align: center; align-items: center; }
.occasion { margin: 0; font-size: .875rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.occasion span { margin: 0 .2em; }
h1, h2 { font-family: Georgia, serif; color: var(--wine); font-weight: 400; }
h1 { font-size: clamp(3.7rem, 13vw, 8.4rem); line-height: .83; margin: .4em 0 .24em; letter-spacing: -.07em; }
h1 em { font-weight: inherit; }
.lead { line-height: 1.55; margin: 0; font-size: clamp(1rem, 3vw, 1.25rem); }
.wheel-frame {
  width: min(100%, 26rem);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  margin: .65rem auto 1.15rem;
  padding: .5rem;
  background: var(--wine);
  border: 2px solid var(--gold);
  box-shadow: 0 10px 35px #651d3438, inset 0 0 0 3px #e4ba7b;
}
#wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  border: 1px solid #e4ba7b;
  transition: transform 3.6s cubic-bezier(.12,.75,.2,1);
}
.pointer {
  position: absolute;
  top: -.65rem;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  width: 2rem;
  height: 2.3rem;
  clip-path: polygon(0 0,100% 0,50% 100%);
  background: #e9bd78;
}
#labels { position: absolute; inset: 0; }
.slice-label {
  position: absolute;
  inset: 0;
  transform: rotate(var(--angle));
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12%;
  color: var(--label-color);
  font-size: clamp(.69rem, 2.9vw, 1rem);
  font-weight: 700;
}
.slice-label span { writing-mode: vertical-rl; white-space: nowrap; }
.hub {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 19%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--wine);
  border: 3px solid #e4ba7b;
  color: #ffe0ba;
  display: grid;
  place-items: center;
  font-size: clamp(1rem, 5vw, 2rem);
}
button, .primary { font: inherit; font-weight: 700; cursor: pointer; }
.primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2rem;
  min-height: 48px;
  padding: .65rem 1.25rem;
  text-decoration: none;
}
.primary { color: white; background: var(--wine); border: 1px solid var(--wine); }
.primary:hover { background: #481326; }
#spin { width: min(100%, 19rem); }
button:disabled { cursor: default; opacity: .72; }
.secondary { color: var(--wine); border: 1px solid #9e6572; background: transparent; }
.secondary:hover { background: #f7e1df; }
:focus-visible { outline: 3px solid #876020; outline-offset: 4px; }
.status { font-size: .875rem; margin: .55rem 0 0; }
.status:empty { margin: 0; }
.result {
  margin: 2rem auto 0;
  background: var(--ivory);
  border: 1px solid #bc916b;
  border-radius: 1.4rem;
  overflow: hidden;
  display: grid;
}
figure { margin: 0; }
figure img { width: 100%; display: block; aspect-ratio: 2.65; object-fit: cover; }
figcaption { font-size: .8rem; padding: .45rem .9rem; }
figcaption a { color: inherit; }
.result-text { padding: clamp(1rem, 4vw, 2.5rem); }
h2 { font-size: clamp(2.6rem, 8vw, 4.5rem); line-height: 1; margin: .22em 0; overflow-wrap: anywhere; }
#description { line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; }
textarea { width: 100%; font: inherit; margin-top: .4rem; }
#manual-share { margin-top: .75rem; }
@media (min-width: 49rem) {
  main { padding-top: 3.5rem; }
  .game, .result { grid-template-columns: 1fr 1fr; }
  .intro { text-align: left; }
  .result { align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  #wheel { transition: none; }
}

