/* Cabinet page only. Emulator frames and cabinet hotspot geometry are untouched. */
/* The oversized cabinet must start from the left edge in both reading directions. */
body[data-page="/arcade.html"] .hero { direction: ltr; }
html[dir="rtl"] body[data-page="/arcade.html"] .hero > .eyebrow,
html[dir="rtl"] body[data-page="/arcade.html"] #machineStage,
html[dir="rtl"] body[data-page="/arcade.html"] .machine-actions { direction: rtl; }
body[data-page="/arcade.html"] #coinStatus {
  display: flex;
  align-items: center;
  gap: 8px;
}
body[data-page="/arcade.html"] #coinStatus > .dual-copy { min-width: 0; gap: 2px; }
body[data-page="/arcade.html"] #coinStatus .coin-dot { flex: 0 0 7px; width: 7px; height: 7px; }
body[data-page="/arcade.html"] #coinSecondary {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #aeb8cf;
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
}
body[data-page="/arcade.html"] #coinSecondary[hidden] { display: none; }

@media (max-width: 900px) {
  body[data-page="/arcade.html"] .topbar {
    width: calc(100% - 24px);
    min-height: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    padding: max(10px, env(safe-area-inset-top)) 0 8px;
  }
  body[data-page="/arcade.html"] .topbar > * { min-width: 0; margin: 0; }
  body[data-page="/arcade.html"] .topbar-brand { grid-column: 1; grid-row: 1; padding: 0; justify-content: center; }
  body[data-page="/arcade.html"] .topbar-brand .dual-copy { display: none; }
  body[data-page="/arcade.html"] .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
  body[data-page="/arcade.html"] .topbar > a.mini-button { grid-column: 2; grid-row: 1; }
  body[data-page="/arcade.html"] #openIntroButton { grid-column: 3; grid-row: 1; }
  body[data-page="/arcade.html"] .topbar .mini-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 7px 8px;
    border-radius: 11px;
    color: var(--text);
    text-decoration: none;
    text-align: center;
    font: 600 12px/1.25 system-ui, sans-serif;
    overflow-wrap: anywhere;
  }
  body[data-page="/arcade.html"] .topbar .mini-button .primary-copy { font: inherit; letter-spacing: 0; }
  body[data-page="/arcade.html"] .topbar-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(78px, .85fr) minmax(108px, 1.25fr) minmax(82px, 1fr);
    gap: 8px;
    align-items: stretch;
  }
  body[data-page="/arcade.html"] .topbar-actions > * { min-width: 0; }
  body[data-page="/arcade.html"] #coinStatus { min-height: 44px; padding: 5px 7px; border-radius: 11px; }
  body[data-page="/arcade.html"] #coinPrimary { font-size: 11px; line-height: 1.3; letter-spacing: .035em; white-space: nowrap; }
  body[data-page="/arcade.html"] #coinSecondary { font-size: 9px; line-height: 1.3; overflow-wrap: anywhere; }
  body[data-page="/arcade.html"] #languageButton.language-menu { width: 100%; min-width: 0; max-width: none; min-height: 44px; }
  body[data-page="/arcade.html"] #languageButton summary {
    box-sizing: border-box;
    height: 100%;
    min-height: 44px;
    padding: 7px 8px;
    gap: 7px;
    border-radius: 11px;
    font: 500 12px/1.3 system-ui, sans-serif;
  }
  body[data-page="/arcade.html"] #languageButton summary > span { min-width: 0; }
  body[data-page="/arcade.html"] #languageButton summary > img { width: 21px; height: 16px; }
  body[data-page="/arcade.html"] #languageButton nav { max-width: calc(100vw - 32px); max-height: min(390px, 65dvh); }
  body[data-page="/arcade.html"] #languageButton nav a { min-height: 44px; padding-block: 10px; }
  body[data-page="/arcade.html"] .primary-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    gap: 6px;
    overflow: visible;
  }
  body[data-page="/arcade.html"] .primary-nav a {
    min-width: 0;
    min-height: 44px;
    padding: 7px 10px;
    border-radius: 11px;
    text-align: center;
  }
  body[data-page="/arcade.html"] .primary-nav strong {
    font: 600 12px/1.3 system-ui, sans-serif;
    white-space: normal;
    overflow-wrap: anywhere;
    letter-spacing: 0;
  }
  body[data-page="/arcade.html"] .hero > .eyebrow {
    padding-inline: 16px;
    margin: 8px 0 6px;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: .1em;
  }
  body[data-page="/arcade.html"] .hero h1 { padding-inline: 18px; font-size: clamp(22px, 6.1vw, 34px); line-height: 1.08; }
  body[data-page="/arcade.html"] .machine-actions {
    width: calc(100% - 24px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
  }
  body[data-page="/arcade.html"] .arcade-button {
    min-width: 0;
    min-height: 48px;
    padding: 10px 8px;
    border-radius: 12px;
    gap: 6px;
  }
  body[data-page="/arcade.html"] .arcade-button .button-icon { font-size: 17px; flex: none; }
  body[data-page="/arcade.html"] .arcade-button .dual-copy { min-width: 0; }
  body[data-page="/arcade.html"] .arcade-button .primary-copy { font: 600 11px/1.35 system-ui, sans-serif; letter-spacing: 0; overflow-wrap: anywhere; }
  body[data-page="/arcade.html"] .home-content { padding: 20px; }
}

@media (max-width: 600px) {
  body[data-page="/arcade.html"] #screenHome { padding: 3%; }
  body[data-page="/arcade.html"] #screenHome .screen-title { font-size: clamp(11px, 3.5vw, 16px); line-height: 1.15; letter-spacing: .04em; }
  body[data-page="/arcade.html"] #screenSubtitle { margin: 3px 0 4px; font-size: clamp(6px, 1.6vw, 8px); line-height: 1.25; }
  body[data-page="/arcade.html"] #screenCoinButton,
  body[data-page="/arcade.html"] #screenMenuButton { display: flex; align-items: center; justify-content: center; gap: 5px; width: 86%; min-height: 22px; padding: 4px 5px; margin-block-end: 4px; }
  body[data-page="/arcade.html"] #screenHome button .primary-copy { font-size: clamp(7px, 2.15vw, 10px); line-height: 1.25; letter-spacing: 0; }
  body[data-page="/arcade.html"] #screenCoinButton .coin-icon { margin: 0; font-size: 12px; }
  body[data-page="/arcade.html"] #screenSelected { padding: 3px 5px; margin-top: 1px; width: 86%; font-size: 7px; line-height: 1.2; letter-spacing: .02em; }
  body[data-page="/arcade.html"] #gameMenu { padding: 8px; }
  body[data-page="/arcade.html"] #gameMenu .game-menu-panel { width: 100%; height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
  body[data-page="/arcade.html"] #gameMenu .game-menu-header { flex: none; min-height: 64px; gap: 10px; padding: 12px; }
  body[data-page="/arcade.html"] #gameMenu .game-menu-header > div { min-width: 0; }
  body[data-page="/arcade.html"] #gameMenu .game-menu-header .eyebrow { font-size: 9px; letter-spacing: .06em; }
  body[data-page="/arcade.html"] #gameMenu .game-menu-header h2 { font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
  body[data-page="/arcade.html"] #gameMenu .close-button { width: 44px; height: 44px; }
  body[data-page="/arcade.html"] #gameMenu .menu-toolbar { position: relative; flex: none; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 12px; }
  body[data-page="/arcade.html"] #gameMenu .search-field { grid-column: 1 / -1; min-width: 0; }
  body[data-page="/arcade.html"] #gameMenu .search-field input { min-height: 44px; padding-inline: 36px 12px; font-size: 16px; }
  body[data-page="/arcade.html"] #gameMenu .search-field > span { left: auto; inset-inline-start: 12px; }
  body[data-page="/arcade.html"] #gameMenu .category-control { position: static; min-width: 0; }
  body[data-page="/arcade.html"] #gameMenu .category-toggle { min-height: 44px; padding: 8px 10px; font-size: 12px; letter-spacing: 0; }
  body[data-page="/arcade.html"] #gameMenu .catalog-count { grid-column: 2; min-width: 0; min-height: 44px; padding: 6px 9px; font-size: 10px; letter-spacing: 0; white-space: normal; }
  body[data-page="/arcade.html"] #gameMenu .category-popover { left: 12px; right: 12px; top: calc(100% - 2px); width: auto; max-height: min(300px, 48dvh); overflow-y: auto; }
  body[data-page="/arcade.html"] #gameMenu .category-option { min-height: 44px; font-size: 11px; line-height: 1.3; letter-spacing: 0; }
  body[data-page="/arcade.html"] #gameMenu .game-logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
  body[data-page="/arcade.html"] #gameMenu .game-logo-card { min-height: 154px; padding: 10px; }
  body[data-page="/arcade.html"] #gameMenu .game-logo-name { font-size: 12px; }
  body[data-page="/arcade.html"] #gameMenu .game-profile-link { min-height: 40px; font-size: 10px; line-height: 1.3; letter-spacing: 0; }
  body[data-page="/arcade.html"] #gameMenu .menu-pagination { flex: none; min-height: 54px; padding: 8px 12px max(8px, env(safe-area-inset-bottom)); }
  body[data-page="/arcade.html"] #gameMenu .page-button-wide { min-height: 44px; }
}

@media (orientation: landscape) and (max-height: 520px) and (pointer: coarse) {
  body[data-page="/arcade.html"] #gameMenu { padding: 8px; }
  body[data-page="/arcade.html"] #gameMenu .game-menu-panel { height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  body[data-page="/arcade.html"] #gameMenu .game-menu-header { flex: none; min-height: 50px; padding: 8px 12px; }
  body[data-page="/arcade.html"] #gameMenu .menu-toolbar { position: relative; flex: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; padding: 8px 12px; }
  body[data-page="/arcade.html"] #gameMenu .search-field { grid-column: 1; }
  body[data-page="/arcade.html"] #gameMenu .category-control { position: static; }
  body[data-page="/arcade.html"] #gameMenu .category-popover { left: 12px; right: 12px; top: calc(100% - 2px); width: auto; max-height: min(200px, 55dvh); overflow-y: auto; }
  body[data-page="/arcade.html"] #gameMenu .catalog-count { grid-column: 3; min-width: 0; }
  body[data-page="/arcade.html"] #gameMenu .game-logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-page="/arcade.html"] #gameMenu .menu-pagination { flex: none; min-height: 48px; padding-block: 4px; }
}
