/* Shared navigation, footer identity and readable rulebook. */
.site-header { gap: 14px; top: 0; }
.site-nav { order: 1; margin-left: auto; }
.nav-toggle { order: 3; }
.footer-inner { grid-template-columns: minmax(270px, 330px) 1fr; }
.footer-brand { display: flex; align-items: center; gap: 22px; }
.footer-brand .footer-logo { width: 180px; flex-shrink: 0; }
.footer-flags { display: flex; gap: 10px; align-items: center; }
.footer-flags img { width: auto; height: 24px; max-width: none; border: 1px solid #ffffff55; }
.site-copyright { color: #d8cdbb !important; }
.rulebook-translation-callout { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; margin-bottom: 26px; border: 1px solid #c99b3577; border-radius: 8px; background: #1d1911; }
.rulebook-translation-callout h3 { font-size: 1.3rem; }
.rulebook-translation-callout p { max-width: 740px; color: #e0d5c1; line-height: 1.6; }
.rulebook-translation-callout > a { flex-shrink: 0; }
.book-section { background: #fff; color: #212121; }
.book-layout { max-width: 980px; }
.book-layout h1 { max-width: 900px; font-size: clamp(2rem, 5vw, 3.4rem); color: #191611; line-height: 1.15; }
.book-layout h2 { color: #191611; font-size: 1.9rem; line-height: 1.3; margin: 36px 0 18px; }
.book-layout h3 { color: #191611; font: 750 1.25rem/1.45 Inter, sans-serif; margin: 24px 0 12px; }
.book-layout p { line-height: 1.8; }
.book-layout a:not(.button) { color: #73520c; text-decoration: underline; text-underline-offset: 3px; }
.book-layout .button-secondary { color: #252018; background: #eee6d6; border-color: #b5a782; }
.book-layout .button-secondary:hover, .book-layout .button-secondary:focus-visible { color: #16120c; background: #e2d3b5; }
.book-intro { max-width: 800px; font-size: 1.1rem; }
.book-chapters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.book-chapters a { padding: 20px; border: 1px solid #d7ccb6; border-radius: 5px; background: #f8f5ed; font-weight: 700; }
.book-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; margin: 20px 0; border-block: 1px solid #ddd; }
.book-text { font-size: 1rem; line-height: 1.8; overflow-wrap: anywhere; }
.book-text p { margin: 0 0 12px; }
.book-text h2 { scroll-margin-top: 100px; }
.book-table-scroll { overflow-x: auto; max-width: 100%; margin: 18px 0 26px; border: 1px solid #bbb; border-radius: 4px; }
.book-table-scroll:focus-visible { outline: 3px solid #a67716; outline-offset: 2px; }
.book-text table { width: 100%; border-collapse: collapse; font-size: .91rem; line-height: 1.5; min-width: 720px; overflow-wrap: normal; }
.book-text th, .book-text td { padding: 10px 12px; text-align: start; border: 1px solid #ccc; color: #161616; }
.book-text th { background: #eee8db; font-weight: 750; }
.book-text tr:nth-child(odd) td { background: #faf8f3; }
.book-text caption { text-align: start; padding: 12px; background: #e3d4b4; color: #161616; font-weight: 750; }
.book-unit-index { margin: 20px 0; border: 1px solid #d7ccb6; padding: 16px; }
.book-unit-index summary { cursor: pointer; font-weight: 700; }
.book-unit-index nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.localized-game { padding-top: 112px; }
.localized-game .game-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.localized-game .game-hero h1 { font-size: clamp(2rem,4vw,3.5rem); line-height: 1.13; }
.localized-game .game-hero p { font-size: 1.1rem; line-height: 1.7; }
.localized-game .game-hero img { border-radius: 8px; border: 1px solid #ac8744; }
.localized-game .language-alternate { color: #e6c15a; text-decoration: underline; }
.localized-game .game-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-top: 48px; }
.localized-game .game-facts h2 { font-size: 1.65rem; line-height: 1.25; }
.localized-game .game-facts p { line-height: 1.75; }
@media (max-width: 1280px) {
  .site-header { min-height: 76px; padding: 8px 20px; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .site-nav { position: fixed; inset: 76px 16px auto; display: grid; justify-content: stretch; gap: 4px; max-height: calc(100dvh - 92px); overflow: auto; padding: 14px; border: 1px solid #e6c15a44; border-radius: 8px; background: #100d0afa; box-shadow: var(--shadow); opacity: 0; pointer-events: none; visibility: hidden; transform: translateY(-10px); }
  .site-nav.is-open { opacity: 1; pointer-events: auto; visibility: visible; transform: none; }
  .site-nav a, .site-nav .nav-cta { justify-content: flex-start; min-height: 48px; margin-left: 0; }
}
@media (max-width: 820px) {
  .site-header { gap: 10px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .footer-brand { flex-wrap: wrap; }
  .rulebook-translation-callout { flex-direction: column; align-items: flex-start; }
  .book-chapters, .localized-game .game-hero, .localized-game .game-facts { grid-template-columns: 1fr; }
  .book-unit-index nav { grid-template-columns: 1fr 1fr; }
  .book-layout .hero-actions { margin-bottom: 32px; }
}
@media print {
  .site-header, .site-footer, .book-pager, .book-unit-index, .book-intro { display: none !important; }
  .standalone-main .section:first-child { padding: 0; }
  .book-table-scroll { overflow: visible; }
  .book-text table { min-width: 0; font-size: 9pt; }
  .book-text th, .book-text td { padding: 5px; }
}

/* Compact social links keep their names available to screen readers and on hover. */
.footer-bottom { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px; padding-top:20px; border-top:1px solid #fff8ea1c; }
.footer-bottom .site-copyright { flex:1 1 300px; font-size:.82rem; line-height:1.6; }
.footer-socials { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.footer-socials a { display:inline-flex; width:42px; height:42px; align-items:center; justify-content:center; border:1px solid transparent; border-radius:50%; background:#fff8ea0d; transition:background 160ms ease,border-color 160ms ease; }
.footer-socials img { width:20px; height:20px; object-fit:contain; }
.footer-socials a:hover { background:#e6c15a2e; border-color:#e6c15a66; }
.footer-socials a:focus-visible { outline:2px solid #e6c15a; outline-offset:3px; }
