:root {
  --ink: #241d17;
  --ink-soft: #51463b;
  --paper: #f3eddf;
  --paper-deep: #e7dcc7;
  --paper-light: #fbf8f0;
  --vermilion: #9e3326;
  --vermilion-dark: #71251d;
  --indigo: #203b42;
  --gold: #a98347;
  --rule: rgba(66, 49, 33, 0.23);
  --serif: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
  --content: min(1180px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(121, 91, 53, 0.055) 0 1px, transparent 1.5px) 0 0 / 19px 19px,
    linear-gradient(90deg, rgba(92, 62, 31, 0.026) 1px, transparent 1px) 0 0 / 7px 100%,
    var(--paper);
  font-family: var(--sans);
  line-height: 1.85;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  color: white;
  background: var(--vermilion);
  transform: translateY(-160%);
}

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

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 24px 4vw;
  color: #f7f0df;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: contain;
}

.brand small {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.23em;
}

.header-link {
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.56);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 820px;
  place-items: center;
  overflow: hidden;
  color: #f4eddd;
  background:
    linear-gradient(112deg, rgba(18, 28, 29, 0.2), transparent 45%),
    linear-gradient(145deg, #182d31 0%, #223a3c 48%, #16282a 100%);
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
}

.hero::before {
  inset: 0;
  opacity: 0.22;
  background:
    repeating-linear-gradient(14deg, transparent 0 34px, rgba(232, 215, 177, 0.16) 35px 36px, transparent 37px 74px),
    repeating-linear-gradient(104deg, transparent 0 64px, rgba(232, 215, 177, 0.11) 65px 67px, transparent 68px 132px);
  mask-image: linear-gradient(to bottom, transparent 3%, #000 28%, #000 75%, transparent);
}

.hero::after {
  width: min(720px, 76vw);
  aspect-ratio: 1;
  border: 1px solid rgba(225, 207, 170, 0.17);
  border-radius: 50%;
  box-shadow:
    0 0 0 68px rgba(255, 255, 255, 0.018),
    0 0 0 138px rgba(255, 255, 255, 0.014);
}

.hero__map-lines {
  position: absolute;
  inset: -10%;
  opacity: 0.24;
  background:
    linear-gradient(29deg, transparent 48%, rgba(218, 196, 149, 0.36) 49%, rgba(218, 196, 149, 0.36) 50%, transparent 51%) 35% 30% / 340px 190px,
    linear-gradient(113deg, transparent 48%, rgba(218, 196, 149, 0.25) 49%, rgba(218, 196, 149, 0.25) 50%, transparent 51%) 70% 44% / 410px 260px;
  transform: rotate(-4deg);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 48px));
  padding: 150px 0 110px;
  text-align: center;
}

.hero__eyebrow,
.kicker {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  display: inline-block;
  width: 42px;
  height: 1px;
  margin: 0 16px 4px;
  background: rgba(244, 237, 221, 0.58);
  content: "";
}

.hero__seal {
  position: absolute;
  top: 184px;
  right: 18px;
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0;
  place-items: center;
  border: 2px solid rgba(191, 74, 57, 0.9);
  color: #df8b74;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  transform: rotate(5deg);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(72px, 11vw, 142px);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-shadow: 0 8px 38px rgba(0, 0, 0, 0.22);
}

.hero h1 span {
  display: block;
  margin-bottom: 16px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.7em;
  text-indent: 0.7em;
}

.hero__lead {
  margin: 42px auto 0;
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: 0.08em;
  line-height: 2.15;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  margin-top: 54px;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(244, 237, 221, 0.54);
  font-size: 14px;
  letter-spacing: 0.15em;
  text-decoration: none;
}

.hero__folio {
  position: absolute;
  right: 4vw;
  bottom: 32px;
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
}

.introduction {
  display: grid;
  width: var(--content);
  grid-template-columns: 80px minmax(0, 1.6fr) minmax(300px, 0.75fr);
  gap: clamp(28px, 4vw, 58px);
  padding: 150px 0 135px;
}

.section-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.section-label > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--vermilion);
  color: var(--vermilion);
  font-family: var(--serif);
  font-size: 18px;
}

.section-label p {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.4;
  writing-mode: vertical-rl;
}

.introduction h2,
.register h2,
.closing h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.45;
}

.introduction h2 {
  font-size: clamp(36px, 4.5vw, 62px);
}

.introduction__copy > p {
  max-width: 650px;
  margin: 34px 0 0;
  font-size: 16px;
}

.introduction__copy .introduction__note {
  margin-top: 22px;
  padding-left: 18px;
  border-left: 2px solid var(--vermilion);
  color: var(--ink-soft);
  font-size: 13px;
}

.era-notes {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.era-notes li {
  display: grid;
  grid-template-columns: 32px 1fr;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.era-notes span {
  grid-row: 1 / 3;
  color: var(--vermilion);
  font-family: var(--serif);
  font-size: 17px;
}

.era-notes strong {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.06em;
}

.era-notes small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.07em;
}

.register {
  padding: 128px max(24px, calc((100% - 1180px) / 2)) 150px;
  color: #eee5d3;
  background:
    linear-gradient(rgba(18, 28, 29, 0.94), rgba(18, 28, 29, 0.94)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255, 255, 255, 0.05) 40px);
}

.register__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(235, 223, 198, 0.27);
}

.register__head .kicker {
  color: #c8a86c;
}

.register h2 {
  font-size: clamp(50px, 6vw, 78px);
}

.register__head > p {
  max-width: 390px;
  margin: 0 0 10px;
  color: #c8c0b2;
  font-size: 14px;
}

.register-tools {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 34px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid rgba(235, 223, 198, 0.33);
  border-radius: 0;
  color: #e9e0cf;
  background: transparent;
  cursor: pointer;
}

.filter:hover,
.filter.is-active {
  border-color: var(--gold);
  color: #19282a;
  background: #c9aa70;
}

.search {
  display: grid;
  width: min(300px, 100%);
  gap: 7px;
  color: #c8c0b2;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.search input {
  width: 100%;
  min-height: 46px;
  padding: 9px 13px;
  border: 1px solid rgba(235, 223, 198, 0.33);
  border-radius: 0;
  color: white;
  outline: 0;
  background: rgba(255, 255, 255, 0.04);
}

.search input::placeholder {
  color: #979187;
}

.search input:focus {
  border-color: #d0b377;
  box-shadow: 0 0 0 2px rgba(208, 179, 119, 0.2);
}

.result-status {
  margin: 30px 0 12px;
  color: #b6aea1;
  font-size: 13px;
  letter-spacing: 0.08em;
}

table {
  display: block;
  width: 100%;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

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

tbody tr {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px clamp(135px, 13vw, 170px) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  gap: 8px 14px;
  padding: 20px;
  border: 1px solid rgba(235, 223, 198, 0.2);
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 180ms ease, background 180ms ease;
}

tbody tr:hover {
  border-color: rgba(200, 168, 108, 0.52);
  background: rgba(255, 255, 255, 0.035);
}

tbody td,
tbody th {
  display: block;
  min-width: 0;
  padding: 0;
}

tbody td:first-child {
  grid-column: 1;
  grid-row: 1 / 5;
  text-align: center;
}

.town-photo-cell {
  grid-column: 2;
  grid-row: 1 / 5;
}

tbody th {
  grid-column: 3;
  grid-row: 1;
  text-align: left;
}

tbody td:nth-child(4) {
  grid-column: 3;
  grid-row: 2 / 4;
}

tbody td:nth-child(5) {
  grid-column: 3;
  grid-row: 4;
  align-self: end;
  color: #928b80;
}

tbody td:nth-child(5)::before {
  content: "全 ";
}

tbody td:nth-child(5)::after {
  content: " 頁";
}

tbody td:last-child {
  grid-column: 3;
  grid-row: 4;
  align-self: end;
  justify-self: end;
}

.town-number {
  color: #c8a86c;
  font-family: var(--serif);
  font-size: 18px;
}

.town-photo {
  width: 100%;
  margin: 0;
}

.town-photo img {
  display: block;
  width: 100%;
  height: clamp(96px, 9vw, 114px);
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(235, 223, 198, 0.24);
  filter: saturate(0.72) sepia(0.1);
  object-fit: cover;
  transition: filter 180ms ease;
}

tr:hover .town-photo img {
  filter: saturate(1) sepia(0);
}

.town-photo figcaption {
  margin-top: 7px;
  color: #938b7f;
  font-size: 9px;
  line-height: 1.45;
}

.town-photo figcaption span {
  display: block;
  margin-top: 4px;
  color: #d19a8b;
}

.town-name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(24px, 2.3vw, 31px);
  font-weight: 600;
  letter-spacing: 0.08em;
}

tbody th small {
  display: block;
  margin-top: 4px;
  color: #928b80;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.17em;
}

.page-status {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 7px;
  border: 1px solid rgba(200, 168, 108, 0.35);
  color: #b8aa91;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.page-status--preview {
  border-color: rgba(199, 95, 75, 0.62);
  color: #dd9a88;
}

tbody td {
  color: #bdb6aa;
  font-size: 13px;
}

tbody td p {
  margin: 0;
}

.story-title {
  color: #eee5d3;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.tag {
  display: inline-block;
  margin: 8px 5px 0 0;
  padding: 1px 8px;
  border: 1px solid rgba(200, 168, 108, 0.35);
  color: #c9b48c;
  font-size: 10px;
  line-height: 1.7;
}

.town-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 2px;
  border-bottom: 1px solid #8f7760;
  color: #eee5d3;
  font-family: var(--serif);
  font-size: 14px;
  text-decoration: none;
}

.town-link:hover {
  color: #d7b878;
  border-color: #d7b878;
}

.town-link--disabled {
  color: #928b80;
  border-color: rgba(143, 119, 96, 0.45);
  cursor: default;
}

.empty-message {
  padding: 60px 20px;
  border-bottom: 1px solid rgba(235, 223, 198, 0.25);
  text-align: center;
}

.closing {
  position: relative;
  display: grid;
  width: var(--content);
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 70px;
  padding: 145px 0;
}

.closing__mark {
  display: grid;
  width: 142px;
  aspect-ratio: 1;
  margin: 0;
  place-items: center;
  border: 1px solid var(--vermilion);
  color: var(--vermilion);
  font-family: var(--serif);
  font-size: 68px;
  transform: rotate(-3deg);
}

.closing .kicker {
  color: var(--vermilion);
}

.closing h2 {
  font-size: clamp(36px, 4vw, 56px);
}

.closing div > p:last-child {
  margin: 25px 0 0;
}

.closing > a {
  display: inline-flex;
  align-items: center;
  gap: 45px;
  padding: 18px 22px;
  border: 1px solid var(--ink);
  font-family: var(--serif);
  text-decoration: none;
}

.closing > a:hover {
  color: var(--paper-light);
  background: var(--ink);
}

.global-footer {
  padding: 72px max(24px, calc((100% - 1180px) / 2)) 28px;
  color: #ddd2bf;
  background: #251e19;
}

.global-footer__main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding-bottom: 55px;
}

.global-footer__brand {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 27px;
}

.global-footer__brand small {
  display: block;
  margin-top: 8px;
  color: #9e9384;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.global-footer__main > div:first-child > p:last-child {
  max-width: 460px;
  margin: 0;
  color: #a9a092;
  font-size: 13px;
}

.global-footer__credits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.global-footer__credits p {
  margin: 0;
  padding-top: 13px;
  border-top: 1px solid #5a4d42;
}

.global-footer__credits span,
.global-footer__credits strong,
.global-footer__credits a {
  display: block;
}

.global-footer__credits span {
  color: #968b7d;
  font-size: 11px;
}

.global-footer__credits strong {
  margin: 7px 0;
  font-family: var(--serif);
  font-size: 17px;
}

.global-footer__credits a {
  color: #b9ae9f;
  font-size: 12px;
}

.global-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid #4b4037;
  color: #8f8578;
  font-size: 11px;
}

.global-footer__bottom p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #d8ad55;
  outline-offset: 4px;
}

@media (max-width: 1100px) {
  .hero {
    min-height: 720px;
  }

  .hero__seal {
    position: static;
    margin: 32px auto 20px;
  }

  .hero__eyebrow {
    margin-bottom: 0;
  }

  .introduction {
    grid-template-columns: 72px 1fr;
  }

  .era-notes {
    grid-column: 2;
  }

  .closing {
    grid-template-columns: 120px 1fr;
    gap: 40px;
  }

  .closing__mark {
    width: 110px;
    font-size: 52px;
  }

  .closing > a {
    grid-column: 2;
    justify-self: start;
  }

  .global-footer__main {
    grid-template-columns: 1fr;
    gap: 45px;
  }
}

@media (max-width: 900px) {
  tbody {
    grid-template-columns: 1fr;
  }

  tbody tr {
    grid-template-columns: 42px 190px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  :root {
    --content: min(100% - 32px, 1180px);
  }

  .site-header {
    padding: 17px 18px;
  }

  .header-link {
    display: none;
  }

  .hero {
    min-height: 680px;
  }

  .hero__inner {
    width: min(100% - 32px, 760px);
    padding: 110px 0 70px;
  }

  .hero__eyebrow {
    font-size: 10px;
  }

  .hero__eyebrow::before,
  .hero__eyebrow::after {
    width: 20px;
    margin-inline: 9px;
  }

  .hero h1 {
    font-size: clamp(58px, 20vw, 90px);
    letter-spacing: 0.04em;
  }

  .hero h1 span {
    font-size: 11px;
  }

  .hero__lead {
    font-size: 16px;
    line-height: 2;
  }

  .desktop-break {
    display: none;
  }

  .introduction {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 90px 0;
  }

  .section-label {
    align-items: center;
  }

  .section-label p {
    writing-mode: initial;
  }

  .era-notes {
    grid-column: 1;
  }

  .register {
    padding: 85px 16px 100px;
  }

  .register__head,
  .register-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .register__head {
    gap: 16px;
  }

  .register-tools {
    gap: 24px;
  }

  .search {
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  table,
  tbody,
  tr,
  td,
  tbody th {
    display: block;
    width: 100%;
  }

  tbody tr {
    position: relative;
    padding: 28px 0 36px;
  }

  tbody td,
  tbody th {
    padding: 0;
  }

  tbody td:first-child {
    position: absolute;
    z-index: 2;
    top: 38px;
    left: 10px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #f3e5ca;
    background: rgba(24, 40, 42, 0.9);
    text-align: center;
  }

  .town-photo-cell {
    margin-bottom: 21px;
  }

  .town-photo {
    width: 100%;
  }

  .town-photo img {
    height: clamp(180px, 52vw, 230px);
    aspect-ratio: 16 / 9;
  }

  .town-photo figcaption {
    font-size: 10px;
  }

  tbody th {
    margin-bottom: 17px;
  }

  tbody td:nth-child(4) {
    padding-right: 5px;
  }

  tbody td:nth-child(5) {
    margin-top: 13px;
    color: #928b80;
    text-align: left;
  }

  tbody td:nth-child(5)::before {
    content: "全 ";
  }

  tbody td:nth-child(5)::after {
    content: " 頁";
  }

  tbody td:last-child {
    margin-top: 17px;
  }

  .town-name {
    font-size: 30px;
  }

  .closing {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 90px 0;
  }

  .closing__mark {
    width: 84px;
    font-size: 40px;
  }

  .closing > a {
    grid-column: 1;
  }

  .global-footer {
    padding: 58px 20px 24px;
  }

  .global-footer__credits {
    grid-template-columns: 1fr;
  }

  .global-footer__bottom {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
