/* Shared language menu, footer identity and readable rulebook. */
.site-header { gap: 14px; top: var(--translation-toolbar-offset, 0px); }
html:has(#gt-nvframe) .site-header { top: var(--translation-toolbar-offset, 57px); }
.site-nav { order: 1; margin-left: auto; }
.language-menu { order: 2; flex: 0 0 auto; position: relative; color: #fff8ea; font: 600 .85rem/1.4 Inter, sans-serif; }
.nav-toggle { order: 3; }
.language-menu summary { display: flex; gap: 7px; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid #88713c; border-radius: 8px; cursor: pointer; list-style: none; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary::after { content: "⌄"; }
.language-menu[open] summary { color: #edce76; background: #2b2418; }
.language-menu :focus-visible { outline: 3px solid #e6c15a; outline-offset: 3px; }
.language-panel { position: absolute; right: 0; top: calc(100% + 14px); width: min(350px, calc(100vw - 32px)); max-height: calc(100dvh - 110px); overflow-y: auto; padding: 22px; border: 1px solid #88713c; border-radius: 10px; background: #17120e; box-shadow: 0 16px 44px #0009; }
.language-panel h2 { font: 700 1.2rem/1.4 Inter, sans-serif; color: #fff8ea; margin-bottom: 16px; }
.language-panel form { display: grid; gap: 10px; }
.language-panel select { width: 100%; min-height: 44px; padding: 10px; border-radius: 5px; border: 1px solid #a99157; background: #fff8ea; color: #17120e; font: 1rem/1.4 system-ui,sans-serif; }
.language-panel .button { justify-content: center; cursor: pointer; }
.language-panel p { font-size: .82rem; line-height: 1.55; color: #cfbf9f; }
.language-panel > a { display: block; padding: 8px 0; color: #f1d885; text-decoration: underline; text-underline-offset: 3px; }
.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; }
  .language-menu { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: calc(76px + var(--translation-toolbar-offset, 0px)) 16px auto; display: grid; justify-content: stretch; gap: 4px; max-height: calc(100dvh - 92px - var(--translation-toolbar-offset, 0px)); 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; }
  .language-menu summary { padding: 8px; }
  .language-panel { position: fixed; top: calc(80px + var(--translation-toolbar-offset, 0px)); right: 16px; max-height: calc(100dvh - 110px - var(--translation-toolbar-offset, 0px)); }
  .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; }
}
