/* The paper pages around the game: rules, about, contact, privacy, 404.
   Plain HTML, no JavaScript, the same washi and sumi as the front door. */
:root {
  --washi: #efe8da;
  --washi-2: #e6dcc8;
  --sumi: #1b1a17;
  --ink-soft: #4a463e;
  --shu: #d2412a;
  --hair: rgb(27 26 23 / 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  background: var(--washi);
  color: var(--sumi);
  font: 18px/1.65 "Iowan Old Style", "Palatino Linotype", Palatino, "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(1rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
}

a { color: inherit; text-decoration-color: var(--shu); text-underline-offset: 3px; }
a:hover { color: var(--shu); }
a:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }

.site-head,
.site-page,
.site-foot { width: 100%; max-width: 42rem; margin: 0 auto; }

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hair);
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  text-decoration: none;
}

.site-seal {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  background: var(--shu);
  color: var(--washi);
  font-size: 0.55rem;
  line-height: 1;
  writing-mode: vertical-rl;
  letter-spacing: 0.05em;
}

.site-head nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }

.site-head nav a {
  display: inline-block;
  padding: 0.6rem 0;
  font: 600 0.72rem/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

.site-head nav a[aria-current='page'] { color: var(--shu); }

.site-page { padding: 2.5rem 0 3rem; }

.site-page h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.site-page h2 {
  margin: 2.4rem 0 0.75rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

.site-page li { margin: 0.35rem 0; }
.site-page code { font: 0.85em ui-monospace, "SF Mono", Menlo, monospace; }

.site-page table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.92rem; }
.site-page th,
.site-page td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.site-page th { font: 600 0.7rem/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }

.site-foot {
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

@media (max-width: 30rem) {
  html { font-size: 17px; }
  .site-page table { font-size: 0.85rem; }
}
