:root {
  --night: #170d1c;
  --velvet: #25152c;
  --gold: #c8a35a;
  --gold-line: rgba(200, 163, 90, 0.32);
  --paper: #ece2d4;
  --card: #efe6d8;
  --mute: #a7969f;
  --gutter: 1.375rem;
  --measure: 34em;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
}

html:not(.age-ok) body {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', serif;
  font-size: 1.0625rem;
  line-height: 2;
  letter-spacing: 0.02em;
  font-kerning: normal;
  line-break: strict;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

::selection {
  background: var(--gold);
  color: var(--night);
}

/* ---------- age gate ---------- */

#age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 2rem var(--gutter) calc(2rem + env(safe-area-inset-bottom));
  background: var(--night);
  overflow-y: auto;
}

#age-gate[hidden],
.age-ok #age-gate {
  display: none;
}

#age-gate:focus {
  outline: none;
}

.gate-inner {
  width: 100%;
  max-width: 21rem;
  text-align: center;
}

.gate-site {
  writing-mode: vertical-rl;
  margin: 0 auto 1.75rem;
  color: var(--gold);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
}

.gate-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.gate-message {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.95;
  text-align: left;
}

.gate-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}

.gate-actions button {
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.9rem 1rem;
  border-radius: 3px;
  cursor: pointer;
}

.gate-yes {
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--night);
  font-weight: 800;
}

.gate-no {
  background: transparent;
  border: 1px solid var(--gold-line);
  color: var(--paper);
}

/* ---------- shared ---------- */

.masthead {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 0;
}

.brand {
  color: var(--gold);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-decoration: none;
}

.site-footer {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 4.5rem auto 0;
  padding: 2rem var(--gutter) calc(2.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--gold-line);
  color: var(--mute);
  font-size: 0.8125rem;
  line-height: 1.9;
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

.copy {
  margin-top: 1rem !important;
}

/* ---------- index ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.5rem;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  min-height: 64svh;
  margin: 0 auto;
  padding: 3rem var(--gutter) 2.75rem;
  overflow-x: clip;
}

.hero-title {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  writing-mode: vertical-rl;
  margin: 0;
  color: var(--gold);
  font-size: clamp(4.5rem, 23vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.hero-lede {
  margin: 0 0 1rem;
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.85;
}

.hero-sub {
  margin: 0;
  color: var(--mute);
  font-size: 0.875rem;
  line-height: 1.9;
}

.shelf {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.shelf-title {
  margin: 0 0 0.5rem;
  color: var(--mute);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.story-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-item a {
  display: block;
  padding: 1.5rem 0 1.625rem;
  border-top: 1px solid var(--gold-line);
  color: inherit;
  text-decoration: none;
}

.story-item time {
  display: block;
  color: var(--mute);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.story-title {
  display: block;
  margin: 0.375rem 0 0.5rem;
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.6;
  font-feature-settings: 'palt';
}

.story-item a:hover .story-title {
  color: var(--gold);
}

.story-teaser {
  display: block;
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.9;
}

.empty {
  color: var(--mute);
}

/* ---------- story ---------- */

.story-head,
.story-body,
.page {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.story-head {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.story-h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.625rem, 6.8vw, 2.375rem);
  font-weight: 800;
  line-height: 1.5;
  font-feature-settings: 'palt';
}

.story-meta,
.story-cast,
.story-note {
  margin: 0;
  color: var(--mute);
  font-size: 0.875rem;
  line-height: 1.85;
}

.story-note {
  margin-top: 0.75rem;
}

.cast {
  white-space: nowrap;
}

.story-body p {
  margin: 0 0 1.5em;
}

/* Each change of viewpoint is handed over like a business card at the table:
   odd cards from the left, even cards from the right. */
.story-body h2 {
  width: fit-content;
  max-width: 88%;
  margin: 3.25rem 0 2.25rem;
  padding: 0.85rem 1.5rem;
  background: var(--card);
  color: var(--night);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.08em;
  border-radius: 2px;
  outline: 1px solid rgba(160, 120, 50, 0.55);
  outline-offset: -6px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  transform: rotate(-1.6deg);
}

.story-body h2:nth-of-type(even) {
  margin-left: auto;
  transform: rotate(1.4deg);
}

.story-body h2:first-child {
  margin-top: 0.5rem;
}

.ad {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 3rem auto 0;
  padding: 1rem var(--gutter) 1.25rem;
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
}

.ad-label {
  margin: 0 0 0.5rem;
  color: var(--mute);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.story-nav {
  display: grid;
  gap: 1rem;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 3rem auto 0;
  padding: 0 var(--gutter);
}

.story-nav a {
  display: block;
  line-height: 1.7;
}

.story-nav span {
  display: block;
  color: var(--mute);
  font-size: 0.8125rem;
}

/* ---------- plain pages ---------- */

.page {
  padding-top: 2.5rem;
}

.page h1 {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.5;
}

.page h2 {
  margin: 2.25rem 0 0.5rem;
  color: var(--gold);
  font-size: 1.125rem;
  font-weight: 600;
}

.page p {
  margin: 0 0 1rem;
}

@media (min-width: 720px) {
  body {
    font-size: 1.125rem;
  }

  .hero {
    min-height: 56vh;
    padding-top: 5rem;
  }
}
