:root {
  --bg: #f7f0e3;
  --paper: #fffaf0;
  --paper-2: #efe2c8;
  --ink: #24170f;
  --muted: #6d5d4d;
  --brand: #0f6b58;
  --brand-2: #b3472f;
  --gold: #c9972a;
  --green-soft: #d9eadf;
  --rule: #dcc9a9;
  --shadow: 0 24px 70px rgba(58, 35, 15, .16);
  --radius: 24px;
  --chinese-red: #b91c1c;
  --chinese-gold: #c9972a;
  --chinese-green: #2d5a27;
  --chinese-ink: #1a1a1a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(201, 151, 42, .22), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(15, 107, 88, .15), transparent 26rem),
    radial-gradient(circle at 50% 80%, rgba(185, 28, 28, .06), transparent 30rem),
    linear-gradient(135deg, #f7f0e3 0%, #f3e4c8 46%, #fff6e4 100%);
}

/* Chinese traditional pattern overlay — 传统回纹无缝底纹 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .4;
  background-image: url("/assets/cloud-pattern.svg");
  background-size: 200px 200px;
}



a {
  color: var(--brand);
  text-underline-offset: 4px;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(247, 240, 227, .82);
  border-bottom: 1px solid rgba(220, 201, 169, .7);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 1.2rem;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: #fff8e7;
  box-shadow: 0 8px 18px rgba(15, 107, 88, .25);
  font-family: Arial, sans-serif;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-family: Arial, sans-serif;
  font-size: .94rem;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  opacity: .82;
}

.nav-links a:hover { opacity: 1; color: var(--brand); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff8e7;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15, 107, 88, .24);
}

.btn.secondary {
  background: transparent;
  color: var(--brand);
  box-shadow: none;
}

.hero {
  position: relative;
  padding: 52px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
  gap: 36px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(15, 107, 88, .1);
  border: 1px solid rgba(15, 107, 88, .18);
  font-family: Arial, sans-serif;
  font-weight: 800;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

h1, h2, h3 {
  line-height: 1.08;
  letter-spacing: -.035em;
}

h1 {
  margin: 12px 0 12px;
  font-size: clamp(1.9rem, 6vw, 4rem);
  max-width: 680px;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.lead {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 620px;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.hero-card {
  position: relative;
  background: rgba(255, 250, 240, .86);
  border: 1px solid rgba(220, 201, 169, .9);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40px auto auto -40px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(214, 163, 61, .22);
}

.mini-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  position: relative;
}

.mini-tile {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #fffdf5, #f0e4c8);
  border: 1px solid rgba(160, 128, 80, .3);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.9), 0 5px 0 #a08050, 0 10px 16px rgba(70, 38, 12, .14);
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", Arial, sans-serif;
  font-weight: normal;
  font-variation-settings: 'wght' 400;
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.5));
  padding: 4px 2px;
  overflow: hidden;
}

/* Cores por naipe — igual ao jogo */
.mini-tile[data-suit="vento"]     { color: #1f6feb; }
.mini-tile[data-suit="dragão"]    { color: #b91c1c; }
.mini-tile[data-suit="caractere"] { color: #b91c1c; }
.mini-tile[data-suit="bambu"]     { color: #2d5a27; }
.mini-tile[data-suit="círculo"]   { color: #1a1a1a; }

.section {
  padding: 62px 0;
}

.section-intro {
  max-width: 790px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Game gallery styles */
.game-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.game-card {
  display: block;
  background: rgba(255, 250, 240, .9);
  border: 1px solid var(--rule);
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 14px 40px rgba(58, 35, 15, .1);
  transition: transform .22s ease, box-shadow .22s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(58, 35, 15, .18);
}

.game-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--rule);
}

.game-card-body {
  padding: 18px 20px 20px;
}

.game-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.game-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
}

.game-card-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 107, 88, .1);
  color: var(--brand);
  font-family: Arial, sans-serif;
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.card {
  background: rgba(255, 250, 240, .84);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(58, 35, 15, .09);
}

.card p { color: var(--muted); line-height: 1.65; margin: 0; }

.game-shell {
  margin: 28px 0;
  background: rgba(255, 250, 240, .92);
  border: 1px solid var(--rule);
  border-radius: 30px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 18px;
  font-family: Arial, sans-serif;
}

.game-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff7e7;
  color: var(--muted);
  font-weight: 700;
}

.stat strong { color: var(--ink); }

.game-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

button {
  font: 800 .92rem Arial, sans-serif;
}

.board-wrap {
  position: relative;
  min-height: 470px;
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(220, 201, 169, .8);
  background: #efe0c2;
}

#mahjong-board {
  position: relative;
  width: 980px;
  height: 600px;
  margin: 20px auto;
}

/* Traditional Chinese Mahjong tile styling.
   Fundo de marfim tradicional, símbolo colorido por naipe. */
.tile {
  position: absolute;
  width: 72px;
  height: 98px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #fffdf5 0%, #f6eed9 42%, #efe2c7 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.9),
    0 6px 0 #9a7b4a,
    0 12px 18px rgba(69, 40, 15, .24);
  color: var(--ink);
  cursor: pointer;
  transition: transform .14s ease, filter .14s ease, box-shadow .14s ease, opacity .2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 4px;
  overflow: visible;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  border: 1px solid rgba(160, 128, 80, .25);
  pointer-events: none;
}

.tile:hover:not(:disabled) {
  transform: translateY(-5px) scale(1.03);
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,.9),
    0 13px 0 #9a7b4a,
    0 28px 34px rgba(69, 40, 15, .28);
}

.tile.selected {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
  transform: translateY(-6px) scale(1.05);
}

.tile.hint {
  animation: hintPulse 1s ease-in-out 3;
}

.tile.removing {
  animation: tileRemove .35s ease-out forwards;
}

@keyframes tileRemove {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.15); opacity: .8; }
  100% { transform: scale(0.4); opacity: 0; }
}

.tile.shake {
  animation: tileShake .35s ease-in-out;
}

@keyframes tileShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.tile:disabled {
  cursor: default;
  opacity: .35;
  filter: grayscale(.4);
}

.tile-symbol {
  font-size: 4rem;
  line-height: 1;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", Arial, sans-serif;
  font-weight: normal;
  font-variation-settings: 'wght' 400;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.5));
  margin-bottom: 2px;
  margin-top: 4px;
}

.tile-name {
  display: block;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .06);
  font: 800 .55rem Arial, sans-serif;
  color: rgba(0, 0, 0, .55);
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: 68px;
  line-height: 1.15;
  text-align: center;
  margin-top: auto;
  margin-bottom: 2px;
}

/* Cores do símbolo por naipe - tradição do Mahjong chinês */
.tile[data-suit="vento"]     .tile-symbol { color: #1f6feb; }
.tile[data-suit="dragão"]    .tile-symbol { color: var(--chinese-red); }
.tile[data-suit="caractere"] .tile-symbol { color: var(--chinese-red); }
.tile[data-suit="bambu"]     .tile-symbol { color: var(--chinese-green); }
.tile[data-suit="círculo"]   .tile-symbol { color: #1a1a1a; }
.tile[data-suit="flor"]      .tile-symbol { color: #d94f8a; }
.tile[data-suit="estação"]   .tile-symbol { color: #8b5cf6; }

/* Nome em português segue a cor do naipe para consistência */
.tile[data-suit="vento"]     .tile-name { color: #1f6feb; background: rgba(31, 111, 235, .1); }
.tile[data-suit="dragão"]    .tile-name { color: var(--chinese-red); background: rgba(185, 28, 28, .1); }
.tile[data-suit="caractere"] .tile-name { color: var(--chinese-red); background: rgba(185, 28, 28, .1); }
.tile[data-suit="bambu"]     .tile-name { color: var(--chinese-green); background: rgba(45, 90, 39, .12); }
.tile[data-suit="círculo"]   .tile-name { color: #1a1a1a; background: rgba(0, 0, 0, .08); }
.tile[data-suit="flor"]      .tile-name { color: #d94f8a; background: rgba(217, 79, 138, .12); }
.tile[data-suit="estação"]   .tile-name { color: #8b5cf6; background: rgba(139, 92, 246, .12); }

.message {
  min-height: 28px;
  margin-top: 12px;
  font-family: Arial, sans-serif;
  color: var(--muted);
  font-weight: 700;
}

@keyframes hintPulse {
  50% { transform: translateY(-6px) scale(1.05); outline: 3px solid var(--brand-2); }
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, .85fr);
  gap: 28px;
  align-items: start;
}

.article {
  background: rgba(255, 250, 240, .82);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
}

.article p, .article li {
  color: var(--muted);
  line-height: 1.78;
}

.article strong { color: var(--ink); }

.sidebox {
  position: sticky;
  top: 84px;
  background: var(--green-soft);
  border: 1px solid rgba(15, 107, 88, .2);
  border-radius: var(--radius);
  padding: 22px;
}

.sidebox ul {
  margin: 0;
  padding-left: 18px;
}

.ad-slot {
  margin: 28px 0;
  border: 1px dashed rgba(109, 93, 77, .5);
  background: rgba(255, 250, 240, .6);
  border-radius: 18px;
  padding: 18px;
  min-height: 96px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font: 700 .86rem Arial, sans-serif;
}

.faq details {
  background: rgba(255, 250, 240, .84);
  border: 1px solid var(--rule);
  border-radius: 18px;
  margin: 12px 0;
  padding: 16px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 900;
}

.faq p { color: var(--muted); margin: 12px 0 0; }

.footer {
  margin-top: 60px;
  padding: 44px 0;
  background: rgba(36, 23, 15, .94);
  color: #fff6e4;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
}

.footer a { color: #ffe2a2; }
.footer p { color: rgba(255, 246, 228, .76); margin: 8px 0 0; }

/* ========== Game page compact layout ========== */
.game-page .section:first-of-type {
  padding: 24px 0 32px;
}

.game-page .eyebrow {
  display: none;
}

.game-page h1 {
  font-size: 1.5rem;
  margin: 0 0 8px;
  line-height: 1.2;
}

.game-page .lead {
  font-size: .95rem;
  margin: 0 0 16px;
  line-height: 1.5;
  color: var(--muted);
}

.game-page .ad-slot {
  display: none;
}

.game-page .article {
  margin-top: 0;
}
.connect-board {
  position: relative;
  margin: 20px auto;
}

.connect-grid {
  display: grid;
  gap: 6px;
  justify-content: center;
}

/* Connect game: tile override para grid layout */
.connect-tile {
  position: relative !important;
  left: auto !important;
  top: auto !important;
}

.connect-tile:hover {
  transform: translateY(-2px) scale(1.03);
}

.connect-tile.selected {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  transform: translateY(-3px) scale(1.05);
}

.connect-tile.matched {
  opacity: 0;
  transform: scale(.6);
  pointer-events: none;
}

.connect-line {
  position: absolute;
  background: var(--gold);
  border-radius: 2px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity .15s ease;
}

.connect-line.show {
  opacity: 1;
}

/* ========== Memory game styles ========== */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  max-width: 920px;
  margin: 20px auto;
  justify-items: center;
}

.memory-card {
  width: 80px;
  height: 100px;
  perspective: 600px;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
  transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.memory-card-front {
  background: linear-gradient(145deg, #b91c1c 0%, #8b1538 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    0 5px 0 #6b1028,
    0 12px 20px rgba(69, 40, 15, .25);
}

.memory-card-front::before {
  content: "🀫";
  font-size: 2.2rem;
  opacity: .7;
}

.memory-card-back {
  background: linear-gradient(145deg, #fffdf5 0%, #f5ecd8 40%, #efe2c7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 5px 0 #a08050,
    0 12px 20px rgba(69, 40, 15, .22);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
}

.memory-card-back::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 9px;
  border: 1px solid rgba(160, 128, 80, .25);
  pointer-events: none;
}

.memory-card-back .tile-symbol {
  font-size: 3.2rem;
  margin-bottom: 2px;
}

.memory-card-back .tile-name {
  font-size: .55rem;
  max-width: 64px;
  margin-top: 0;
  padding: 1px 6px;
}

/* Cores por naipe na memória também */
.memory-card-back[data-suit="vento"]     .tile-symbol { color: #1f6feb; }
.memory-card-back[data-suit="dragão"]    .tile-symbol { color: var(--chinese-red); }
.memory-card-back[data-suit="caractere"] .tile-symbol { color: var(--chinese-red); }
.memory-card-back[data-suit="bambu"]     .tile-symbol { color: var(--chinese-green); }
.memory-card-back[data-suit="círculo"]   .tile-symbol { color: #1a1a1a; }
.memory-card-back[data-suit="flor"]      .tile-symbol { color: #d94f8a; }
.memory-card-back[data-suit="estação"]   .tile-symbol { color: #8b5cf6; }

.memory-card-back[data-suit="vento"]     .tile-name { color: #1f6feb; background: rgba(31, 111, 235, .1); }
.memory-card-back[data-suit="dragão"]    .tile-name { color: var(--chinese-red); background: rgba(185, 28, 28, .1); }
.memory-card-back[data-suit="caractere"] .tile-name { color: var(--chinese-red); background: rgba(185, 28, 28, .1); }
.memory-card-back[data-suit="bambu"]     .tile-name { color: var(--chinese-green); background: rgba(45, 90, 39, .12); }
.memory-card-back[data-suit="círculo"]   .tile-name { color: #1a1a1a; background: rgba(0, 0, 0, .08); }
.memory-card-back[data-suit="flor"]      .tile-name { color: #d94f8a; background: rgba(217, 79, 138, .12); }
.memory-card-back[data-suit="estação"]   .tile-name { color: #8b5cf6; background: rgba(139, 92, 246, .12); }

.memory-card.matched .memory-card-back {
  background: linear-gradient(145deg, #d9eadf 0%, #b8d4c4 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 5px 0 #7aad8e,
    0 12px 20px rgba(69, 40, 15, .22);
}

/* ========== Timed game: countdown banner ========== */
.countdown-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin: 12px 0 4px;
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(185, 28, 28, .12), rgba(201, 151, 42, .14));
  border: 1px solid rgba(185, 28, 28, .25);
  font-family: Arial, sans-serif;
}

.countdown-banner .cd-label {
  font-weight: 800;
  color: var(--chinese-red);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .82rem;
}

.countdown-banner .cd-time {
  font-size: 2rem;
  font-weight: 900;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.countdown-banner.urgent {
  background: linear-gradient(120deg, rgba(185, 28, 28, .25), rgba(185, 28, 28, .15));
  animation: cdPulse 1s ease-in-out infinite;
}

@keyframes cdPulse {
  50% { box-shadow: 0 0 0 4px rgba(185, 28, 28, .15); }
}

.countdown-banner.over .cd-time { color: var(--muted); }

/* ========== Relaxation mode banner ========== */
.zen-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin: 12px 0 4px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(15, 107, 88, .12), rgba(45, 90, 39, .12));
  border: 1px solid rgba(15, 107, 88, .22);
  font-family: Arial, sans-serif;
  color: var(--muted);
}

.zen-banner strong { color: var(--brand); }

/* ========== Chain game ========== */
.chain-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin: 10px 0;
  border-radius: 14px;
  background: rgba(255, 250, 240, .8);
  border: 1px solid var(--rule);
  font-family: Arial, sans-serif;
  font-weight: 700;
  color: var(--muted);
}

.chain-combo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(201, 151, 42, .18);
  color: #8a6212;
  font-weight: 900;
}

.chain-combo.hot {
  background: rgba(185, 28, 28, .18);
  color: var(--chinese-red);
  animation: cdPulse 1s ease-in-out infinite;
}

/* ========== Pyramid layout board ========== */
#pyramid-board {
  position: relative;
  width: 820px;
  height: 520px;
  margin: 20px auto;
}

/* ========== Tower layout board ========== */
#tower-board {
  position: relative;
  width: 800px;
  height: 520px;
  margin: 20px auto;
}

/* ========== Blitz layout board ========== */
#blitz-board {
  position: relative;
  width: 780px;
  height: 420px;
  margin: 20px auto;
}

/* ========== Slide game styles ========== */
#slide-board {
  padding: 40px 20px;
  text-align: center;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.slide-track {
  position: relative;
  height: 170px;
  margin: 10px auto;
  border-bottom: 3px solid rgba(15, 107, 88, .3);
}

.slide-tile {
  width: 72px;
  height: 98px;
}

.slide-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.slide-btn {
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 800;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #d97706 0%, #b45309 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 0 #92400e, 0 6px 14px rgba(0, 0, 0, .2);
  transition: transform .1s, box-shadow .1s;
  font-family: Arial, sans-serif;
}

.slide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #92400e, 0 8px 18px rgba(0, 0, 0, .25);
}

.slide-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #92400e, 0 3px 8px rgba(0, 0, 0, .2);
}

.slide-hint {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: .9rem;
}

/* ========== Tile legend (galeria de peças) ========== */
.tile-legend {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}

.legend-group {
  background: rgba(255, 250, 240, .82);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 16px 18px;
}

.legend-group h4 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--ink);
  font-family: Arial, sans-serif;
}

.legend-group .legend-hint {
  margin: 0 0 12px;
  font-size: .88rem;
  color: var(--muted);
  font-family: Arial, sans-serif;
}

.legend-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 60px;
  padding: 8px 4px 6px;
  border-radius: 10px;
  background: linear-gradient(145deg, #fffdf5 0%, #f5ecd8 40%, #efe2c7 100%);
  border: 1px solid rgba(160, 128, 80, .35);
  box-shadow: 0 4px 0 #a08050, 0 8px 12px rgba(69, 40, 15, .14);
}

.legend-tile .tile-symbol {
  font-size: 1.6rem;
  line-height: 1;
}

.legend-tile .legend-name {
  font: 800 .58rem Arial, sans-serif;
  color: var(--ink);
  text-align: center;
  line-height: 1.15;
}

.legend-tile .legend-cn {
  font-size: .62rem;
  color: var(--muted);
  font-family: Arial, sans-serif;
}

/* ========== Cultural / Brazil-China section ========== */
.culture-hero {
  position: relative;
  padding: 56px 0 40px;
}

.culture-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  gap: 36px;
  align-items: center;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.fact-card {
  background: rgba(255, 250, 240, .9);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(58, 35, 15, .08);
}

.fact-card .fact-num {
  display: inline-block;
  font: 900 1.7rem Arial, sans-serif;
  color: var(--chinese-red);
  letter-spacing: -.02em;
}

.fact-card .fact-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.55;
}

.tagline-strip {
  margin: 30px 0 0;
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(120deg, rgba(15, 107, 88, .92), rgba(45, 90, 39, .92));
  color: #fff8e7;
  font-family: Arial, sans-serif;
  box-shadow: 0 18px 40px rgba(15, 107, 88, .25);
}

.tagline-strip strong { color: #ffd97a; }

/* Game mode pills used on cards and headers */
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font: 800 .72rem Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(201, 151, 42, .18);
  color: #8a6212;
}

.mode-pill.relax { background: rgba(15, 107, 88, .14); color: var(--brand); }
.mode-pill.timed { background: rgba(185, 28, 28, .14); color: var(--chinese-red); }
.mode-pill.chain { background: rgba(45, 90, 39, .16); color: var(--chinese-green); }

@media (max-width: 900px) {
  .hero-grid, .content-grid { grid-template-columns: 1fr; }
  .culture-hero-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .game-gallery { grid-template-columns: 1fr; }
  .sidebox { position: static; }
  h1 { font-size: clamp(2.4rem, 14vw, 4.6rem); }
  .nav { align-items: flex-start; }
  .nav-links { flex-wrap: wrap; justify-content: flex-end; }
  .memory-board { grid-template-columns: repeat(4, 1fr); }
  .memory-card { width: 70px; height: 88px; }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 22px, 1120px); }
  .hero { padding-top: 44px; }
  .nav { flex-direction: column; }
  .nav-links { justify-content: flex-start; font-size: .88rem; }
  .game-shell { padding: 10px; border-radius: 22px; }
  .board-wrap { min-height: 390px; }
  #mahjong-board { transform: scale(.74); transform-origin: top left; margin-left: 4px; }
  #pyramid-board { transform: scale(.7); transform-origin: top left; margin-left: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .memory-board { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .memory-card { width: 64px; height: 80px; }
  .connect-tile { width: 44px; height: 56px; }
  .connect-tile .tile-symbol { font-size: 1.2rem; }
  .countdown-banner .cd-time { font-size: 1.5rem; }
  .tile-name { font-size: .46rem; }
  .tile-symbol { font-size: 1.5rem; }
  .mini-tile { font-size: 1.4rem; border-radius: 6px; }
  .hero-card { padding: 16px; }
}
