/* Demo-download infrastructure shared by all six game cassettes. */
.demo-download-section {
  position: relative;
  z-index: 4;
  margin: 16px 0 5px;
  padding: 13px;
  border: 1px solid rgba(214, 187, 116, .52);
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(229, 204, 139, .07), transparent 25%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0 1px, transparent 1px 4px),
    rgba(5, 9, 7, .88);
  box-shadow: inset 0 0 18px rgba(0,0,0,.66), 0 1px rgba(255,255,255,.04);
  color: #d7c9a6;
  font-family: var(--mono, "Courier New", monospace);
}
.demo-download-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(214,187,116,.22);
  padding-bottom: 7px;
}
.demo-download-heading p,
.demo-download-heading h3,
.demo-download-status { margin: 0; }
.demo-download-heading p {
  color: #8c8068;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .18em;
}
.demo-download-heading h3 {
  color: #ebd99c;
  font-family: var(--ui, Arial, sans-serif);
  font-size: clamp(13px, 1.65vw, 19px);
  letter-spacing: .055em;
  text-transform: uppercase;
}
.demo-download-status {
  padding: 8px 0 7px;
  color: #afa387;
  font-size: 9px;
  line-height: 1.45;
}
.demo-platform-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 5px;
  margin-bottom: 9px;
}
.demo-platform-state {
  display: grid;
  grid-template-columns: 7px 1fr;
  gap: 1px 5px;
  align-items: center;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(194,178,139,.18);
  background: rgba(0,0,0,.28);
  color: #c7baa0;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
}
.demo-platform-state i {
  grid-row: 1 / span 2;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #544d42;
  box-shadow: inset 0 0 2px #000;
}
.demo-platform-state b {
  color: #766f61;
  font-size: 5.5px;
  letter-spacing: .12em;
}
.demo-platform-state.is-ready i {
  background: #8fb976;
  box-shadow: 0 0 7px rgba(143,185,118,.5), inset 0 0 2px rgba(255,255,255,.45);
}
.demo-platform-state.is-ready b { color: #9ebd8d; }
.demo-download-controls { display: grid; justify-items: start; gap: 7px; }
.demo-download-primary,
.game-demo-os-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid #d4b760;
  border-radius: 3px;
  background: linear-gradient(#e2c671, #b7923f);
  box-shadow: inset 0 1px rgba(255,255,255,.35), 0 2px 4px rgba(0,0,0,.45);
  color: #171006;
  font-family: var(--ui, Arial, sans-serif);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.demo-download-primary:hover,
.demo-download-primary:focus-visible,
.game-demo-os-button:hover,
.game-demo-os-button:focus-visible { filter: brightness(1.12); outline: 1px solid #f2de9e; outline-offset: 2px; }
.demo-download-primary:active,
.game-demo-os-button:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,.35); }
.demo-download-primary.is-unavailable,
.game-demo-os-button.is-unavailable {
  border-color: #514b3f;
  background: linear-gradient(#454139, #292720);
  color: #8f8775;
  box-shadow: inset 0 1px rgba(255,255,255,.05);
  cursor: not-allowed;
  filter: none;
}
.demo-choose-os-link {
  padding: 2px 1px;
  border: 0;
  border-bottom: 1px solid rgba(225,201,132,.58);
  background: transparent;
  color: #d9c078;
  font: 800 7px/1.25 var(--mono, "Courier New", monospace);
  letter-spacing: .12em;
  text-shadow: -1px 0 #1b160e, 0 1px #1b160e, 1px 0 #1b160e, 0 -1px #1b160e;
  text-transform: uppercase;
  cursor: pointer;
}
.demo-choose-os-link:hover,
.demo-choose-os-link:focus-visible { color: #fff0ba; border-bottom-color: #fff0ba; outline: none; }

.game-demo-download-dialog {
  width: min(570px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 1px solid #987b39;
  border-radius: 5px;
  background: #0c0b09;
  color: #d8cba9;
  box-shadow: 0 28px 90px rgba(0,0,0,.9), inset 0 0 0 2px #211b10;
}
.game-demo-download-dialog::backdrop {
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(2px) saturate(.7);
}
.game-demo-dialog-panel {
  padding: 17px;
  background:
    linear-gradient(135deg, rgba(208,172,82,.08), transparent 26%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 4px),
    #0d0c09;
}
.game-demo-dialog-panel header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(214,187,116,.28);
}
.game-demo-dialog-panel header p,
.game-demo-dialog-panel header h2,
.game-demo-dialog-game,
.game-demo-dialog-note { margin: 0; }
.game-demo-dialog-panel header p {
  margin-bottom: 4px;
  color: #81745a;
  font: 800 8px/1 var(--mono, "Courier New", monospace);
  letter-spacing: .18em;
}
.game-demo-dialog-panel header h2 {
  color: #eedb9c;
  font: 900 clamp(20px, 5vw, 32px)/1 var(--ui, Arial, sans-serif);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.game-demo-dialog-close {
  display: grid;
  place-content: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid #615438;
  border-radius: 2px;
  background: linear-gradient(#39342b,#1c1a16);
  color: #d9c68f;
  font: 700 21px/1 Arial, sans-serif;
  cursor: pointer;
}
.game-demo-dialog-game {
  padding: 13px 0 11px;
  color: #c5b99b;
  font: 800 12px/1.3 var(--mono, "Courier New", monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.game-demo-os-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 9px;
}
.game-demo-os-button {
  display: grid;
  min-height: 67px;
  align-content: center;
  gap: 6px;
  width: 100%;
}
.game-demo-os-button span { font-size: 12px; }
.game-demo-os-button small { font: 800 6px/1 var(--mono, "Courier New", monospace); letter-spacing: .15em; }
.game-demo-dialog-note {
  padding-top: 12px;
  color: #887e69;
  font: 8px/1.45 var(--mono, "Courier New", monospace);
}
body.game-demo-dialog-open::before {
  content: "";
  position: fixed;
  z-index: 3998;
  inset: 0;
  background: rgba(0,0,0,.82);
}
body.game-demo-dialog-open .game-demo-download-dialog { position: fixed; z-index: 3999; inset: 50% auto auto 50%; transform: translate(-50%,-50%); }

@media (max-width: 560px) {
  .demo-download-heading { align-items: start; flex-direction: column-reverse; gap: 4px; }
  .demo-platform-summary { grid-template-columns: 1fr; }
  .demo-platform-state { grid-template-columns: 7px 1fr auto; }
  .demo-platform-state b { align-self: center; }
  .demo-download-primary { width: 100%; }
  .demo-download-controls { justify-items: stretch; }
  .demo-choose-os-link { justify-self: start; }
  .game-demo-os-grid { grid-template-columns: 1fr; }
  .game-demo-os-button { min-height: 48px; }
}

.demo-release-page-link,
.game-demo-release-page {
  color: #94866a;
  font: 700 6.5px/1.35 var(--mono, "Courier New", monospace);
  letter-spacing: .08em;
  text-decoration: underline;
  text-decoration-color: rgba(205,181,118,.38);
  text-underline-offset: 3px;
  text-transform: uppercase;
}
.demo-release-page-link:hover,
.demo-release-page-link:focus-visible,
.game-demo-release-page:hover,
.game-demo-release-page:focus-visible {
  color: #e4cb86;
  text-decoration-color: currentColor;
  outline: none;
}
.game-demo-release-page {
  display: inline-block;
  margin-top: 11px;
}

.demo-download-primary[hidden] { display: none !important; }
