@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700&family=Noto+Serif+JP:wght@600;700;900&family=Lexend:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --edition-ink: #263b35;
  --edition-paper: #fbfaf6;
  --edition-matcha: #365e50;
  --edition-sakura: #b65362;
  --edition-gold: #bd8f36;
  --edition-indigo: #384765;
  --edition-line: rgba(38, 59, 53, .18);
  --edition-glass-fill: rgba(255, 255, 255, .38);
  --edition-opening-wash: rgba(250, 249, 245, .16);
}

.edition-library {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--edition-ink);
  background:
    linear-gradient(rgba(54, 94, 80, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 94, 80, .045) 1px, transparent 1px),
    radial-gradient(circle at 8% 4%, rgba(182, 83, 98, .13), transparent 32rem),
    radial-gradient(circle at 94% 10%, rgba(189, 143, 54, .12), transparent 30rem),
    var(--edition-paper);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  font-family: 'Lexend', system-ui, sans-serif;
}

.edition-library a { color: inherit; }

/* The language-selection page keeps the grid, but uses the same quiet paper tone as its value panel. */
.edition-library--selection {
  --edition-paper: #faf9f5;
  background:
    linear-gradient(rgba(54, 94, 80, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 94, 80, .045) 1px, transparent 1px),
    var(--edition-paper);
  background-size: 32px 32px, 32px 32px;
}

.edition-library__masthead {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--edition-line);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.edition-library__home { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.pyon-go-home-button__image,
.pyon-go-home-button img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border: 1px solid var(--edition-line);
  border-radius: 12px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 8px 20px rgba(38,59,53,.12);
}
.pyon-go-home-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
}
.pyon-go-home-button:hover,
.pyon-go-home-button:focus-visible,
.edition-library__home:hover,
.edition-library__home:focus-visible { outline: 2px solid var(--edition-gold); outline-offset: 3px; }
.edition-library__mark { color: var(--edition-sakura); }

.edition-library__hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 3.5vw, 46px) 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: clamp(20px, 3vw, 42px);
  align-items: end;
}

.edition-library__hero > * { min-width: 0; }

.edition-library__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The chapter opening carries the scenic backdrop through the Orientation heading. */
.edition-library--chapter-index .edition-shelf--orientation {
  padding-top: 0;
}

.edition-library--chapter-index .edition-library__chapter-opening {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(38, 59, 53, .16);
  border-radius: 2px;
  background-color: #f7f4ec;
  background-image: url('../assets/brand/pyon-go-chapter-backdrop.webp');
  background-position: center 46%;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 18px 48px rgba(38, 59, 53, .1);
}

.edition-library--chapter-index .edition-library__chapter-opening::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  background: var(--edition-opening-wash);
}

.edition-library--chapter-index .edition-library__chapter-opening > * {
  position: relative;
  z-index: 1;
}

.edition-library--chapter-index .edition-library__chapter-hero {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: clamp(208px, 25.6vw, 320px);
  margin: 0;
  padding: clamp(28px, 4vw, 52px);
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.edition-library--chapter-index .edition-library__orientation-heading {
  margin: 0;
  padding: 0 clamp(14px, 4vw, 52px) 10px;
}

.edition-library--chapter-index .edition-shelf--orientation > .edition-grid {
  background: var(--edition-paper);
}

.edition-library--chapter-index .edition-library__chapter-opening .edition-library__value {
  width: min(100%, 980px);
  padding: clamp(1.65rem, 3.2vw, 2.55rem) clamp(1.8rem, 4.8vw, 4.4rem) clamp(1.7rem, 3.4vw, 2.7rem);
  margin: 0 auto;
  background: rgba(250, 255, 254, .20);
  backdrop-filter: blur(3px) saturate(1.02);
  -webkit-backdrop-filter: blur(3px) saturate(1.02);
  opacity: 1;
  box-shadow: 0 14px 34px rgba(38, 59, 53, .1);
}

.edition-library--chapter-index .edition-library__chapter-opening .edition-library__value h2 {
  font-size: clamp(1.3rem, 2.1vw, 1.7rem);
  line-height: 1.2;
}

.edition-library--chapter-index .edition-library__chapter-opening .edition-library__value p {
  margin-top: .8rem;
  font-size: clamp(.95rem, 1.25vw, 1.12rem);
  line-height: 1.55;
}

.edition-library--chapter-index .edition-library__chapter-opening .edition-library__value .edition-library__value-note {
  padding-top: .8rem;
  font-size: clamp(.78rem, 1vw, .92rem);
}

.edition-library__eyebrow {
  margin: 0 0 14px;
  color: var(--edition-sakura);
  font: 700 11px/1.4 'Space Mono', monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.edition-library h1 {
  max-width: 820px;
  margin: 0;
  font: 900 clamp(3.2rem, 8vw, 7.2rem)/.88 'Noto Serif JP', serif;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.edition-library h1 em {
  color: var(--edition-sakura);
  font-weight: 600;
}

.edition-library h1.edition-library__title {
  max-width: 720px;
  line-height: 0;
  letter-spacing: 0;
}

.edition-library__logotype {
  display: block;
  width: min(100%, 720px);
  line-height: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 .8%, #000 99.2%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 .8%, #000 99.2%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 .8%, #000 99.2%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 .8%, #000 99.2%, transparent 100%);
  mask-composite: intersect;
}

.edition-library__logotype img {
  display: block;
  width: 100%;
  height: auto;
}

.edition-library__logotype-frame {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(6px, .85vw, 10px);
  border: 1px solid var(--edition-line);
  border-top: 3px solid var(--edition-gold);
  border-left: 3px solid var(--edition-matcha);
  border-radius: 2px;
  background: rgba(255, 255, 255, .28);
  box-shadow: 0 10px 24px rgba(38, 59, 53, .08);
  backdrop-filter: blur(5px) saturate(1.05);
  -webkit-backdrop-filter: blur(5px) saturate(1.05);
  line-height: 0;
}

/* Keep the selection banner present but give the edition grid more room above the fold. */
.edition-library--selection .edition-library__hero {
  padding-top: clamp(22px, 3.15vw, 41px);
  padding-bottom: 22px;
  gap: clamp(18px, 2.7vw, 38px);
  align-items: stretch;
}

.edition-library--selection .edition-library__logotype-frame { width: min(100%, 583px); }

/* The selection page uses the same glass language as the chapter index. The value
   panel keeps its content height; the banner follows that row instead of creating
   a large empty equal-height box around the copy. */
.edition-library--selection .edition-library__banner,
.edition-library--selection .edition-library__value {
  box-sizing: border-box;
  border: 1px solid rgba(38, 59, 53, .16);
  border-radius: 2px;
  background: rgba(250, 255, 254, .20);
  backdrop-filter: blur(3px) saturate(1.02);
  -webkit-backdrop-filter: blur(3px) saturate(1.02);
  box-shadow: 0 14px 34px rgba(38, 59, 53, .1);
}

.edition-library--selection .edition-library__banner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 560px);
  justify-self: center;
  padding: .58rem .9rem .62rem;
  border-top: 3px solid var(--edition-gold);
  border-left: 3px solid var(--edition-matcha);
}

.edition-library--selection .edition-library__banner .edition-library__eyebrow {
  margin-bottom: 0;
}

.edition-library--selection .edition-library__title {
  display: block;
  flex: 0 0 auto;
  max-width: none;
  min-height: 0;
}

.edition-library--selection .edition-library__logotype-frame {
  width: min(100%, 320px);
  margin: 0 auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.edition-library--selection .edition-library__value {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: min(100%, 420px);
  justify-self: center;
  padding: 1rem 1.15rem 1.05rem;
}

.edition-library--selection .edition-library__value h2 { font-size: 1.15rem; }
.edition-library--selection .edition-library__value p { margin-top: .63rem; font-size: .92rem; }
.edition-library--selection .edition-library__value .edition-library__value-note {
  padding-top: .63rem;
  font-size: .78rem;
}

.edition-library--selection .edition-library__hero {
  border-bottom: 1px solid var(--edition-line);
}

.edition-library--selection .edition-library__hero > div:first-child,
.edition-library--selection .edition-library__value {
  align-self: stretch;
}

.edition-library__value {
  align-self: end;
  box-sizing: border-box;
  width: 100%;
  padding: 1.15rem 1.3rem 1.2rem;
  border: 1px solid rgba(17, 17, 17, .14);
  border-radius: 2px;
  color: #111;
  background: var(--edition-glass-fill);
  backdrop-filter: blur(8px) saturate(1.05);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
  font-family: 'DM Sans', 'Noto Sans JP', system-ui, sans-serif;
}

.edition-library__value h2 {
  margin: 0;
  color: #111;
  font: 700 1rem/1.25 'DM Sans', 'Noto Sans JP', system-ui, sans-serif;
  letter-spacing: 0;
}

.edition-library__value p {
  margin: .55rem 0 0;
  color: #111;
  font: 400 .8rem/1.55 'DM Sans', 'Noto Sans JP', system-ui, sans-serif;
}

.edition-library__value .edition-library__value-note {
  padding-top: .55rem;
  border-top: 1px solid rgba(17, 17, 17, .14);
  font-size: .68rem;
  font-weight: 700;
}

.edition-library__practice {
  box-sizing: border-box;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 18px 15px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(17, 17, 17, .14);
  border-left: 6px solid var(--edition-gold);
  border-radius: 2px;
  background: rgba(255, 255, 255, .52);
  backdrop-filter: blur(8px);
}

.edition-library__practice-copy { min-width: 0; }

.edition-library__practice-label {
  margin: 0 0 4px;
  color: var(--edition-gold);
  font: 700 9px/1.3 'Space Mono', monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.edition-library__practice h2 {
  margin: 0;
  color: #111;
  font: 700 clamp(1.25rem, 2vw, 1.7rem)/1.1 'Noto Serif JP', serif;
}

.edition-library__practice-copy > p:last-child {
  max-width: none;
  margin: .35rem 0 0;
  color: #111;
  font: 400 .78rem/1.5 'DM Sans', 'Noto Sans JP', system-ui, sans-serif;
}

.edition-library__practice-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--edition-matcha);
  border-radius: 999px;
  color: var(--edition-matcha);
  background: rgba(255, 255, 255, .7);
  font: 700 9px/1.3 'Space Mono', monospace;
  letter-spacing: .06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.edition-library__practice-link:hover,
.edition-library__practice-link:focus-visible {
  color: #fff;
  background: var(--edition-matcha);
  outline: 0;
  transform: translateY(-2px);
}

.edition-shelf {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 40px;
}

.edition-shelf__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.edition-shelf__heading h2 {
  margin: 0;
  font: 700 clamp(1.45rem, 3vw, 2.25rem)/1.1 'Noto Serif JP', serif;
}

.edition-shelf__heading p {
  margin: 0;
  color: #69756f;
  font: 700 10px/1.4 'Space Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.edition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--edition-line);
  border-left: 1px solid var(--edition-line);
}

/* The Orientation shelf has one entry; let it use the full desktop row. */
@media (min-width: 821px) {
  .edition-library--chapter-index .edition-shelf--orientation > .edition-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The wide Orientation entry is a visual map, with one shared reading action. */
.orientation-film-roll {
  --orientation-control-height: 115px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  height: var(--orientation-control-height);
  min-height: var(--orientation-control-height);
  padding: 8px 12px;
  overflow: hidden;
  border-right: 1px solid var(--edition-line);
  border-bottom: 1px solid var(--edition-line);
  border-left: 6px solid var(--edition-matcha);
  color: #25463d;
  background:
    linear-gradient(135deg, rgba(223, 241, 237, .78), rgba(255, 251, 237, .72)),
    var(--edition-paper);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.orientation-film-roll::before {
  position: absolute;
  inset: 10px 10px auto;
  height: 1px;
  content: '';
  background: linear-gradient(90deg, transparent, rgba(54, 94, 80, .3), transparent);
}

.orientation-film-roll:hover,
.orientation-film-roll:focus-visible {
  z-index: 1;
  outline: 0;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(38, 59, 53, .16);
  background:
    linear-gradient(135deg, rgba(214, 239, 233, .92), rgba(255, 248, 228, .88)),
    var(--edition-paper);
}

.orientation-film-roll__summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.orientation-film-roll__summary > span {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  color: #6b756f;
  font: 700 9px/1.35 'Space Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.orientation-film-roll__track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  box-sizing: border-box;
  padding: 3px 0;
  overflow: hidden;
  border-top: 1px solid rgba(54, 94, 80, .22);
  border-bottom: 1px solid rgba(54, 94, 80, .22);
  background: rgba(255, 255, 255, .28);
}

.orientation-film-roll__track::before,
.orientation-film-roll__track::after {
  display: none;
}

.orientation-film-page {
  position: relative;
  display: block;
  flex: 0 0 50px;
  width: 50px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(38, 59, 53, .2);
  background: #fbfaf4;
  box-shadow: 0 8px 16px rgba(38, 59, 53, .11);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.orientation-film-roll:hover .orientation-film-page,
.orientation-film-roll:focus-visible .orientation-film-page {
  box-shadow: 0 10px 18px rgba(38, 59, 53, .15);
}

.orientation-film-page::before {
  position: absolute;
  inset: 0;
  content: '';
  opacity: .5;
  background: repeating-linear-gradient(to bottom, transparent 0 17px, rgba(54, 94, 80, .08) 17px 18px);
}

.orientation-film-page::after {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
}

.orientation-film-page__number,
.orientation-film-page__eyebrow,
.orientation-film-page__title,
.orientation-film-page__body,
.orientation-film-page__footer {
  position: absolute;
  display: block;
  z-index: 1;
}

.orientation-film-page__number {
  top: 9px;
  right: 10px;
  color: rgba(37, 70, 61, .7);
  font: 700 8px/1 'Space Mono', monospace;
  letter-spacing: .08em;
}

.orientation-film-page__eyebrow {
  top: 18%;
  left: 12%;
  width: 34%;
  height: 4px;
  background: var(--edition-red);
}

.orientation-film-page__title {
  top: 29%;
  left: 12%;
  width: 72%;
  height: 11px;
  background: rgba(37, 70, 61, .8);
}

.orientation-film-page__body {
  top: 48%;
  left: 12%;
  width: 77%;
  height: 4px;
  background: rgba(54, 94, 80, .42);
}

.orientation-film-page__body--short {
  top: 55%;
  width: 58%;
  background: rgba(54, 94, 80, .25);
}

.orientation-film-page__footer {
  right: 12%;
  bottom: 10%;
  width: 38%;
  height: 4px;
  border-top: 1px solid rgba(185, 67, 79, .48);
}

.orientation-film-page--cover {
  background: linear-gradient(155deg, rgba(255, 250, 232, .98), rgba(221, 239, 234, .9));
}

.orientation-film-page--cover::after {
  inset: 33% 10% 28%;
  background: url('../assets/brand/pyon-go-logotype.webp') center / contain no-repeat;
}

.orientation-film-page--cover .orientation-film-page__title,
.orientation-film-page--cover .orientation-film-page__body,
.orientation-film-page--cover .orientation-film-page__body--short { opacity: .18; }

.orientation-film-page--imprint { background: linear-gradient(145deg, #fbfaf4, #f0e9df); }
.orientation-film-page--imprint .orientation-film-page__eyebrow { background: var(--edition-gold); }
.orientation-film-page--imprint .orientation-film-page__title { width: 54%; height: 8px; }

.orientation-film-page--promise { background: linear-gradient(150deg, rgba(226, 241, 236, .96), #fbfaf4); }
.orientation-film-page--promise::after {
  inset: 64% 12% 17%;
  border-top: 2px solid rgba(185, 67, 79, .5);
  border-bottom: 2px solid rgba(95, 159, 172, .5);
}

.orientation-film-page--method { background: linear-gradient(150deg, #fbfaf4, rgba(239, 230, 241, .8)); }
.orientation-film-page--method::after {
  inset: auto 12% 17%;
  height: 8px;
  background: linear-gradient(90deg, var(--edition-matcha) 0 25%, var(--edition-signal) 25% 50%, var(--edition-red) 50% 75%, var(--edition-gold) 75%);
}

.orientation-film-page--cast { background: linear-gradient(150deg, rgba(242, 247, 235, .96), #fbfaf4); }
.orientation-film-page--cast::after {
  inset: 53% 6% 5%;
  background:
    url('../assets/mascots/tsuki_expr.png') 8% 100% / 28% auto no-repeat,
    url('../assets/mascots/selene_master.png') 50% 100% / 28% auto no-repeat,
    url('../assets/mascots/marina_master.png') 92% 100% / 28% auto no-repeat;
}

.orientation-film-page--scripts { background: linear-gradient(145deg, rgba(226, 239, 244, .9), #fbfaf4); }
.orientation-film-page--scripts::after {
  content: 'あ い う';
  inset: auto 10% 20%;
  color: rgba(54, 94, 80, .68);
  font: 700 clamp(.9rem, 2vw, 1.35rem)/1 'Noto Serif JP', serif;
  letter-spacing: .14em;
  text-align: center;
}

/* The roll uses captures of the actual Orientation sheets, not abstract page shapes. */
.orientation-film-page {
  width: 100%;
  justify-self: stretch;
  aspect-ratio: 344 / 486;
  background: #fff;
}

.orientation-film-page::before,
.orientation-film-page::after { display: none; }

.orientation-film-page > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edition-card {
  position: relative;
  min-height: 88px;
  padding: 14px 17px 13px 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  border-right: 1px solid var(--edition-line);
  border-bottom: 1px solid var(--edition-line);
  background: rgba(255, 255, 255, .7);
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.edition-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  content: '';
  background: var(--edition-accent, var(--edition-matcha));
}

.edition-card::after {
  position: absolute;
  right: 14px;
  top: 12px;
  content: attr(data-shelf-mark);
  color: rgba(54, 94, 80, .17);
  font: 900 2rem/1 'Noto Serif JP', serif;
}

.edition-card:hover,
.edition-card:focus-visible,
.edition-card[data-suggested] {
  z-index: 1;
  color: #fff;
  background: var(--edition-accent, var(--edition-matcha));
  outline: 0;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(38, 59, 53, .17);
}

.edition-card:hover::before,
.edition-card:focus-visible::before,
.edition-card[data-suggested]::before { background: rgba(255,255,255,.72); }
.edition-card:hover::after,
.edition-card:focus-visible::after,
.edition-card[data-suggested]::after { color: rgba(255,255,255,.18); }

.edition-card strong {
  position: relative;
  font: 700 clamp(1.05rem, 1.7vw, 1.32rem)/1.2 'Noto Serif JP', serif;
}

.edition-card span {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #6b756f;
  font: 700 9px/1.35 'Space Mono', monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.edition-card:hover span,
.edition-card:focus-visible span,
.edition-card[data-suggested] span { color: rgba(255,255,255,.76); }

.edition-card--locked {
  background: rgba(255, 252, 246, .92);
  box-shadow: inset 0 0 0 1px rgba(166, 110, 43, .18);
}

.edition-card--locked::before {
  background: #c89d45;
}

.edition-card--locked span { color: #6b5a3d; }

.edition-card__title {
  position: relative;
  color: #2f4a40;
  font: 600 clamp(.92rem, 1.25vw, 1.02rem)/1.3 "Noto Serif JP", serif;
  font-style: normal;
}

.edition-card--locked .edition-card__title { color: #5a4526; }

.edition-card:hover .edition-card__title,
.edition-card:focus-visible .edition-card__title { color: #fff; }

/* Members-only chapter: the whole card links to the page; the website asks visitors to join first. */
.edition-card__join {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #e2ece6;
  color: #2f5546;
  font: 700 9px/1.2 "Space Mono", monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.edition-card:hover .edition-card__join,
.edition-card:focus-visible .edition-card__join {
  background: #fff;
  color: var(--edition-matcha);
}

.edition-library__foot {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 34px;
  border-top: 1px solid var(--edition-line);
  color: #6b756f;
  font: 400 10px/1.6 'Space Mono', monospace;
}

.pyon-go-edition-ribbon {
  width: min(182mm, calc(100% - 24px));
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  color: #5b534d;
  font: 700 10px/1.3 'Space Mono', monospace;
  letter-spacing: .06em;
}

.pyon-go-edition-ribbon strong { color: var(--edition-matcha); }
.pyon-go-edition-ribbon > a:last-child { margin-left: auto; color: #8f3544; text-underline-offset: 3px; }
.pyon-go-edition-ribbon__back {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(38, 59, 53, .22);
  border-radius: 1px;
  background: rgba(255, 255, 255, .5);
  font: 700 17px/1 'Space Mono', monospace;
  letter-spacing: 0;
  text-decoration: none;
}

.pyon-go-edition-ribbon__back:hover,
.pyon-go-edition-ribbon__back:focus-visible {
  color: #fff;
  border-color: var(--edition-sakura);
  background: var(--edition-sakura);
  outline: 0;
}

/* The chapter index uses a sticky Paper Rail for quick wayfinding without hiding the shelves. */
.pyon-go-paper-rail {
  position: sticky;
  top: 0;
  z-index: 20;
  box-sizing: border-box;
  width: min(1180px, calc(100% - 32px));
  min-height: 66px;
  margin: 0 auto 16px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: minmax(136px, 176px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(38, 59, 53, .2);
  border-top: 3px solid var(--edition-gold);
  border-radius: 0 0 2px 2px;
  background: rgba(251, 250, 246, .88);
  box-shadow: 0 12px 28px rgba(38, 59, 53, .11);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pyon-go-paper-rail::before {
  position: absolute;
  inset: 0 auto 0 -1px;
  width: 4px;
  content: '';
  background: var(--edition-matcha);
}

.pyon-go-paper-rail a {
  color: inherit;
  text-decoration: none;
}

.pyon-go-paper-rail__brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--edition-matcha) !important;
  font: 700 9px/1.2 'Space Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pyon-go-paper-rail__brand-frame {
  display: block;
  width: 124px;
  box-sizing: border-box;
  flex: 0 0 auto;
  padding: 4px 6px;
  border: 1px solid rgba(38, 59, 53, .22);
  border-top: 2px solid var(--edition-gold);
  border-left: 2px solid var(--edition-matcha);
  border-radius: 2px;
  background: rgba(255, 255, 255, .5);
  box-shadow: 0 4px 10px rgba(38, 59, 53, .08);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  line-height: 0;
}

.pyon-go-paper-rail__brand-frame picture,
.pyon-go-paper-rail__brand-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.pyon-go-paper-rail__brand:hover .pyon-go-paper-rail__brand-frame,
.pyon-go-paper-rail__brand:focus-visible .pyon-go-paper-rail__brand-frame {
  border-color: var(--edition-matcha);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 6px 14px rgba(38, 59, 53, .13);
}

.pyon-go-paper-rail__brand:focus-visible {
  outline: 2px solid rgba(54, 94, 80, .3);
  outline-offset: 3px;
}

.pyon-go-paper-rail__brand > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pyon-go-paper-rail__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pyon-go-paper-rail__action {
  padding: 7px 9px;
  color: #5b534d;
  font: 700 9px/1.3 'Space Mono', monospace;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.pyon-go-paper-rail__action {
  border: 1px solid rgba(38, 59, 53, .22);
  border-radius: 1px;
  background: rgba(255, 255, 255, .5);
}

.pyon-go-paper-rail__action:hover,
.pyon-go-paper-rail__action:focus-visible {
  color: #fff;
  border-color: var(--edition-sakura);
  background: var(--edition-sakura);
  outline: 0;
}

.pyon-go-paper-rail__action--back {
  width: 30px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  letter-spacing: 0;
  line-height: 1;
}

.pyon-go-paper-rail__home {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(38, 59, 53, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .65);
}

.pyon-go-paper-rail__home img {
  display: block;
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.pyon-go-paper-rail__home:hover,
.pyon-go-paper-rail__home:focus-visible {
  border-color: var(--edition-matcha);
  outline: 2px solid rgba(54, 94, 80, .22);
  outline-offset: 2px;
}

.edition-library--chapter-index [id$='-shelf-title'] {
  scroll-margin-top: 94px;
}

/* The chapter index is a wayfinding page, so its title should leave room for the first shelf. */
.edition-library h1#chapter-index-title {
  font-size: clamp(2.45rem, 6vw, 5.25rem);
}

@media (max-width: 820px) {
  .edition-library__hero { grid-template-columns: minmax(0, 1fr); }
  .edition-library__value { max-width: 58ch; }
  .edition-library--selection .edition-library__banner,
  .edition-library--selection .edition-library__value {
    width: min(100%, 560px);
  }
  .edition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orientation-film-roll__track {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

@media (max-width: 520px) {
  .edition-library__masthead { align-items: flex-start; flex-direction: column; }
  .edition-library__hero { display: block; padding-top: 30px; }
  .edition-library--selection .edition-library__banner {
    min-height: 0;
    padding: .9rem 1rem .95rem;
  }
  .edition-library--selection .edition-library__title { display: block; }
  .edition-library--selection .edition-library__value {
    min-height: 0;
    padding: 1rem 1.05rem 1.08rem;
  }
  .edition-library--selection .edition-library__value h2 { font-size: .92rem; }
  .edition-library--selection .edition-library__value p { margin-top: .45rem; font-size: .74rem; line-height: 1.45; }
  .edition-library--selection .edition-library__value .edition-library__value-note { padding-top: .55rem; font-size: .64rem; }
  .edition-library--chapter-index .edition-library__chapter-hero {
    display: grid;
    min-height: 232px;
    padding: 24px 14px;
  }
  .edition-library h1 { font-size: clamp(2.45rem, 12vw, 3.35rem); letter-spacing: -.04em; }
  .edition-library h1#chapter-index-title { font-size: clamp(2.15rem, 10vw, 2.9rem); }
  .edition-library__value { width: 100%; max-width: 100%; margin-top: 14px; padding: .9rem 1rem .95rem; }
  .edition-library__value h2 { font-size: .92rem; }
  .edition-library__value p { margin-top: .45rem; font-size: .74rem; line-height: 1.45; }
  .edition-library__value .edition-library__value-note { font-size: .64rem; }
  .edition-library--chapter-index .edition-library__chapter-opening .edition-library__value {
    padding: 1.15rem 1.2rem 1.2rem;
  }
  .edition-library--chapter-index .edition-library__chapter-opening .edition-library__value h2 {
    font-size: 1.08rem;
  }
  .edition-library--chapter-index .edition-library__chapter-opening .edition-library__value p {
    margin-top: .55rem;
    font-size: .82rem;
    line-height: 1.5;
  }
  .edition-library--chapter-index .edition-library__chapter-opening .edition-library__value .edition-library__value-note {
    padding-top: .6rem;
    font-size: .7rem;
  }
  .edition-library__practice {
    display: block;
    width: calc(100% - 32px);
    padding: 13px 14px 14px 16px;
  }
  .edition-library__practice-copy > p:last-child { font-size: .72rem; line-height: 1.45; }
  .edition-library__practice-link { margin-top: 11px; }
  .edition-shelf__heading { align-items: flex-start; flex-direction: column; }
  .edition-grid { grid-template-columns: 1fr; }
  .orientation-film-roll {
    --orientation-control-height: 107px;
    padding: 10px 12px;
  }
  .orientation-film-roll__summary { align-items: center; }
  .orientation-film-roll__summary > span { gap: 8px; font-size: 8px; }
  .orientation-film-roll__track {
    gap: 6px;
    margin-top: 4px;
    padding: 3px 6px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .orientation-film-page {
    flex-basis: 44px;
    width: 44px;
  }
  .edition-card { min-height: 84px; padding: 12px 14px 11px 21px; }
  .pyon-go-edition-ribbon { align-items: flex-start; flex-direction: column; }
  .pyon-go-paper-rail {
    width: calc(100% - 20px);
    margin-bottom: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
  }
  .pyon-go-paper-rail__brand-frame { width: 112px; }
  .pyon-go-paper-rail__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 5px;
  }
  .pyon-go-paper-rail__action { padding: 6px 7px; font-size: 8px; }
  .pyon-go-paper-rail__action--back { width: 28px; height: 28px; padding: 0; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .edition-card { transition: none; }
}

@media print {
  .pyon-go-edition-ribbon,
  .pyon-go-paper-rail { display: none !important; }
}

/* One coherent book introduction, rather than a floating logo inside a frame. */
.edition-library--selection .edition-library__hero {
  box-sizing: border-box;
  margin: 28px auto 30px;
  padding: clamp(22px, 3vw, 38px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  border: 1px solid #d7dfd9;
  border-radius: 22px;
  background: linear-gradient(115deg, #fffdf8, #f3f9f8);
  box-shadow: 0 12px 28px rgba(38,59,53,.05);
}
.edition-library--selection .edition-library__banner,
.edition-library--selection .edition-library__value {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  align-self: center;
}
.edition-library--selection .edition-library__banner .edition-library__eyebrow {
  margin: 0 0 18px;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .12em;
  color: #8c3b4d;
}
.edition-library--selection .edition-library__logotype-frame {
  width: 100%;
  max-width: 480px;
  margin: 0;
  padding: 0;
}
.edition-library--selection .edition-library__logotype { mask: none; -webkit-mask: none; }
.edition-library--selection .edition-library__logotype img { border-radius: 12px; }
.edition-library--selection .edition-library__value h2 {
  font-family: 'Lexend', system-ui, sans-serif;
  font-size: clamp(1.3rem, 2.1vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -.025em;
}
.edition-library--selection .edition-library__value p { margin-top: 16px; font-size: 1rem; line-height: 1.65; }
.edition-library--selection .edition-library__value .edition-library__value-note { margin-top: 18px; padding-top: 16px; font-size: .86rem; line-height: 1.6; }
@media (max-width: 820px) {
  .edition-library--selection .edition-library__hero { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 20px; padding: 24px; }
  .edition-library--selection .edition-library__logotype-frame { max-width: 440px; }
  .edition-library--selection .edition-library__value { max-width: none; }
}
@media (max-width: 520px) {
  .edition-library--selection .edition-library__hero { padding: 20px; border-radius: 18px; }
  .edition-library--selection .edition-library__value h2 { font-size: 1.35rem; }
  .edition-library--selection .edition-library__value p { font-size: .95rem; }
  .edition-library--selection .edition-library__value .edition-library__value-note { font-size: .82rem; }
}

/* Japanese edition (2026-11-06): Japanese text set inside an English-shaped layout. Under lang="ja" the same
   fonts draw brackets and kana wider and lines taller, which pushed p.21 and p.42 past their B5 sheet.
   Proportional kana widths keep the Kanji Story Card's reading rows on one line; a set line height keeps
   glosses the height of the English. Other editions are untouched. */
:lang(ja) .kanji-card span.v { font-feature-settings: "palt"; }
:lang(ja) .gloss { line-height: 1.3; }
