/* Agent Arcade: menu cards and the shared shell of the per-game pages. Page chrome comes from arena.css.
   Each game is a small pixel cabinet: a notched cream case with an ink outline, a pale green LCD screen
   (the same LCD as the in-game scores) with scanlines, a sprite window and one chunky cream PLAY key. */
.arcade-head { max-width: 62ch; }
.arcade-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.arcade-card {
  --notch: polygon(0 6px, 2px 6px, 2px 2px, 6px 2px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 2px) calc(100% - 6px), calc(100% - 2px) calc(100% - 2px), calc(100% - 6px) calc(100% - 2px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 6px), 0 calc(100% - 6px));
  --notch-s: polygon(0 3px, 3px 3px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px));
  position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 12px 12px 14px;
  background: none; border: 0; color: #14130F;
  filter: drop-shadow(4px 4px 0 rgba(20, 19, 15, .28));
}
.arcade-card::before, .arcade-card::after { content: ''; position: absolute; z-index: -1; clip-path: var(--notch); }
.arcade-card::before { inset: 0; background: #14130F; }
.arcade-card::after { inset: 2px; background: #E9E4D8; }
/* Screen: pale LCD with scanlines; the sprite sits in a light window so its black outline stays readable. */
.arcade-card__top {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  background: #A7B190 repeating-linear-gradient(to bottom, rgba(28, 38, 20, .07) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 0 2px #14130F, inset 3px 3px 0 2px rgba(28, 38, 20, .22);
  clip-path: var(--notch-s);
}
.arcade-card img {
  box-sizing: content-box; width: 80px; height: 80px; flex: none; padding: 6px; background-color: #E9E5DC;
  background-image: radial-gradient(rgba(20, 19, 15, .16) 1px, transparent 1.2px); background-size: 6px 6px;
  clip-path: var(--notch-s);
}
.arcade-card:is(:hover, :focus-within) img { animation: bob .7s steps(1) infinite; }
.arcade-card__top > div { min-width: 0; }
.arcade-card__name {
  margin: 0; font-family: 'Array', ui-monospace, monospace; font-size: 22px; font-weight: 400; line-height: 1.15; letter-spacing: .05em; text-transform: uppercase;
  color: #1C2614; overflow-wrap: break-word;
}
.arcade-card__genre { margin: 6px 0 0; font-family: var(--mono); font-size: 12px; line-height: 1.35; letter-spacing: .06em; text-transform: uppercase; color: #2F3A22; }
.arcade-card__genre::after { content: '_' / ''; margin-left: 2px; color: #1C2614; }
.arcade-card__goal { flex: 1; margin: 0; padding: 0 2px; font-size: 16px; line-height: 1.45; color: #14130F; }

/* PLAY key: chunky, bottom lip, pixel notch. Pressed = the key sinks. */
.arcade-card .btn.arcade-play {
  --notch-k: polygon(0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px));
  align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; min-width: 0; padding: 0 20px 5px;
  background: #FBF8F0; color: #14130F; border: 0; border-radius: 0; text-decoration: none; cursor: pointer; clip-path: var(--notch-k);
  box-shadow: inset 0 0 0 2px #14130F, inset 0 -8px 0 #C9C1AB;
  font: 400 19px/1 'Array', ui-monospace, monospace; letter-spacing: .16em; text-transform: none; -webkit-tap-highlight-color: transparent;
}
.arcade-card .arcade-play__label { text-transform: uppercase; margin-right: -.16em; }
.arcade-card .arcade-play::before {
  content: ''; flex: none; width: 12px; height: 14px; background: #14130F;
  clip-path: polygon(0 0, 25% 0, 25% 14%, 50% 14%, 50% 28%, 75% 28%, 75% 43%, 100% 43%, 100% 57%, 75% 57%, 75% 72%, 50% 72%, 50% 86%, 25% 86%, 25% 100%, 0 100%);
}
@media (hover: hover) {
  .arcade-card .btn.arcade-play:hover { background: #FFFFFF; box-shadow: inset 0 0 0 2px #14130F, inset 0 -8px 0 #A99F86; }
  .arcade-card .btn.arcade-play:hover::before { transform: translateX(3px); }
}
.arcade-card .btn.arcade-play:active { background: #FBF8F0; transform: none; padding: 5px 20px 0; box-shadow: inset 0 0 0 2px #14130F, inset 0 -3px 0 #C9C1AB; }
/* The notch would clip an outside outline, so focus draws a dark frame inside the key. */
.arcade-card .btn.arcade-play:focus-visible { outline: 2px dotted #14130F; outline-offset: -9px; background: #FFFFFF; }

.game-shell { min-width: 0; }
@media (max-width: 860px) { .arcade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Two and three narrow columns: smaller sprite and name so OPENKLAW never splits mid-word. */
@media (min-width: 561px) and (max-width: 1100px) {
  .arcade-card__top { gap: 10px; }
  .arcade-card img { width: 64px; height: 64px; }
  .arcade-card__name { font-size: 18px; letter-spacing: .03em; }
}
@media (max-width: 560px) { .arcade-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
@media (forced-colors: active) {
  .arcade-card::before { background: Canvas; border: 2px solid CanvasText; clip-path: none; }
  .arcade-card::after { display: none; }
  .arcade-card, .arcade-card__top, .arcade-card__goal, .arcade-card__name, .arcade-card__genre { color: CanvasText; text-shadow: none; }
  .arcade-card__top { background: Canvas; box-shadow: none; border: 2px solid CanvasText; clip-path: none; }
  .arcade-card .btn.arcade-play { background: ButtonFace; color: ButtonText; border: 2px solid ButtonText; clip-path: none; }
  .arcade-card .arcade-play::before { background: ButtonText; }
}
