/*
 * Dirlizanu — final art-direction pass
 * Layout-only refinements added after screenshot review.
 * No gameplay selector or movement property is changed here.
 */

body[data-rm-blueprint] {
  --rm-radius-object: clamp(13px, 2vw, 18px);
  --rm-radius-key: clamp(9px, 1.8vw, 13px);
}

.game-shell {
  width: min(100% - 24px, 620px);
  padding-top: max(54px, calc(env(safe-area-inset-top) + 44px));
}

.game-topbar {
  margin-bottom: 10px;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, .24);
}

.game-topbar > .button {
  min-width: 92px;
}

.game-identification {
  padding: 10px 13px;
}

.game-identification strong {
  font-size: 16px;
}

.game-difficulty,
.game-identification small,
.stat small {
  font-size: 8px;
}

.stat {
  padding: 9px 11px;
}

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

.machine {
  padding: 15px 15px 13px;
}

.machine.rm-surface {
  border-width: 1px;
  box-shadow:
    5px 6px 0 rgba(22, 24, 23, .22),
    0 18px 38px rgba(0, 0, 0, .32),
    inset 0 1px rgba(255, 255, 255, .72);
}

.machine.rm-surface::before {
  inset: 6px;
  border-color: rgba(54, 167, 210, .25);
}

.machine-head {
  margin-bottom: 11px;
  padding-inline: 3px;
}

.machine-head strong {
  margin-top: 4px;
  font-size: 21px;
}

.machine-kicker {
  font-size: 9px;
  letter-spacing: .13em;
}

.machine-register {
  font-size: 8px;
  line-height: 1.45;
  letter-spacing: .1em;
}

.board-shell {
  padding: 8px;
  border-width: 1px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .3),
    3px 4px 0 rgba(22, 24, 23, .24);
}

.board {
  box-shadow: inset 0 5px 12px rgba(3, 50, 69, .34);
}

.tile {
  font-weight: 600;
  box-shadow:
    inset 2px 2px 2px rgba(255, 255, 255, .82),
    inset -2px -4px 7px rgba(22, 24, 23, .075),
    0 5px 0 #bcb3a5,
    0 8px 12px rgba(22, 24, 23, .21);
}

.tile::before {
  inset: 9%;
}

.tile-number {
  transform: translateY(-2%);
}

.tile.hero-tile {
  background:
    radial-gradient(circle at 34% 18%, rgba(255, 255, 255, .29), transparent 40%),
    linear-gradient(145deg, #ff6428, #f5521a);
  box-shadow:
    inset 2px 2px 2px rgba(255, 255, 255, .29),
    inset -2px -4px 7px rgba(92, 20, 0, .1),
    0 5px 0 #c63d10,
    0 8px 12px rgba(92, 20, 0, .23);
}

.tile.hero-tile .tile-number {
  transform: translate(-.025em, -2%);
}

.machine-foot {
  margin-top: 11px;
  padding-inline: 3px;
  font-size: 8px;
  letter-spacing: .1em;
}

.game-footer {
  gap: 7px;
  margin-top: 14px;
}

.button {
  min-height: 50px;
  font-size: 10.5px;
}

.button[data-command]::before {
  margin-bottom: 4px;
  font-size: 7px;
}

/* The base rm-command selector is intentionally stronger than .button-primary.
   This explicit compound selector restores the signal hierarchy. */
[data-rm-blueprint] .button.button-primary,
[data-rm-blueprint] .button.rm-signal {
  color: #fff8f1;
  border-color: var(--rm-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 55%),
    var(--rm-vermilion);
  box-shadow: 0 4px 0 var(--rm-ink);
}

[data-rm-blueprint] .button.button-primary:hover,
[data-rm-blueprint] .button.rm-signal:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 55%),
    #ff6425;
}

.sound-toggle {
  min-width: 116px;
}

.game-hint {
  margin-top: 12px;
  color: rgba(243, 238, 228, .68);
  font-size: 9px;
  letter-spacing: .08em;
}

@media (max-width: 560px) {
  .game-shell {
    width: min(100% - 16px, 620px);
    padding-top: max(48px, calc(env(safe-area-inset-top) + 40px));
  }

  .machine {
    padding: 13px 10px 12px;
  }

  .machine-register {
    display: none;
  }

  .machine-head strong {
    font-size: 18px;
  }

  .machine-kicker {
    font-size: 8px;
  }

  .machine-foot {
    font-size: 7.5px;
  }

  .game-footer {
    gap: 6px;
  }

  .button {
    min-height: 48px;
  }
}

@media (max-width: 370px) {
  .machine-foot span:last-child {
    display: none;
  }

  .game-hint {
    font-size: 8px;
  }
}
