.dgs-game {
  --dgs-game-paper: #f7f4ee;
  --dgs-game-surface: #fffdf8;
  --dgs-game-ink: #1f2821;
  --dgs-game-muted: #687068;
  --dgs-game-sage: #61785c;
  --dgs-game-sage-dark: #3c5740;
  --dgs-game-terracotta: #b86342;
  --dgs-game-line: #d9d7ce;
  --dgs-game-sand: #e9e2d4;
  --dgs-game-display: "Iowan Old Style", Baskerville, Georgia, serif;
  --dgs-game-sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --dgs-game-pixel: "Courier New", Courier, monospace;
  width: min(1500px, 100%);
  margin: 0 auto;
  color: var(--dgs-game-ink);
  color-scheme: light;
  font-family: var(--dgs-game-sans);
}

.dgs-game,
.dgs-game *,
.dgs-game *::before,
.dgs-game *::after {
  box-sizing: border-box;
}

body.dgs-game-preview {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f7f4ee;
}

.dgs-game-page {
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 38px) clamp(14px, 3vw, 46px) 32px;
}

.dgs-game-page-template .dgs-site-header {
  display: none;
}

.dgs-game-page-template .dgs-game-template-main {
  overflow: clip;
  padding: clamp(18px, 3vw, 38px) clamp(14px, 3vw, 46px) 48px;
  background: var(--dgs-game-paper, #f7f4ee);
}

.dgs-game button {
  font: inherit;
}

.dgs-game button,
.dgs-game canvas {
  -webkit-tap-highlight-color: transparent;
}

.dgs-game__brand-header {
  display: grid;
  grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
  align-items: center;
  gap: clamp(14px, 2.5vw, 32px);
  margin-bottom: clamp(14px, 2vw, 24px);
}

.dgs-game__brand-rule {
  height: 2px;
  background: var(--dgs-game-terracotta);
}

.dgs-game__brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--dgs-game-ink);
  font-family: var(--dgs-game-display);
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
}

.dgs-game__brand-lockup:hover,
.dgs-game__brand-lockup:focus-visible {
  color: var(--dgs-game-sage-dark);
}

.dgs-game__brand-lockup img {
  width: clamp(28px, 3vw, 42px);
  height: auto;
}

.dgs-game__shell {
  position: relative;
  width: min(1420px, 100%, calc((100vh - 132px) * 16 / 9));
  width: min(1420px, 100%, calc((100dvh - 132px) * 16 / 9));
  margin: 0 auto;
  touch-action: pan-y;
}

.dgs-game__frame {
  --dgs-game-frame-border: clamp(4px, 0.55vw, 8px);
  position: relative;
  box-sizing: content-box;
  overflow: hidden;
  width: calc(100% - (2 * var(--dgs-game-frame-border)));
  aspect-ratio: 16 / 9;
  border: var(--dgs-game-frame-border) solid var(--dgs-game-ink);
  border-radius: 14px;
  background: #c9d6d4;
  box-shadow: 0 10px 0 rgba(31, 40, 33, 0.11);
  isolation: isolate;
}

.dgs-game__canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: pan-y;
  user-select: none;
}

.dgs-game__canvas:focus-visible {
  box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 9px var(--dgs-game-terracotta);
}

.dgs-game__hud {
  position: absolute;
  inset: clamp(10px, 2vw, 26px) clamp(10px, 2vw, 28px) auto;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  pointer-events: none;
}

.dgs-game__hud-panel {
  justify-self: start;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: clamp(112px, 15vw, 210px);
  padding: clamp(7px, 1vw, 13px) clamp(10px, 1.4vw, 20px);
  border: 3px solid var(--dgs-game-ink);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 4px 4px 0 rgba(31, 40, 33, 0.28);
  color: var(--dgs-game-ink);
  font-family: var(--dgs-game-pixel);
  text-transform: uppercase;
}

.dgs-game__hud-panel--time {
  justify-self: center;
}

.dgs-game__hud-panel:last-child {
  justify-self: end;
}

.dgs-game__hud-label {
  font-size: clamp(10px, 1.25vw, 18px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dgs-game__hud-panel strong {
  color: var(--dgs-game-terracotta);
  font-size: clamp(15px, 2vw, 29px);
  letter-spacing: 0.03em;
  line-height: 1;
}

.dgs-game [data-dgs-lives] {
  white-space: nowrap;
}

.dgs-game__overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 78px 20px 24px;
  background: rgba(31, 40, 33, 0.18);
  touch-action: manipulation;
}

.dgs-game__overlay[hidden] {
  display: none;
}

.dgs-game__overlay-panel {
  width: min(520px, 78%);
  padding: clamp(20px, 3vw, 38px);
  border: 4px solid var(--dgs-game-ink);
  background: var(--dgs-game-surface);
  box-shadow: 8px 8px 0 rgba(31, 40, 33, 0.3);
  text-align: center;
}

.dgs-game__name,
.dgs-game__subtitle,
.dgs-game__copy,
.dgs-game__best-score {
  margin: 0;
}

.dgs-game__name {
  color: var(--dgs-game-ink);
  font-family: var(--dgs-game-display);
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.dgs-game__subtitle {
  margin-top: 7px;
  color: var(--dgs-game-terracotta);
  font-family: var(--dgs-game-pixel);
  font-size: clamp(22px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dgs-game__copy {
  margin-top: clamp(11px, 1.5vw, 20px);
  color: #4f554e;
  font-size: clamp(13px, 1.4vw, 18px);
  line-height: 1.45;
  white-space: pre-line;
}

.dgs-game__primary-button {
  min-width: min(270px, 100%);
  min-height: 54px;
  margin-top: clamp(16px, 2.3vw, 28px);
  padding: 14px 28px;
  border: 4px solid var(--dgs-game-ink);
  background: var(--dgs-game-sage);
  box-shadow: 6px 6px 0 var(--dgs-game-ink);
  color: #fff;
  cursor: pointer;
  font-family: var(--dgs-game-pixel);
  font-size: clamp(20px, 2.2vw, 32px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  touch-action: manipulation;
}

.dgs-game__primary-button:hover:not(:disabled) {
  background: var(--dgs-game-sage-dark);
}

.dgs-game__primary-button:active:not(:disabled) {
  translate: 4px 4px;
  box-shadow: 2px 2px 0 var(--dgs-game-ink);
}

.dgs-game__primary-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.dgs-game__overlay-actions {
  display: grid;
  width: min(340px, 100%);
  gap: 12px;
  margin: clamp(16px, 2.3vw, 28px) auto 0;
}

.dgs-game__overlay-actions .dgs-game__primary-button {
  width: 100%;
  margin-top: 0;
}

.dgs-game__secondary-button {
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border: 3px solid var(--dgs-game-ink);
  background: var(--dgs-game-surface);
  color: var(--dgs-game-ink);
  cursor: pointer;
  font-family: var(--dgs-game-pixel);
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  touch-action: manipulation;
}

.dgs-game__secondary-button:hover:not(:disabled) {
  background: var(--dgs-game-sand);
}

.dgs-game__secondary-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.dgs-game__secondary-button:focus-visible,
.dgs-game__fullscreen-toolbar button:focus-visible {
  outline: 4px solid var(--dgs-game-terracotta);
  outline-offset: 3px;
}

.dgs-game__primary-button:focus-visible,
.dgs-game__control:focus-visible,
.dgs-game__action-button:focus-visible,
.dgs-game__brand-lockup:focus-visible {
  outline: 4px solid var(--dgs-game-terracotta);
  outline-offset: 4px;
}

.dgs-game__best-score {
  margin-top: 16px;
  color: var(--dgs-game-muted);
  font-family: var(--dgs-game-pixel);
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 700;
  text-transform: uppercase;
}

.dgs-game__message {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 21%;
  min-width: 150px;
  translate: -50% -10px;
  padding: 8px 14px;
  border: 3px solid var(--dgs-game-ink);
  background: var(--dgs-game-surface);
  box-shadow: 4px 4px 0 rgba(31, 40, 33, 0.28);
  color: var(--dgs-game-sage-dark);
  font-family: var(--dgs-game-pixel);
  font-size: clamp(13px, 1.5vw, 22px);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
}

.dgs-game__message.is-visible {
  translate: -50% 0;
  opacity: 1;
}

.dgs-game__message.is-hazard {
  color: #8d382e;
}

.dgs-game__control-deck {
  display: grid;
  grid-template-columns: auto minmax(300px, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  margin-top: clamp(16px, 2.3vw, 28px);
}

.dgs-game__control-group {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.dgs-game__control-label {
  font-family: var(--dgs-game-pixel);
  font-size: clamp(13px, 1.3vw, 18px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dgs-game__control-buttons,
.dgs-game__action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dgs-game__control {
  display: grid;
  width: clamp(58px, 6vw, 86px);
  aspect-ratio: 1;
  place-items: center;
  border: 4px solid var(--dgs-game-ink);
  border-radius: 8px;
  background: var(--dgs-game-sage);
  box-shadow: 5px 5px 0 var(--dgs-game-ink);
  color: #fff;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.dgs-game__control:hover {
  background: var(--dgs-game-sage-dark);
}

.dgs-game__control:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.dgs-game__control.is-pressed,
.dgs-game__control:active {
  translate: 3px 3px;
  box-shadow: 2px 2px 0 var(--dgs-game-ink);
}

.dgs-game__control svg {
  width: 58%;
  fill: currentColor;
}

.dgs-game__legend {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 20px;
  min-height: 104px;
  padding: 12px clamp(14px, 2vw, 28px);
  border: 2px dashed #c7b99d;
  background: var(--dgs-game-surface);
  text-align: center;
}

.dgs-game__legend-items {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 18px);
  height: 42px;
}

.dgs-game__legend p {
  margin: 0;
  color: #4f554e;
  font-family: var(--dgs-game-pixel);
  font-size: clamp(11px, 1.15vw, 16px);
  font-weight: 700;
}

.dgs-game__legend-icon {
  width: 48px;
  height: 42px;
  background-image: var(--dgs-game-objects-image);
  background-repeat: no-repeat;
  background-size: 500% 100%;
  image-rendering: pixelated;
}

.dgs-game__legend-icon--hay { background-position: 0 50%; }
.dgs-game__legend-icon--herb { background-position: 25% 50%; }
.dgs-game__legend-icon--twig { background-position: 50% 50%; }
.dgs-game__legend-icon--sugar { background-position: 75% 50%; }
.dgs-game__legend-icon--cable { background-position: 100% 50%; }

.dgs-game__legend-separator {
  width: 2px;
  height: 34px;
  background: var(--dgs-game-line);
}

.dgs-game__action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 48px;
  min-height: 44px;
  padding: 8px 12px;
  border: 2px solid var(--dgs-game-ink);
  background: var(--dgs-game-sand);
  color: var(--dgs-game-ink);
  cursor: pointer;
  font-family: var(--dgs-game-pixel);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  touch-action: manipulation;
}

.dgs-game__action-button:hover:not(:disabled) {
  background: #ddd2bf;
}

.dgs-game__action-button:active:not(:disabled) {
  translate: 1px 1px;
}

.dgs-game__action-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.dgs-game__action-button svg {
  width: 19px;
  flex: 0 0 19px;
  fill: currentColor;
}

.dgs-game__sound-muted {
  display: none;
}

.dgs-game__action-button[aria-pressed="false"] .dgs-game__sound-wave {
  display: none;
}

.dgs-game__action-button[aria-pressed="false"] .dgs-game__sound-muted {
  display: block;
}

.dgs-game__keyboard-help {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-top: 18px;
  color: var(--dgs-game-muted);
  font-size: 13px;
}

.dgs-game__mobile-help {
  display: none;
  max-width: 720px;
  margin: 16px auto 0;
  color: var(--dgs-game-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.dgs-game kbd {
  display: inline-block;
  min-width: 24px;
  margin: 0 2px;
  padding: 2px 5px;
  border: 1px solid #bcb8ae;
  border-bottom-width: 3px;
  border-radius: 4px;
  background: var(--dgs-game-surface);
  color: var(--dgs-game-ink);
  font-family: var(--dgs-game-pixel);
  font-size: 11px;
  text-align: center;
}

.dgs-game__privacy-note {
  max-width: 820px;
  margin: 18px auto 0;
  color: var(--dgs-game-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.dgs-game__info {
  max-width: 860px;
  margin: clamp(30px, 5vw, 64px) auto 0;
  padding: clamp(22px, 3vw, 36px);
  border-top: 2px solid var(--dgs-game-terracotta);
  background: var(--dgs-game-surface);
  color: var(--dgs-game-ink);
  line-height: 1.65;
}

.dgs-game__info h2 {
  margin: 0 0 12px;
  color: var(--dgs-game-ink);
  font-family: var(--dgs-game-display);
  font-size: clamp(28px, 4vw, 44px);
}

.dgs-game__info p {
  margin: 0 0 14px;
}

.dgs-game__info a {
  color: var(--dgs-game-sage-dark);
  font-weight: 700;
}

.dgs-game__visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html.dgs-game-fullscreen-active,
html.dgs-game-fullscreen-active body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.dgs-game__shell:fullscreen,
.dgs-game__shell:-webkit-full-screen {
  background: #14241a;
}

.dgs-game__shell.is-fullscreen {
  position: fixed !important;
  z-index: 2147483000;
  inset: 0 !important;
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0 !important;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  background: #14241a;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.dgs-game__shell.is-fullscreen .dgs-game__frame {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #14241a;
  box-shadow: none;
}

.dgs-game__shell.is-fullscreen .dgs-game__canvas {
  width: 100%;
  height: 100%;
  background: #14241a;
  object-fit: contain;
  touch-action: none;
}

.dgs-game__fullscreen-toolbar,
.dgs-game__gesture-hint {
  display: none;
}

.dgs-game__shell.is-fullscreen .dgs-game__fullscreen-toolbar {
  position: absolute;
  z-index: 12;
  top: max(72px, calc(env(safe-area-inset-top) + 58px));
  right: max(10px, env(safe-area-inset-right));
  display: flex;
  gap: 8px;
}

.dgs-game__fullscreen-toolbar button {
  display: inline-flex;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 3px solid #fff4d7;
  border-radius: 2px;
  padding: 7px 10px;
  background: rgba(38, 59, 45, 0.92);
  box-shadow: 3px 3px 0 rgba(20, 36, 26, 0.82);
  color: #fff9e9;
  cursor: pointer;
  font-family: var(--dgs-game-pixel);
  font-size: 0.72rem;
  font-weight: 700;
  touch-action: manipulation;
}

.dgs-game__fullscreen-toolbar button:disabled {
  opacity: 0.5;
}

.dgs-game__fullscreen-toolbar button[aria-pressed="true"] {
  background: var(--dgs-game-terracotta);
}

.dgs-game__shell.is-fullscreen .dgs-game__gesture-hint {
  position: absolute;
  z-index: 10;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 82px));
  left: 50%;
  display: block;
  width: min(560px, calc(100% - 32px));
  margin: 0;
  translate: -50% 0;
  border: 2px solid rgba(255, 244, 215, 0.78);
  border-radius: 2px;
  padding: 7px 12px;
  background: rgba(20, 36, 26, 0.8);
  color: #fff9e9;
  font-family: var(--dgs-game-pixel);
  font-size: clamp(0.62rem, 2.5vw, 0.82rem);
  line-height: 1.35;
  opacity: 1;
  pointer-events: none;
  text-align: center;
  transition: opacity 180ms ease;
}

.dgs-game__shell.is-fullscreen .dgs-game__gesture-hint span {
  display: block;
  margin-top: 3px;
  color: #dbcda7;
}

.dgs-game__shell.is-fullscreen .dgs-game__gesture-hint.is-dismissed {
  opacity: 0;
}

.dgs-game__shell.is-fullscreen > .dgs-game__keyboard-help,
.dgs-game__shell.is-fullscreen > .dgs-game__mobile-help,
.dgs-game__shell.is-fullscreen > .dgs-game__privacy-note {
  display: none;
}

.dgs-game__shell.is-fullscreen > .dgs-game__control-deck {
  position: absolute;
  z-index: 11;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  display: flex;
  width: auto;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.dgs-game__shell.is-fullscreen .dgs-game__control-group {
  pointer-events: auto;
}

.dgs-game__shell.is-fullscreen .dgs-game__control-label,
.dgs-game__shell.is-fullscreen .dgs-game__legend {
  display: none;
}

.dgs-game__shell.is-fullscreen .dgs-game__control {
  width: clamp(52px, 13vw, 68px);
  min-width: 48px;
  height: clamp(52px, 13vw, 68px);
  min-height: 48px;
  border-color: #fff4d7;
  background: rgba(56, 84, 63, 0.84);
  box-shadow: 4px 4px 0 rgba(20, 36, 26, 0.8);
  backdrop-filter: blur(2px);
}

.dgs-game__shell.is-fullscreen .dgs-game__control--jump {
  width: clamp(60px, 15vw, 78px);
  height: clamp(60px, 15vw, 78px);
}

@media (max-width: 760px) {
  .dgs-game-page,
  .dgs-game-page-template .dgs-game-template-main {
    padding: 14px max(10px, env(safe-area-inset-right)) 30px max(10px, env(safe-area-inset-left));
  }

  .dgs-game__brand-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .dgs-game__brand-lockup {
    gap: 6px;
  }

  .dgs-game__brand-lockup img {
    display: none;
  }

  .dgs-game__frame {
    --dgs-game-frame-border: 4px;
    border-radius: 9px;
    box-shadow: 0 6px 0 rgba(31, 40, 33, 0.11);
  }

  .dgs-game__shell {
    width: 100%;
  }

  .dgs-game__hud-panel {
    min-width: 0;
    gap: 5px;
    border-width: 2px;
    box-shadow: 2px 2px 0 rgba(31, 40, 33, 0.3);
  }

  .dgs-game__hud-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .dgs-game__overlay {
    padding: 52px 10px 10px;
  }

  .dgs-game__overlay-panel {
    width: min(390px, 88%);
    padding: 14px 16px;
    border-width: 3px;
    box-shadow: 5px 5px 0 rgba(31, 40, 33, 0.3);
  }

  .dgs-game__copy {
    display: none;
  }

  .dgs-game__primary-button {
    margin-top: 12px;
    padding-block: 10px;
    border-width: 3px;
    box-shadow: 4px 4px 0 var(--dgs-game-ink);
  }

  .dgs-game__best-score {
    margin-top: 10px;
  }

  .dgs-game__control-deck {
    grid-template-columns: auto minmax(88px, 1fr) auto;
    gap: 10px;
    margin-top: 14px;
  }

  .dgs-game__legend {
    min-width: 0;
    min-height: 70px;
    grid-template-columns: 1fr;
    padding: 9px;
  }

  .dgs-game__legend-items,
  .dgs-game__legend p {
    display: none;
  }

  .dgs-game__action-buttons {
    flex-wrap: wrap;
    gap: 6px;
  }

  .dgs-game__keyboard-help {
    display: none;
  }

  .dgs-game__mobile-help {
    display: block;
  }
}

@media (max-width: 480px) {
  .dgs-game__brand-lockup {
    font-size: 30px;
  }

  .dgs-game__hud {
    inset: 7px 7px auto;
  }

  .dgs-game__hud-panel {
    padding: 5px 7px;
  }

  .dgs-game__hud-panel strong {
    font-size: 14px;
  }

  .dgs-game__overlay {
    padding: 38px 7px 7px;
  }

  .dgs-game__overlay-panel {
    padding: 8px 10px 9px;
  }

  .dgs-game__name {
    font-size: clamp(25px, 9vw, 38px);
  }

  .dgs-game__subtitle {
    margin-top: 3px;
    font-size: clamp(15px, 6vw, 25px);
  }

  .dgs-game__primary-button {
    min-width: min(210px, 95%);
    min-height: 44px;
    margin-top: 7px;
    padding: 6px 12px;
    font-size: 17px;
  }

  .dgs-game__secondary-button {
    min-height: 42px;
    padding: 6px 10px;
    font-size: 14px;
  }

  .dgs-game__overlay-actions {
    gap: 6px;
    margin-top: 7px;
  }

  .dgs-game__best-score {
    margin-top: 5px;
    font-size: 9px;
  }

  .dgs-game__control-deck {
    gap: 7px;
  }

  .dgs-game__control {
    width: 54px;
    border-width: 3px;
    box-shadow: 3px 3px 0 var(--dgs-game-ink);
  }

  .dgs-game__control-buttons {
    gap: 6px;
  }

  .dgs-game__control-label {
    font-size: 10px;
  }

  .dgs-game__legend {
    min-height: 62px;
    padding: 5px;
  }

  .dgs-game__action-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 7px;
  }

  .dgs-game__action-button span {
    display: none;
  }

  .dgs-game__privacy-note {
    margin-top: 14px;
    font-size: 12px;
  }
}

@media (max-height: 520px) and (min-width: 600px) {
  .dgs-game-page,
  .dgs-game-page-template .dgs-game-template-main {
    padding-top: 8px;
  }

  .dgs-game__brand-header {
    display: none;
  }

  .dgs-game__shell {
    width: min(100%, calc((100dvh - 150px) * 16 / 9));
  }

  .dgs-game__overlay {
    padding: 5px;
  }

  .dgs-game__overlay-panel {
    width: min(390px, 88%);
    padding: 9px 12px;
    border-width: 3px;
    box-shadow: 5px 5px 0 rgba(31, 40, 33, 0.3);
  }

  .dgs-game__name {
    font-size: clamp(30px, 6vw, 44px);
  }

  .dgs-game__subtitle {
    margin-top: 3px;
    font-size: clamp(18px, 3.6vw, 28px);
  }

  .dgs-game__copy,
  .dgs-game__best-score,
  .dgs-game__legend-items,
  .dgs-game__legend p {
    display: none;
  }

  .dgs-game__primary-button {
    min-width: min(230px, 90%);
    min-height: 44px;
    margin-top: 8px;
    padding: 7px 16px;
    border-width: 3px;
    box-shadow: 4px 4px 0 var(--dgs-game-ink);
    font-size: 19px;
  }

  .dgs-game__control-deck {
    grid-template-columns: auto minmax(88px, 1fr) auto;
    gap: 8px;
    margin-top: 8px;
  }

  .dgs-game__control {
    width: 48px;
    border-width: 3px;
    box-shadow: 3px 3px 0 var(--dgs-game-ink);
  }

  .dgs-game__control-label {
    font-size: 10px;
  }

  .dgs-game__legend {
    min-width: 0;
    min-height: 56px;
    grid-template-columns: 1fr;
    padding: 5px;
  }

  .dgs-game__action-buttons {
    gap: 5px;
  }

  .dgs-game__action-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 7px;
  }

  .dgs-game__action-button span {
    display: none;
  }

  .dgs-game__privacy-note,
  .dgs-game__keyboard-help {
    display: none;
  }

  .dgs-game__shell.is-fullscreen .dgs-game__fullscreen-toolbar {
    top: max(56px, calc(env(safe-area-inset-top) + 48px));
  }

  .dgs-game__shell.is-fullscreen .dgs-game__gesture-hint span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dgs-game *,
  .dgs-game *::before,
  .dgs-game *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
