@font-face {
  font-family: "Night Theater";
  src: url("/assets/home-night/theater-serif.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Night Mincho";
  src: url("night-mincho.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

.edition.night-typography {
  --night-ink: #11100f;
  --night-ivory: #f1e6d3;
  --night-text: #d2c7b6;
  --night-gold: #d5b15d;
  --night-cool: #32bfb4;
  --night-pink: #ed4999;
  --night-accent: var(--night-gold);
  --night-rule: #685739;
  --night-display: "Night Theater", Georgia, serif;
  --night-mincho: "Night Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
  background: var(--night-ink);
  color: var(--night-text);
  padding-top: clamp(74px, 8vw, 108px);
  font-size: clamp(1rem, .94rem + .28vw, 1.06rem);
  line-height: 2;
}

.night-typography section { border-color: var(--night-rule); }

.night-typography :is(#chapter01, #chapter02, #chapter03, .end) {
  padding-block: clamp(52px, 8vw, 110px);
}

.night-typography #chapter01 { --night-accent: var(--night-cool); }
.night-typography #chapter03 { --night-accent: var(--night-pink); }
.night-typography .gold { color: var(--night-gold); }
.night-typography .pink { color: var(--night-pink); }

.night-typography :is(.intro, .photo-section > .body, .end article) {
  width: min(100%, 37em);
  max-width: none;
}

.night-typography :is(.intro, .body, .end article) > p {
  margin-bottom: 1.05em;
  text-wrap: pretty;
}

.night-title {
  text-align: center;
  padding: clamp(23px, 4vw, 55px) 0 clamp(33px, 5vw, 76px);
}

.night-title::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto 11px;
  background: var(--night-gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.night-typography .night-title__english {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.18em, 2vw, .5em);
  margin: 0;
  color: var(--night-gold);
  font: 700 clamp(2.32rem, 10.35vw, 4.65rem)/1.09 var(--night-display);
  letter-spacing: .055em;
  white-space: nowrap;
}

.night-title__english::before,
.night-title__english::after,
.night-ending__label::before,
.night-ending__label::after {
  content: "";
  flex: 1 1 2.5em;
  max-width: 2.5em;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--night-gold));
}

.night-title__english::after,
.night-ending__label::after { transform: scaleX(-1); }

.night-typography .opening .night-title h1 {
  writing-mode: horizontal-tb;
  max-width: none;
  margin: clamp(22px, 3vw, 43px) 0 0;
  padding: 0;
  color: var(--night-ivory);
  font: 700 clamp(1.6rem, 4.3vw, 2.8rem)/1.36 var(--night-mincho);
  letter-spacing: .025em;
  white-space: normal;
}

.night-title h1 strong,
.philosophy-heading h2 strong,
.night-typography .end h2 strong {
  color: var(--night-accent);
  display: block;
  font-size: 1.23em;
  line-height: 1.3;
}

.night-typography .intro-copy {
  margin-block: clamp(24px, 4vw, 46px);
  font: inherit;
}

.night-typography .intro-trio {
  display: block;
  color: var(--night-gold);
  font: 700 clamp(1rem, 4.4vw, 2.1rem)/1.65 var(--night-mincho);
  text-wrap: balance;
}

.night-typography .intro > p .gold { white-space: nowrap; }

.night-typography .intro-emphasis {
  color: var(--night-ivory);
  font-weight: 600;
}

.night-typography .intro-statement {
  margin-block: clamp(1.75rem, 4vw, 2.65rem) 1.05em;
}

.intro-statement::before {
  content: "";
  display: block;
  width: 2.4em;
  height: 1px;
  margin-bottom: .9em;
  background: var(--night-gold);
}

.intro-statement__message {
  display: block;
  margin-top: .28em;
  color: var(--night-cool);
  font-size: clamp(1.125rem, 2.25vw, 1.35rem);
  font-weight: 600;
  line-height: 1.75;
}

.intro-statement__message span { display: inline-block; max-width: 100%; }

.night-typography .night-record {
  padding-top: clamp(17px, 3vw, 29px);
  border-color: var(--night-rule);
  color: var(--night-text);
}

.night-typography .night-record ul {
  display: grid;
  grid-template-columns: .88fr .72fr 1.4fr;
  align-items: stretch;
  gap: 0;
  margin-bottom: 19px;
  font-size: clamp(.57rem, 1.5vw, .69rem);
  letter-spacing: .085em;
  text-align: center;
}

.night-typography .night-record li {
  display: flex;
  flex-direction: column;
  padding-inline: 4px;
}

.night-typography .night-record li + li { border-inline-start: 1px solid var(--night-rule); }
.night-typography .night-record li + li::before { content: none; }
.night-typography .night-record li span { display: block; }

.night-typography .night-record li strong {
  order: -1;
  display: block;
  margin-bottom: .24em;
  font: 700 clamp(1.45rem, 6.1vw, 2.85rem)/1.1 var(--night-display);
  letter-spacing: -.045em;
}

.night-typography .night-record a { color: var(--night-gold); }

.night-typography .philosophy-heading {
  display: block;
  min-height: 0;
  max-width: none;
  padding: 0;
  border: 0;
  letter-spacing: normal;
}

.night-typography .philosophy-heading__folio {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 2vw, 19px);
  color: var(--night-accent);
  margin: 0;
  font: 700 clamp(.69rem, 1.1vw, .84rem)/1.15 var(--night-display);
  letter-spacing: .18em;
}

.night-typography .philosophy-heading__folio::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--night-accent), transparent);
  opacity: .72;
}

.night-typography :is(#chapter01, #chapter02, #chapter03) .philosophy-heading .num {
  border: 0;
  padding: 0;
  color: var(--night-accent);
  font: 700 clamp(4rem, 14vw, 7.9rem)/.92 var(--night-display);
  letter-spacing: -.05em;
}

.night-typography :is(.philosophy-heading, .end) h2 {
  color: var(--night-ivory);
  margin: clamp(17px, 3vw, 36px) 0 clamp(24px, 4vw, 48px);
  font: 700 clamp(1.72rem, 4.65vw, 3.55rem)/1.38 var(--night-mincho);
  text-wrap: pretty;
}

.night-typography .philosophy-heading h2 {
  color: var(--night-accent);
}

.night-typography .contrast,
.night-typography .contrast em { color: var(--night-text); }
.night-typography .contrast i { color: var(--night-accent); }

.night-typography .philosophy-pairs {
  margin-block: 1.4em;
  border-inline-start: 1px solid var(--night-accent);
  padding-inline-start: 1em;
}

.philosophy-pairs__and { margin-inline: .22em; }

.night-typography :is(.body, .end article) > .night-quote {
  margin-block: clamp(29px, 5vw, 57px);
  color: var(--night-accent);
  font: 700 clamp(1.43rem, 4.4vw, 2.22rem)/1.54 var(--night-mincho);
  text-wrap: pretty;
}

.night-quote::before {
  content: "";
  display: block;
  width: 2.4em;
  height: 1px;
  margin-bottom: .62em;
  background: linear-gradient(90deg, var(--night-accent), transparent);
}

.night-quote :is(span, strong) { display: block; }
.night-quote--closing span { color: var(--night-ivory); }
.night-quote--invitation strong { font-size: 1.15em; }
.night-quote--invitation strong span { display: inline-block; max-width: 100%; }
.night-quote--closing span { font-size: .76em; }
.night-quote--closing strong { margin-top: .34em; }

.night-typography .detail {
  min-height: 54px;
  margin-top: clamp(14px, 3vw, 30px);
  padding: .76em .92em;
  border: 1px solid var(--night-accent);
  color: var(--night-ivory);
  font-size: clamp(.86rem, 2vw, .96rem);
  line-height: 1.6;
}

.night-typography .detail :is(small, span) { color: var(--night-accent); }
.night-typography .detail:hover { color: var(--night-accent); }
.night-typography .detail:focus-visible { outline: 2px solid var(--night-accent); outline-offset: 4px; }

.night-typography .night-ending__label {
  display: flex;
  align-items: center;
  gap: 1em;
  color: var(--night-gold);
  font: 700 clamp(.88rem, 2vw, 1.17rem)/1.4 var(--night-display);
  letter-spacing: .38em;
}

.night-typography .end article > p:last-child {
  color: var(--night-gold);
  font: 700 clamp(1.18rem, 3vw, 1.7rem)/1.56 var(--night-mincho);
}

.night-typography .night-explore h2 { color: var(--night-ivory); font-family: var(--night-mincho); }
.night-typography .night-explore .explore-card strong { color: var(--night-ivory); }

@media (max-width: 700px) {
  .night-typography .photo-section > .body .detail {
    position: relative;
    padding-inline-end: 2em;
  }

  .night-typography .photo-section > .body .detail > span {
    position: absolute;
    inset-inline-end: .92em;
    inset-block-end: .76em;
  }

  .night-typography .opening .night-title h1 {
    width: max-content;
    margin-left: auto;
    margin-right: auto;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: clamp(1.75rem, min(10vw, 5.6svh), 3rem);
    letter-spacing: .07em;
    white-space: nowrap;
  }

  .night-typography .opening .night-title h1 strong {
    display: inline;
    font-size: inherit;
    line-height: inherit;
  }
}
