/*
 * TCG大会結果アーカイブ: image-first, 和風.
 * Site palette: Morphos "Morphous Camellia" (ツバキ) from morphos-ja, used by the home,
 * privacy and 404 pages: 生成り paper, 墨 ink, 椿の紅 and 常磐 green. A game page loads its own
 * fixed Morphos theme (/themes/<game>.css) after this file, which overrides the same tokens.
 * The game --primary is used only for marks and rules, never for text, because some themes
 * have a light primary.
 */
:root {
  color-scheme: light dark;
  --background: oklch(0.962 0.014 84.6);
  --foreground: oklch(0.218 0 89.9);
  --card: oklch(0.910 0.032 10.7);
  --card-foreground: oklch(0.218 0 89.9);
  --primary: oklch(0.486 0.187 23.3);
  --primary-foreground: oklch(0.962 0.014 84.6);
  --muted: oklch(0.924 0.024 20.7);
  --muted-foreground: oklch(0.308 0.034 154.1);
  --border: oklch(0.783 0.039 84.6);
  --ring: oklch(0.414 0.093 156.7);
  /* Headings: one font per game (scripts/lib/game-fonts.mjs, set in /themes/<game>.css), in a
     single weight. Body: one gothic shared by every page. */
  --font-heading: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-heading-weight: 700;
  --font-gothic: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  /* Vertical rhythm: one line of body text is 1.75rem; spacing uses its halves and wholes. */
  --line: 1.75rem;
  --half: calc(var(--line) / 2);
  --rule: color-mix(in oklch, var(--foreground) 22%, transparent);
  --rule-strong: color-mix(in oklch, var(--foreground) 70%, transparent);
  --soft-ink: color-mix(in oklch, var(--foreground) 72%, var(--background));
  --feed-gap: 1rem;
  /* Large enough to recognise a deck. */
  --tile-width: 280px;
  --page-width: min(1400px, calc(100% - 3rem));
  font-family: var(--font-gothic);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.218 0 89.9);
    --foreground: oklch(0.962 0.014 84.6);
    --card: oklch(0.278 0.024 154.4);
    --card-foreground: oklch(0.962 0.014 84.6);
    --primary: oklch(0.598 0.181 21.9);
    --primary-foreground: oklch(0.218 0 89.9);
    --muted: oklch(0.363 0.050 135.6);
    --muted-foreground: oklch(0.782 0.055 112.3);
    --border: oklch(1 0 0 / 12%);
    --ring: oklch(0.598 0.181 21.9);
  }
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  /* 和紙: two sparse fibre dot layers and faint laid lines, CSS only. */
  background: var(--background, oklch(0.962 0.014 84.6));
  background-image:
    radial-gradient(circle at 30% 40%, color-mix(in oklch, var(--foreground) 6%, transparent) 0 0.55px, transparent 0.9px),
    radial-gradient(circle at 70% 20%, color-mix(in oklch, var(--foreground) 4%, transparent) 0 0.5px, transparent 0.9px),
    repeating-linear-gradient(0deg, color-mix(in oklch, var(--foreground) 1.8%, transparent) 0 1px, transparent 1px 6px);
  background-size: 7px 9px, 11px 13px, auto;
  color: var(--foreground);
  font-family: var(--font-gothic);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

a {
  color: inherit;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

img[data-result-image][hidden] {
  display: none !important;
}

[data-image-fallback][hidden] {
  display: none !important;
}

/* ---- Header: one thin bar. The vermilion square is a 落款 (seal) mark. ---- */
.site-bar,
body > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  width: var(--page-width);
  margin: 0 auto;
  padding: var(--half) 0;
  border-bottom: 1px solid var(--rule-strong);
}

.site-bar h1 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
}

.site-bar h1::before {
  content: "";
  flex: none;
  width: 0.7em;
  height: 0.7em;
  border-radius: 1px;
  background: var(--primary);
}

.site-home,
body > header > a {
  color: var(--soft-ink);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

body > header > a {
  color: var(--foreground);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: var(--font-heading-weight);
}

.site-home:hover {
  text-decoration: underline;
}

/* Games under a small maker label per group (owner, 2026-10-18). Wraps on wide screens and
   scrolls sideways on phones. */
.game-nav {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 0 1.6rem;
  min-width: 0;
}

/* A group may shrink and its games wrap, so no width between the phone layout and the full
   desktop line overflows the page (Codex review of 4815235). */
.game-nav-group {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.6rem;
  min-width: 0;
}

.game-nav-maker {
  color: var(--soft-ink);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.game-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-nav li + li {
  border-left: 1px solid var(--rule);
}

.game-nav a {
  display: block;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  white-space: nowrap;
  text-decoration: none;
}

.game-nav li:first-child a {
  padding-left: 0.2rem;
}

.game-nav a:hover {
  text-decoration: underline;
}

/* ---- The deck feed ---- */
.home-main,
.game-main {
  width: var(--page-width);
  margin: 0 auto;
  padding: var(--half) 0 calc(var(--line) * 2);
}

/* The space under the rows is kept for the pause button, so showing it never moves the page. */
.deck-feed {
  position: relative;
  padding-bottom: 2.6rem;
}

/* One row on every screen size. It scrolls by hand without JS; archive.js turns it into a
   marquee. */
.feed-row {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.feed-row::-webkit-scrollbar {
  display: none;
}

.feed-track {
  display: flex;
  width: max-content;
}

.feed-strip {
  display: flex;
  gap: var(--feed-gap);
  margin: 0;
  padding: 0 var(--feed-gap) 0 0;
  list-style: none;
}

.feed-tile {
  position: relative;
  flex: none;
  width: var(--tile-width);
  min-width: 0;
  border-top: 1px solid var(--rule-strong);
  padding-top: 0.4rem;
}

.feed-link {
  display: block;
  text-decoration: none;
}

.feed-image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: color-mix(in oklch, var(--foreground) 6%, var(--background));
}

.feed-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feed-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.6rem;
  margin-top: 0.35rem;
  color: var(--soft-ink);
  font-size: 0.78rem;
  line-height: 1.6;
}

.feed-game {
  color: var(--foreground);
  font-weight: 700;
}

.feed-deck {
  display: block;
  overflow: hidden;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: var(--font-heading-weight);
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-source {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--soft-ink);
  font-size: 0.74rem;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}

/* Sits over the image box, so a failed image never changes the tile height. */
.feed-fallback {
  position: absolute;
  top: 0.4rem;
  right: 0;
  left: 0;
  display: grid;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 0.75rem;
  place-content: center;
  font-size: 0.78rem;
  text-align: center;
}

.feed-toggle {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0.4rem;
  min-width: 5.5rem;
  min-height: 36px;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.feed-toggle[hidden] {
  display: none;
}

/* The track holds the list and its copy; each list ends with one gap, so -50% is one loop. */
@keyframes feed-flow {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

[data-feed-clone] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .feed-row.is-moving {
    overflow: hidden;
    /* Fade the left and right edges like mist, so tiles enter and leave softly. */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 2rem, #000 calc(100% - 2rem), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 2rem, #000 calc(100% - 2rem), transparent 100%);
  }

  .feed-row.is-moving .feed-track {
    animation: feed-flow var(--feed-duration, 120s) linear infinite;
    will-change: transform;
  }

  .feed-row.is-moving [data-feed-clone] {
    display: flex;
  }

  /* The user is swiping, dragging or wheeling: native scrolling, no automatic flow. The copy
     stays, so archive.js can wrap the scroll position by one loop. */
  .feed-row.is-moving.is-manual {
    overflow-x: auto;
  }

  .feed-row.is-moving.is-manual .feed-track {
    animation: none;
  }

  .feed-row.is-moving {
    cursor: grab;
  }

  .deck-feed:hover .feed-track,
  .deck-feed:focus-within .feed-track {
    animation-play-state: paused;
  }
}

/* No motion: the rows wrap into a static grid. */
@media (prefers-reduced-motion: reduce) {
  .feed-row {
    overflow: visible;
  }

  .feed-track {
    width: auto;
    animation: none !important;
  }

  .feed-track {
    display: block;
  }

  .feed-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(var(--tile-width), 42%), 1fr));
    padding: 0;
  }

  .feed-tile {
    width: auto;
  }
}

/* ---- Below the feed ---- */
.archive-lower {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: var(--line) calc(var(--line) * 1.5);
  margin-top: calc(var(--line) * 1.5);
}

.archive-lower h2,
.game-latest h2,
.home-search h2 {
  margin: 0 0 var(--half);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule-strong);
  font-size: 1.05rem;
}

.archive-month-index ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-month-index li + li {
  border-top: 1px solid var(--rule);
}

.archive-month-index a {
  display: flex;
  justify-content: space-between;
  min-height: 44px;
  padding: 0.5rem 0;
  align-items: center;
  text-decoration: none;
}

.archive-month-index strong {
  color: var(--soft-ink);
  font-family: var(--font-gothic);
  font-size: 0.82rem;
  font-weight: 400;
}

.archive-month-index li[aria-current="page"] a::before {
  content: "";
  width: 3px;
  align-self: stretch;
  margin-right: 0.5rem;
  background: var(--primary);
}

.archive-month-index li[aria-current="page"] span {
  margin-right: auto;
}

.archive-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: var(--half);
}

.archive-list-heading h2 {
  margin: 0;
  border: 0;
}

#search-status {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.82rem;
}

.archive-empty {
  color: var(--soft-ink);
}

/* ---- Forms ---- */
input,
select,
button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.45rem 0.7rem;
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 0.88rem;
}

button {
  background: var(--foreground);
  color: var(--background);
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.archive-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 8.5rem 10rem 6rem;
  gap: 0.5rem;
  margin: 0 0 var(--half);
}

form[role="search"]:not(.archive-search) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 0.75rem;
  margin: 0 0 var(--half);
}

form[role="search"] label {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
  color: var(--soft-ink);
  font-size: 0.8rem;
}

form[role="search"] button {
  align-self: end;
}

/* ---- すべての結果: an image grid with no visible text (game page) ----
   Desktop 3-4 columns; 2 columns from 481px; one full-width column on phones, where two
   columns would make each deck only ~165px wide, too small to read the cards. */
.archive-result-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--feed-gap);
}

.archive-result-row {
  position: relative;
  min-width: 0;
  border-top: 0;
  padding-top: 0;
}

.archive-result-row[hidden] {
  display: none;
}

.archive-tile-link {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: color-mix(in oklch, var(--foreground) 6%, var(--background));
}

.archive-tile-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* One small, muted caption line under the image: date and @handle (the X post). */
.archive-tile-caption {
  display: flex;
  gap: 0.6em;
  margin: 0.3rem 0 0;
  overflow: hidden;
  color: var(--soft-ink);
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: nowrap;
}

.archive-tile-caption time {
  flex: none;
}

.archive-tile-source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sits over the image box, so a failed image never changes the tile size. */
.archive-tile-fallback {
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 4 / 3;
  display: grid;
  margin: 0;
  padding: 0.75rem;
  place-content: center;
  font-size: 0.8rem;
  text-align: center;
}

/* ---- Home: game list and search ---- */
.game-latest,
.home-search {
  margin-top: calc(var(--line) * 1.5);
}

.game-latest-group + .game-latest-group {
  margin-top: var(--line);
}

/* A small maker heading over each group: the gothic meta size, not a second big title. */
.game-latest .game-latest-maker {
  margin: 0 0 var(--half);
  color: var(--soft-ink);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.game-latest ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: var(--half) 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-latest a {
  display: grid;
  gap: 0.1rem;
  text-decoration: none;
}

.game-latest-image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: color-mix(in oklch, var(--foreground) 6%, var(--background));
}

.game-latest img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-latest-name {
  margin-top: 0.3rem;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
}

.game-latest-meta {
  color: var(--soft-ink);
  font-size: 0.78rem;
}

.search-result-grid,
.archive-subpage > section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--line) 1rem;
}

/* ---- Post cards (month pages, search results) and the result page ---- */
article {
  min-width: 0;
  border-top: 1px solid var(--rule-strong);
  padding-top: 0.4rem;
}

article p {
  margin: 0.35rem 0 0;
  overflow-wrap: anywhere;
}

.post-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 2px;
}

.post-images[data-image-count="3"],
.post-images[data-image-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-image-frame > a {
  display: block;
}

article .result-image-frame img,
.archive-subpage > article img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: color-mix(in oklch, var(--foreground) 6%, var(--background));
  object-fit: contain;
}

.post-game {
  color: var(--soft-ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.post-card .post-title {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.post-text {
  font-size: 0.88rem;
}

.post-source,
article p:last-child {
  color: var(--soft-ink);
  font-size: 0.8rem;
}

.post-more summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  width: fit-content;
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
}

.post-more p {
  white-space: pre-line;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.result-tags li {
  padding: 0 0.4rem;
  border: 1px solid var(--rule-strong);
  border-radius: 1px;
  font-size: 0.74rem;
  line-height: 1.6;
}

.archive-subpage {
  display: grid;
  gap: var(--line);
  width: var(--page-width);
  margin: 0 auto;
  padding: var(--half) 0 calc(var(--line) * 2);
}

.archive-subpage > article {
  max-width: 880px;
}

.archive-breadcrumb {
  color: var(--soft-ink);
  font-size: 0.8rem;
}

/* ---- Text pages (privacy, 404) ---- */
.prose-page {
  width: min(760px, calc(100% - 3rem));
  margin: 0 auto;
  padding: var(--line) 0 calc(var(--line) * 2);
}

.prose-page h1 {
  margin: 0 0 var(--half);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.prose-page h2 {
  margin: var(--line) 0 0;
  font-size: 1.1rem;
}

.prose-page p,
.prose-page ul {
  margin: var(--half) 0 0;
}

/* ---- Footer ---- */
footer,
.game-archive-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  width: var(--page-width);
  margin: 0 auto;
  padding: var(--half) 0 calc(var(--line) * 2);
  border-top: 1px solid var(--rule-strong);
  color: var(--soft-ink);
  font-size: 0.82rem;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 900px) {
  .archive-lower {
    grid-template-columns: 1fr;
  }

  .archive-month-index ol {
    display: flex;
    overflow-x: auto;
  }

  .archive-month-index li {
    flex: none;
  }

  .archive-month-index li + li {
    border-top: 0;
    border-left: 1px solid var(--rule);
  }

  .archive-month-index a {
    gap: 0.6rem;
    padding: 0.5rem 0.9rem;
  }

  .archive-month-index li:first-child a {
    padding-left: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --page-width: calc(100% - 2rem);
    --feed-gap: 0.6rem;
    --tile-width: 196px;
  }

  .feed-deck {
    font-size: 0.86rem;
  }

  /* Phones: one line that scrolls sideways inside the nav, never the page. */
  .game-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .game-nav-group,
  .game-nav ul {
    flex: none;
    flex-wrap: nowrap;
  }

  .archive-search {
    grid-template-columns: 1fr 1fr;
  }

  .archive-search input,
  .archive-search button {
    grid-column: 1 / -1;
  }

  .archive-result-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .site-bar h1 {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .archive-result-list {
    grid-template-columns: 1fr;
  }
}

/* ---- Game heading mark: the first product image, or a one-character seal (落款) ---- */
.site-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.site-title h1::before {
  display: none;
}

.game-mark {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: color-mix(in oklch, var(--foreground) 4%, var(--background));
}

.game-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-seal {
  display: grid;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  place-content: center;
  border-radius: 2px;
  background: var(--primary);
  /* A worn stamp edge, drawn with the page colour: no image, no gradient. */
  box-shadow: inset 0 0 0 2px var(--primary), inset 0 0 0 3px color-mix(in oklch, var(--primary-foreground) 55%, var(--primary));
  color: var(--primary-foreground);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--font-heading-weight);
  line-height: 1;
}

/* ---- Product block (PR): below the deck row on phones, a narrow column beside it on PC ---- */
.product-block {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  margin-top: -0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
  color: var(--soft-ink);
  font-size: 0.74rem;
}

.product-head {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin: 0;
}

.product-pr {
  padding: 0 0.3em;
  border: 1px solid var(--rule-strong);
  border-radius: 1px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.product-source {
  font-size: 0.68rem;
  white-space: nowrap;
}

.product-list {
  display: flex;
  flex: 1 1 auto;
  gap: 0.4rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.product-list::-webkit-scrollbar {
  display: none;
}

.product-item {
  flex: none;
  width: 56px;
}

.product-link {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: color-mix(in oklch, var(--foreground) 4%, var(--background));
}

.product-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-link:hover,
.product-link:focus-visible {
  border-color: var(--rule-strong);
}

.product-stores {
  flex: none;
  margin: 0;
}

.product-store-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--soft-ink);
  white-space: nowrap;
}

.product-block.is-empty .product-stores {
  margin-left: auto;
}

.product-tag {
  display: block;
  margin-top: 0.15rem;
  overflow: hidden;
  color: var(--soft-ink);
  font-size: 0.6rem;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rakuten-credit a {
  font-size: 0.72rem;
}

/*
 * Yahoo! JAPAN's credit keeps its official look (browser-default link colour and size; its rules
 * forbid restyling it). The wrapper undoes the footer's colour and size, and the link goes back
 * to the browser's own style, so none of the global a / footer a rules apply to it.
 */
.yahoo-credit {
  color: CanvasText;
  font-size: 1rem;
}

.yahoo-credit a,
.yahoo-credit a:hover,
.yahoo-credit a:focus-visible {
  all: revert;
}

@media (min-width: 1024px) {
  .game-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: 1.5rem;
    align-items: start;
  }

  .game-hero.is-solo {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-block {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    margin-top: 0;
    padding: 0.4rem 0 0 1rem;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }

  .product-head {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .product-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .product-item {
    width: auto;
  }

  .product-block.is-empty .product-stores {
    margin-left: 0;
  }
}
