:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #2e171c;
  background: #faf5f6;
  --accent: #83223c;
  --muted: #70525a;
  --line: #ead8d9;
}
* { box-sizing: border-box; }
body { margin: 0; }
.frame { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; }
.plate-mark {
  width: 27px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.plate-mark::before {
  content: "";
  width: 12px;
  aspect-ratio: 1;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}
.site-header a { color: var(--accent); font-size: .9rem; text-underline-offset: .23em; display: none;}
.site-header a:hover { text-decoration-thickness: 2px; }
.layout {
  display: grid;
  grid-template-columns: minmax(290px, .77fr) minmax(0, 1fr);
  grid-template-areas: "intro wheel" "controls wheel";
  column-gap: clamp(36px, 6.5vw, 104px);
  align-content: center;
  min-height: min(750px, calc(100svh - 84px));
  padding-block: clamp(36px, 6.5vh, 76px);
}
.intro { grid-area: intro; align-self: end; }
h1 {
  font-family: Georgia, serif;
  font-size: clamp(3.5rem, 7.1vw, 7rem);
  line-height: .91;
  letter-spacing: -.068em;
  font-weight: 700;
  margin: 0;
}
.intro p {
  max-width: 26rem;
  font-size: 1.125rem;
  line-height: 1.5;
  margin: 24px 0 0;
  color: var(--muted);
}
.controls { grid-area: controls; align-self: start; padding-top: 25px; }
button {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 6px;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff9f7;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .16s ease, transform .16s ease;
}
button:hover:not([aria-disabled="true"]) { background: #691830; }
button:active:not([aria-disabled="true"]) { transform: scale(.985); }
button[aria-disabled="true"] { cursor: progress; background: #70525a; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.result {
  margin-top: 27px;
  background: #fffaf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px 10px;
}
.result h2 { margin: 0 0 6px; font-size: 1rem; }
.result dl { margin: 0; }
.result dl div {
  display: grid;
  grid-template-columns: 5.1rem minmax(0, 1fr);
  gap: 10px;
  padding-block: 9px;
}
.result dl div + div { border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: .925rem; }
dd { margin: 0; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
dd.empty { color: var(--muted); font-weight: 400; }
.source-status { color: var(--muted); font-size: .875rem; margin: 10px 0 0; min-height: 1.3em; }
.wheel-stage { grid-area: wheel; align-self: center; justify-self: center; width: min(100%, 600px); padding-top: 14px; }
.wheel-frame {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #fff9f6;
  padding: 9px;
}
canvas { display: block; width: 100%; height: 100%; border-radius: 50%; }
.wheel-hub {
  position: absolute;
  width: 12%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  background: #fff9f6;
  border-radius: 50%;
}
.wheel-hub::before {
  content: "";
  width: 53%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid #c98090;
}
.pointer {
  position: absolute;
  left: 50%;
  top: -15px;
  transform: translateX(-50%);
  width: clamp(25px, 4.5%, 32px);
  height: clamp(30px, 6%, 38px);
  border-radius: 5px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
@media (max-width: 750px) {
  .frame { width: calc(100% - 36px); }
  .site-header { min-height: 58px; }
  .layout {
    max-width: 510px;
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "wheel" "controls";
    padding-block: 32px 18px;
  }
  h1 { font-size: clamp(2.75rem, 10.8vw, 4.75rem); letter-spacing: -.06em; }
  h1 br { display: none; }
  .intro p { font-size: 1rem; margin-top: 10px; }
  .wheel-stage { padding-top: 14px; margin-top: 17px; }
  .wheel-frame { padding: 6px; }
  .controls { padding-top: 20px; }
  .result { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
