#modern-menu,
#modern-menu * {
  box-sizing: border-box;
}

#modern-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f2f0ea;
  color: #111;
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* The game canvas is 400px wide; keep the page from scrolling behind the panel. */
html.mm-open,
html.mm-open body {
  overflow: hidden;
}

#modern-menu[hidden] {
  display: none !important;
}

#modern-menu .mm-col {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  margin: 0 auto;
  padding: 24px;
}

#modern-menu .mm-title {
  margin: 32px 0 0;
  font-size: clamp(52px, 15vw, 80px);
  line-height: 0.92;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

#modern-menu .mm-tag {
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 1.4;
  color: #77746c;
}

#modern-menu .mm-rule {
  height: 0;
  margin: 24px 0 8px;
  border: 0;
  border-top: 2px solid #111;
}

#modern-menu .mm-section {
  padding: 20px 0 8px;
}

#modern-menu .mm-h {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#modern-menu .mm-num {
  color: #77746c;
  font-variant-numeric: tabular-nums;
}

#modern-menu .mm-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#modern-menu .mm-opts.mm-roads {
  grid-template-columns: 1fr;
  gap: 8px;
}

#modern-menu .mm-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid #111;
  border-radius: 0;
  background: #f2f0ea;
  color: #111;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

#modern-menu .mm-opt[aria-pressed="true"] {
  background: #111;
  color: #f2f0ea;
}

#modern-menu .mm-sw {
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--mm-c, #77746c);
}

#modern-menu .mm-idx {
  flex: none;
  min-width: 1.6em;
  color: #77746c;
  font-variant-numeric: tabular-nums;
}

#modern-menu .mm-opt[aria-pressed="true"] .mm-idx {
  color: #77746c;
}

#modern-menu .mm-play-wrap {
  margin-top: auto;
  padding: 36px 0 8px;
}

#modern-menu .mm-play {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 0 20px;
  border: 2px solid #111;
  border-radius: 0;
  background: #111;
  color: #f2f0ea;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

#modern-menu .mm-play-arrow {
  font-size: 26px;
  line-height: 1;
}

#modern-menu .mm-play:disabled {
  background: #77746c;
  border-color: #77746c;
  cursor: default;
}

#modern-menu .mm-status {
  min-height: 1.4em;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: #77746c;
}

@media (hover: hover) {
  #modern-menu .mm-opt:hover {
    box-shadow: 4px 4px 0 #111;
    transform: translate(-2px, -2px);
  }

  #modern-menu .mm-play:hover:not(:disabled) {
    box-shadow: 6px 6px 0 #e4002b;
    transform: translate(-3px, -3px);
  }
}

#modern-menu button:focus-visible {
  outline: 3px solid #0057b8;
  outline-offset: 3px;
}

@media (max-width: 359px) {
  #modern-menu .mm-opts {
    grid-template-columns: 1fr;
  }
}
