.seven-families-page .family-stories,
.seven-families-page .game-origin,
.seven-families-page .game-rules {
  color: var(--gallery-ink);
  background: var(--gallery-canvas);
}

.family-stories,
.game-origin,
.game-rules {
  border-top: 1px solid var(--gallery-line);
}

.seven-families-page .game-video-frame {
  width: 100%;
  max-height: none;
  margin-inline: 0;
}

.family-stories-heading {
  max-width: 850px;
  margin-bottom: clamp(42px, 7vw, 76px);
}

.family-stories-heading h2,
.game-origin-copy h2,
.game-rules-heading h2 {
  margin: 14px 0 20px;
  color: var(--gallery-ink);
  font: 500 clamp(34px, 5.5vw, 66px)/1.08 var(--font-display);
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.family-stories-tagline,
.game-rules-heading > p:last-child {
  color: var(--gallery-gold);
  font: 500 clamp(17px, 2vw, 22px)/1.45 var(--font-display);
}

.family-stories-intro {
  max-width: 760px;
  margin-top: 24px;
  color: var(--gallery-taupe);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.9;
}

.family-stories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 34px);
}

.family-story-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--gallery-line);
  background: rgba(248, 244, 236, 0.88);
  box-shadow: 0 18px 46px rgba(54, 40, 27, 0.1);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.family-story-card:hover {
  transform: translateY(-5px);
  border-color: rgba(143, 103, 44, 0.5);
  box-shadow: 0 24px 58px rgba(54, 40, 27, 0.16);
}

.family-story-image {
  position: relative;
  padding: clamp(12px, 1.4vw, 18px);
  background: rgba(229, 216, 194, 0.52);
  border-bottom: 1px solid var(--gallery-line);
}

.family-story-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(74, 57, 39, 0.2);
}

.family-story-image span {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #f8f2e8;
  background: rgba(31, 25, 20, 0.88);
  border: 1px solid rgba(215, 174, 95, 0.55);
  font: 600 12px/1 var(--font-display);
  letter-spacing: 0.12em;
}

.family-story-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(24px, 3vw, 32px);
}

.family-story-copy > p:first-child {
  min-height: 34px;
  color: var(--gallery-gold);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.family-story-copy h3 {
  margin: 12px 0 14px;
  color: var(--gallery-ink);
  font: 500 clamp(25px, 3vw, 34px)/1.1 var(--font-display);
}

.family-story-copy > p:nth-of-type(2) {
  margin-bottom: 25px;
  color: var(--gallery-taupe);
  font-size: 14px;
  line-height: 1.75;
}

.family-story-copy button,
.culture-cta {
  margin-top: auto;
  padding: 15px 18px;
  cursor: pointer;
  color: var(--gallery-ink);
  background: transparent;
  border: 1px solid rgba(143, 103, 44, 0.46);
  font: 600 11px/1.2 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 220ms ease, background 220ms ease, border-color 220ms ease;
}

.family-story-copy button:hover,
.family-story-copy button:focus-visible,
.culture-cta:hover,
.culture-cta:focus-visible {
  color: #17120d;
  background: #e3bd69;
  border-color: #e3bd69;
}

.game-origin {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.55fr);
  align-items: center;
  gap: clamp(42px, 8vw, 110px);
}

.game-origin-copy h2 {
  max-width: 720px;
}

.game-origin-copy > p:last-child {
  max-width: 650px;
  color: var(--gallery-taupe);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.95;
}

.editorial-image {
  position: relative;
  display: block;
  width: 100%;
  padding: clamp(8px, 1vw, 12px);
  cursor: zoom-in;
  color: #f5eee3;
  background: #211a14;
  border: 1px solid rgba(143, 103, 44, 0.48);
  box-shadow: 0 22px 58px rgba(54, 40, 27, 0.18);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.editorial-image:hover,
.editorial-image:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(54, 40, 27, 0.24);
}

.editorial-image img {
  display: block;
  width: 100%;
  height: auto;
}

.editorial-image span {
  position: absolute;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  background: rgba(23, 18, 13, 0.88);
  border: 1px solid rgba(227, 189, 105, 0.55);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.game-rules-heading {
  max-width: 820px;
  margin-bottom: clamp(38px, 6vw, 64px);
}

.game-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(24px, 5vw, 68px);
}

.culture-cta {
  display: table;
  margin: clamp(38px, 6vw, 64px) auto 0;
  text-align: center;
}

.heritage-dialog {
  width: min(94vw, 1120px);
  max-width: none;
  max-height: 94dvh;
  padding: 0;
  overflow: hidden;
  color: #f5eee3;
  background: #17130f;
  border: 1px solid rgba(227, 189, 105, 0.52);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.58);
}

.heritage-dialog::backdrop {
  background: rgba(10, 8, 6, 0.84);
  backdrop-filter: blur(5px);
}

.heritage-dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: 94dvh;
}

.heritage-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 3vw, 32px);
  border-bottom: 1px solid rgba(227, 189, 105, 0.25);
}

.heritage-dialog-header .eyebrow {
  margin-bottom: 6px;
}

.heritage-dialog-header h2 {
  color: #f5eee3;
  font: 500 clamp(20px, 3vw, 30px)/1.15 var(--font-display);
}

.heritage-dialog-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: #f5eee3;
  background: transparent;
  border: 1px solid rgba(227, 189, 105, 0.38);
  font-size: 28px;
  line-height: 1;
}

.heritage-dialog-stage {
  min-height: 0;
  padding: clamp(14px, 2vw, 24px);
  overflow: auto;
  text-align: center;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
  background: #0c0a08;
}

.heritage-dialog-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(94dvh - 178px);
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  transform-origin: top center;
}

.heritage-dialog-stage.is-zoomed img {
  width: 1488px;
  max-width: none;
  max-height: none;
}

.heritage-dialog-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px clamp(14px, 3vw, 28px);
  border-top: 1px solid rgba(227, 189, 105, 0.25);
}

.heritage-dialog-controls button {
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  color: #f5eee3;
  background: transparent;
  border: 1px solid rgba(227, 189, 105, 0.34);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.heritage-dialog-controls button:hover,
.heritage-dialog-controls button:focus-visible,
.heritage-dialog-close:hover,
.heritage-dialog-close:focus-visible {
  color: #17120d;
  background: #e3bd69;
}

.heritage-dialog-controls button[hidden] {
  display: block;
  visibility: hidden;
}

@media (max-width: 920px) {
  .family-stories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-origin {
    grid-template-columns: 1fr;
  }

  .game-origin .editorial-image {
    width: min(100%, 560px);
    margin-inline: auto;
  }
}

@media (max-width: 680px) {
  .family-stories-heading h2,
  .game-origin-copy h2,
  .game-rules-heading h2 {
    font-size: clamp(31px, 10vw, 43px);
  }

  .family-stories-grid,
  .game-rules-grid {
    grid-template-columns: 1fr;
  }

  .family-story-card {
    max-width: 480px;
    margin-inline: auto;
  }

  .family-story-copy > p:first-child {
    min-height: 0;
  }

  .family-story-copy button,
  .culture-cta {
    width: 100%;
    min-height: 48px;
  }

  .heritage-dialog {
    width: 100vw;
    max-height: 100dvh;
    border-inline: 0;
  }

  .heritage-dialog-shell {
    max-height: 100dvh;
  }

  .heritage-dialog-header {
    padding: 13px 14px;
  }

  .heritage-dialog-header .eyebrow {
    display: none;
  }

  .heritage-dialog-stage {
    padding: 10px;
  }

  .heritage-dialog-stage img {
    max-height: calc(100dvh - 145px);
  }

  .heritage-dialog-controls {
    gap: 6px;
    padding: 10px;
  }

  .heritage-dialog-controls button {
    padding-inline: 7px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .editorial-image span {
    right: 12px;
    bottom: 12px;
    left: 12px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .family-story-card,
  .editorial-image,
  .family-story-copy button,
  .culture-cta {
    transition: none;
  }
}
