/* Site chrome and content pages (home, rules, legal). The game board styles live in game.css. */
:root {
  --felt: #0f5132; --felt-dark: #0b3d26; --gold: #f5c542; --paper: #fdfcf7; --ink: #1b1b1b;
  --link: #0a57a3; --muted: #4a4a4a; --line: #e2dfd2;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--felt-dark); color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; line-height: 1.5; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1280px; margin: 0 auto; padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top)); min-height: 48px; background: var(--felt-dark); }
.site-header .brand { color: #fff; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: .01em; }
.site-header nav { display: flex; gap: 4px; }
.site-header nav a { color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 15px; }
.site-header nav a:hover, .site-header nav a[aria-current] { background: rgba(255,255,255,.14); }

main { display: block; }
.content { background: var(--paper); color: var(--ink); max-width: 800px; margin: 20px auto; padding: 24px 20px 28px; border-radius: 14px; font-size: 17px; }
.page-game .content { margin-top: 24px; }
.content h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; }
.content h2 { font-size: 24px; line-height: 1.25; margin: 32px 0 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.content h3 { font-size: 19px; margin: 20px 0 6px; }
.content p, .content li { max-width: 68ch; }
.content li { margin-bottom: 6px; }
.content a { color: var(--link); }
.content code { background: #efece0; padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.content .meta { color: var(--muted); font-size: 14px; }
.content .draft { background: #fff3cd; border: 1px solid #e6c767; border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.toc a { background: #e9efe9; color: #0b3d26; text-decoration: none; padding: 7px 14px; border-radius: 20px; font-size: 15px; font-weight: 600; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin: 8px 0; background: #fff; }
summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
details p { margin: 0 0 12px; }
.nojs { padding: 24px; text-align: center; }

.game-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.game-card { display: flex; gap: 14px; align-items: center; text-decoration: none !important; color: var(--ink) !important; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px; }
.game-card:hover { border-color: var(--felt); }
.gc-art { flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--felt); color: #fff; display: grid; place-items: center; font-size: 26px; }
.gc-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.gc-text strong { font-size: 19px; }
.gc-cta { color: var(--link); font-weight: 700; margin-top: 4px; }
.features { padding-left: 20px; }

.site-footer { max-width: 800px; margin: 8px auto 0; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); text-align: center; color: rgba(255,255,255,.85); font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin-bottom: 8px; }
.site-footer a, .linklike { color: #fff; padding: 8px 10px; text-decoration: underline; background: none; border: 0; font: inherit; cursor: pointer; }

/* Phone: game page header is a thin strip so the board stays on screen */
@media (max-width: 699px) {
  .content { margin: 12px 8px; padding: 18px 14px 22px; font-size: 16px; }
  .content h1 { font-size: 25px; }
  .content h2 { font-size: 21px; }
  .page-game .site-header { min-height: 40px; padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: 4px; }
  .page-game .site-header nav a { padding: 6px 8px; font-size: 14px; }
  .page-game .site-header .brand { font-size: 16px; }
}
/* The game board fills the viewport below the header */
body.page-game #app { min-height: calc(100dvh - 50px); padding-top: 0; }
@media print { .site-header, .site-footer, #app { display: none; } .content { background: #fff; } }

/* ---- Ad slots: space is reserved up front so nothing jumps when an ad arrives ---- */
.ad-slot { display: block; position: relative; margin: 14px auto; width: 100%; max-width: 728px; min-height: 120px; background: rgba(255,255,255,.04); border-radius: 8px; overflow: hidden; text-align: center; }
.ad-slot::before { content: "Advertisement"; display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); padding: 3px 0 0; height: 16px; }
.ad-slot .adsbygoogle { min-height: 100px; }
.ad-slot.ad-empty { visibility: hidden; }          /* blocked or unavailable: keeps the space, shows nothing */
.ad-sim-text { display: grid; place-items: center; min-height: 100px; color: rgba(255,255,255,.7); font-size: 14px; }
.ad-below { padding: 0 8px; }
.ad-side { display: none; }
.stage { display: block; }
@media (min-width: 1440px) {
  .stage { display: flex; justify-content: center; align-items: flex-start; gap: 20px; padding: 0 12px; }
  .page-game .stage #app { flex: 0 1 1120px; min-width: 0; margin: 0; }
  .ad-side { display: block; flex: none; width: 300px; min-height: 616px; margin: 0; position: sticky; top: 12px; }
  .ad-below { display: none; }
}

/* Simulated ad used only until a real publisher ID is configured */
.sim-ad { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 16px; }
.sim-ad-box { background: #fdfcf7; color: #1b1b1b; border-radius: 14px; padding: 22px; width: min(92vw, 360px); text-align: center; }
.sim-ad-box h2 { margin: 6px 0 10px; }
.sim-tag { margin: 0; font-size: 12px; font-weight: 700; color: #8a1f1f; letter-spacing: .06em; }
.sim-count { font-size: 18px; margin: 8px 0 14px; }
.sim-skip { width: 100%; background: #e8e8e8; color: #111; border: 0; border-radius: 10px; padding: 12px; font-size: 16px; font-weight: 700; }
