:root {
  --navy: #142b3a;
  --navy-soft: #294758;
  --cream: #fff8e6;
  --cream-deep: #f5e8c8;
  --gold: #f6c445;
  --gold-deep: #b57b08;
  --red: #d92b2b;
  --blue: #2d76c8;
  --green: #2f8f57;
  --shadow: rgba(7, 30, 45, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #83d2ed;
}

body {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 79% 13%, rgba(255, 247, 190, 0.95) 0%, rgba(255, 238, 150, 0.45) 9%, rgba(255, 238, 150, 0) 26%),
    radial-gradient(circle at 18% 82%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #4aa9d8 0%, #7ecdeb 38%, #b9e8f6 68%, #e7f8fb 100%);
}

#sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 115%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 42%);
}

#game {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(8, 36, 54, 0) 52%, rgba(8, 36, 54, 0.22) 100%),
    linear-gradient(180deg, rgba(8, 36, 54, 0.08) 0%, rgba(8, 36, 54, 0) 18%, rgba(8, 36, 54, 0) 82%, rgba(8, 36, 54, 0.12) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
}

/* ---------------------------------- HUD ---------------------------------- */

.hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hud.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.panel {
  position: relative;
  background: linear-gradient(180deg, #fffdf5 0%, #fff5d9 58%, #f6e9c8 100%);
  border: 4px solid var(--navy);
  border-radius: 14px;
  box-shadow:
    0 7px 0 var(--shadow),
    0 12px 24px rgba(7, 30, 45, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    inset 0 -4px 0 rgba(152, 119, 49, 0.13);
}

.hud-top {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.brand-panel {
  width: 300px;
  padding: 13px 16px 14px;
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 24px;
  height: 11px;
  border-radius: 6px;
  background: var(--red);
  border: 2px solid rgba(20, 43, 58, 0.7);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.brand-panel::before {
  left: 20px;
}

.brand-panel::after {
  right: 20px;
  background: var(--blue);
}

.brand-mini {
  margin-bottom: 9px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 3.5px;
  line-height: 1;
  color: var(--navy);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9);
}

.objective-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.objective-icon {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 29px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffe27a 0%, var(--gold) 46%, #dda31c 100%);
  border: 2px solid #6f4b05;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 3px 0 #8a5e05;
}

.objective-icon::before,
.objective-icon::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 13px;
  height: 7px;
  border-radius: 4px;
  background: #ffdd70;
  border: 2px solid #6f4b05;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.objective-icon::before {
  left: 5px;
}

.objective-icon::after {
  right: 5px;
}

.objective-icon i {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: rgba(111, 75, 5, 0.35);
}

.eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #8b6a2c;
  line-height: 1;
}

.progress-text {
  margin-top: 2px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--navy);
  text-shadow: 0 2px 0 #fff;
}

.progress-text .slash {
  margin: 0 3px;
  color: #b6a47d;
}

.studs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.6px;
  color: #7d632f;
}

.stud-dot {
  width: 15px;
  height: 9px;
  border-radius: 4px;
  background: linear-gradient(180deg, #a8ecff, #3aa7d8 60%, #1f7fae);
  border: 1px solid #1d5f7d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.gold-slots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 11px;
}

.gold-slot {
  position: relative;
  height: 15px;
  border-radius: 3px;
  border: 2px solid rgba(20, 43, 58, 0.28);
  background: rgba(20, 43, 58, 0.07);
  box-shadow: inset 0 2px 2px rgba(20, 43, 58, 0.12);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.gold-slot::before,
.gold-slot::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 7px;
  height: 4px;
  border-radius: 2px;
  background: rgba(20, 43, 58, 0.2);
  transition: background 0.25s ease;
}

.gold-slot::before {
  left: 2px;
}

.gold-slot::after {
  right: 2px;
}

.gold-slot.filled {
  border-color: #7a5205;
  background: linear-gradient(180deg, #ffe783, var(--gold) 55%, #dba21a);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 2px 0 #8a5e05;
  animation: slot-pop 0.45s cubic-bezier(0.2, 1.7, 0.4, 1);
}

.gold-slot.filled::before,
.gold-slot.filled::after {
  background: #ffe27a;
  border: 1px solid #7a5205;
}

@keyframes slot-pop {
  0% { transform: scale(0.7) rotate(-4deg); }
  55% { transform: scale(1.16) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}

.top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.minimap-panel {
  padding: 8px 8px 6px;
}

#minimap {
  display: block;
  width: 166px;
  height: 166px;
  border: 3px solid var(--navy);
  border-radius: 8px;
  background: #79cde7;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.minimap-label {
  margin-top: 5px;
  text-align: center;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.4px;
  color: #7d632f;
}

.timer {
  padding: 6px 13px;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: var(--cream);
  box-shadow: 0 4px 0 var(--shadow);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}

.toast {
  position: absolute;
  top: 142px;
  left: 50%;
  transform: translate(-50%, -12px) scale(0.94);
  padding: 8px 19px;
  border: 3px solid #fff3ce;
  border-radius: 999px;
  background: var(--navy);
  color: #ffe38b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 5px 0 rgba(7, 30, 45, 0.3);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 1.5, 0.4, 1);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.prompt {
  position: absolute;
  left: 50%;
  bottom: 150px;
  transform: translate(-50%, 12px);
  max-width: min(92vw, 520px);
  padding: 12px 24px;
  border: 4px solid var(--navy);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf4, #ffefbf);
  box-shadow: 0 7px 0 var(--shadow), 0 14px 30px rgba(7, 30, 45, 0.18);
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.7px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.prompt.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.prompt b {
  color: #a86e07;
}

.hud-bottom {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.controls-panel {
  width: 270px;
  padding: 11px 15px 12px;
}

.controls-title {
  margin-bottom: 7px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.4px;
  color: #8b6a2c;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 25px;
  font-size: 11px;
  font-weight: 700;
  color: #53666c;
}

.control-row + .control-row {
  margin-top: 2px;
}

.keys {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 2px solid var(--navy);
  border-bottom-width: 4px;
  border-radius: 5px;
  background: #fffdf4;
  color: var(--navy);
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

kbd.wide {
  min-width: 48px;
  font-size: 8px;
  letter-spacing: 0.5px;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  pointer-events: auto;
}

/* -------------------------------- Buttons -------------------------------- */

.brick-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 3px solid var(--navy);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe77c 0%, var(--gold) 48%, #e6a91a 100%);
  color: var(--navy);
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 12px 22px;
  cursor: pointer;
  box-shadow:
    0 6px 0 #9c6b06,
    0 10px 18px rgba(7, 30, 45, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  touch-action: manipulation;
}

.brick-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 0 #9c6b06,
    0 14px 22px rgba(7, 30, 45, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
  filter: brightness(1.03);
}

.brick-button:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #9c6b06,
    0 5px 10px rgba(7, 30, 45, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.brick-button.small {
  padding: 8px 12px;
  font-size: 9px;
  letter-spacing: 1px;
  box-shadow:
    0 4px 0 #9c6b06,
    0 7px 12px rgba(7, 30, 45, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.brick-button.ghost {
  background: linear-gradient(180deg, #fffdf5, #f3e6c4);
  box-shadow:
    0 4px 0 #8d7b54,
    0 7px 12px rgba(7, 30, 45, 0.13),
    inset 0 2px 0 #fff;
}

.brick-button.ghost:hover {
  box-shadow:
    0 6px 0 #8d7b54,
    0 10px 16px rgba(7, 30, 45, 0.15),
    inset 0 2px 0 #fff;
}

.brick-button.ghost:active {
  box-shadow:
    0 2px 0 #8d7b54,
    0 4px 8px rgba(7, 30, 45, 0.12),
    inset 0 2px 0 #fff;
}

.brick-button.play {
  min-width: 260px;
  padding: 16px 30px 15px;
  font-size: 17px;
  letter-spacing: 1.8px;
}

.play-studs {
  position: absolute;
  top: -14px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.play-studs i {
  display: block;
  width: 22px;
  height: 12px;
  border-radius: 6px;
  background: #ffe77c;
  border: 2px solid var(--navy);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

/* -------------------------------- Overlays ------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 43%, rgba(7, 32, 48, 0.08) 0%, rgba(7, 32, 48, 0.48) 100%),
    linear-gradient(180deg, rgba(7, 32, 48, 0.06), rgba(7, 32, 48, 0.34));
  backdrop-filter: blur(1.2px) saturate(1.05);
  -webkit-backdrop-filter: blur(1.2px) saturate(1.05);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.menu-card {
  position: relative;
  width: min(700px, 100%);
  max-height: calc(100vh - 32px);
  overflow: visible;
  padding: 27px 38px 24px;
  border: 5px solid var(--navy);
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #fffdf5 0%, #fff7e2 55%, #f7ebcd 100%);
  box-shadow:
    0 18px 0 rgba(7, 30, 45, 0.24),
    0 34px 70px rgba(7, 30, 45, 0.3),
    inset 0 3px 0 #fff,
    inset 0 -7px 0 rgba(143, 107, 38, 0.12);
  text-align: center;
  scrollbar-width: thin;
}

.card-studs {
  position: absolute;
  top: -16px;
  left: 34px;
  right: 34px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.card-studs i {
  display: block;
  width: 30px;
  height: 15px;
  border-radius: 7px;
  background: var(--red);
  border: 3px solid var(--navy);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.4);
}

.card-studs i:nth-child(2) {
  background: var(--gold);
}

.card-studs i:nth-child(3) {
  background: var(--green);
}

.card-studs i:nth-child(4) {
  background: var(--blue);
}

.menu-kicker,
.win-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 3.2px;
  color: #9a742d;
}

.win-kicker {
  display: inline-block;
  padding: 6px 14px;
  border: 2px solid #7a5205;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe77c, var(--gold));
  color: #6b4704;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.logo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  margin: 13px 0 7px;
  perspective: 700px;
}

.letter {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(38px, 5.8vw, 61px);
  aspect-ratio: 0.9;
  border: 3px solid rgba(20, 43, 58, 0.24);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 34%),
    var(--c);
  color: #fffdf4;
  font-size: clamp(27px, 4.1vw, 45px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  text-shadow: 0 3px 0 rgba(20, 43, 58, 0.28);
  box-shadow:
    inset 0 -7px 0 rgba(20, 43, 58, 0.14),
    inset 0 3px 0 rgba(255, 255, 255, 0.3),
    0 7px 0 var(--d),
    0 12px 16px rgba(7, 30, 45, 0.2);
  transform: rotate(-2.5deg) translateY(0);
  animation: letter-in 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms + 120ms);
}

.letter:nth-child(2n) {
  transform: rotate(2deg) translateY(-3px);
}

.letter:nth-child(3n) {
  transform: rotate(-1deg) translateY(2px);
}

.letter::before,
.letter::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 15px;
  height: 8px;
  border-radius: 4px;
  background: var(--c);
  border: 2px solid rgba(20, 43, 58, 0.3);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 2px 0 rgba(7, 30, 45, 0.12);
  z-index: -1;
}

.letter::before {
  left: 5px;
}

.letter::after {
  right: 5px;
}

@keyframes letter-in {
  0% { opacity: 0; transform: translateY(-26px) rotate(-8deg) scale(0.8); }
  100% { opacity: 1; }
}

.tagline {
  margin: 0 0 11px;
  font-size: clamp(16px, 2.2vw, 21px);
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #314c59;
}

.intro-copy {
  max-width: 540px;
  margin: 0 auto;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: #637177;
}

.intro-copy strong {
  color: #9a6a08;
}

.menu-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 18px 0 21px;
  padding: 11px 16px;
  border-top: 2px dashed rgba(20, 43, 58, 0.16);
  border-bottom: 2px dashed rgba(20, 43, 58, 0.16);
}

.touch-only {
  display: none !important;
}

.menu-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: #77847f;
}

.menu-foot {
  margin-top: 15px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 3.4px;
  color: #a18e66;
}

.menu-foot b {
  margin: 0 5px;
  color: #c9a23d;
}

.win-overlay {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 238, 156, 0.2) 0%, rgba(7, 32, 48, 0.16) 45%, rgba(7, 32, 48, 0.62) 100%);
}

.win-card {
  width: min(590px, 100%);
  padding-top: 30px;
}

.win-title {
  margin: 8px 0 10px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 0.94;
  letter-spacing: -1.5px;
  color: var(--navy);
  text-shadow: 0 3px 0 #fff, 0 6px 0 rgba(20, 43, 58, 0.12);
}

.win-copy {
  margin: 0 auto;
  max-width: 390px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: #637177;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 11px;
  margin: 19px 0 23px;
}

.stat {
  min-width: 112px;
  padding: 10px 14px 8px;
  border: 3px solid var(--navy);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf5, #f7ebcf);
  box-shadow: 0 4px 0 var(--shadow), inset 0 2px 0 #fff;
}

.stat span {
  display: block;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.5px;
  color: var(--navy);
}

.stat small {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #9a742d;
}

#flash {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  background: #eafcff;
  transition: opacity 0.3s ease;
}

#flash.show {
  opacity: 0.72;
}

#flash.blue {
  background: #56bde3;
}

/* ------------------------------- Touch UI -------------------------------- */

.touch-ui {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.joystick {
  position: absolute;
  left: 26px;
  bottom: 30px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(255, 250, 235, 0.16);
  border: 3px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 24px rgba(7, 30, 45, 0.18), 0 4px 18px rgba(7, 30, 45, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
  touch-action: none;
}

.joystick-ring {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.32);
}

.joystick-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffdf4, #f4e6c2);
  border: 3px solid var(--navy);
  box-shadow: 0 4px 0 rgba(7, 30, 45, 0.28), inset 0 3px 0 #fff;
  transition: transform 0.06s linear;
}

.jump-button {
  position: absolute;
  right: 30px;
  bottom: 38px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 4px solid var(--navy);
  background: linear-gradient(180deg, #ffe77c, var(--gold) 55%, #e0a314);
  color: var(--navy);
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1.2px;
  box-shadow:
    0 7px 0 #9c6b06,
    0 12px 22px rgba(7, 30, 45, 0.22),
    inset 0 3px 0 rgba(255, 255, 255, 0.6);
  pointer-events: auto;
  touch-action: none;
}

.jump-button:active {
  transform: translateY(5px);
  box-shadow:
    0 2px 0 #9c6b06,
    0 5px 10px rgba(7, 30, 45, 0.2),
    inset 0 3px 0 rgba(255, 255, 255, 0.5);
}

/* ------------------------------- Responsive ------------------------------ */

@media (pointer: coarse) {
  .touch-ui {
    display: block;
  }

  .keyboard-only {
    display: none !important;
  }

  .touch-only {
    display: flex !important;
  }

  .hud-actions {
    position: fixed;
    top: 178px;
    right: 10px;
    bottom: auto;
    left: auto;
  }

  .controls-panel {
    display: none;
  }

  .hud-bottom {
    align-items: flex-end;
  }

  .toast {
    top: 240px;
  }
}

@media (max-width: 820px) {
  .hud-top {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 8px;
  }

  .brand-panel {
    width: 218px;
    padding: 9px 11px 10px;
    border-width: 3px;
  }

  .brand-panel::before,
  .brand-panel::after {
    top: -10px;
    width: 18px;
    height: 8px;
  }

  .brand-mini {
    font-size: 14px;
    letter-spacing: 2.5px;
    margin-bottom: 6px;
  }

  .objective-row {
    gap: 8px;
  }

  .objective-icon {
    width: 37px;
    height: 24px;
  }

  .objective-icon::before,
  .objective-icon::after {
    top: -7px;
    width: 11px;
    height: 6px;
  }

  .progress-text {
    font-size: 22px;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.4px;
  }

  .gold-slots {
    gap: 4px;
    margin-top: 8px;
  }

  .gold-slot {
    height: 11px;
    border-width: 1px;
  }

  .gold-slot::before,
  .gold-slot::after {
    top: -4px;
    width: 6px;
    height: 3px;
  }

  .studs-row {
    margin-top: 6px;
    font-size: 8px;
    letter-spacing: 1px;
  }

  .stud-dot {
    width: 12px;
    height: 7px;
  }

  #minimap {
    width: 112px;
    height: 112px;
    border-width: 2px;
  }

  .minimap-panel {
    padding: 5px 5px 4px;
    border-width: 3px;
  }

  .minimap-label {
    font-size: 7px;
    letter-spacing: 1.5px;
    margin-top: 3px;
  }

  .timer {
    font-size: 9px;
    padding: 4px 9px;
    border-width: 2px;
  }

  .hud-bottom {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .prompt {
    bottom: 136px;
    font-size: 12px;
    padding: 9px 16px;
    border-width: 3px;
  }

  .toast {
    top: 108px;
    font-size: 10px;
    padding: 6px 13px;
    border-width: 2px;
  }

  .menu-card {
    padding: 24px 18px 21px;
    border-width: 4px;
    border-radius: 18px;
  }

  .card-studs {
    left: 22px;
    right: 22px;
    top: -13px;
  }

  .card-studs i {
    width: 24px;
    height: 12px;
    border-width: 2px;
  }

  .logo {
    gap: 3px;
    margin-top: 11px;
  }

  .letter {
    width: clamp(31px, 8.4vw, 44px);
    border-width: 2px;
    border-radius: 5px;
    font-size: clamp(23px, 6.4vw, 33px);
    box-shadow:
      inset 0 -5px 0 rgba(20, 43, 58, 0.14),
      inset 0 2px 0 rgba(255, 255, 255, 0.3),
      0 5px 0 var(--d),
      0 8px 12px rgba(7, 30, 45, 0.18);
  }

  .letter::before,
  .letter::after {
    top: -9px;
    width: 11px;
    height: 6px;
    border-width: 1px;
  }

  .letter::before {
    left: 3px;
  }

  .letter::after {
    right: 3px;
  }

  .tagline {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .intro-copy {
    font-size: 12px;
    line-height: 1.45;
  }

  .menu-controls {
    gap: 13px;
    margin: 13px 0 16px;
    padding: 8px 8px;
  }

  .menu-control {
    gap: 5px;
    font-size: 8px;
    letter-spacing: 0.8px;
  }

  kbd {
    min-width: 18px;
    height: 18px;
    font-size: 8px;
    border-width: 1px;
    border-bottom-width: 3px;
  }

  kbd.wide {
    min-width: 38px;
    font-size: 7px;
  }

  .brick-button.play {
    min-width: 220px;
    padding: 14px 22px;
    font-size: 14px;
  }

  .play-studs {
    top: -12px;
    left: 18px;
    right: 18px;
  }

  .play-studs i {
    width: 18px;
    height: 10px;
  }

  .menu-foot {
    font-size: 8px;
    letter-spacing: 2px;
    margin-top: 12px;
  }

  .win-card {
    padding-top: 25px;
  }

  .win-title {
    font-size: clamp(34px, 10vw, 50px);
  }

  .stats {
    gap: 7px;
    margin: 14px 0 18px;
  }

  .stat {
    min-width: 88px;
    padding: 7px 8px 6px;
    border-width: 2px;
  }

  .stat span {
    font-size: 20px;
  }

  .stat small {
    font-size: 7px;
  }
}

@media (max-width: 380px) {
  .hud-top {
    gap: 4px;
  }

  .brand-panel {
    width: 190px;
    padding: 8px 9px 9px;
  }

  .brand-mini {
    font-size: 12px;
    letter-spacing: 2px;
  }

  .objective-icon {
    width: 32px;
    height: 21px;
  }

  .progress-text {
    font-size: 19px;
  }

  .gold-slots {
    gap: 3px;
  }

  .gold-slot {
    height: 10px;
  }

  #minimap {
    width: 92px;
    height: 92px;
  }

  .minimap-label {
    font-size: 6px;
    letter-spacing: 1px;
  }

  .timer {
    font-size: 8px;
    padding: 3px 7px;
  }

  .hud-actions {
    top: 160px;
  }

  .menu-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .logo {
    gap: 2px;
  }

  .letter {
    width: 27px;
    font-size: 20px;
    box-shadow:
      inset 0 -4px 0 rgba(20, 43, 58, 0.14),
      inset 0 2px 0 rgba(255, 255, 255, 0.3),
      0 4px 0 var(--d);
  }

  .letter::before,
  .letter::after {
    width: 9px;
    height: 5px;
  }

  .tagline {
    font-size: 13px;
  }

  .intro-copy {
    font-size: 11px;
  }

  .menu-controls {
    gap: 8px;
  }

  .brick-button.play {
    min-width: 190px;
    font-size: 12px;
    padding: 13px 16px;
  }

  .win-title {
    font-size: 30px;
  }

  .stat {
    min-width: 76px;
  }
}

@media (max-height: 680px) {
  .menu-card {
    overflow-y: auto;
    padding-top: 20px;
    padding-bottom: 17px;
  }

  .logo {
    margin: 8px 0 5px;
  }

  .tagline {
    margin-bottom: 6px;
  }

  .intro-copy {
    font-size: 12px;
    line-height: 1.4;
  }

  .menu-controls {
    margin: 10px 0 13px;
    padding: 7px 12px;
  }

  .menu-foot {
    margin-top: 10px;
  }

  .win-card {
    padding-top: 22px;
  }

  .win-title {
    font-size: clamp(32px, 8vw, 48px);
  }

  .stats {
    margin: 10px 0 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (pointer: coarse) {
  .prompt {
    bottom: 172px;
  }
}

@media (pointer: coarse) {
  .toast {
    top: 240px;
  }
}
