/* The Arcade page (arcade.html): every game as a tile. Launcher games on one shelf, browser games on another.
   Built on styles.css's tokens and nav. */

.arcade-page { background: var(--bg); }
.arcade-wrap { max-width: 1180px; margin: 0 auto; padding: 120px 24px 96px; }
.arcade-head { margin-bottom: 48px; }
.arcade-kicker { color: var(--ember-2); margin-bottom: 14px; }
.arcade-page .arcade-display { max-width: 14ch; }
.arcade-sub { margin-top: 16px; color: var(--ink-2); font-size: 17px; max-width: 52ch; }

.shelf-title { color: var(--ink-3); margin: 44px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.shelf-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 44px 0 16px; padding-bottom: 10px; }
.shelf-row .shelf-title { margin: 0; padding: 0; border: 0; }
.get-launcher { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--ember-2); color: var(--ember-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: background .2s, color .2s; }
.get-launcher:hover { background: var(--ember-2); color: #111; }
.get-launcher .mono { font-size: 10px; opacity: .75; }
.install-note { margin: -4px 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 12px 16px; color: var(--ink-2); font-size: 15px; }
.install-note summary { cursor: pointer; color: var(--ink); }
.install-note summary b { color: var(--ember-2); }
.install-note ol { margin: 14px 0 6px 20px; display: grid; gap: 12px; }
.install-why { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.smartscreen { margin-top: 10px; max-width: 420px; background: #0b62b5; color: #fff; padding: 16px 18px 14px; border-radius: 4px; font: 13px/1.45 "Segoe UI", system-ui, sans-serif; position: relative; }
.ss-title { font-size: 20px; margin-bottom: 8px; }
.ss-link { text-decoration: underline; margin: 6px 0; outline: 2px solid #ffd35c; outline-offset: 2px; display: inline-block; }
.ss-app { opacity: .9; margin: 6px 0 12px; }
.ss-btn { display: inline-block; border: 1px solid #fff; padding: 4px 18px; outline: 2px solid #ffd35c; outline-offset: 2px; }
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.ac-tile {
  --accent: var(--ink);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
  color: var(--ink); text-decoration: none;
  transition: transform .4s var(--ease), border-color .3s;
}
.ac-tile:hover { transform: translateY(-4px); border-color: var(--line-2); }
.ac-tile:focus-within, .ac-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.ac-art {
  position: relative; height: 180px; overflow: hidden;
  background: var(--img, none) center / cover, var(--bg-3);
  display: grid; place-items: center;
  transition: transform .6s var(--ease);
}
.ac-tile:hover .ac-art { transform: scale(1.03); }
.ac-art span { font-family: var(--arcade); font-size: 64px; color: var(--accent); text-shadow: 0 0 28px color-mix(in srgb, var(--accent) 45%, transparent); }
.ac-art-pw { background: radial-gradient(60% 80% at 50% 110%, rgba(255, 91, 210, .3), transparent 70%), #2a1b2e; }
.ac-art-sk { background: radial-gradient(70% 80% at 50% 120%, rgba(63, 212, 255, .22), transparent 70%), #13202a; }
.ac-art-rh { background: radial-gradient(70% 80% at 50% 120%, rgba(255, 194, 61, .22), transparent 70%), #2a2116; }
.ac-art-ls { background: radial-gradient(70% 80% at 50% 120%, rgba(155, 227, 107, .22), transparent 70%), #1f1a36; }

.ac-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ac-meta { color: var(--ink-3); }
.ac-title { font-family: var(--arcade); font-weight: 400; font-size: 24px; color: var(--accent); }
.ac-body > p:not(.ac-meta):not(.ac-note) { color: var(--ink-2); font-size: 15px; }
.ac-go {
  margin-top: auto; align-self: flex-start;
  font: 13px var(--arcade); letter-spacing: .02em;
  padding: 10px 16px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--accent); color: #111;
}
.ac-tile:hover .ac-go, .ac-go:hover { filter: brightness(1.12); }
.ac-note { font-size: 13px; color: var(--ink-2); border-left: 2px solid var(--accent); padding-left: 10px; }
.ac-note a { color: var(--accent); }

.ac-crown { --accent: var(--ember-2); }
.ac-crown .ac-title { font-family: var(--serif); font-size: 30px; }
.ac-pw { --accent: var(--pw); }
.ac-sk { --accent: var(--sk); }
.ac-rh { --accent: var(--rh); }
.ac-ls { --accent: #9be36b; }  /* Little Spells: spell-leaf green */

.ac-chess, .ac-checkers { --accent: #b9a4ff; }  /* Coven Chess / Checkers: their board's lavender */
.ac-poker { --accent: #ffd36b; }      /* Coven Poker: the Raise button's gold */
.ac-solitaire { --accent: #f2c14e; }  /* Coven Solitaire: the moon on its card back */
.ac-witchdust { --accent: #e8c27a; }  /* Witchdust: sand */
.ac-gloamwalk { --accent: #f2a65a; }  /* Coven Gloamwalk: Hollowfield's dusk sky */
.ac-wyrdhand { --accent: #e0a24e; }   /* Wyrdhand: Tallow Hill's lamplight */
.ac-cinderwake { --accent: #e8743b; } /* Cinderwake: ember on snow */

/* Featured: Ashen Crown spans the shelf. Screenshot behind, the crown logo over it, a strip of shots in the body. */
.ac-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border-color: rgba(255, 178, 107, .22);
  box-shadow: 0 30px 80px -40px var(--ember-glow); }
.ac-hero .ac-art { height: auto; min-height: 380px; }
.ac-art-crown::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 70% at 50% 55%, rgba(12, 10, 11, .55), transparent 75%), linear-gradient(90deg, transparent 70%, rgba(21, 17, 18, .65)); }
.crown-mark { position: relative; z-index: 1; width: min(62%, 300px); height: auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .55)); }
.ac-hero .ac-body { padding: 28px 30px 30px; gap: 12px; }
.ac-hero .ac-title { font-size: 42px; line-height: 1; }
.ac-hero .ac-body > p:not(.ac-meta) { font-size: 16px; }
.crown-shots { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 6px; padding: 0; }
.crown-shots img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.ac-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.ac-actions .ac-go { margin-top: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.ac-actions .ac-go .mono { font-size: 10px; opacity: .7; }
.ac-hero + .install-note { margin: 12px 0 0; }
.ac-go-ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.shelf-sub { color: var(--ink-3); font-size: 11px; font-weight: 400; margin: 22px 0 12px; opacity: .8; }
.shelf-title + .shelf-sub { margin-top: 0; }
.shelf-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Hexword. Every browser-game tile shows its own game, tilted like a board: art/tile-<game>.webp (PC) and
   art/tile-<game>-sm.webp (phone rows), made from real screenshots. */
.ac-hx { --accent: #7fd88a; }
/* Not live yet (data-soon): greyed and unclickable. Remove data-soon in arcade.html to turn it on. */
.go-soon { display: none; }
.ac-tile[data-soon] { pointer-events: none; }
.ac-tile[data-soon] .ac-art { filter: saturate(.55) brightness(.8); }
.ac-tile[data-soon] .ac-go { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.ac-tile[data-soon] .go-live { display: none; }
.ac-tile[data-soon] .go-soon { display: inline; }

@media (max-width: 1080px) { .shelf-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-hero { grid-template-columns: 1fr; }
  .ac-hero .ac-art { min-height: 0; aspect-ratio: 16 / 9; }
  .ac-art-crown::after { background: radial-gradient(60% 70% at 50% 55%, rgba(12, 10, 11, .5), transparent 75%), linear-gradient(180deg, transparent 70%, rgba(21, 17, 18, .6)); }
}
/* Phones: the browser games turn into compact rows (art square on the left) so the whole list fits a couple of
   screens; the featured tile stays a full card. */
@media (max-width: 620px) {
  .arcade-wrap { padding: 96px 16px 64px; }
  .arcade-head { margin-bottom: 28px; }
  .shelf, .shelf-4 { grid-template-columns: 1fr; gap: 10px; }
  .ac-hero .ac-body { padding: 18px 18px 20px; }
  .ac-hero .ac-title { font-size: 34px; }
  .crown-mark { width: 52%; }
  .ac-actions .ac-go { flex: 1 1 auto; justify-content: center; }
  .shelf .ac-tile:not(.ac-hero) { flex-direction: row; align-items: stretch; }
  .shelf .ac-tile:not(.ac-hero) .ac-art { width: 104px; height: auto; min-height: 104px; flex: none; }
  .shelf .ac-tile:not(.ac-hero) .ac-art { background-image: var(--img-sm, var(--img)); }
  .shelf .ac-tile:not(.ac-hero) .ac-body { padding: 12px 14px; gap: 4px; }
  .shelf .ac-tile:not(.ac-hero) .ac-title { font-size: 18px; }
  .shelf .ac-tile:not(.ac-hero) .ac-body > p:not(.ac-meta):not(.ac-note) { font-size: 13px; line-height: 1.4; }
  .shelf .ac-tile:not(.ac-hero) .ac-meta { font-size: 10px; }
  .shelf .ac-tile:not(.ac-hero) .ac-go { display: none; }  /* the whole row is the link */
  .ac-tile[data-soon] .ac-meta::after { content: " · Coming soon"; color: var(--accent); }
}

/* "Own a copy" (nexus/matchbox): under each Matchbox tile, a quiet link to buy the game as a self-host copy (the game
   + its server). Secondary to Play: small, no fill. arcade-copies.js adds the price from the gate's /shop/copies.json. */
.ac-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ac-cell > .ac-tile { flex: 1; }
.ac-own {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; margin-left: 6px;
  font: 11px var(--mono); letter-spacing: .04em; color: var(--ink-3); text-decoration: none; border-radius: 6px;
  transition: color .2s;
}
.ac-own::before { content: ""; width: 10px; height: 10px; flex: none; background: currentColor; opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0v6M2 3.5 5 6.5 8 3.5M0.5 9h9' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0v6M2 3.5 5 6.5 8 3.5M0.5 9h9' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat; }
.ac-own:hover, .ac-own:focus-visible { color: var(--accent); }
.ac-own:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ac-own .own-soon { color: var(--ink-3); opacity: .8; }

.own-copy { margin-top: 36px; display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: center;
  padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.own-kicker { color: var(--ember-2); font-size: 11px; margin-bottom: 8px; }
.own-title { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--ink); margin-bottom: 8px; }
.own-text p { color: var(--ink-2); font-size: 15px; max-width: 60ch; }
.own-text a { color: var(--ember-2); }
.own-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 12px; color: var(--ink-2); }
.own-points li { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.own-points b { color: var(--ink); font-weight: 500; }
@media (max-width: 620px) {
  .ac-own { margin-left: 4px; padding: 2px 4px; }
  .own-copy { grid-template-columns: 1fr; padding: 18px; gap: 14px; margin-top: 28px; }
  .own-title { font-size: 20px; }
}
