:root {
  --bg: #fff4d8;
  --bg-2: #f7ead0;
  --paper: #fffdf2;
  --ink: #231b14;
  --ink-soft: #5d4c3d;
  --muted: #8b745f;
  --line: #c89d69;
  --line-soft: rgba(130, 90, 48, 0.24);
  --pink: #f06f9b;
  --blue: #4aaed8;
  --green: #62b36c;
  --yellow: #f5c84c;
  --orange: #f59a3d;
  --red: #d84c3f;
  --shadow: 6px 6px 0 rgba(82, 54, 24, 0.13);
  --radius: 8px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.78;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(132, 95, 48, 0.07) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(180deg, var(--bg) 0%, #ffecc8 54%, var(--bg-2) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid rgba(74, 174, 216, 0.75);
  outline-offset: 3px;
}

img {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  font-size: 52px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 18px;
}

.wrap {
  width: min(calc(100% - 28px), var(--max));
  margin-inline: auto;
}

.narrow {
  max-width: 780px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-140%);
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
  background: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 4px solid var(--ink);
  background: rgba(255, 253, 242, 0.94);
}

.masthead {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-logo {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  font-size: 25px;
  font-weight: 700;
  text-decoration: none;
}

.masthead p {
  color: var(--ink-soft);
  font-size: 14px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 244, 216, 0.95);
  backdrop-filter: blur(8px);
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 0;
}

.nav-row a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
  background: rgba(255, 253, 242, 0.58);
}

.nav-row a:hover,
.nav-row a.current {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper);
}

.hero,
.page-hero {
  padding: 52px 0 34px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 34px;
  align-items: center;
}

.hero-grid > *,
.memory-item > * {
  min-width: 0;
}

.hero-copy {
  max-width: 680px;
}

.label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.large-copy {
  margin-top: 16px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.72;
}

.hero-copy p:not(.label):not(.large-copy),
.page-hero p:not(.label):not(.large-copy),
.note-card p,
.route-box p,
.memory-copy p,
.schedule-row p,
.rule-card p {
  color: var(--ink-soft);
}

.hero-copy p + p,
.page-hero p + p,
.note-card p + p,
.route-box p + p,
.memory-copy p + p,
.schedule-row p + p,
.rule-card p + p {
  margin-top: 10px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 24px;
}

.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  background: var(--yellow);
  box-shadow: 4px 4px 0 rgba(82, 54, 24, 0.16);
}

.text-link {
  color: #096f9a;
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.mobile-only {
  display: none;
}

.scrap-figure {
  transform: rotate(1.4deg);
}

.scrap-figure img,
.memory-image img {
  width: 100%;
  border: 4px solid #fffdf2;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.scrap-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 30px 0;
}

.section-tight {
  padding-top: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.zine-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.note-card,
.route-box,
.rule-card,
.schedule-row,
.shelf-link,
.event-strip article,
.comment-box {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.note-card,
.route-box,
.rule-card {
  padding: 22px;
}

.note-card h2,
.route-box h2 {
  margin-bottom: 12px;
}

.note-card.yellow,
.note-card.sunny {
  background: #fff2a9;
}

.note-card.blue {
  background: #dff4ff;
}

.note-card.pink {
  background: #ffe0ec;
}

.note-card.green {
  background: #e4f6d7;
}

.event-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.event-strip article {
  padding: 18px;
  background: #fffdf2;
}

.event-strip span {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.event-strip strong {
  display: block;
  margin-top: 6px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  font-size: 26px;
}

.event-strip p {
  margin-top: 8px;
  color: var(--ink-soft);
}

.page-hero {
  border-bottom: 2px dashed rgba(120, 82, 40, 0.34);
}

.memory-list {
  display: grid;
  gap: 38px;
}

.memory-item {
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.memory-item:nth-child(even) .memory-image {
  order: 2;
  transform: rotate(1deg);
}

.memory-item:nth-child(odd) .memory-image {
  transform: rotate(-1deg);
}

.event-lead {
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
}

.comment-box {
  margin-top: 20px;
  padding: 16px;
  background: #fff8cf;
}

.comment-box h3 {
  margin-bottom: 8px;
}

.schedule-board {
  display: grid;
  gap: 16px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  background: #fffdf2;
}

.date-box {
  display: grid;
  min-height: 118px;
  place-items: center;
  padding: 12px;
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  font-weight: 700;
  text-align: center;
}

.small-note {
  color: var(--muted);
  font-size: 13px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rule-card {
  background: #fffdf2;
}

.rule-card:nth-child(2n) {
  background: #e5f6dc;
}

.rule-card:nth-child(3n) {
  background: #e3f4ff;
}

.rule-number {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.rule-card h2 {
  margin: 8px 0 10px;
  font-size: 24px;
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.shelf-link {
  min-height: 178px;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  background: #fff2a9;
}

.shelf-link:nth-child(2) {
  background: #dff4ff;
}

.shelf-link:nth-child(3) {
  background: #e4f6d7;
}

.shelf-link:nth-child(4) {
  background: #ffe0ec;
}

.shelf-link span {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.shelf-link strong {
  display: block;
  margin-top: 12px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  font-size: 28px;
  line-height: 1.2;
}

.shelf-link em {
  display: block;
  margin-top: 10px;
  color: var(--ink-soft);
  font-style: normal;
}

.redirect-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.redirect-page .note-card {
  width: min(100%, 620px);
}

.gate-page {
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
  padding: 56px 0;
}

.gate-wrap {
  max-width: 720px;
}

.gate-card {
  padding: 34px;
}

@media (max-width: 920px) {
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 24px;
  }

  .hero-grid,
  .split-layout,
  .zine-layout,
  .event-strip,
  .memory-item,
  .rules-grid,
  .shelf-grid {
    grid-template-columns: 1fr;
  }

  .memory-item:nth-child(even) .memory-image {
    order: 0;
  }

  .schedule-row {
    grid-template-columns: 1fr;
  }

  .site-nav {
    position: static;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 22px;
  }

  .large-copy,
  .event-lead {
    font-size: 18px;
  }

  .wrap {
    width: min(calc(100vw - 28px), 362px);
    max-width: calc(100vw - 28px);
    margin-left: 14px;
    margin-right: auto;
  }

  .hero,
  .page-hero {
    padding: 34px 0 22px;
  }

  .masthead {
    display: block;
    padding: 12px 0;
  }

  .masthead p {
    margin-top: 4px;
  }

  .nav-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-row a {
    justify-content: center;
    padding: 0 6px;
    min-width: 0;
    text-align: center;
    font-size: 13px;
  }

  .scrap-figure,
  .memory-item:nth-child(even) .memory-image,
  .memory-item:nth-child(odd) .memory-image {
    transform: none;
  }

  .hero-copy,
  .page-hero,
  .note-card,
  .route-box,
  .rule-card {
    overflow-wrap: anywhere;
    word-break: break-all;
    line-break: anywhere;
  }

  .hero-copy p,
  .page-hero p,
  .note-card h2,
  .note-card p,
  .route-box h2,
  .route-box p,
  .memory-copy p,
  .schedule-row p,
  .rule-card h2,
  .rule-card p {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-break: anywhere;
  }

  .mobile-only {
    display: initial;
  }

  .link-row {
    display: grid;
    gap: 12px;
    justify-items: start;
  }

  .button-link {
    width: 100%;
  }

  .scrap-figure img,
  .memory-image img {
    width: calc(100% - 8px);
  }

  .note-card,
  .route-box,
  .rule-card,
  .schedule-row {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
