.aviator-page {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  max-width: 1240px;
}
.aviator-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}
.aviator-heading h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}
.aviator-heading h1 span {
  color: #718582;
  font-size: 0.5em;
  letter-spacing: 0.04em;
}
.aviator-poster {
  position: relative;
  width: 160px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #354d46;
}
.aviator-poster-plane {
  position: absolute;
  top: 12px;
  left: 22px;
  transform: rotate(-10deg);
}
.aviator-disclosure {
  max-width: 780px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #becdc9;
}
.demo-toolbar,
.demo-tools,
.demo-lifecycle,
.demo-dialog-actions,
.demo-recovery-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.demo-toolbar {
  justify-content: space-between;
  background: #18211f;
  border: 1px solid #2c3a36;
  border-radius: 14px;
  padding: 1rem;
  margin-top: 1.5rem;
}
.demo-toolbar strong {
  display: inline-block;
  font-size: 1.3rem;
  margin-left: 0.75rem;
  color: #90f0ce;
  font-variant-numeric: tabular-nums;
}
.demo-toolbar > span {
  font-size: 0.75rem;
  color: #a9bdb6;
}
.aviator-page button,
.demo-dialog button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  border: 1px solid #385249;
  font-size: 0.8rem;
}
.aviator-page button:disabled,
.demo-dialog button:disabled {
  cursor: default;
  opacity: 0.5;
}
.aviator-page :focus-visible,
.demo-dialog :focus-visible {
  outline: 2px solid #98f6d8;
  outline-offset: 4px;
}
.demo-message {
  min-height: 2.7rem;
  padding: 0.7rem 0;
  font-size: 0.85rem;
  color: #c2d9cf;
}
.demo-recovery {
  padding: 1rem;
  border: 1px solid #b69d62;
  margin-bottom: 1rem;
  border-radius: 10px;
}
.demo-recovery p {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}
.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
}
.demo-flight-column {
  min-width: 0;
}
.demo-ribbon {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  height: 32px;
  align-items: center;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.demo-ribbon span {
  white-space: nowrap;
  font-size: 0.75rem;
  background: #24342e;
  border-radius: 5px;
  padding: 2px 7px;
}
.demo-flight {
  position: relative;
  height: 380px;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(ellipse at 65% 20%, #243b34, #0e1915 75%);
  border: 1px solid #2d4339;
}
.demo-flight [data-scene],
.demo-flight canvas,
.demo-flight svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.demo-flight [data-scene] {
  pointer-events: none;
}
.demo-sky {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center bottom;
}
.demo-haze {
  position: absolute;
  width: 150%;
  max-width: none;
  height: 35%;
  bottom: 0;
  left: -25%;
  opacity: 0.5;
}
.demo-readout {
  position: absolute;
  top: 12%;
  left: 4%;
  width: 50%;
  text-shadow:
    0 2px 20px #020a0a,
    0 1px 3px #020a0a;
  text-align: center;
  pointer-events: none;
}
.demo-readout p {
  font-size: 0.8rem;
  color: #acc8bc;
}
.demo-readout strong {
  font-size: clamp(1.8rem, 8cqw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: #e1fff3;
  font-variant-numeric: tabular-nums;
}
.demo-readout span {
  display: block;
  font-size: 0.8rem;
  color: #adc5ba;
  min-height: 20px;
}
.demo-lifecycle {
  margin: 0.75rem 0;
}
.demo-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.demo-stake {
  background: #19231e;
  border: 1px solid #34463d;
  border-radius: 14px;
  padding: 1rem;
  min-width: 0;
}
.demo-stake-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.demo-stake h2 {
  font-size: 0.9rem;
  font-weight: 700;
}
.demo-stake-title span {
  font-size: 0.7rem;
  color: #9ab3a5;
}
.demo-stake-fields > label {
  font-size: 0.75rem;
  display: block;
  margin-bottom: 0.3rem;
}
.demo-stake input:not([type="checkbox"]) {
  width: 100%;
  height: 44px;
  background: #101a15;
  border: 1px solid #466154;
  border-radius: 7px;
  color: #e2eee7;
  padding: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.demo-auto {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.demo-auto label {
  font-size: 0.75rem;
  flex: 1;
  line-height: 1.2;
}
.demo-auto input[name="target"] {
  width: 80px;
}
.demo-auto input[type="checkbox"],
.demo-dialog input {
  accent-color: #7aedbb;
  width: 18px;
  height: 18px;
}
.demo-stake [data-bet-status] {
  font-size: 0.75rem;
  min-height: 32px;
  margin-top: 0.5rem;
  color: #aacabb;
}
.demo-stake [data-bet-action] {
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.demo-players {
  background: #151e19;
  border: 1px solid #314237;
  border-radius: 14px;
  padding: 1rem;
  align-self: start;
}
.demo-players summary {
  cursor: pointer;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 700;
}
.demo-players summary span {
  font-size: 0.75rem;
  color: #8ef0be;
}
.demo-players > p {
  font-size: 0.72rem;
  color: #a2b9aa;
  margin-bottom: 0.6rem;
}
.demo-players ol {
  list-style: none;
  padding: 0;
}
.demo-players li {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0.65rem 0;
  border-bottom: 1px solid #283b2e;
  font-size: 0.72rem;
  min-height: 50px;
}
.demo-players li img {
  width: 24px;
  height: 24px;
}
.demo-players li small {
  display: block;
  color: #a0cbb0;
  font-size: 0.7rem;
}
.demo-players button {
  margin-top: 0.8rem;
  width: 100%;
}
.demo-history-preview {
  margin-top: 2rem;
  border-top: 1px solid #32483b;
  padding-top: 1.5rem;
}
.demo-history-preview h2 {
  font-size: 1.3rem;
  font-weight: 700;
}
.demo-history-preview > p,
.demo-dialog p {
  font-size: 0.8rem;
  line-height: 1.65;
  color: #b4c9ba;
  margin: 0.7rem 0;
}
.demo-history-card {
  border: 1px solid #34483c;
  border-radius: 10px;
  padding: 0.8rem;
  margin: 0.5rem 0;
  font-size: 0.8rem;
}
.demo-history-card strong {
  color: #b2f8cc;
}
.demo-history-card p {
  font-size: 0.75rem;
  margin: 0.3rem 0;
}
.demo-dialog {
  max-width: 720px;
  width: calc(100% - 2rem);
  max-height: 85dvh;
  background: #15221a;
  color: #e1f0e5;
  border: 1px solid #608c6e;
  border-radius: 16px;
  padding: 1.5rem;
  overflow: auto;
  margin: auto;
}
.demo-dialog::backdrop {
  background: #020a07bb;
  backdrop-filter: blur(4px);
}
.demo-dialog h2 {
  font-size: 1.4rem;
  font-weight: 700;
  padding-right: 2rem;
  margin-bottom: 1rem;
}
.demo-dialog-close {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  /* biome-ignore lint/complexity/noImportantStyles: The close control overrides the shared dialog button size. */
  font-size: 1.3rem !important;
}
.demo-dialog pre {
  font-size: 0.75rem;
  white-space: pre-wrap;
  border: 1px solid #36553e;
  padding: 0.8rem;
  margin: 1rem 0;
}
.demo-dialog > label {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-height: 44px;
  font-size: 0.85rem;
}
.demo-dialog-actions,
.demo-recovery-actions {
  margin: 1rem 0;
}
.demo-in-flight .demo-stake-fields {
  opacity: 0.65;
}
.demo-paused .demo-readout strong {
  color: #acc8ba;
}
@media (max-width: 767px) {
  .aviator-poster {
    display: none;
  }
  .aviator-page {
    padding-top: 0.7rem;
  }
  .aviator-heading h1 {
    font-size: 2.2rem;
  }
  .aviator-disclosure {
    font-size: 0.78rem;
  }
  .aviator-page > .public-context-note {
    font-size: 0.72rem;
  }
  .demo-toolbar {
    padding: 0.6rem;
    gap: 0.5rem;
    margin-top: 0.8rem;
  }
  .demo-toolbar p {
    font-size: 0.75rem;
  }
  .demo-toolbar strong {
    font-size: 1.05rem;
    margin-left: 0.4rem;
  }
  .demo-tools {
    gap: 0.3rem;
  }
  .demo-layout {
    grid-template-columns: 1fr;
  }
  .demo-flight {
    height: 280px;
  }
  .demo-sky {
    object-fit: cover;
    object-position: right bottom;
  }
  .demo-players {
    margin-top: 0.5rem;
  }
  .demo-stake {
    padding: 0.65rem;
  }
  .demo-stake h2 {
    font-size: 0.8rem;
  }
  .demo-auto {
    flex-wrap: wrap;
  }
  .demo-auto input[name="target"] {
    width: 100%;
  }
  .demo-stake [data-bet-status] {
    font-size: 0.7rem;
    min-height: 34px;
  }
  .demo-lifecycle {
    gap: 0.4rem;
  }
  .demo-lifecycle button {
    font-size: 0.72rem;
  }
  .demo-in-flight .demo-panels {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 15;
    background: #0d1811;
    padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom));
    border-top: 1px solid #74b08a;
    gap: 0.5rem;
  }
  .demo-in-flight .demo-stake-fields {
    display: none;
  }
  .demo-in-flight .demo-stake {
    padding: 0.4rem 0.5rem;
  }
  .demo-in-flight .demo-stake-title {
    margin-bottom: 0;
  }
  .demo-in-flight .demo-stake [data-bet-status] {
    min-height: 18px;
    margin: 0.2rem 0;
  }
  .demo-in-flight {
    padding-bottom: 160px;
  }
  .demo-history-preview {
    margin-top: 1rem;
  }
  .demo-message {
    font-size: 0.75rem;
  }
  .demo-dialog {
    padding: 1rem;
  }
  .demo-dialog h2 {
    font-size: 1.15rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .demo-flight * {
    /* biome-ignore lint/complexity/noImportantStyles: Reduced-motion preferences must override component motion. */
    animation: none !important;
    /* biome-ignore lint/complexity/noImportantStyles: Reduced-motion preferences must override component motion. */
    transition: none !important;
  }
}
.demo-auto label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
}
.demo-history-card {
  overflow-wrap: anywhere;
}
@media (min-width: 768px) and (max-width: 900px), (min-width: 768px) and (max-height: 850px) {
  .demo-in-flight .demo-panels {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 15;
    max-width: 1100px;
    margin: 0 auto;
    background: #0d1811;
    padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom));
    border: 1px solid #74b08a;
  }
  .demo-in-flight .demo-stake-fields {
    display: none;
  }
  .demo-in-flight .demo-stake {
    padding: 0.5rem 0.75rem;
  }
  .demo-in-flight .demo-stake [data-bet-status] {
    min-height: 18px;
    margin: 0.2rem 0;
  }
  .demo-in-flight {
    padding-bottom: 170px;
  }
}
.demo-players summary small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: #a2b9aa;
  margin: 0.2rem 0 0.5rem;
}
.demo-lifecycle button {
  scroll-margin-bottom: 180px;
}
.demo-players li[data-updated="true"] {
  background: #263d2f;
  box-shadow: inset 2px 0 #9ae8b7;
}
