/* Page, reading, and navigation rules; desktop composition comes first. */
:root {
  color-scheme: light;
  --paper: #fcf8ee;
  --white: #fffdf6;
  --ink: #382f22;
  --quiet: #64553e;
  --amber: #efc466;
  --amber-pale: #f7e7bb;
  --amber-deep: #74500b;
  --line: #d8c9aa;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --accent: ui-monospace, Menlo, Consolas, monospace;
  --display: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-padding-bottom: 130px; }
body { margin: 0; color: var(--ink); font: 18px/1.65 var(--body); -webkit-text-size-adjust: 100%; }
::selection { background: var(--amber); color: var(--ink); }
a { color: var(--ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--amber-deep); outline-offset: 5px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
p { margin: 0 0 1.1em; }
h1, h2, h3, p, li, dt, dd { overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; }
h1 { font-size: 76px; line-height: 1.05; letter-spacing: -0.045em; margin: 0 0 28px; max-width: 15ch; }
h2 { font-size: 38px; line-height: 1.17; letter-spacing: -0.025em; margin: 0 0 24px; }
h3 { font-size: 28px; line-height: 1.23; margin: 0 0 16px; }
main, .masthead, .closing { width: min(1160px, calc(100% - 112px)); margin-inline: auto; }
main { outline: none; }
main:focus { outline: none; }

.skip-link { position: fixed; top: -100px; left: 24px; padding: 12px 20px; z-index: 20; background: var(--ink); color: var(--white); border-radius: 8px; }
.skip-link:focus { top: 16px; }
.masthead { min-height: 124px; display: flex; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--line); }
.guide-name { display: flex; align-items: center; gap: 24px; padding-block: 12px; text-decoration: none; }
.place-name { font: 32px/1.1 var(--display); letter-spacing: -0.035em; }
.guide-kind { padding-left: 24px; border-left: 1px solid var(--line); font-size: 16px; line-height: 1.4; }
.masthead-note { color: var(--quiet); font-size: 16px; }
.opening { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 80px; align-items: end; padding: 68px 0 64px; }
.opening-copy { min-width: 0; }
.chapter-name { font: 16px/1.5 var(--accent); color: var(--amber-deep); margin-bottom: 28px; }
.opening-intro { font-size: 21px; line-height: 1.6; max-width: 50ch; margin-bottom: 0; }
.opening-note { background: var(--amber-pale); padding: 30px 30px 24px; border-radius: 38px 38px 8px 38px; }
.opening-note h2 { font-size: 37px; line-height: 1.13; margin-bottom: 24px; }
.opening-note p { font-size: 17px; }
.opening-note .note-label { font: 16px/1.5 var(--accent); margin-bottom: 24px; color: var(--amber-deep); }
.opening-note .text-link { font-size: 16px; }
.home .opening h1 { font-size: 84px; max-width: 12ch; }
.home .opening { align-items: center; }
.article .opening:not(:has(.opening-note)), .missing .opening { grid-template-columns: minmax(0, 840px); }
.article .opening:not(:has(.opening-note)) h1 { max-width: 18ch; }
.article .opening:not(:has(.opening-note)) .opening-intro { max-width: 56ch; }
.text-link { display: inline-flex; gap: 16px; align-items: center; min-height: 48px; padding-block: 10px; font-size: 18px; line-height: 1.5; }
.check-date { color: var(--quiet); font: 16px/1.7 var(--accent); }

.rule-book { border-top: 2px solid var(--ink); }
.section-intro { display: flex; justify-content: space-between; align-items: baseline; gap: 48px; padding: 36px 0 22px; }
.section-intro h2 { max-width: 19ch; }
.section-intro .check-date { max-width: 29ch; }
.rule { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 68px; border-top: 1px solid var(--line); padding: 38px 0; }
.rule h3 { max-width: 16ch; }
.rule div { max-width: 66ch; }
.rule p:last-child { margin-bottom: 0; }
.reading-pair { display: grid; grid-template-columns: 1fr 1.35fr; gap: 100px; border-top: 1px solid var(--line); padding: 56px 0 32px; }
.reading-pair h2 { max-width: 12ch; }
.next-page { display: flex; gap: 32px; align-items: center; justify-content: space-between; padding: 32px 0; margin: 42px 0 24px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; min-height: 112px; }
.next-page:hover .next-title { text-decoration: underline; text-underline-offset: 5px; }
.next-copy { display: block; }
.next-note { display: block; font: 16px/1.6 var(--accent); color: var(--quiet); margin-bottom: 8px; }
.next-title { display: block; font: 32px/1.2 var(--display); letter-spacing: -0.02em; }
.next-arrow { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; background: var(--amber); font-size: 32px; line-height: 1; }

.article-body { max-width: 760px; margin-left: 172px; border-top: 2px solid var(--ink); padding-top: 46px; }
.article-body > section { margin-bottom: 52px; }
.article-body p { max-width: 67ch; }
dl { margin: 30px 0; }
dt { font-weight: 600; }
dd { margin: 8px 0 0; }
.board-notes > div { border-top: 1px solid var(--line); padding: 24px 0; }
.board-notes dt { font-size: 19px; }
.word-notes { background: var(--amber-pale); border-radius: 8px 32px 32px 32px; padding: 8px 32px; }
.word-notes > div { padding: 24px 0; }
.word-notes > div + div { border-top: 1px solid #cbb67c; }
.word-notes dt { font: 25px/1.3 var(--display); }
.myth-book { margin-top: 60px; }
.myth { border-top: 1px solid var(--line); padding: 28px 0; }
.myth h3 { font-size: 27px; margin-bottom: 20px; }
.myth-toggle { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 20px; background: var(--paper); border: 1px solid var(--amber-deep); border-radius: 24px; cursor: pointer; font-size: 16px; }
.myth-toggle:hover { background: var(--amber-pale); }
.myth-toggle[aria-expanded="true"] { background: var(--amber-pale); }
.myth-answer { margin: 22px 0 0; padding-left: 24px; border-left: 4px solid var(--amber); }
.myth-answer p:last-child { margin-bottom: 0; }
.visit-questions { padding-left: 25px; }
.visit-questions li { margin-bottom: 16px; padding-left: 8px; }
.quote-notes { counter-reset: none; }
.quote-notes > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 30px; border-top: 1px solid var(--line); padding: 24px 0; }
.quote-notes dt { font-size: 18px; }
.quote-notes dd { margin: 0; }
.price-note { padding: 30px; background: var(--amber-pale); border-radius: 8px 32px 32px 32px; }
.price-note p:last-child { margin-bottom: 0; }
.urgent-note { background: var(--amber-pale); padding: 32px; margin-bottom: 56px; border-radius: 8px 32px 32px 32px; }
.urgent-note .urgent-action { font-size: 22px; font-weight: 600; line-height: 1.45; }
.urgent-note .check-date { margin-bottom: 0; }

.source-book { border-top: 2px solid var(--ink); }
.source-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 0 72px; padding: 38px 0 30px; }
.source-dates h2 { grid-row: span 4; max-width: 13ch; }
.source-dates p { max-width: 60ch; }
.source-section { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; padding: 44px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.source-section > div { max-width: 53ch; }
.source-section h2 { max-width: 16ch; }
.source-section ul { list-style: none; padding: 0; margin: 0; }
.source-section li { border-bottom: 1px solid var(--line); }
.source-section li:first-child { border-top: 1px solid var(--line); }
.source-link { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; align-items: center; min-height: 56px; font-size: 18px; line-height: 1.5; }
.source-section li p { padding-bottom: 14px; font-size: 17px; }

.closing { display: grid; grid-template-columns: 1fr auto; gap: 80px; align-items: start; padding: 32px 0 158px; }
.closing p { max-width: 70ch; font-size: 16px; color: var(--quiet); margin: 0; }
.closing a { font-size: 16px; display: inline-flex; gap: 16px; align-items: center; min-height: 48px; padding: 10px 0; }
.bottom-dock { position: fixed; z-index: 10; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; width: min(888px, calc(100% - 64px)); padding: 8px; background: var(--white); border: 1px solid #ad9a76; border-radius: 40px; box-shadow: 0 7px 28px #5d48101a; }
.bottom-dock a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 12px; border-radius: 28px; text-decoration: none; font-size: 16px; line-height: 1.4; text-align: center; }
.bottom-dock a:hover { background: var(--amber-pale); }
.bottom-dock a[aria-current="page"] { background: var(--amber); font-weight: 600; }
.bottom-dock a:focus-visible { outline-offset: 0; }
.missing .opening { max-width: 900px; }

@media (max-width: 1100px) {
  main, .masthead, .closing { width: calc(100% - 72px); }
  .opening { gap: 44px; grid-template-columns: minmax(0, 1fr) 300px; }
  h1 { font-size: 64px; }
  .home .opening h1 { font-size: 70px; }
  .article-body { margin-left: 100px; }
  .rule { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
  .reading-pair { gap: 56px; }
  .source-section, .source-dates { gap: 40px; }
  .masthead-note { display: none; }
}

@media (max-width: 760px) {
  html { scroll-padding-bottom: 160px; }
  main, .masthead, .closing { width: calc(100% - 40px); }
  body { font-size: 18px; line-height: 1.65; }
  .masthead { min-height: 96px; }
  .guide-name { gap: 18px; width: 100%; }
  .place-name { font-size: 29px; }
  .guide-kind { font-size: 16px; padding-left: 18px; max-width: 12ch; }
  .opening, .article .opening:not(:has(.opening-note)), .missing .opening { display: block; padding: 42px 0; }
  h1, .home .opening h1 { font-size: 52px; letter-spacing: -0.04em; line-height: 1.07; max-width: 12ch; margin-bottom: 24px; }
  .article .opening:not(:has(.opening-note)) h1 { max-width: 14ch; }
  .chapter-name { margin-bottom: 20px; }
  .opening-intro { font-size: 20px; line-height: 1.6; }
  .opening-note { margin-top: 36px; padding: 28px 26px 22px; border-radius: 30px 30px 6px 30px; }
  .opening-note h2 { font-size: 34px; }
  .opening-note p { font-size: 18px; }
  .opening-note .note-label, .opening-note .text-link { font-size: 16px; }
  h2 { font-size: 32px; line-height: 1.2; }
  h3 { font-size: 26px; }
  .section-intro { display: block; padding-top: 28px; }
  .section-intro h2 { max-width: 18ch; margin-bottom: 18px; }
  .section-intro .check-date { max-width: 100%; }
  .rule { display: block; padding: 30px 0; }
  .rule h3 { max-width: 22ch; margin-bottom: 20px; }
  .reading-pair { display: block; padding-top: 36px; }
  .reading-pair h2 { max-width: 16ch; }
  .reading-pair > div + div { margin-top: 28px; }
  .next-page { gap: 20px; padding: 26px 0; margin-top: 30px; }
  .next-title { font-size: 28px; }
  .next-note { font-size: 16px; }
  .next-arrow { width: 48px; height: 48px; flex-basis: 48px; font-size: 27px; }
  .article-body { margin-left: 0; padding-top: 34px; }
  .article-body > section { margin-bottom: 42px; }
  .board-notes dt { font-size: 18px; }
  .word-notes { padding-inline: 24px; }
  .myth h3 { font-size: 26px; }
  .myth-answer { padding-left: 18px; }
  .quote-notes > div { display: block; padding-block: 24px; }
  .quote-notes dd { margin-top: 10px; }
  .price-note, .urgent-note { padding: 26px 24px; }
  .urgent-note h2 { font-size: 30px; }
  .urgent-note .urgent-action { font-size: 21px; }
  .source-dates, .source-section { display: block; padding: 32px 0; }
  .source-dates h2, .source-section h2 { max-width: 20ch; }
  .source-section > div { margin-bottom: 24px; }
  .source-link { font-size: 18px; }
  .closing { display: block; padding-top: 24px; padding-bottom: calc(164px + env(safe-area-inset-bottom, 0px)); }
  .closing p { font-size: 16px; }
  .closing a { margin-top: 16px; }
  .bottom-dock { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; width: calc(100% - 24px); padding: 6px; border-radius: 28px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .bottom-dock a { min-height: 44px; padding: 9px 6px; font-size: 16px; border-radius: 24px; }
}

@media (max-width: 360px) {
  h1, .home .opening h1 { font-size: 46px; }
  .guide-name { gap: 14px; }
  .place-name { font-size: 27px; }
  .guide-kind { padding-left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .bottom-dock, .skip-link, .myth-toggle { display: none !important; }
  .myth-answer[hidden] { display: block !important; }
  body { font-size: 12pt; background: white; }
  main, .masthead, .closing { width: 100%; }
  .opening { padding-top: 24px; }
  .closing { padding-bottom: 0; }
  .article-body { margin-left: 0; }
  a { color: inherit; }
}
