.tower-shortcuts {
  position: fixed;
  z-index: 20;
  transform: translate(-50%, -100%);
  display: grid;
  justify-items: center;
  gap: 5px;
  padding-bottom: 12px;
}
.tower-shortcuts[hidden] { display: none; }
.tower-shortcuts-main, .tower-shortcuts-sub {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: min(320px, 90vw);
}
.tower-shortcuts button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(#c58b4c, #8a5a2b 60%, #6b431e); /* the wave scroll's rod wood */
  color: #fff4d6; /* its paper colour */
  border: 2px solid #f3dfb0;
  border-radius: 999px;
  box-shadow: 0 2px 6px #0009;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.tower-shortcuts button svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tower-shortcuts button:hover:not(:disabled) { background: linear-gradient(#d49b5c, #996637); }
.tower-shortcuts button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tower-shortcuts button:active:not(:disabled) { box-shadow: 0 1px 3px #0009; }

#menu { align-items: safe center; background: #071b2bd9; }
#menu .m-card {
  width: min(1050px, 100%);
  margin: auto;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid color-mix(in srgb, var(--line), #fff 25%);
  border-radius: 22px;
  box-shadow: 0 20px 70px #0008;
}
#menu .m-hero { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
#menu .m-emblem { display: grid; place-items: center; flex: 0 0 64px; height: 64px; border-radius: 18px; background: var(--sea); color: white; }
#menu .m-emblem svg { width: 46px; height: 46px; }
#menu .m-hero h1 { text-align: left; font-size: clamp(28px, 4vw, 42px); line-height: 1; text-shadow: none; }
#menu .m-kicker { margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
#menu .m-sub { text-align: left; margin: 5px 0 0; }
#menu .m-ver { margin-left: auto; white-space: nowrap; color: var(--muted); }
#menu .m-cols { gap: 0 32px; }
#menu h4 { margin-top: 20px; letter-spacing: .12em; }
#menu .m-modes button, #menu .m-themes button { border-radius: 10px; transition: border-color .15s, transform .15s; }
#menu .m-modes button:hover, #menu .m-themes button:hover { transform: translateY(-2px); }
#menu .m-go { justify-content: flex-end; padding-top: 18px; border-top: 1px solid var(--line); }
#menu #m-play, #menu #m-resume { min-height: 44px; }
#overlay .end-card { gap: 14px; padding: 34px; border-radius: 22px; box-shadow: 0 20px 70px #0008; }
#overlay .end-mark { width: 76px; height: 76px; border-radius: 20px; }
#overlay .end-mark svg { width: 48px; height: 48px; }
#overlay .end-wave { border-width: 1px; }
@media (min-width: 1401px) and (max-width: 1700px) {
  :root { --hud-height: 82px; }
  #hud { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 36px 36px; gap: 2px 6px; align-content: center; padding: 2px 8px; }
  #hud .hud-counters { grid-column: 1; grid-row: 1; }
  #hud .hud-actions { grid-column: 3; grid-row: 1; }
  #hud .hud-middle { display: contents; }
  #hud .hud-strip { grid-column: 2; grid-row: 1; }
  #hud .hud-center { position: static; transform: none; grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 600px) {
  #menu { align-items: flex-start; padding: 10px; }
  #menu .m-hero { flex-wrap: wrap; }
  #menu .m-emblem { flex-basis: 48px; height: 48px; border-radius: 12px; }
  #menu .m-emblem svg { width: 36px; height: 36px; }
  #menu .m-ver { font-size: 10px; }
  #menu .m-go { flex-wrap: wrap; justify-content: stretch; }
  #menu .m-go button { flex: 1 1 120px; }
}
@media (max-width: 560px) {
  :root { --hud-height: 184px; }
  #hud { grid-template-columns: minmax(0, 1fr); grid-template-rows: 30px 34px 40px auto; }
  #hud .hud-counters { grid-column: 1; grid-row: 1; justify-self: center; }
  #hud .hud-actions { grid-column: 1; grid-row: 2; justify-self: center; }
  #hud .hud-strip { grid-column: 1; grid-row: 3; }
  #hud .hud-center { grid-column: 1; grid-row: 4; }
}
