html,
body {
  height: auto;
  min-height: 0;
  overflow: visible;
}
#demo-table {
  display: flow-root;
}
#demo-table .overlay-title {
  font-size: 1.15rem;
}
#demo-table :is(.overlay-head, .overlay-body) {
  width: 100%;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}
#demo-table .overlay-body {
  max-height: none;
  overflow: visible;
}
.demo-status {
  color: var(--muted);
  font-size: 0.875rem;
}
.demo-reading:not(:focus-within),
.demo-result:not(.demo-reading:focus-within + .demo-result) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.demo-reading:focus-within {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}
.demo-reading input {
  flex: 1;
  accent-color: var(--gold);
}
.demo-hint summary {
  list-style: none;
}
.demo-hint summary::-webkit-details-marker {
  display: none;
}
.demo-hint p {
  padding: 0 8px 8px;
  color: var(--muted);
  font-size: 0.875rem;
}
#demo-table #dtNums {
  padding: 5px;
}

.demo-wheel {
  display: grid;
  grid-template-columns: minmax(120px, 178px) 1fr;
  align-items: center;
  gap: clamp(14px, 4vw, 30px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-solid);
}
#demo-wheel {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}
.demo-wheel h2 {
  margin-bottom: 7px;
}
.demo-wheel .wheel-result {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: 7px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 355px) {
  .demo-wheel {
    grid-template-columns: minmax(105px, 145px) 1fr;
    gap: 11px;
  }
}

#demo-table .overlay-body {
  gap: 16px;
  padding: clamp(10px, 2vw, 24px);
}
#demo-table :is(.demo-wheel, .chart-box, .demo-details, #dtNums) {
  min-width: 0;
}
#demo-table #dtNums {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
}
#demo-table #dtNums .numchip {
  width: 34px;
  height: 34px;
}
#demo-table .demo-details {
  display: grid;
  gap: 20px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}
#demo-table .demo-details .sec,
#demo-table [aria-labelledby="recent-title"] {
  margin: 0;
}
@media (min-width: 680px) {
  #demo-table .overlay-body {
    grid-template-columns: minmax(218px, 0.36fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    grid-template-areas: "wheel chart" "results chart" "next next" "details details";
  }
  #demo-table .demo-wheel {
    grid-area: wheel;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    justify-items: center;
    text-align: center;
    gap: 12px;
  }
  #demo-wheel {
    width: min(100%, 200px);
  }
  #demo-table .chart-box {
    grid-area: chart;
    align-self: stretch;
    padding: 16px;
  }
  #demo-table [aria-labelledby="recent-title"] {
    grid-area: results;
  }
  #demo-table .demo-details {
    grid-area: details;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(18px, 4vw, 48px);
  }
}

.wheel-impact {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}
#wheel-change {
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
#sim-chart-title {
  margin: 0 0 10px;
}
.demo-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-solid);
}
.demo-next h2 {
  font-size: 1rem;
  margin: 0 0 3px;
}
.demo-next p {
  color: var(--muted);
  margin: 0;
}
.demo-next a {
  text-decoration: none;
}
@media (min-width: 680px) {
  .demo-next {
    grid-area: next;
  }
}
@media (max-width: 679px) {
  .demo-wheel {
    grid-template-columns: minmax(90px, 129px) minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
  }
  .demo-wheel h2 {
    margin-bottom: 3px;
  }
  .demo-wheel .wheel-result {
    width: 35px;
    height: 35px;
    margin-top: 3px;
  }
}
