/* arcade.css — slop arcade cabinet grid, high scores and controls help.
   Loads after slop.css. Only arcade-specific changes. */
.cabinets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 14px 12px;
  margin: 22px auto 26px;
  max-width: 960px;
}
.cabinets a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 160px;              /* hard cap to prevent horizontal scroll */
  padding: 10px;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
  background: #1d2b12;
  color: #b8ff7a;
  border: 3px solid var(--ink);
  border-radius: 12px 18px 8px 16px;
  box-shadow: 4px 4px 0 var(--accent);
  transition: translate .12s, box-shadow .12s, background .12s;
  position: relative;
}
.cabinets a svg {
  display: block; margin: 0 auto 4px;
  width: 44px; height: 44px;
  fill: none; stroke: var(--ink);
}
.cabinets a span { white-space: normal; }
.cabinets a .cabinet-hs {
  font-size: 11px; font-weight: 700;
  opacity: .75; letter-spacing: .2px;
}
.cabinets a .cabinet-cat {
  font-size: 10px; font-weight: 700;
  opacity: .6; text-transform: uppercase; letter-spacing: .5px;
}
.cabinets a:hover {
  translate: 0 -3px; background: #213016;
}
.cabinets a[aria-current="true"] {
  background: var(--mustard); color: var(--ink);
  box-shadow: 2px 2px 0 var(--accent); translate: 2px 2px;
}
.cabinets a.visited {
  border-style: dashed;
  background: #1a2b0f;
}
.cabinets a.visited::after {
  content: '✓';
  position: absolute;
  top: 6px; right: 8px;
  font-size: 14px; color: var(--accent);
}
@media (max-width: 700px) {
  .cabinets { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px 8px; }
  .cabinets a { min-height: 130px; font-size: 13px; }
  .cabinets a svg { width: 36px; height: 36px; }
}
@media (max-width: 380px) {
  .cabinets { grid-template-columns: repeat(2, 1fr); }
}

/* Cabinet search bar */
#cabinet-search-bar {
  margin: 14px auto 18px;
  max-width: 960px;
}
#cabinet-search-bar .cabinet-search {
  margin: 8px 0;
  text-align: center;
}
#cabinet-search-bar label {
  font-weight: 600;
  margin-right: 8px;
  color: var(--ink);
  opacity: 0.8;
}
#cabinet-search-bar input[type="search"] {
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.9em;
  min-width: 180px;
  max-width: 280px;
}
#cabinet-search-bar input[type="search"]::placeholder {
  color: var(--ink);
  opacity: 0.5;
}
#cabinet-search-bar input[type="search"]:focus {
  outline: none;
  border-color: var(--mustard);
  box-shadow: 0 0 0 2px var(--paper);
}

/* Category filters */
.cabinet-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px auto;
  max-width: 960px;
}
.cabinet-filters button {
  font-weight: 700;
  font-size: 13px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: translate .12s, background .12s;
  position: relative;
}
.cabinet-filters button:hover { translate: 0 -2px; background: var(--paper); }
.cabinet-filters button.active { background: var(--mustard); box-shadow: 2px 2px 0 var(--shadow); }
.cabinet-filters button[data-category] { --cat-color: var(--ink); border-color: var(--cat-color); }
.cabinet-filters button[data-category] small { font-size: 0.85em; opacity: 0.7; margin-left: 4px; }

/* Tap targets - minimum 44px for WCAG AA compliance */
.cabinets a,
.cabinet-filters button,
.cabinet-hs {
  min-height: 44px;
  min-width: 44px;
}
.cabinets a .cabinet-icon {
  width: 44px;
  height: 44px;
  margin: 0 0 4px;
  display: block;
  stroke: var(--ink);
  fill: none;
}

/* featured game banner */
.featured-game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--mustard);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px auto;
  max-width: 960px;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: translate .12s, box-shadow .12s;
}
.featured-game:hover { translate: 0 -2px; }
.featured-emoji { font-size: 2em; }
.featured-text { text-align: left; }
.featured-text b { font-weight: 800; color: var(--ink); display: block; }
.featured-text span { color: var(--ink); font-weight: 700; }
.featured-text small { font-size: .85em; opacity: .7; }
.featured-game a { font-weight: 800; color: var(--accent); text-decoration: none; }

/* category filter buttons */
.cabinet-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px auto;
  max-width: 960px;
}
.cabinet-filters button {
  font-weight: 700;
  font-size: 14px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: translate .12s, background .12s;
}
.cabinet-filters button:hover { translate: 0 -2px; background: var(--paper); }
.cabinet-filters button.active { background: var(--mustard); box-shadow: 2px 2px 0 var(--shadow); }
.cabinet-filters button[data-category] { --cat-color: var(--ink); border-color: var(--cat-color); }
.cabinet-filters button[data-category] small { font-size: 0.85em; opacity: 0.7; }

/* cabinet meta cards that sit under the grid */
.cabinet-meta {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; margin: 18px auto; max-width: 960px;
}
.cabinet-meta .meta {
  background: var(--card); border: 3px solid var(--ink); border-radius: 12px 18px 10px 16px;
  box-shadow: 5px 6px 0 var(--shadow); padding: 10px 12px;
}
.cabinet-meta .meta h3 { margin: 0 0 4px; font-size: 16px; }
.cabinet-meta .meta .hs { font-weight: 800; color: var(--slime-dark); }
.cabinet-meta .meta .ctrls { font-size: 13px; opacity: .85; margin-top: 4px; }

/* controls help panel per game – small overlay below the game card */
.game-help {
  display: none;             /* shown only on hover/focus of the heading */
  background: var(--card); border: 3px solid var(--ink); border-radius: 10px;
  padding: 8px 12px; margin-top: 8px;
}
.card:hover .game-help,
.card:focus-within .game-help { display: block; }

.cabinet-ctrl-help {
  background: var(--card); border: 3px dashed var(--ink); border-radius: 12px;
  padding: 14px 16px; margin: 18px auto; max-width: 960px;
}
.cabinet-ctrl-help h3 { margin: 0 0 8px; font-size: 20px; }
.cabinet-ctrl-help ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.cabinet-ctrl-help li { font-size: 14px; }
.cabinet-ctrl-help kbd { font-family: ui-monospace, monospace; font-size: 12px; }

/* arcade high score summary */
.arcade-hs-summary .hs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid var(--ink);
}
.arcade-hs-summary .hs-row:last-child { border-bottom: none; }
.arcade-hs-summary .hs-row span { font-size: 14px; }
