@font-face {
  font-family: Forest Serif;
  src: url("./serif.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Forest Sans;
  src: url("./sans.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f3e5c6;
  --paper-light: #fff1d1;
  --ink: #314c33;
  --muted: #635438;
  --forest: #1b3a24;
  --forest-dark: #172f21;
  --cream: #fff0c9;
  --gold: #be9651;
  --line: #916c3b42;
  --serif: "Forest Serif", Georgia, serif;
  --sans: "Forest Sans", system-ui, sans-serif;
  --shell: min(1240px, calc(100% - 96px));
  --header-height: 70px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 20px); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.58; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid #92611c; outline-offset: 4px; }
.modes :focus-visible, .closing :focus-visible { outline-color: var(--gold); }
h1, h2, h3, p, figure, dd { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; }
h2 { font-size: clamp(48px, 6.2vw, 88px); letter-spacing: -.045em; line-height: .88; }
h3 { font-size: 32px; line-height: 1; }
.shell { width: var(--shell); margin-inline: auto; }
.section { padding-block: clamp(64px, 8vw, 118px); }
.skip { position: fixed; top: 8px; left: 8px; z-index: 5; transform: translateY(-200%); padding: 10px; background: var(--paper-light); }
.skip:focus { transform: none; }

.header {
  min-height: var(--header-height);
  padding: 10px max(32px, calc((100% - 1240px) / 2));
  position: sticky;
  inset-block-start: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #f3e5c6f4;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 25px/.95 var(--serif); }
.brand img { border-radius: 11px; flex: none; }
.header nav, .footer > div { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); font-size: 13px; }
.header nav a, .footer > div a { color: var(--muted); }
.header nav a:hover, .footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.header-play { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; padding-inline: 15px; border-radius: 10px; background: var(--forest); color: var(--cream); font-weight: bold; font-size: 14px; }
.header-play:hover { filter: brightness(1.12); }

.hero {
  width: min(1440px, calc(100% - 48px));
  min-height: clamp(530px, 44vw, 650px);
  margin: 24px auto 0;
  border: 1px solid #9d793f;
  border-radius: 18px;
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--forest);
  color: var(--ink);
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.hero-content {
  z-index: 1;
  width: min(51%, 590px);
  margin: 40px 0 40px clamp(28px, 5.5vw, 92px);
  padding: 14px clamp(10px, 2.1vw, 28px) 18px;
  border: 28px solid transparent;
  border-image: url("../art/ui-panel-v15.webp") 23% fill stretch;
  box-shadow: 0 14px 46px #202b1c57;
}
.eyebrow { margin: 0 0 16px; color: #72603e; font-weight: bold; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span { display: inline-block; margin-right: .5em; padding-right: .65em; border-right: 1px solid currentColor; }
.hero-label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: #72603e; }
.hero-label::before { content: ""; width: 22px; height: 1px; background: currentColor; }
h1 img { width: 100%; max-width: 490px; }
.intro { max-width: 40ch; margin-top: 14px; color: var(--ink); font-size: 16px; }
.hero-actions, .closing-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
.button { min-height: 49px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: bold; transition: background-color .18s; }
.primary { color: var(--cream); }
.primary:hover { filter: brightness(1.12); }
.primary span { font-size: 12px; }
.hero-link { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.hero-link:hover { color: #74511f; text-decoration: underline; text-underline-offset: 4px; }
.note { margin-top: 11px; color: var(--muted); font-size: 12px; }
.game-facts { margin-block: 0; padding-block: 25px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.game-facts div { padding-inline: 22px; }
.game-facts div:first-child { padding-left: 0; }
.game-facts div + div { border-left: 1px solid var(--line); }
.game-facts dt { color: var(--muted); font-size: 11px; }
.game-facts dd { font: 700 clamp(22px, 3vw, 38px)/1 var(--serif); }

.rules { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(34px, 7vw, 106px); }
.steps { margin: 24px 0 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 33px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.steps li > span { color: #526451; font-size: 11px; font-weight: bold; padding-top: 6px; }
.steps p, .mode-grid p, .questions p { color: var(--muted); font-size: 14px; margin-top: 5px; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: #263e30; font-size: 14px; font-weight: bold; text-decoration: underline; text-underline-offset: 5px; }
.text-link:hover { color: #6d4e22; }
.guide-link { margin-top: 12px; }
.game-shot { padding: 8px; min-width: 0; overflow: hidden; border: 17px solid transparent; border-image: url("../art/ui-panel-v15.webp") 23% fill stretch; box-shadow: 0 18px 38px #1933231c; }
.game-shot img { width: 100%; border: 1px solid #9d793f; border-radius: 4px; }
.game-shot figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 5px 9px 0; color: var(--muted); font-size: 12px; }
.zoom-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding-inline: 9px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: bold; }
.zoom-button:hover { background: #17302510; }
.zoom-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.board-dialog { width: min(1000px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper-light); color: var(--ink); }
.board-dialog::backdrop { background: #0a1812cc; }
.board-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 1px 7px 9px; }
.board-dialog-head h2 { font-size: clamp(27px, 5vw, 38px); line-height: 1; }
.board-dialog-head span { font-size: 20px; line-height: 1; }
.board-dialog > img { width: auto; max-height: calc(100dvh - 105px); margin-inline: auto; border-radius: 8px; object-fit: contain; }

.guide { background: #eeddb6; border-block: 1px solid var(--line); }
.guide-layout { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(0, 2.1fr); gap: clamp(30px, 7vw, 104px); }
.guide-index { position: sticky; top: calc(var(--header-height) + 34px); align-self: start; }
.guide-index nav { display: grid; gap: 2px; margin-top: 24px; }
.guide-index nav a { padding: 9px 12px; border-left: 2px solid #916c3b42; border-radius: 0 5px 5px 0; color: var(--muted); font-size: 14px; }
.guide-index nav a:hover, .guide-index nav a[aria-current="location"] { border-left-color: #926531; color: var(--ink); background: #fff1d3; }
.guide-content { max-width: 73ch; color: var(--muted); overflow-wrap: break-word; }
.guide-content section + section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.guide-content h3, .guide-content strong, .guide-content dt, .score-table th { color: var(--ink); }
.guide-content h3 { font-size: clamp(34px, 4.5vw, 50px); margin-bottom: 12px; }
.guide-content p + p, .guide-content li + li { margin-top: 11px; }
.guide-content ul, .guide-content ol { padding-left: 22px; margin-block: 12px; }
.score-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; margin-block: 16px; text-align: left; }
.score-table caption { text-align: left; font-weight: bold; color: var(--ink); padding-bottom: 7px; }
.score-table th, .score-table td { border: 1px solid var(--line); padding: 9px; vertical-align: top; }
.score-table thead th:first-child { width: 23%; }
.score-table thead { background: #e5d3a3; }
.score-table tbody tr:nth-child(odd) { background: #fff0ce; }
.expansion-rules dt { font-weight: bold; margin-top: 14px; }
.expansion-rules dd { margin: 4px 0 0; }

.modes { background: var(--forest-dark); color: var(--cream); }
.modes .eyebrow { color: var(--gold); }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); margin-top: 34px; }
.mode-grid article { display: flex; flex-direction: column; overflow: hidden; border: 14px solid transparent; border-image: url("../art/ui-button-v15.webp") 28% 18% fill stretch; }
.mode-grid img { width: 100%; aspect-ratio: 1.85; object-fit: contain; padding: 10px 8px 0; background: radial-gradient(ellipse at 50% 78%, #89a05639, transparent 75%); }
.mode-grid article div { padding: 17px 19px 22px; }
.mode-grid p { color: #ead9ae; }
.faq { display: grid; grid-template-columns: .9fr 1.1fr; gap: 34px; }
.questions details { border-top: 1px solid var(--line); }
.questions details:last-child { border-bottom: 1px solid var(--line); }
.questions summary { padding-block: 14px; cursor: pointer; font-weight: bold; }
.questions summary::marker { color: #4a6c52; }
.questions p { max-width: 52ch; margin: 0 0 14px 16px; }
.questions p a { text-decoration: underline; text-underline-offset: 3px; }
.closing { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px; background: linear-gradient(115deg, #2d4c31, #15301f); color: var(--cream); border-radius: 17px; padding: 34px; margin-bottom: 38px; }
.closing h2 { font-size: clamp(41px, 5vw, 66px); }
.closing-actions { margin: 0; gap: 13px; }
.secondary { background: transparent; border-color: #f8eac65c; color: var(--cream); }
.secondary:hover { background: #ffffff12; }
.share-status { grid-column: 1 / -1; color: var(--gold); font-size: 13px; overflow-wrap: anywhere; }
.share-status:empty { display: none; }
.share-status a { text-decoration: underline; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-block: 22px; border-top: 1px solid var(--line); }
.footer .brand { font-size: 21px; }

.header-play, .primary {
  border: 11px solid transparent;
  border-image: url("../art/ui-button-v15.webp") 28% 18% fill stretch;
  border-radius: 0;
  background: none;
  padding: 1px 9px;
}
@media (max-width: 950px) {
  :root { --shell: calc(100% - 48px); }
  .header { padding-inline: 24px; }
  .hero-content { width: min(61%, 550px); margin-left: 24px; padding-inline: 12px; }
  .rules { gap: 35px; }
  .guide-layout { grid-template-columns: minmax(190px, .8fr) minmax(0, 2.2fr); gap: 27px; }
}
@media (max-width: 720px) {
  :root { --shell: calc(100% - 36px); --header-height: 64px; }
  .header { padding: max(9px, env(safe-area-inset-top)) 18px 9px; gap: 10px; }
  .header nav { display: none; }
  .header .brand { font-size: 22px; }
  .brand img { width: 34px; height: 34px; }
  .header-play { padding-inline: 4px; border-width: 9px; }
  .hero { width: calc(100% - 24px); min-height: 0; margin-top: 12px; padding-top: 160px; border-radius: 13px; }
  .hero-art { height: clamp(220px, 62vw, 310px); object-position: 71% center; mask-image: linear-gradient(#000 73%, transparent); }
  .hero-content { width: auto; margin: 0 10px 10px; padding: 9px 10px 12px; border-width: 17px; }
  .hero-label { margin-bottom: 8px; }
  .intro { margin-top: 19px; font-size: 14px; }
  .hero-actions { margin-top: 15px; gap: 8px 12px; }
  .game-facts { padding-block: 17px; }
  .game-facts div { padding-inline: 8px; }
  .game-facts dt { font-size: 10px; }
  .game-facts dd { font-size: clamp(21px, 5.5vw, 31px); }
  .section { padding-block: 55px; }
  .rules, .guide-layout, .faq, .closing { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .guide-index { position: static; }
  .guide-index nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
  .guide-index nav a { padding: 6px 8px; font-size: 12px; }
  .guide-content { font-size: 14px; }
  .score-table { font-size: 12px; }
  .score-table th, .score-table td { padding: 5px; hyphens: auto; }
  .mode-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 23px; }
  .mode-grid article { border-width: 11px; display: grid; grid-template-columns: 33% minmax(0, 1fr); }
  .mode-grid img { height: 100%; min-width: 0; padding: 4px; }
  .mode-grid article div { padding: 14px 11px; }
  .closing { padding: 23px; margin-bottom: 25px; }
  .footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
