/* One download surface shared by the desktop dialog and the mobile page. */
.download-page,
.download-dialog {
  --download-gold: #e4bf7d;
  --download-text: #f4e8d8;
  --download-muted: #bca99a;
  color: var(--download-text);
}

.download-shell,
.download-dialog {
  width: min(820px, calc(100% - 40px));
}

.download-dialog {
  border-color: #a47a46;
  background: #170f12;
}

.download-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #987144;
  border-radius: 6px;
  background: #180f12;
  box-shadow: inset 0 1px #f5d69b40, 0 22px 75px #0009;
}

.download-dialog .download-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.download-hero {
  position: relative;
  isolation: isolate;
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid #9e7343;
  background: #240e10 url('../images/mu-buttons/mu-download.png') center 43% / cover no-repeat;
}

.download-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  background: linear-gradient(90deg, transparent 22%, #170b0845 48%, #13090a12);
  pointer-events: none;
}

.download-logo {
  position: absolute;
  top: 12px;
  left: 69%;
  width: 150px;
  max-width: 30%;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 4px #000d) drop-shadow(0 0 14px #b86b1933);
}

.download-hero-copy {
  position: absolute;
  right: 9%;
  bottom: 16px;
  width: 44%;
  text-align: center;
  text-shadow: 0 2px 5px #000;
}

.download-kicker {
  display: block;
  margin: 0;
  color: var(--download-gold);
  font-family: Arial, Tahoma, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 2.8px;
  text-transform: uppercase;
}

.download-hero-copy strong {
  display: block;
  margin-top: 6px;
  color: #f8e4c1;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
}

.download-close {
  top: 9px;
  right: 9px;
  border: 1px solid #b3895359;
  color: #e8cfa6;
  background: #140a0dda;
}

.download-panel {
  min-width: 0;
  padding: 24px 36px 15px;
  background:
    radial-gradient(ellipse at 50% 0, #672a202e, transparent 64%),
    linear-gradient(145deg, #241719, #150f12 72%);
}

.download-heading {
  margin-bottom: 18px;
  text-align: center;
}

.download-heading h1,
.download-heading h2 {
  margin: 4px 0 5px;
  color: #f7e8d1;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.4px;
}

.download-intro {
  margin: 0;
  color: var(--download-muted);
  font-size: 13px;
  line-height: 1.7;
}

.download-platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.download-platforms legend,
.download-platform input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.download-platform {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-width: 0;
  min-height: 97px;
  padding: 18px 42px 18px 24px;
  border: 1px solid #6c4a35;
  border-radius: 4px;
  background: linear-gradient(125deg, #2d2020, #171115 75%);
  box-shadow: inset 0 1px #f5d4970b, 0 3px 10px #0003;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
}

.download-platform::before {
  position: absolute;
  inset: 4px;
  content: '';
  border: 1px solid #a7783c16;
  border-radius: 2px;
  pointer-events: none;
}

.download-platform:has(input:checked) {
  border-color: #d2a960;
  background:
    radial-gradient(ellipse at 12% 50%, #ba853026, transparent 80%),
    linear-gradient(125deg, #3f2b1e, #25171a 75%);
  box-shadow: inset 0 0 0 1px #d6a24b2b, 0 0 18px #bd803511;
}

.download-platform:has(input:focus-visible) {
  outline: 2px solid #f2cc86;
  outline-offset: 4px;
}

.download-platform .platform-icon {
  flex: none;
  width: 39px;
  height: 39px;
  color: #ede4d6;
  filter: drop-shadow(0 2px 3px #0007);
}

.download-platform:has(input[value='android']) .platform-icon {
  color: #a6cb79;
}

.download-platform:has(input[value='ios']) .platform-icon {
  color: #eee4d7;
}

.platform-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.platform-copy strong {
  color: #f3e4ca;
  font-family: Arial, Tahoma, sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.platform-copy small {
  color: #bbab99;
  font-size: 11px;
  line-height: 1.6;
}

.platform-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 17px;
  height: 17px;
  border: 1px solid #7b6145;
  border-radius: 50%;
  background: #120d0f;
}

.download-platform:has(input:checked) .platform-check {
  border-color: #e5bf74;
  background: #d6aa61;
  box-shadow: 0 0 10px #e4ad3440;
}

.download-platform:has(input:checked) .platform-check::after {
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 7px;
  content: '';
  border: solid #382411;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.download-selection {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #664a333b;
  border-left: 2px solid #946838;
  background: #0e0b0d80;
}

.download-selection-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 14px;
  margin: 0;
}

.download-selected-title {
  margin: 0;
  color: #e8d7ba;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.download-availability {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c4ad86;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
}

.download-status-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d2a557;
  box-shadow: 0 0 7px #d2a55733;
}

.download-card.is-available .download-status-dot {
  background: #a0c978;
  box-shadow: 0 0 7px #a0c97833;
}

.download-description {
  margin: 5px 0 0;
  color: #b3a397;
  font-size: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.download-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  margin-top: 17px;
  padding: 15px 44px;
  border: 0;
  border-radius: 3px;
  color: #ffebbb;
  background: url('../images/mu-buttons/register-submit.svg') center / 100% 100% no-repeat;
  filter: drop-shadow(0 5px 5px #0009) drop-shadow(0 0 6px #90290d33);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 2px #080203, 0 0 12px #e295363b;
  cursor: pointer;
  transition: filter .2s, transform .15s;
}

.download-action-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.download-action-copy small {
  color: #d1af7b;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 8px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 2.6px;
}

.download-action svg {
  flex: none;
  width: 23px;
  height: 23px;
  color: #dfbc7c;
}

.download-action:active:not(:disabled) {
  transform: translateY(1px);
  filter: brightness(.95) drop-shadow(0 2px 3px #0009);
}

.download-action:disabled,
.download-action[aria-disabled='true'] {
  cursor: default;
}

.download-notice {
  margin: 9px 0 0;
  color: #b5a391;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
  overflow-wrap: anywhere;
}

.download-notice[data-state='feedback'] {
  color: #efd098;
}

.download-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 23px;
  margin-top: 12px;
  padding-top: 4px;
  border-top: 1px solid #694a303f;
  color: #aa9886;
  font-size: 11px;
  line-height: 1.6;
}

.download-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  color: #dcc096;
  text-underline-offset: 4px;
}

.download-footer a svg {
  width: 14px;
  height: 14px;
}

.download-page :is(a, button):focus-visible,
.download-dialog :is(a, button):focus-visible {
  outline: 2px solid #f2cc86;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .download-platform:hover {
    border-color: #ba9158;
    box-shadow: inset 0 1px #f5d49714, 0 0 20px #bc782212;
  }

  .download-action:hover:not(:disabled):not([aria-disabled='true']) {
    filter: brightness(1.14) drop-shadow(0 5px 5px #0009) drop-shadow(0 0 10px #ba4b2359);
  }

  .download-footer a:hover {
    color: #fff0cf;
    text-decoration: underline;
  }
}

@media (max-width: 700px) {
  .download-shell {
    width: min(480px, calc(100% - 28px));
  }

  .download-dialog {
    width: calc(100% - 24px);
  }

  .download-hero {
    height: 140px;
    background-position: 40% 38%;
  }

  .download-logo {
    top: 13px;
    left: 72%;
    width: 135px;
    max-width: 34%;
  }

  .download-hero-copy {
    right: 5%;
    bottom: 21px;
    width: 46%;
  }

  .download-hero-copy .download-kicker {
    display: none;
  }

  .download-hero-copy strong {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
  }

  .download-panel {
    padding: 23px 21px 10px;
  }

  .download-heading {
    margin-bottom: 19px;
  }

  .download-heading h1,
  .download-heading h2 {
    font-size: 26px;
  }

  .download-intro {
    font-size: 12px;
  }

  .download-platforms {
    gap: 10px;
  }

  .download-platform {
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    min-height: 139px;
    padding: 18px 9px 14px;
    text-align: center;
  }

  .download-platform .platform-icon {
    width: 35px;
    height: 35px;
  }

  .platform-copy strong {
    font-size: 19px;
  }

  .platform-copy small {
    font-size: 10px;
  }

  .platform-check {
    top: 11px;
    right: 11px;
    width: 16px;
    height: 16px;
  }

  .download-platform:has(input:checked) .platform-check::after {
    top: 2px;
    left: 4px;
  }

  .download-selection {
    margin-top: 16px;
    padding: 12px 13px;
  }

  .download-selection-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .download-description {
    font-size: 12px;
  }

  .download-action {
    min-height: 74px;
    margin-top: 16px;
    padding: 15px 27px;
    gap: 10px;
    font-size: 16px;
  }

  .download-action svg {
    width: 21px;
    height: 21px;
  }

  .download-action-copy small {
    font-size: 7px;
    letter-spacing: 2px;
  }

  .download-notice {
    font-size: 11px;
    line-height: 1.85;
  }

  .download-footer {
    gap: 0 18px;
    margin-top: 13px;
  }
}

@media (max-width: 360px) {
  .download-shell {
    width: calc(100% - 20px);
  }

  .download-panel {
    padding-right: 15px;
    padding-left: 15px;
  }

  .download-hero {
    height: 130px;
  }

  .download-hero-copy {
    right: 4%;
    bottom: 20px;
  }

  .download-hero-copy strong {
    font-size: 14px;
  }

  .download-logo {
    top: 15px;
  }

  .download-heading h1,
  .download-heading h2 {
    font-size: 24px;
  }

  .download-action {
    padding-right: 24px;
    padding-left: 24px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-card *,
  .download-card *::before,
  .download-card *::after {
    animation: none;
    transition: none;
  }
}
