/* Hover controls and progressive touch disclosure; native Details stays independent. */
.games-card[data-shelf-card] { align-self: start; min-width: 0; }
.games-card[data-shelf-card] .game-shelf-thumbnail { position: relative; isolation: isolate; min-width: 0; }
.games-card[data-shelf-card] .games-card-art { position: relative; isolation: isolate; }
.games-card[data-shelf-card] .game-shelf-quick-actions {
  display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center;
  gap: 10px; padding: 12px 16px; background: #f5f8fd;
}
.games-card[data-shelf-card] .game-shelf-quick-actions a {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  flex: 1 1 140px; min-height: 48px; max-width: 240px; padding: 12px 18px; border: 2px solid transparent;
  border-radius: 12px; font: 800 17px/1.3 Arial,sans-serif; text-decoration: none;
  text-align: center; box-shadow: 0 3px 10px #17294326;
}
.games-card[data-shelf-card] .game-shelf-continue { color: #fff; background: #17693f; }
.games-card[data-shelf-card] .game-shelf-restart { color: #fff; background: #215bbb; }
.games-card[data-shelf-card] .game-shelf-quick-actions a:hover { filter: brightness(1.1); }
.games-card[data-shelf-card] :is(.game-shelf-toggle,.game-shelf-close,.game-shelf-quick-actions)[hidden] { display: none !important; }
.games-card[data-shelf-card] .games-card-copy > h3 { margin: 0 0 14px; }
/* Public samples stay discoverable without opening the artwork controls or Details.
   Member Start/Continue links and the existing hover/tap controls are unchanged. */
.games-card[data-shelf-card] .games-card-copy > .game-shelf-sample {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; box-sizing: border-box; padding: 12px 14px;
  margin: 0 0 16px; border: 2px solid transparent; border-radius: 12px;
  background: #215bbb; color: #fff; font: 800 17px/1.35 Arial,sans-serif;
  text-align: center; text-decoration: none; white-space: normal;
}
.games-card[data-shelf-card] .game-shelf-sample:hover { background: #194992; }
.games-card[data-shelf-card] .game-shelf-sample:focus-visible { outline: 3px solid #b85100; outline-offset: 3px; }
.games-card[data-shelf-card] .game-shelf-details { margin: 0 0 16px; min-width: 0; }
.games-card[data-shelf-card] .game-shelf-details > summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 48px;
  box-sizing: border-box; padding: 13px 16px; border: 1px solid #b6c5e2; border-radius: 12px;
  color: #223b70; background: #f0f5ff; font: 800 17px/1.3 Arial,sans-serif; cursor: pointer; list-style: none;
}
.games-card[data-shelf-card] .game-shelf-details > summary::-webkit-details-marker { display: none; }
.games-card[data-shelf-card] .game-shelf-details > summary::after { content: '+'; font-size: 24px; }
.games-card[data-shelf-card] .game-shelf-details[open] > summary::after { content: '−'; }
.games-card[data-shelf-card] .game-shelf-details > :not(summary) { margin-top: 14px; }
.games-card[data-shelf-card] .game-shelf-details > p { font-size: 16px; line-height: 1.5; }
.games-card[data-shelf-card] .game-shelf-note { color: #46526b; font-size: 14px; line-height: 1.5; }
.games-card[data-shelf-card] :is(.game-shelf-quick-actions a,.game-shelf-toggle,.game-shelf-close,.game-shelf-details > summary):focus-visible { outline: 3px solid #b85100; outline-offset: 3px; }
/* A real hover-capable pointer gets controls over the artwork. Keyboard focus
   reveals the same controls, including when tabbing into the first link. */
@media (hover: hover) and (pointer: fine) {
  .games-card[data-shelf-card] .game-shelf-quick-actions {
    position: absolute; inset: 0; z-index: 4; flex-direction: column; flex-wrap: nowrap;
    align-items: center; gap: 12px; padding: 16px;
    background: rgb(255 255 255 / 72%); opacity: 0; pointer-events: none;
    transition: opacity .18s ease;
  }
  .games-card[data-shelf-card] .game-shelf-quick-actions a { flex: 0 1 auto; width: min(100%,240px); }
  .games-card[data-shelf-card] .game-shelf-thumbnail:is(:hover,:focus-within) .game-shelf-quick-actions { opacity: 1; pointer-events: auto; }
}
/* Without JavaScript, touch devices retain directly usable action links. */
@media (hover: none), (pointer: coarse), (any-pointer: coarse) {
  .games-card[data-shelf-card] .game-shelf-quick-actions {
    position: static; inset: auto; flex-direction: row; flex-wrap: wrap;
    align-items: stretch; gap: 10px; padding: 12px 16px;
    background: #f5f8fd; opacity: 1; pointer-events: auto;
  }
  .games-card[data-shelf-card] .game-shelf-quick-actions a { flex: 1 1 140px; width: auto; }
}
/* With touch disclosure ready, the first tap only reveals options over the art. */
html[data-shelf-touch] .games-card[data-shelf-card] .game-shelf-toggle {
  position: absolute; inset: 0; z-index: 3; display: block; width: 100%; height: 100%;
  min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; cursor: pointer;
}
.game-shelf-tap-hint {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 24px); padding: 9px 14px; border: 1px solid #b6c5e2;
  border-radius: 999px; background: #fffffff0; color: #223b70;
  font: 700 13px/1.4 Arial,sans-serif; white-space: nowrap;
}
html[data-shelf-touch] .games-card[data-shelf-card] .game-shelf-quick-actions {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; flex-wrap: nowrap;
  align-items: center; justify-content: center; gap: 12px; padding: 54px 16px 16px;
  background: rgb(255 255 255 / 82%); opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
html[data-shelf-touch] .games-card[data-shelf-card] .game-shelf-quick-actions a { flex: 0 1 auto; width: min(100%,240px); }
html[data-shelf-touch] .games-card[data-shelf-card] .is-shelf-open .game-shelf-quick-actions { opacity: 1; pointer-events: auto; }
html[data-shelf-touch] .is-shelf-open .game-shelf-tap-hint { visibility: hidden; }
html[data-shelf-touch] .games-card[data-shelf-card] .game-shelf-close {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0; padding: 0;
  border: 1px solid #b6c5e2; border-radius: 999px; background: #fff; color: #223b70;
  box-shadow: 0 2px 8px #17294320; font: 700 28px/1 Arial,sans-serif; cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .games-card[data-shelf-card] .game-shelf-quick-actions { transition: none; }
}
