/* Shared styles for the board-game pages (Squadro, Marco Polo's Map).
   Built on the site's own components (hero, content-card, pill-nav,
   btn-pill) — only what those don't already cover lives here. */

/* ---------- Hero themes ---------- */
/* Squadro's three brand colors, as used in the online game (online-squadro
   board/constants.ts): board grey rgb(50,50,50) (the dominant tone of the rendered board:
   rgb(70,70,70) tiles over rgb(50,50,50) crosses and black gaps), yellow #FFA000, dark red
   #8C0000. A grey field with one yellow and one red glow wandering across
   it on their own, desynced paths — the same idea as About's flame hero,
   but two plain circles instead of the blended blobs (which wash these
   colors out). */
.hero--squadro {
  background: radial-gradient(circle at 50% 50%, #3c3c3c 0%, #323232 70%);
  animation: none;
}

.hero--squadro::before,
.hero--squadro::after {
  inset: auto;
  top: 50%;
  left: 50%;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  mix-blend-mode: normal;
  will-change: transform;
}

.hero--squadro::before {
  background: radial-gradient(circle, rgba(255, 160, 0, 0.95) 0%, rgba(255, 160, 0, 0.55) 35%, rgba(255, 160, 0, 0) 70%);
  animation: squadro-orbit-yellow 19s ease-in-out infinite;
}

.hero--squadro::after {
  background: radial-gradient(circle, rgba(140, 0, 0, 1) 0%, rgba(140, 0, 0, 0.6) 35%, rgba(140, 0, 0, 0) 70%);
  animation: squadro-orbit-red 23s ease-in-out infinite;
}

.hero--squadro h1,
.hero--squadro .subtitle {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

@keyframes squadro-orbit-yellow {
  0%   { transform: translate(-34vw, -12%) scale(1); }
  22%  { transform: translate(-10vw, 22%) scale(1.15); }
  48%  { transform: translate(28vw, -6%) scale(0.92); }
  74%  { transform: translate(8vw, -28%) scale(1.1); }
  100% { transform: translate(-34vw, -12%) scale(1); }
}

@keyframes squadro-orbit-red {
  0%   { transform: translate(32vw, 14%) scale(1.05); }
  27%  { transform: translate(6vw, -24%) scale(0.92); }
  53%  { transform: translate(-30vw, 8%) scale(1.15); }
  78%  { transform: translate(-6vw, 26%) scale(1); }
  100% { transform: translate(32vw, 14%) scale(1.05); }
}

.hero--marco-polo {
  --hero-c1: #1f3c88;
  --hero-c2: #c0392b;
  --hero-blob-a-highlight: rgba(255, 190, 170, 0.5);
  --hero-blob-b-highlight: rgba(130, 170, 240, 0.55);
}

.hero--marco-polo h1,
.hero--marco-polo .subtitle {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* ---------- Shared bits ---------- */
.content-card h3 {
  margin-bottom: var(--space-4);
}

.content-card h3.mt,
.content-card .mt {
  margin-top: var(--space-8);
}

.content-card p + p,
.content-card div > p + p {
  margin-top: var(--space-5);
}

.aside {
  font-size: 0.92em;
  color: var(--color-text-muted);
}

.flag {
  width: 16px;
  height: auto;
  vertical-align: -2px;
  border-radius: 2px;
}

.flag--lg { width: 20px; }
.flag--xl { width: 25px; vertical-align: -4px; }

.logo-inline {
  height: 56px;
  width: auto;
  vertical-align: middle;
  margin: 0 var(--space-3);
}

.c-blue { color: #1d4ed8; font-weight: 700; }
.c-red { color: #dc2626; font-weight: 700; }

/* ---------- Gallery ----------
   Same behaviour and look as the Cuchilleras gallery (see game-gallery.js):
   a strip of small thumbnails above a stage that cross-fades its stacked
   images. A grey overlay marks every thumb as "not the current one" except
   the active pick. */
.game-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
}

.game-gallery-thumb {
  position: relative;
  width: 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-page-bg);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

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

.game-gallery-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(60, 60, 65, 0.45);
  transition: background var(--transition-fast);
}

.game-gallery-thumb:hover::after {
  background: rgba(60, 60, 65, 0.2);
}

.game-gallery-thumb.is-active {
  border-color: var(--color-brand-start);
}

.game-gallery-thumb.is-active::after {
  background: rgba(60, 60, 65, 0);
}

.game-gallery-thumb:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
}

/* A fixed 4/3 stage, so the card doesn't change height as photos of
   different shapes cross-fade; each image keeps its own proportions,
   centred and contained inside it. */
.game-gallery-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  max-width: 640px;
  margin: var(--space-7) auto 0;
}

.game-gallery-stage img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-resting);
}

.game-gallery-stage img.is-visible {
  opacity: 1;
}

.game-gallery-caption {
  min-height: 1.4em;
  margin-top: var(--space-5);
  text-align: center;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .game-gallery-stage img {
    transition: none;
  }
}

/* ---------- Video / media ---------- */
.video-embed {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  margin: var(--space-5) auto 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

audio {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: var(--space-4) 0 var(--space-3);
}

.game-figure {
  margin: var(--space-7) 0;
  text-align: center;
}

.game-figure img {
  max-width: 100%;
  height: auto;
}

.game-figure figcaption {
  margin-top: var(--space-3);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

/* ---------- Squadro rules & tips ----------
   Same structure as squadro.app/about (quick facts, how to play, key
   mechanics, strategy tips), restyled with the site's cards and Squadro's
   colors: board grey, yellow #FFA000 and dark red #8C0000. */
.sq-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
}

.sq-facts li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-7);
  border-radius: var(--radius-pill);
  background: var(--color-page-bg);
  font-size: 1.05em;
}

.sq-fact-icon,
.sq-tip-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.sq-fact-icon--red,
.sq-tip-icon--red { color: #8C0000; }
.sq-fact-icon--yellow,
.sq-tip-icon--yellow { color: #FFA000; }

/* Marco Polo's colours: the red (3 spaces) and blue (2 spaces) piece sides,
   and the teal of its box. */
.sq-fact-icon--blue,
.sq-tip-icon--blue { color: #1d4ed8; }
.sq-fact-icon--mp-red,
.sq-tip-icon--mp-red { color: #dc2626; }

.content-card h4 {
  font-size: 1.15em;
  margin-bottom: var(--space-3);
}

.sq-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.sq-step {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: var(--space-8);
  border-radius: var(--radius-md);
  background: var(--color-page-bg);
}

.sq-step p {
  flex-grow: 1;
  margin-bottom: var(--space-6);
}

.sq-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto var(--space-5);
  border-radius: 50%;
  color: #fff;
}

.sq-step-icon svg {
  width: 26px;
  height: 26px;
}

.sq-step-icon--board { background: #323232; }
.sq-step-icon--red { background: #8C0000; }
.sq-step-icon--yellow { background: #FFA000; }
.sq-step-icon--blue { background: #1d4ed8; }
.sq-step-icon--mp-red { background: #dc2626; }
.sq-step-icon--teal { background: #1f9e98; }

.mp-pieces {
  display: flex;
  justify-content: center;
  gap: var(--space-9);
  margin-top: var(--space-6);
}

.mp-pieces figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  font-size: 0.95em;
}

.mp-piece {
  width: 56px;
  height: 56px;
}

.mp-piece--red { color: #dc2626; }
.mp-piece--blue { color: #1d4ed8; }

.sq-board {
  max-width: 280px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.sq-board img {
  display: block;
  width: 100%;
  height: auto;
}

.sq-mechs {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-9);
}

.sq-mech {
  display: flex;
  flex-direction: column;
  padding-left: var(--space-8);
  border-left: 4px solid #FFA000;
}

.sq-mech--red { border-left-color: #8C0000; }
.sq-mech--blue { border-left-color: #1d4ed8; }
.sq-mech--mp-red { border-left-color: #dc2626; }

.sq-mech-note {
  flex-grow: 1;
  margin: var(--space-4) 0 var(--space-7);
  font-size: 0.92em;
  color: var(--color-text-muted);
}

.sq-before-after {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.sq-before-after .sq-board {
  flex: 1;
  margin: 0;
}

.sq-arrow {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: #FFA000;
}

.sq-mech--red .sq-arrow { color: #8C0000; }

.sq-tips {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.sq-tip {
  display: flex;
  align-items: center;
  gap: var(--space-7);
  padding: var(--space-7);
  border-radius: var(--radius-md);
  background: var(--color-page-bg);
}

.sq-tip-icon {
  width: 32px;
  height: 32px;
}

.sq-tip h4 { margin-bottom: var(--space-1); }
.sq-tip p { font-size: 0.95em; }

.sq-ways { margin-top: var(--space-7); }

@media screen and (min-width: 769px) {
  .sq-steps,
  .sq-tips { grid-template-columns: repeat(3, 1fr); }
  .sq-mechs { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- For sale ----------
   One card split in two halves like Online playing: Squadro (left) and
   Squadro Mini (right), each with its in-stock Amazon stores as pills, and
   a shared Gigamic footer with the store finder. */
.content-card.sq-sale {
  display: grid;
  grid-template-columns: 1fr;
  padding: 0;
  overflow: hidden;
}

.sq-sale-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-9);
  text-align: center;
}

.sq-sale-col + .sq-sale-col {
  border-top: 1px solid var(--color-border-neutral);
}

.sq-sale-name {
  margin: 0;
  font-size: 1.6em;
}

.sq-sale-col p { margin: 0; color: var(--color-text-muted); }

.sq-sale-col .sq-sale-label {
  margin-top: var(--space-5);
  color: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
}

.sq-sale-col .sq-hub-links {
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0;
}

.sq-sale-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-5) var(--space-6);
  padding: var(--space-8) var(--space-9);
  border-top: 1px solid var(--color-border-neutral);
  text-align: center;
}

.sq-sale-foot p { margin: 0; }

.sq-sale-pub-logo {
  display: block;
  width: 40px;
  height: 40px;
}

.sq-sale-stores {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.sq-sale-stores svg {
  width: 13px;
  height: 13px;
}

/* ---------- Online playing ----------
   One card split in two halves, each half a whole-tile link: BoardGameArena
   (left, human opponents) and squadro.app (right, perfect AI). */
.content-card.sq-play {
  display: grid;
  grid-template-columns: 1fr;
  padding: 0;
  overflow: hidden;
}

.sq-play-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-9);
  color: inherit;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.sq-play-tile + .sq-play-tile {
  border-top: 1px solid var(--color-border-neutral);
}

.sq-play-tile:hover,
.sq-play-tile:focus-visible {
  background: var(--color-page-bg);
}

.sq-play-tile:focus-visible {
  outline: none;
  box-shadow: inset var(--shadow-focus-ring);
}

.sq-play-logo {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-6);
  object-fit: contain;
}

.sq-play-tile p {
  flex-grow: 1;
  color: var(--color-text-muted);
}

.sq-play-go {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-7);
  font-weight: 700;
  color: #8C0000;
}

.sq-play-tile--bga .sq-play-go { color: var(--color-brand-end); }

.sq-play-go svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.sq-play-tile:hover .sq-play-go svg { transform: translateX(4px); }

@media screen and (min-width: 769px) {
  .content-card.sq-play { grid-template-columns: 1fr 1fr; }
  .content-card.sq-sale { grid-template-columns: 1fr 1fr; }
  .content-card.sq-sale--single { grid-template-columns: 1fr; }
  .sq-sale-foot { grid-column: 1 / -1; }
  .sq-play-tile + .sq-play-tile,
  .sq-sale-col + .sq-sale-col {
    border-top: 0;
    border-left: 1px solid var(--color-border-neutral);
  }
}

/* ---------- Formulas ---------- */
.formula {
  text-align: center;
  font-family: 'Cambria Math', 'STIX Two Math', Georgia, serif;
  font-size: 1.2em;
  margin: var(--space-5) 0;
  overflow-wrap: anywhere;
}

/* ---------- References ---------- */
.ref-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ref-list > li { line-height: 1.5; }

.ref-list .starred {
  font-size: 1.05em;
}

.ref-name {
  font-weight: 700;
}

/* Squadro's references, in the About page's Press / Video idiom: colored
   .tag pills (language, outlet, length) followed by the title as the link,
   and media collapsed behind a "Watch" / "Listen" toggle (.video-entry). */
.sq-hubs {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.sq-hub {
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  border-radius: var(--radius-md);
  background: var(--color-page-bg);
}

.sq-hub-logo {
  align-self: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* Each tile washed in a pale tint of its logo's main colour. */
.sq-hub--gigamic { background: #F3F8E9; }
.sq-hub--bgg { background: #F0EFF6; }
.sq-hub--bodoge { background: #FBEEEF; }
.sq-hub--hanayama { background: #F2F2F3; }

.sq-hub p {
  flex-grow: 1;
  color: var(--color-text-muted);
  font-size: 0.95em;
}

.sq-hub-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.sq-hub-link {
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.sq-hub-link svg {
  width: 11px;
  height: 11px;
}

.sq-hub-link:hover,
.sq-hub-link:focus-visible {
  background: rgba(5, 150, 105, 0.22);
  border-color: rgba(5, 150, 105, 0.45);
}

/* No bullets: the pills already start each row, and in WebKit an <li>'s
   marker lands inside a <summary>'s first flex item, inflating that pill. */
.content-card ul.sq-refs {
  list-style: none;
  padding-left: 0;
}

.sq-refs > li {
  line-height: 1.9;
}

.sq-refs > li + li .video-entry {
  border-top: 1px solid var(--color-border-neutral);
}

.sq-refs .video-entry {
  padding: var(--space-3) 0;
}

.sq-refs--cols > li {
  break-inside: avoid;
}

/* Videos & podcasts: one column each on desktop, stacked on phones. */
.sq-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8) var(--space-10);
}

.sq-media > div { min-width: 0; }

.sq-media-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.sq-media-title svg {
  width: 20px;
  height: 20px;
  color: var(--color-brand-start);
}

@media screen and (min-width: 769px) {
  .sq-hubs { grid-template-columns: repeat(3, 1fr); }
  .sq-hubs--2 { grid-template-columns: repeat(2, 1fr); }
  .sq-refs--cols { column-count: 2; column-gap: var(--space-10); }
  .sq-media { grid-template-columns: repeat(2, 1fr); }
}

.quote-carousel {
  text-align: center;
  min-height: 7em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
}

.quote-text {
  font-size: 1.25em;
  font-style: italic;
}

.quote-author {
  color: var(--color-text-muted);
  font-weight: 600;
}

.stars {
  display: inline-block;
  font-style: normal;
  letter-spacing: 0.1em;
  background: linear-gradient(90deg, #f59e0b calc(var(--rating) / 5 * 100%), #d1d5db 0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Sale ---------- */
.shop-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.shop-link { margin-right: var(--space-3); }



