.home-arcade-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(9px, 1.5vw, 17px);
}

.home-arcade-entry {
  --card-ink: #392167;
  --card-tint: #f7efff;
  --card-edge: #ded0ed;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  padding: 5px;
  isolation: isolate;
  border: 1px solid var(--card-edge);
  border-radius: 22px;
  color: var(--card-ink);
  background: linear-gradient(#fffefa 48%, var(--card-tint));
  box-shadow: 0 3px 0 var(--card-edge), 0 8px 19px #44345111;
  transition: transform .18s ease-out, box-shadow .18s ease-out;
}

.home-arcade-entry[data-scene='102'] { --card-ink: #164f59; --card-tint: #e7faf6; --card-edge: #bddfdc; }
.home-arcade-entry[data-scene='104'] { --card-ink: #22583c; --card-tint: #edf9e2; --card-edge: #c8e3b8; }
.home-arcade-entry[data-scene='107'] { --card-ink: #75421f; --card-tint: #fff4da; --card-edge: #ecd39e; }

.home-arcade-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 8px 7px 5px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.home-arcade-card::before { position: absolute; z-index: 1; inset: 0; border-radius: inherit; content: ''; }
.home-arcade-entry:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.home-arcade-card:focus-visible { outline: none; }
.home-arcade-card strong { min-width: 0; font-size: clamp(.9rem, 1.7vw, 1.12rem); line-height: 1.33; letter-spacing: -.05em; word-break: keep-all; overflow-wrap: anywhere; }
.home-arcade-play {
  width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--card-edge); color: var(--card-ink); background: #fffdfb;
  box-shadow: 0 2px 0 var(--card-edge);
}
.home-arcade-play::after { content: ''; width: 8px; height: 10px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); transform: translateX(1px); }

.game-preview {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  height: var(--preview-height, 138px);
  border-radius: 17px;
  background: radial-gradient(ellipse at 22% 15%, #f6cff8, transparent 66%), linear-gradient(141deg, #c797ee, #8a66c8);
  box-shadow: inset 0 0 0 1px #fff5;
  pointer-events: none;
}

.game-preview[data-preview-category='스포츠'] { background: radial-gradient(ellipse at 52% 13%, #bcffd7, transparent 71%), linear-gradient(155deg, #5ad8bc, #2793a6); }
.game-preview[data-preview-category='동물'] { background: radial-gradient(ellipse at 43% 11%, #d5ffd8, transparent 62%), linear-gradient(148deg, #a3e9bb, #5bbabe); }
.game-preview[data-preview-category='슈팅'] { background: radial-gradient(ellipse at 55% 15%, #eca5fa, transparent 70%), linear-gradient(139deg, #b169de, #714fd1); }
.game-preview[data-preview-category='보드게임'] { background: radial-gradient(ellipse at 43% 11%, #fff4b4, transparent 67%), linear-gradient(136deg, #ffd889, #f7af61); }
.game-preview::before {
  position: absolute; inset: 0; z-index: -1; content: '';
  background: radial-gradient(circle, #fff9 0 1px, transparent 1.5px) 0 0 / 15px 15px;
  mask-image: linear-gradient(125deg, #000, transparent 70%);
}

.game-preview-stage {
  position: absolute;
  inset: 6px 8px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  transition: transform .2s ease-out;
}

.game-preview-stage .game-board {
  width: min(100%, 174px);
  min-width: 0;
  padding: 5px;
  margin: 0;
  border-radius: 10px;
  font-size: .69rem;
}
.game-preview-stage .game-board:is(.board-animal-friends, .board-animal-bridge, .board-mini-gomoku, .board-treasure-expedition, .board-moon-town, .board-firefly-meadow, .board-delivery-map) {
  width: min(100%, calc(var(--preview-height, 138px) - 15px));
}
.game-preview-stage .game-board .board-tiles {
  grid-template-columns: repeat(var(--board-columns), minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}
.game-preview-stage .game-board .board-tile {
  min-height: 17px;
  padding: 0;
  border-radius: 4px;
  font-size: inherit;
  overflow: hidden;
}
.game-preview-stage :is(.board-pre, .board-tile > i, .game-board .spatial-coordinate),
.game-preview:not([data-preview-path]) .board-path { display: none; }
.game-preview-stage .board-clue-text { width: 100%; max-height: 54px; margin: 0; overflow: hidden; }
.game-preview-stage .game-board .board-tile.is-disabled { opacity: 1; }

.game-preview-stage .game-board.board-soccer .board-tiles { padding: 3px; border-width: 2px; }
.game-preview-stage .game-board.board-soccer .board-tile { min-height: 24px; }
.game-preview-stage .soccer-spot { font-size: .55rem; line-height: 1.15; word-break: keep-all; }
.game-preview-stage .game-board.board-bubble-arcade .board-tile { border: 0; padding: 1px; }
.game-preview-stage .bubble-cell { width: min(100%, 28px); font-size: .43rem; border-width: 1px; }
.game-preview-stage .game-board.board-bubble-arcade .board-tile.is-selected .bubble-cell { animation: none; }
.game-preview-stage .game-board.board-mini-gomoku .board-tiles { gap: 0; }
.game-preview-stage .game-board.board-mini-gomoku .board-tile { min-height: 0; }
.game-preview-stage .gomoku-piece.is-empty { width: 3px; }
.game-preview-stage .board-animal-friends .animal-face { font-size: .83rem; transform: none; }
.game-preview-stage .board-animal-friends .animal-square strong { display: none; }
.game-preview-stage .board-animal-friends .animal-peek { transform: scale(.58); }
.game-preview-stage .board-animal-bridge .bridge-stone { box-shadow: 0 1px 0 #6cae9b91; }
.game-preview-stage .board-animal-bridge :is(.is-start, .is-end) .bridge-stone,
.game-preview-stage .board-treasure-expedition .treasure-marker { font-size: .68rem; }
.game-preview-stage .board-treasure-expedition .treasure-marker { border-radius: 3px; }
.game-preview-stage .game-board:is(.board-basketball, .board-ring-toss) .board-tile { min-height: 19px; }
.game-preview-stage .arcade-power-option { column-gap: 2px; row-gap: 0; }
.game-preview-stage .arcade-power-option > strong { font-size: .6rem; }
.game-preview-stage .arcade-power-bars { gap: 1px; }
.game-preview-stage .arcade-power-bars span { width: 2px; height: 2px; }
.game-preview-stage .basketball-ball { width: 9px; height: 9px; }
.game-preview-stage .fairground-ring { width: 9px; height: 6px; border-width: 1px; }
.game-preview-stage .skill-meter { width: min(100%, 174px); padding: 5px 6px; margin: 0; border-radius: 7px; }
.game-preview-stage .skill-meter-track { height: 13px; gap: 2px; border-radius: 5px; }
.game-preview-stage .skill-meter-marker { top: -3px; bottom: -3px; width: 4px; }

.game-preview[data-game-preview='102'] .game-preview-stage {
  grid-template-columns: minmax(28px, .58fr) minmax(0, 1fr);
  align-items: center;
  width: min(calc(100% - 16px), 205px);
  margin-inline: auto;
}
.game-preview[data-game-preview='102'] .skill-meter { grid-column: 1 / -1; width: 100%; }
.game-preview-stage .game-board.board-basketball .board-tile { min-height: 17px; }
.game-preview-hoop { position: relative; width: min(100%, 66px); height: 53px; filter: drop-shadow(0 2px 2px #10465348); }
.game-preview-hoop::before, .game-preview-hoop::after, .game-preview-hoop i { position: absolute; display: block; content: ''; }
.game-preview-hoop::before {
  inset: 3px 4% auto;
  height: 49%;
  border: 2px solid #306a78;
  border-radius: 6px;
  background: linear-gradient(145deg, #fff, #d9fdf1);
}
.game-preview-hoop::after { inset: 14px 31% auto; height: 13px; border: 1px solid #c54d39; border-radius: 2px; }
.game-preview-hoop i:first-child {
  inset: 25px 24% 7px;
  clip-path: polygon(0 0, 100% 0, 73% 100%, 27% 100%);
  background: repeating-linear-gradient(-47deg, transparent 0 4px, #f7fff1 4px 5px), repeating-linear-gradient(47deg, transparent 0 4px, #f7fff1 4px 5px);
}
.game-preview-hoop i:last-child { z-index: 1; inset: 23px 18% auto; height: 8px; border: 2px solid #de5337; border-radius: 50%; box-shadow: 0 1px 0 #8a5146; }

@media (hover: hover) {
  .home-arcade-entry:hover { transform: translateY(-4px); box-shadow: 0 5px 0 var(--card-edge), 0 14px 22px #44345124; }
  .home-arcade-entry:hover .game-preview-stage { transform: scale(1.045); }
}
.home-arcade-entry:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--card-edge), 0 4px 12px #44345112; }

@media (max-width: 680px) {
  .home-arcade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); --preview-height: 120px; }
}
@media (max-width: 390px) {
  .home-arcade-grid { --preview-height: 109px; }
  .home-arcade-entry { padding: 4px; border-radius: 17px; }
  .game-preview { border-radius: 13px; }
  .home-arcade-card { gap: 5px; padding-inline: 4px; }
  .home-arcade-play { width: 24px; height: 24px; }
  .home-arcade-play::after { width: 7px; height: 9px; }
  .game-preview-stage .bubble-cell { width: min(100%, 25px); }
}
@media (prefers-reduced-motion: reduce) {
  .home-arcade-entry, .game-preview-stage { transition: none; }
  .home-arcade-entry:is(:hover, :active), .home-arcade-entry:hover .game-preview-stage { transform: none; }
}
