/* The recovered visual system stays in assets/index-DgcCvmow.css. */
.hero-approved-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* World: separate the original canon from the dormitory continuity. */
.world-split-page {
  --main-accent: #b42442;
  --dorm-accent: #8b6fb0;
}

.world-branch-subnav {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-intro:has(+ .world-branch-subnav) .page-intro-content {
  background-image:
    linear-gradient(110deg, rgba(25, 7, 15, .8), rgba(8, 5, 8, .84)),
    url('/artwork/world-continuities-strip.webp');
  background-position: center 48%;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 60px rgba(4, 2, 4, .34);
}

.page-intro:has(+ .world-branch-subnav) .page-intro-content > * {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .92);
}

.world-branch-choice {
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6.5rem);
}

.world-split-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.world-split-heading h2 {
  margin: .55rem 0 .7rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.world-split-heading p,
.world-branch-header > p,
.world-lore-grid p {
  color: rgba(239, 232, 239, .78);
  font-size: 1rem;
  line-height: 1.85;
}

.world-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.world-path-card {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(145deg, rgba(14,11,18,.96), rgba(29,21,31,.9));
  color: #f7eff5;
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease;
}

.world-path-card::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 46%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: .24;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%);
  mask-image: linear-gradient(to right, transparent 0%, #000 38%);
  pointer-events: none;
}

.world-path-main::before {
  background-image: url('/artwork/world-main-castle.webp');
}

.world-path-dorm::before {
  background-image: url('/artwork/world-dormitory-room.webp');
}

.world-path-card small,
.world-path-card strong,
.world-path-card > span {
  position: relative;
  z-index: 2;
}

.world-path-card > span {
  max-width: 58%;
}

.world-path-main { border-left: 3px solid var(--main-accent); }
.world-path-dorm { border-left: 3px solid var(--dorm-accent); }
.world-path-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.3); }
.world-path-card small { margin-bottom: .7rem; color: rgba(255,255,255,.62); letter-spacing: .16em; }
.world-path-card strong { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 500; }
.world-path-card span { max-width: 33rem; margin-top: .5rem; color: rgba(255,255,255,.76); line-height: 1.7; }
.world-path-card i { position: absolute; right: 1.3rem; top: .7rem; color: rgba(255,255,255,.08); font-family: var(--display), serif; font-size: 5rem; font-style: normal; }

.world-branch {
  padding: clamp(4rem, 8vw, 7rem) 0;
  scroll-margin-top: 5rem;
}

.world-main-story {
  background: radial-gradient(circle at 85% 20%, rgba(180,36,66,.15), transparent 32%), #100c12;
  border-top: 1px solid rgba(180,36,66,.34);
}

.world-dormitory-story {
  background: radial-gradient(circle at 15% 20%, rgba(139,111,176,.18), transparent 34%), #15101a;
  border-top: 1px solid rgba(139,111,176,.36);
}

.world-branch-header {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(18rem, 1fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 6rem);
  margin-bottom: 2.5rem;
}

.world-branch-header h2 { margin: .55rem 0 0; font-size: clamp(2.2rem, 4.5vw, 4rem); }
.world-branch-header h2 em { display: block; margin-top: .3rem; color: rgba(255,255,255,.5); font-size: .34em; font-style: normal; letter-spacing: .16em; text-transform: uppercase; }
.world-main-story .eyebrow { color: #dc5b71; }
.world-dormitory-story .eyebrow { color: #b7a0d5; }

.world-lore-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.world-lore-grid article {
  min-height: 205px;
  padding: 1.6rem;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(5,4,7,.38);
}

.world-lore-grid article > span { color: rgba(255,255,255,.28); font-family: var(--display), serif; font-size: 1.4rem; }
.world-lore-grid h3 { margin: 1.3rem 0 .55rem; color: #f4edf3; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.25rem; }
.world-lore-grid p { margin: 0; font-size: .94rem; }
.world-branch-link { display: inline-flex; gap: .8rem; margin-top: 2rem; color: #f2e6ed; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.32); padding-bottom: .35rem; }

.main-story-manifesto {
  margin-bottom: 1rem;
  padding: clamp(1.6rem, 3vw, 2.5rem);
  border: 1px solid rgba(220, 91, 113, .22);
  border-left: 3px solid rgba(220, 91, 113, .7);
  background: linear-gradient(115deg, rgba(69, 13, 29, .38), rgba(5, 4, 7, .38));
}

.main-story-manifesto small,
.main-story-coda small {
  color: rgba(220, 91, 113, .78);
  font-size: .68rem;
  letter-spacing: .18em;
}

.main-story-manifesto h3 {
  margin: .65rem 0 .85rem;
  color: #f7eff3;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  font-weight: 500;
  line-height: 1.5;
}

.main-story-manifesto h3 em {
  color: #dc7184;
  font-size: .72em;
  font-style: normal;
}

.main-story-manifesto > p {
  max-width: 58rem;
  margin: 0;
  color: rgba(244, 235, 241, .82);
  font-size: 1rem;
  line-height: 1.95;
}

.main-story-lore-grid article { min-height: 0; }
.main-story-lore-grid h3 { margin-bottom: .25rem; }
.main-story-lore-grid h4 {
  margin: 0 0 1rem;
  color: #dc7184;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.65;
}
.main-story-lore-grid p + p { margin-top: .9rem; }

.main-story-coda {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(22rem, 1.15fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  margin-top: 1rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(5,4,7,.46);
}

.main-story-coda p {
  margin: .55rem 0 0;
  color: rgba(239, 232, 239, .72);
  font-size: .88rem;
  line-height: 1.9;
}

.main-story-coda blockquote {
  margin: 0;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(220, 91, 113, .45);
  color: #f6edf2;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 2;
}

@media (max-width: 760px) {
  .world-path-grid,
  .world-lore-grid,
  .world-branch-header { grid-template-columns: 1fr; }
  .world-path-card { min-height: 190px; }
  .world-path-card::before { width: 48%; opacity: .2; }
  .world-path-card > span { max-width: 62%; }
  .world-branch-header { gap: .8rem; }
  .main-story-coda { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .world-branch-subnav { display: grid; grid-template-columns: 1fr; }
}

/* Dormitory universe: lived-in archive, deliberately denser than a landing page. */
.dormitory-shell {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.dormitory-shell .world-branch-header,
.dormitory-shell .world-lore-grid { margin-bottom: 0; }

.dormitory-keyvisual {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 7.8;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid rgba(215, 187, 220, .22);
  background: #0a080c;
}

.dormitory-keyvisual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(6, 4, 7, .84) 100%);
  pointer-events: none;
}

.dormitory-keyvisual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
}

.dormitory-keyvisual figcaption {
  position: absolute;
  z-index: 2;
  left: clamp(1.25rem, 3vw, 2.5rem);
  right: clamp(1.25rem, 3vw, 2.5rem);
  bottom: clamp(1.15rem, 2.5vw, 2rem);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  text-shadow: 0 2px 16px #000;
}

.dormitory-keyvisual figcaption span,
.dormitory-section-heading .eyebrow,
.dormitory-tonight small,
.dormitory-tonight div > span {
  color: #c5afd8;
  font-size: .72rem;
  letter-spacing: .18em;
}

.dormitory-keyvisual figcaption strong {
  color: #f5edf4;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  font-weight: 500;
  letter-spacing: .05em;
}

.dormitory-lore-grid article {
  min-height: 175px;
  background: linear-gradient(145deg, rgba(11, 8, 14, .78), rgba(40, 29, 47, .36));
}

.dormitory-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.35rem;
}

.dormitory-section-heading h3 {
  margin: .5rem 0 0;
  color: #f5edf4;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 500;
}

.dormitory-section-heading > p {
  margin: 0 0 .3rem;
  color: rgba(239, 232, 239, .66);
  font-size: .95rem;
}

.dormitory-trace-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(245px, 30%);
  gap: .85rem;
  overflow-x: auto;
  padding: 0 0 1rem;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scrollbar-color: #8b6fb0 rgba(255, 255, 255, .08);
}

.dormitory-trace-carousel:focus-visible { outline: 1px solid #c5afd8; outline-offset: 6px; }

.dormitory-trace-carousel figure {
  position: relative;
  height: 215px;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, .11);
  background: #08070a;
}

.dormitory-trace-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .35s ease;
}

.dormitory-trace-carousel figure:hover img { transform: scale(1.025); filter: brightness(1.08); }

.dormitory-trace-carousel figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.2rem 1rem .85rem;
  background: linear-gradient(transparent, rgba(7, 5, 8, .92));
  color: #f5edf4;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: .95rem;
  letter-spacing: .08em;
}

.dormitory-place-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.dormitory-place-grid a {
  position: relative;
  isolation: isolate;
  min-height: 155px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .1);
  background: #0b090d;
  color: #f4edf3;
  text-decoration: none;
}

.dormitory-place-grid a::before,
.dormitory-place-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: opacity .35s ease, transform .45s ease;
}

.dormitory-place-grid a::before {
  background-image: var(--place-image);
  background-position: center 26%;
  background-size: cover;
  opacity: .22;
  filter: saturate(.65);
}

.dormitory-place-grid a::after { background: linear-gradient(180deg, rgba(8, 6, 9, .12), rgba(8, 6, 9, .94)); }
.dormitory-place-grid a:hover::before { opacity: .5; transform: scale(1.025); }
.dormitory-place-grid small { position: absolute; top: .8rem; left: .9rem; color: rgba(255,255,255,.46); letter-spacing: .14em; }
.dormitory-place-grid span { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1rem; letter-spacing: .06em; }
.dormitory-place-grid strong { max-height: 0; opacity: 0; color: #cbb7dc; font-family: var(--display), serif; font-size: 1.05rem; font-weight: 500; letter-spacing: .08em; transition: max-height .3s ease, opacity .3s ease, margin .3s ease; }
.dormitory-place-grid a:hover strong,
.dormitory-place-grid a:focus-visible strong { max-height: 2rem; margin-top: .25rem; opacity: 1; }

.dormitory-introduction {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid rgba(197, 175, 216, .17);
  border-top: 2px solid rgba(197, 175, 216, .45);
  background:
    radial-gradient(circle at 92% 8%, rgba(139, 111, 176, .15), transparent 21rem),
    linear-gradient(145deg, rgba(17, 12, 20, .88), rgba(7, 6, 9, .72));
}

.dormitory-introduction header {
  position: relative;
  padding: 0 0 1.7rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.dormitory-introduction header small {
  color: #bca7cf;
  font-size: .74rem;
  letter-spacing: .16em;
}

.dormitory-introduction header h3 {
  margin: .65rem 0 0;
  color: #f7eff6;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(1.65rem, 3.3vw, 2.55rem);
  font-weight: 500;
  letter-spacing: .04em;
}

.dormitory-introduction header > span {
  position: absolute;
  right: 0;
  bottom: .35rem;
  color: rgba(255, 255, 255, .055);
  font-family: var(--display), serif;
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 1;
}

.dormitory-introduction-copy {
  max-width: 1080px;
  columns: 2 28rem;
  column-gap: clamp(2.5rem, 6vw, 5rem);
  column-rule: 1px solid rgba(255, 255, 255, .07);
}

.dormitory-introduction-copy p {
  break-inside: avoid;
  margin: 0 0 1.55rem;
  color: rgba(244, 237, 244, .82);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: 1rem;
  line-height: 2.05;
}

.dormitory-introduction-copy p:first-child,
.dormitory-introduction-ending {
  color: #f6edf5 !important;
  font-size: 1.08rem !important;
}

.dormitory-introduction-copy .dormitory-continuity-note {
  padding: 1rem 1.15rem;
  border-left: 2px solid rgba(183, 160, 213, .68);
  background: rgba(117, 86, 143, .12);
  color: #f3eaf5 !important;
  font-size: 1rem !important;
  line-height: 1.95;
}

.dormitory-daily-list {
  padding-left: 1.2rem;
  border-left: 1px solid rgba(197, 175, 216, .35);
  color: rgba(224, 211, 232, .9) !important;
}

.dormitory-resident-list {
  display: grid;
  gap: .9rem;
}

.dormitory-resident-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .11);
  border-left: 3px solid var(--resident-accent);
  background: linear-gradient(135deg, rgba(18, 14, 21, .94), rgba(7, 6, 9, .84));
}

.dormitory-resident-card summary {
  display: grid;
  grid-template-columns: minmax(250px, .46fr) 1fr;
  min-height: 190px;
  cursor: pointer;
  list-style: none;
}

.dormitory-resident-card summary::-webkit-details-marker { display: none; }
.dormitory-resident-card summary:focus-visible { outline: 1px solid var(--resident-accent); outline-offset: -4px; }
.dormitory-resident-card[open] summary { border-bottom: 1px solid rgba(255, 255, 255, .1); }

.dormitory-resident-photo-slot {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  padding: 1rem;
  border-right: 1px solid rgba(255, 255, 255, .09);
  background:
    linear-gradient(145deg, transparent 40%, rgba(0, 0, 0, .45)),
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--resident-accent) 25%, transparent), transparent 52%),
    #0d0a10;
}

.dormitory-resident-photo-slot::before {
  content: attr(data-photo-slot);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, .12);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dormitory-resident-photo-slot.has-photo::before {
  content: "";
  inset: 0;
  left: 0;
  top: 0;
  transform: none;
  background: none;
  filter: none;
  opacity: 0;
}

.dormitory-resident-photo-slot.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(5,4,6,.18), transparent 46%, rgba(5,4,6,.28)), linear-gradient(180deg, transparent 54%, rgba(5,4,6,.7));
  pointer-events: none;
}

.dormitory-resident-photo-slot b {
  position: relative;
  z-index: 3;
  color: color-mix(in srgb, var(--resident-accent) 78%, white);
  font-family: var(--display), serif;
  font-size: 2rem;
  font-weight: 500;
}

.dormitory-resident-photo-slot span {
  position: relative;
  z-index: 3;
  color: rgba(255, 255, 255, .42);
  font-size: .64rem;
  letter-spacing: .14em;
}

.dormitory-resident-photo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  object-fit: cover;
  object-position: var(--photo-x, 50%) var(--photo-y, 28%);
}

.dormitory-resident-photo-slot[data-photo-slot="01-leviathan"] { --photo-y: 30%; }
.dormitory-resident-photo-slot[data-photo-slot="02-asmodeus"] { --photo-y: 24%; }
.dormitory-resident-photo-slot[data-photo-slot="03-mammon"] { --photo-x: 52%; --photo-y: 29%; }
.dormitory-resident-photo-slot[data-photo-slot="04-belphegor"] { --photo-x: 43%; --photo-y: 47%; }
.dormitory-resident-photo-slot[data-photo-slot="05-samael"] { --photo-x: 50%; --photo-y: 25%; }
.dormitory-resident-photo-slot[data-photo-slot="06-beelzebub"] { --photo-x: 46%; --photo-y: 44%; }
.dormitory-resident-photo-slot[data-photo-slot="07-lucifer"] { --photo-x: 42%; --photo-y: 29%; }

.dormitory-resident-heading {
  position: relative;
  display: grid;
  align-content: center;
  padding: clamp(1.25rem, 3vw, 2.4rem);
}

.dormitory-resident-heading small {
  color: color-mix(in srgb, var(--resident-accent) 74%, white);
  font-size: .7rem;
  letter-spacing: .14em;
}

.dormitory-resident-heading h4 {
  margin: .45rem 0 .25rem;
  color: #f7eff6;
  font-family: var(--display), "Yu Mincho", serif;
  font-size: clamp(1.7rem, 3.3vw, 2.65rem);
  font-weight: 500;
  letter-spacing: .03em;
}

.dormitory-resident-heading p {
  margin: 0;
  color: rgba(244, 237, 244, .72);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: .98rem;
}

.dormitory-resident-heading i {
  position: absolute;
  right: 1.2rem;
  bottom: 1rem;
  color: rgba(255, 255, 255, .42);
  font-size: .64rem;
  font-style: normal;
  letter-spacing: .15em;
}

.dormitory-resident-heading i span { display: inline-block; font-size: 1rem; transition: transform .3s ease; }
.dormitory-resident-card[open] .dormitory-resident-heading i span { transform: rotate(45deg); }

.dormitory-resident-copy {
  padding: clamp(1.5rem, 4vw, 3rem);
  columns: 2 25rem;
  column-gap: clamp(2rem, 5vw, 4.5rem);
  column-rule: 1px solid rgba(255, 255, 255, .06);
  background: rgba(4, 3, 6, .28);
}

.dormitory-resident-copy p {
  break-inside: avoid;
  margin: 0 0 1.35rem;
  color: rgba(242, 234, 242, .79);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: 1rem;
  line-height: 1.95;
}

.dormitory-archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.dormitory-archive-grid a {
  min-height: 125px;
  display: grid;
  align-content: end;
  padding: 1.15rem;
  border: 1px solid rgba(197, 175, 216, .2);
  border-top: 2px solid rgba(197, 175, 216, .46);
  background: linear-gradient(145deg, rgba(34, 24, 40, .6), rgba(7, 6, 9, .88));
  color: #f6eef5;
  text-decoration: none;
  transition: border-color .25s ease, transform .25s ease;
}

.dormitory-archive-grid a:hover { transform: translateY(-2px); border-color: rgba(197, 175, 216, .58); }
.dormitory-archive-grid span { color: rgba(255,255,255,.32); font-size: .75rem; letter-spacing: .14em; }
.dormitory-archive-grid strong { margin-top: .65rem; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.05rem; font-weight: 500; }
.dormitory-archive-grid small { margin-top: .25rem; color: #a78fbb; font-size: .68rem; letter-spacing: .15em; }

.dormitory-tonight {
  position: relative;
  min-height: 180px;
  display: grid;
  grid-template-columns: minmax(180px, .42fr) 1fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(7, 5, 8, .62);
}

.dormitory-tonight img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; opacity: .72; }
.dormitory-tonight div { display: grid; align-content: center; padding: clamp(1.25rem, 3vw, 2.25rem); }
.dormitory-tonight h3 { margin: .35rem 0 .55rem; color: #f5edf4; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(1.35rem, 2.5vw, 1.9rem); font-weight: 500; }
.dormitory-tonight p { margin: 0 0 .75rem; color: rgba(245,237,244,.78); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1rem; }
.dormitory-tonight div > span { color: rgba(197,175,216,.58); font-size: .62rem; }

@media (max-width: 900px) {
  .dormitory-place-grid,
  .dormitory-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dormitory-trace-carousel { grid-auto-columns: minmax(235px, 44%); }
  .dormitory-resident-card summary { grid-template-columns: minmax(215px, .42fr) 1fr; }
}

@media (max-width: 560px) {
  .dormitory-keyvisual { min-height: 310px; aspect-ratio: 4 / 3; }
  .dormitory-keyvisual figcaption { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .dormitory-section-heading { align-items: flex-start; flex-direction: column; gap: .45rem; }
  .dormitory-trace-carousel { grid-auto-columns: 82%; }
  .dormitory-place-grid { grid-template-columns: 1fr 1fr; }
  .dormitory-place-grid a { min-height: 140px; }
  .dormitory-place-grid strong { max-height: 2rem; margin-top: .2rem; opacity: .78; font-size: .9rem; }
  .dormitory-introduction { padding: 1.5rem 1.2rem; }
  .dormitory-introduction-copy,
  .dormitory-resident-copy { columns: 1; }
  .dormitory-introduction-copy p,
  .dormitory-resident-copy p { font-size: .96rem; line-height: 1.9; }
  .dormitory-resident-card summary { grid-template-columns: 1fr; }
  .dormitory-resident-photo-slot { min-height: 0; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .dormitory-resident-heading { min-height: 155px; }
  .dormitory-resident-copy { padding: 1.4rem 1.2rem; }
  .dormitory-archive-grid { grid-template-columns: 1fr 1fr; }
  .dormitory-tonight { grid-template-columns: 1fr; }
  .dormitory-tonight img { height: 160px; min-height: 0; }
}

.hero-approved-art img {
  width: min(100%, 1560px) !important;
  height: auto !important;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
}

.home-cover-caption {
  position: absolute;
  z-index: 22;
  left: 50%;
  bottom: clamp(2.7rem, 5vh, 4rem);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 12rem);
  margin: 0;
  color: #d8a0af;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(1rem, 1.45vw, 1.32rem);
  font-weight: 500;
  letter-spacing: .2em;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 0 16px rgba(183, 104, 125, .42), 0 1px 0 #000;
}

.home-cover-caption::before,
.home-cover-caption::after {
  content: "◇";
  color: var(--gold-light);
  margin: 0 .85rem;
  font-size: .55em;
  vertical-align: .18em;
  opacity: .8;
}

@media (max-width: 720px) {
  .home-cover-caption {
    bottom: 1.7rem;
    max-width: calc(100% - 2rem);
    font-size: .9rem;
    letter-spacing: .1em;
  }

  .home-cover-caption::before,
  .home-cover-caption::after {
    margin-inline: .45rem;
  }
}

.music-soundcloud-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: .45rem;
}

.music-soundcloud-link {
  justify-self: end;
  color: var(--gold-light, #d8ba7a);
  font: 600 .7rem/1.2 var(--font-sans, sans-serif);
  letter-spacing: .15em;
  text-decoration: none;
}

.music-soundcloud-link:hover,
.music-soundcloud-link:focus-visible {
  color: #fff2cf;
  text-decoration: underline;
  text-underline-offset: .25em;
}

.portal-approved-keyvisual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-approved-keyvisual img {
  width: min(100%, 1152px) !important;
  height: auto !important;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
}

.portal-feature-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: filter .3s, transform .5s;
}

.portal-card:hover > .portal-feature-image {
  filter: brightness(1.08) saturate(1.04);
  transform: scale(1.012);
}

.portal-real-content .portal-card-copy {
  background: linear-gradient(0deg, rgba(7, 5, 7, .98), rgba(10, 5, 8, .86) 70%, rgba(7, 5, 7, 0));
  padding-top: 5rem;
}

.portal-real-content .portal-card-copy h3 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", var(--display), serif;
  font-size: clamp(1.65rem, 2.35vw, 2.55rem);
  line-height: 1.25;
}

.portal-dormitory-cover {
  object-position: center 42%;
}

@media (max-width: 560px) {
  .portal-real-content .portal-card-copy h3 {
    padding-right: 2.8rem;
    font-size: 1.5rem;
  }
}

/* Keep the Meet the Seven caption as a slim footer, so the collage stays visible. */
.portal-characters .portal-card-copy {
  background: linear-gradient(90deg, rgba(7, 5, 7, .88), rgba(17, 7, 12, .72) 58%, rgba(7, 5, 7, .3));
  padding: .8rem 1.5rem .9rem;
}

.portal-characters .portal-card-copy h3 {
  margin: .25rem 0 .2rem;
  font-size: clamp(1.65rem, 2.25vw, 2.25rem);
}

.portal-characters .portal-card-copy > i {
  right: 1.2rem;
  bottom: .85rem;
  width: 34px;
  height: 34px;
}

@media (max-width: 560px) {
  .portal-characters .portal-card-copy {
    padding: .7rem 1rem .8rem;
  }

  .portal-characters .portal-card-copy h3 {
    font-size: 1.55rem;
  }
}

.hero-entry-row {
  padding-top: clamp(1rem, 2vw, 1.6rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.6rem);
}

.hero-entry-strip {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  width: min(100%, 620px) !important;
  padding: 1.35rem 1.6rem 1.45rem !important;
}

.hero-entry-strip .hero-tagline {
  margin: .9rem 0 1.15rem;
}

.hero-entry-strip .hero-actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: .8rem 1.25rem;
}

.hero-entry-strip .button {
  min-height: 46px;
}

@media (max-width: 560px) {
  .hero-entry-row { width: calc(100% - 2rem); }
  .hero-entry-strip { padding: 1.2rem 1.25rem 1.3rem !important; }
}

.restored-island { display: contents; }
.desktop-nav-link[aria-current="page"] { color: var(--gold-light); }
.music-lyrics-body,
.music-lyrics-body p { font-size: 18px; }

/* Keep long Japanese track names compact inside the Track archive table. */
.music-track-name strong { font-size: 1.15rem; }

@media (max-width: 560px) {
  .music-track-name strong { font-size: 0.95rem; }
}

/* Home: the path from the original fiction to the dormitory universe. */
.origin-timeline {
  padding-top: clamp(3rem, 5vw, 5rem);
  padding-bottom: clamp(3rem, 5vw, 5rem);
}

.origin-timeline-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr);
  align-items: end;
  gap: 2.5rem;
  margin-bottom: clamp(2rem, 3.5vw, 3.5rem);
}

.origin-timeline-heading .eyebrow { grid-column: 1 / -1; }

.origin-timeline-heading h2 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2rem, 2.5vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.origin-timeline-heading > p {
  color: rgba(248, 239, 230, .84);
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 2;
}

.origin-timeline-frame {
  position: relative;
  isolation: isolate;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 15% 30%, rgba(145,168,198,.09), transparent 19rem),
    radial-gradient(circle at 84% 66%, rgba(183,104,125,.12), transparent 23rem),
    linear-gradient(120deg, rgba(30,9,18,.72), rgba(8,5,8,.9));
  padding: clamp(4rem, 6vw, 6rem) clamp(2rem, 4vw, 4rem);
  overflow: visible;
}

.origin-timeline-frame::before,
.origin-timeline-frame::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.origin-timeline-frame::before {
  inset: 24px;
  border: 1px solid rgba(219,197,141,.18);
}

.origin-timeline-frame::after {
  width: 470px;
  height: 470px;
  border: 1px solid rgba(183,104,125,.12);
  border-radius: 50%;
  top: -250px;
  right: 8%;
  box-shadow: 0 0 0 70px rgba(185,154,93,.025), 0 0 0 140px rgba(183,104,125,.018);
  display: none;
}

.origin-timeline-list {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.origin-timeline-list::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2%;
  right: 2%;
  height: 2px;
  background: linear-gradient(90deg, var(--silver-blue), var(--old-rose) 38%, var(--gold-light) 76%, var(--old-rose));
  box-shadow: 0 0 18px rgba(219,197,141,.28);
  transform: translateY(-50%) rotate(-1.2deg);
}

.origin-timeline-list li {
  position: relative;
  min-height: 250px;
}

.origin-timeline-list li > div {
  position: absolute;
  left: 50%;
  width: min(235px, calc(100% - 1rem));
  transform: translateX(-50%);
}

.origin-timeline-list li:nth-child(odd) > div { bottom: calc(50% + 42px); }
.origin-timeline-list li:nth-child(even) > div { top: calc(50% + 42px); }

.origin-timeline-list small {
  display: block;
  color: var(--gold-light);
  margin-bottom: .55rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
}

.origin-timeline-list strong {
  display: block;
  color: var(--ivory);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.15;
}

.origin-timeline-list p {
  color: rgba(245, 235, 229, .76);
  margin: .65rem 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.8;
}

.origin-dot {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 17px;
  border: 3px solid var(--near-black);
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 0 1px var(--gold-light), 0 0 22px rgba(219,197,141,.55);
  transform: translate(-50%, -50%);
}

.origin-sticker {
  position: absolute;
  z-index: 4;
  display: block;
  width: clamp(72px, 6vw, 104px);
  filter: drop-shadow(0 12px 16px rgba(0,0,0,.62));
}

.origin-sticker img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.sticker-leviathan {
  bottom: -1%;
  left: 3.5%;
  width: clamp(80px, 6.8vw, 116px);
  transform: rotate(-7deg);
}

.sticker-asmodeus {
  top: -2%;
  left: 20.5%;
  width: clamp(72px, 6vw, 102px);
  transform: rotate(8deg);
}

.sticker-belphegor {
  top: 1%;
  left: 52.5%;
  width: clamp(92px, 7.6vw, 130px);
  transform: rotate(-5deg);
}

@media (max-width: 1050px) {
  .origin-timeline-frame { padding-inline: 3rem; }
  .origin-timeline-list {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 3rem;
  }
  .origin-timeline-list::before { display: none; }
  .origin-timeline-list li { min-height: 175px; }
  .origin-timeline-list li > div,
  .origin-timeline-list li:nth-child(odd) > div,
  .origin-timeline-list li:nth-child(even) > div {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    width: auto;
    padding: 3.2rem 1rem 0;
    transform: none;
  }
  .origin-dot { top: 1.15rem; left: 1rem; }
  .origin-stickers { display: none; }
}

.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.world-feature-art {
  position: relative;
}
.world-feature-art img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: contain;
  object-position: center;
  background: #0b070a;
}
.world-feature-art:after {
  background: linear-gradient(135deg, #07050712, transparent 48%, #07050722);
}

@media (max-width: 720px) {
  .origin-timeline-heading { grid-template-columns: 1fr; gap: 1.5rem; }
  .origin-timeline-heading h2 { font-size: clamp(1.9rem, 8vw, 2.3rem); }
  .origin-timeline-frame { padding: 3rem 1.25rem; }
  .origin-timeline-list { grid-template-columns: 1fr; gap: 0; }
  .origin-timeline-list::before {
    display: block;
    top: 1rem;
    bottom: 1rem;
    left: 8px;
    right: auto;
    width: 1px;
    height: auto;
    transform: none;
  }
  .origin-timeline-list li { min-height: 0; padding: 0 0 2.6rem 2.2rem; }
  .origin-timeline-list li:last-child { padding-bottom: 0; }
  .origin-timeline-list li > div,
  .origin-timeline-list li:nth-child(odd) > div,
  .origin-timeline-list li:nth-child(even) > div { padding: 0; }
  .origin-dot { top: .35rem; left: 8px; width: 13px; height: 13px; }
  .origin-stickers { display: none; }
}
