:root {
  color-scheme: dark;
  --ink: #050711;
  --blue: #087cff;
  --cyan: #2de4ff;
  --red: #ff254e;
  --gold: #ffd23f;
  --white: #f8fbff;
}

/* Keep the outgoing page visible until the next showcase document is ready. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .14s;
  animation-timing-function: ease-out;
  mix-blend-mode: normal;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; background: #120713; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
}

button { font: inherit; }

.title-screen {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 46%, rgba(35, 160, 255, .32), transparent 21rem),
    radial-gradient(circle at 8% 20%, rgba(255, 37, 78, .2), transparent 24rem),
    linear-gradient(135deg, #071a3f 0%, #040712 46%, #0b0618 100%);
}

.title-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .3;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(700px) rotateX(56deg) scale(1.6) translateY(29%);
  transform-origin: bottom;
}

.title-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

.speed-lines {
  position: absolute;
  inset: -30%;
  z-index: -1;
  opacity: .42;
  background: repeating-conic-gradient(from 232deg at 50% 50%, transparent 0deg 5deg, rgba(45,228,255,.35) 5.1deg 5.35deg, transparent 5.45deg 11deg);
  animation: breathe 6s ease-in-out infinite;
}

.orbit {
  position: absolute;
  width: min(76vw, 58rem);
  aspect-ratio: 1;
  border: clamp(.6rem, 1.4vw, 1.2rem) solid transparent;
  border-top-color: var(--cyan);
  border-right-color: var(--blue);
  border-radius: 50%;
  opacity: .28;
  filter: drop-shadow(0 0 18px rgba(45,228,255,.5));
  animation: spin 18s linear infinite;
}

.orbit-two {
  width: min(58vw, 43rem);
  border-width: .28rem;
  border-color: transparent var(--red) var(--gold) transparent;
  animation-duration: 13s;
  animation-direction: reverse;
}

.title-lockup {
  position: relative;
  z-index: 2;
  width: min(92vw, 72rem);
  text-align: center;
  transform: skewY(-4deg);
  filter: drop-shadow(0 1.4rem 2.5rem rgba(0,0,0,.7));
}

.eyebrow {
  margin: 0 0 .6rem;
  color: var(--gold);
  font-size: clamp(.76rem, 1.4vw, 1rem);
  font-weight: 900;
  letter-spacing: .36em;
  text-shadow: 0 2px 0 #7c2b00;
}

h1 {
  margin: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-style: italic;
  line-height: .72;
  letter-spacing: -.075em;
}

h1 span {
  position: relative;
  z-index: 1;
  margin-right: 2.4em;
  color: #fff;
  font-size: clamp(4.6rem, 14vw, 11rem);
  -webkit-text-stroke: clamp(2px, .32vw, 5px) #0756ca;
  text-shadow: .06em .06em 0 #08235f, .12em .12em 0 rgba(0,0,0,.35);
}

h1 strong {
  padding: .06em .32em .12em .22em;
  margin-left: 1.35em;
  color: var(--white);
  background: linear-gradient(90deg, #f5123f, #ff5e24);
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
  font-size: clamp(3.8rem, 12vw, 9rem);
  -webkit-text-stroke: clamp(1px, .2vw, 3px) #6b0019;
  box-shadow: 0 0 0 .12em rgba(255,210,63,.9);
  text-shadow: .06em .06em 0 #6b0019;
}

.title-note {
  width: max-content;
  max-width: 90vw;
  margin: 1.6rem auto 0;
  padding: .35rem 1.2rem;
  background: rgba(3,7,20,.75);
  border-left: .38rem solid var(--gold);
  color: #d7eaff;
  font-size: clamp(.78rem, 1.4vw, 1rem);
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.press-start {
  position: absolute;
  left: 50%;
  bottom: clamp(8rem, 15vh, 10.5rem);
  z-index: 6;
  transform: translateX(-50%);
  border: 0;
  padding: .85rem 2.4rem;
  min-width: min(88vw, 30rem);
  color: #fff;
  background: rgba(3,9,24,.78);
  box-shadow: inset 0 0 0 2px rgba(69,213,255,.52), 0 0 28px rgba(8,124,255,.26);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: .13em;
  cursor: pointer;
  clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
  animation: slowPulse 2.8s ease-in-out infinite;
}

.press-start::before {
  content: "▶";
  margin-right: .8rem;
  color: var(--gold);
}

.corner-mark {
  position: absolute;
  width: 18rem;
  height: 2.2rem;
  background: linear-gradient(90deg, var(--red) 0 36%, var(--gold) 36% 43%, var(--blue) 43% 100%);
  opacity: .8;
  transform: skewX(-36deg);
}

.corner-mark-top { top: 2rem; right: -5rem; }
.corner-mark-bottom { bottom: 2.4rem; left: -5rem; transform: skewX(-36deg) rotate(180deg); }

.title-footer {
  position: absolute;
  inset: auto 1.2rem calc(2.25rem + env(safe-area-inset-bottom));
  z-index: 7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255,255,255,.58);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .13em;
}

.sound-toggle {
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 99px;
  padding: .45rem .8rem;
  color: inherit;
  background: rgba(0,0,0,.3);
  cursor: pointer;
}

.sound-toggle:hover, .sound-toggle:focus-visible { color: #fff; border-color: var(--cyan); outline: none; }

@keyframes slowPulse {
  0%, 100% { transform: translateX(-50%) scale(.99); }
  50% { transform: translateX(-50%) scale(1.01); }
}

@keyframes breathe { 0%,100% { transform: scale(.95) rotate(-1deg); } 50% { transform: scale(1.04) rotate(1deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  h1 span { margin-right: .9em; }
  h1 strong { margin-left: .65em; }
  .title-note { letter-spacing: .11em; }
  .orbit { width: 120vw; }
  .corner-mark { width: 11rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .press-start { opacity: 1; }
}

.menu-screen,
.section-screen,
.cast-screen {
  min-height: 100svh;
  background:
    linear-gradient(105deg, rgba(8,124,255,.16), transparent 40%),
    radial-gradient(circle at 92% 12%, rgba(255,37,78,.2), transparent 32rem),
    #050711;
}

.game-header {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 5vw, 4.5rem);
  border-bottom: 1px solid rgba(255,255,255,.16);
  background: rgba(2,7,20,.82);
}

.mini-logo { color: #fff; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 950; font-style: italic; letter-spacing: -.05em; }
.mini-logo b { color: var(--red); }
.screen-label { color: var(--cyan); font-size: .76rem; font-weight: 900; letter-spacing: .24em; }

.menu-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(16rem, .8fr) minmax(22rem, 1.2fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 8rem);
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 8vw, 8rem) calc(8rem + env(safe-area-inset-bottom));
  overflow: hidden;
}

.menu-copy { align-self: end; padding-bottom: 4rem; }
.menu-copy small { color: var(--gold); font-weight: 900; letter-spacing: .24em; }
.menu-copy h1, .menu-copy h2 { display: block; margin: .25rem 0 1rem; font-size: clamp(3.4rem, 7vw, 7rem); line-height: .82; transform: skewY(-4deg); font-style: italic; }
.menu-copy p { max-width: 28rem; color: #b8c9e4; font-size: 1rem; line-height: 1.6; }

.main-menu { position: relative; z-index: 2; display: grid; gap: .6rem; counter-reset: game-menu; }
.menu-item {
  counter-increment: game-menu;
  position: relative;
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 4.3rem;
  padding: .55rem 1.35rem .55rem .65rem;
  border: 0;
  color: #b7c5d9;
  background: linear-gradient(90deg, rgba(17,31,57,.92), rgba(6,12,28,.7));
  text-decoration: none;
  text-transform: uppercase;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-style: italic;
  font-weight: 900;
  letter-spacing: .08em;
  clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%);
  transform: translateX(calc((var(--i, 0)) * .8rem));
  transition: transform .18s ease, color .18s ease, filter .18s ease;
}
.menu-item::before { content: counter(game-menu, decimal-leading-zero); display: grid; place-items: center; align-self: stretch; color: var(--gold); background: rgba(255,210,63,.08); font-size: .8rem; }
.menu-item::after { content: "▶"; color: transparent; }
.menu-item:hover, .menu-item:focus-visible, .menu-item.is-selected {
  z-index: 2;
  color: #fff;
  outline: none;
  transform: translateX(calc((var(--i, 0)) * .8rem - 1rem)) scale(1.045);
  background: linear-gradient(90deg, var(--blue), #074eb5 67%, #062457);
  filter: drop-shadow(.8rem .8rem 0 rgba(255,37,78,.64));
}
.menu-item:hover::after, .menu-item:focus-visible::after, .menu-item.is-selected::after { color: var(--gold); }

.menu-hint { position: absolute; bottom: calc(7.2rem + env(safe-area-inset-bottom)); right: 2rem; color: rgba(255,255,255,.5); font-size: .76rem; letter-spacing: .12em; }
.menu-layer { min-height: 100svh; }
.menu-sound { position: absolute; left: 2rem; bottom: 1rem; }
.page-shell { width: min(70rem, 92vw); margin: 0 auto; padding: clamp(2.5rem, 8vw, 7rem) 0 calc(9rem + env(safe-area-inset-bottom)); }
.back-link { color: var(--cyan); text-decoration: none; font-weight: 900; letter-spacing: .12em; }
.page-shell h1 { display: block; margin: 4rem 0 1.5rem; font-size: clamp(4rem, 10vw, 8rem); line-height: .8; transform: skewY(-3deg); }
.page-shell h1::after { content: ""; display: block; width: 5rem; height: .45rem; margin-top: 1.4rem; background: linear-gradient(90deg, var(--red), var(--gold)); }
.page-shell p { max-width: 44rem; color: #becbe0; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.7; }
.status-chip { display: inline-block; margin-top: 1.5rem; padding: .55rem .8rem; border: 1px solid rgba(45,228,255,.35); color: var(--cyan); font-weight: 900; letter-spacing: .16em; font-size: .75rem; }

.cast-screen {
  height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.cast-layout { width: min(86rem, 94vw); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 0 calc(10rem + env(safe-area-inset-bottom)); }
.cast-title-row { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; }
.cast-branding { position: relative; isolation: isolate; }
.cast-brand-mascot { position: absolute; z-index: -1; top: -2.3rem; left: calc(100% + .7rem); width: clamp(6.4rem, 9vw, 10.5rem); max-height: 10rem; object-fit: contain; object-position: center; filter: drop-shadow(.5rem .7rem .8rem rgba(0,0,0,.58)) saturate(1.12); transform: rotate(-5deg); }
.cast-title-row h1 { display: block; font-size: clamp(3rem, 7vw, 6rem); line-height: .8; transform: skewY(-3deg); }
.cast-title-row p { color: #9db1ce; }
.mature-chip { display: inline-block; margin-top: 1rem; border: 1px solid rgba(255,143,208,.45); padding: .35rem .55rem; color: #ffc3df; background: rgba(77,12,55,.58); font-size: .72rem; font-weight: 900; letter-spacing: .12em; }
.roster { display: flex; gap: .7rem; overflow-x: auto; overflow-y: hidden; padding: 1rem 1rem 1.6rem; scrollbar-color: var(--blue) #0b1324; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x; scroll-snap-type: x proximity; }
.roster button { flex: 0 0 auto; min-width: 10rem; border: 1px solid rgba(255,255,255,.14); padding: .8rem 1rem; color: #aebbd0; background: #0b1221; font-weight: 900; text-align: left; cursor: pointer; clip-path: polygon(5% 0,100% 0,95% 100%,0 100%); }
.roster button { scroll-snap-align: start; }
.roster button:hover, .roster button:focus-visible, .roster button[aria-selected="true"] { color: #fff; border-color: var(--cyan); outline: none; background: linear-gradient(115deg, #076bed, #0b2c68); transform: translateY(-.25rem); }

.character-card { min-height: 34rem; display: grid; grid-template-columns: minmax(17rem, .76fr) minmax(20rem, 1.24fr); background: linear-gradient(135deg, rgba(14,25,47,.95), rgba(4,8,18,.96)); border: 1px solid rgba(255,255,255,.14); box-shadow: 1.4rem 1.4rem 0 rgba(255,37,78,.1); }
.character-card.is-about-presentation { grid-template-columns: 1fr; min-height: min(46rem, calc(100svh - 9rem)); }
.character-card.is-about-presentation .character-visual { display: none; }
.character-card.is-about-presentation .character-copy { display: grid; grid-template-columns: minmax(13rem,.46fr) minmax(0,1.54fr); grid-template-areas: "file profile" "tabs profile"; align-content: start; column-gap: clamp(1.4rem,4vw,4rem); }
.character-card.is-about-presentation .character-kicker, .character-card.is-about-presentation .character-copy h2, .character-card.is-about-presentation .character-role, .character-card.is-about-presentation .janitor-chat { grid-column: 1; }
.character-card.is-about-presentation .profile-tabs { grid-area: tabs; align-self: start; margin: 1.5rem 0 0; }
.character-card.is-about-presentation .profile-panel { grid-area: profile; min-width: 0; }
.character-card.is-about-presentation .about-sequence { min-height: min(37rem, calc(100svh - 12rem)); }
.character-card.is-about-presentation .about-scroll { max-height: min(29rem, calc(100svh - 19rem)); padding: clamp(2rem,5vw,4rem); }
.character-card.is-about-presentation .about-scroll-content { min-height: min(29rem, calc(100svh - 19rem)); }
.character-card.is-gallery-presentation { position: relative; display: block; min-height: min(46rem, calc(100svh - 9rem)); overflow: hidden; }
.character-card.is-gallery-presentation .character-visual,
.character-card.is-gallery-presentation .character-kicker,
.character-card.is-gallery-presentation .character-copy > h2,
.character-card.is-gallery-presentation .character-role,
.character-card.is-gallery-presentation .janitor-chat { display: none; }
.character-card.is-gallery-presentation .character-copy { min-height: inherit; padding: 0; }
.character-card.is-gallery-presentation .profile-tabs { position: absolute; z-index: 3; top: 1.1rem; left: 1.1rem; right: 1.1rem; margin: 0; }
.character-card.is-gallery-presentation .profile-panel { min-height: inherit; }
.character-visual { position: relative; overflow: hidden; min-height: 32rem; display: grid; place-items: center; background: linear-gradient(155deg, #0a79db, #09152e 62%, #190914); }
.character-visual::after { content: ""; position: absolute; inset: auto -10% 8% -10%; height: 5rem; background: var(--red); transform: rotate(-8deg); opacity: .8; }
.character-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center top; position: absolute; inset: 0; z-index: 1; }
.character-initials { font-size: clamp(6rem, 18vw, 12rem); font-weight: 950; font-style: italic; color: rgba(255,255,255,.24); }
.character-copy { padding: clamp(1.5rem, 4vw, 3.5rem); }
.character-kicker { color: var(--gold); font-size: .8rem; font-weight: 900; letter-spacing: .2em; }
.character-copy h2 { margin: .35rem 0; font-size: clamp(2.6rem, 6vw, 5.8rem); line-height: .9; font-style: italic; text-transform: uppercase; }
.character-role { margin: 0 0 1.5rem; color: var(--cyan); font-size: 1rem; font-weight: 900; text-transform: uppercase; }
.janitor-chat { width: fit-content; max-width: 100%; display: grid; grid-template-columns: auto auto 1.4rem; align-items: center; gap: .55rem; margin: .4rem 0 1.2rem; padding: .8rem 1rem; border: 1px solid var(--paper); color: #351024; background: linear-gradient(100deg,#f8e5c8,#e4b1b6); box-shadow: .45rem .45rem 0 rgba(255,62,159,.2); text-decoration: none; transform: skewX(-4deg); transition: transform .16s ease,box-shadow .16s ease,filter .16s ease; }
.janitor-chat span { font-size: .72rem; font-weight: 900; letter-spacing: .1em; }
.janitor-chat strong { overflow: hidden; font-size: .85rem; font-weight: 950; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
.janitor-chat i { color: #a32270; font-size: 1.15rem; font-style: normal; font-weight: 950; }
.janitor-chat:hover,.janitor-chat:focus-visible { outline: none; filter: brightness(1.1); transform: skewX(-4deg) translate(-.18rem,-.18rem); box-shadow: .7rem .7rem 0 rgba(255,62,159,.28); }
.profile-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.profile-tabs button { border: 1px solid rgba(255,255,255,.18); padding: .55rem .85rem; color: #b7c4d9; background: transparent; font-weight: 900; cursor: pointer; }
.profile-tabs button[aria-selected="true"] { color: #07101e; background: var(--gold); border-color: var(--gold); }
.profile-panel { color: #d2daea; font-size: 1rem; line-height: 1.7; }
.about-sequence { position: relative; min-height: 22rem; overflow: hidden; border: 1px solid rgba(246,215,172,.24); background: #150a18; isolation: isolate; }
.about-backdrop { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(circle at 70% 35%, rgba(255,143,208,.13), transparent 34rem); }
.about-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,7,20,.94) 4%, rgba(18,7,20,.7) 46%, rgba(18,7,20,.84)), linear-gradient(0deg, rgba(18,7,20,.9), transparent 65%); }
.about-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: saturate(.28) contrast(.82); opacity: .46; }
.about-scroll, .character-theme, .theme-empty { position: relative; z-index: 1; }
.about-scroll { max-height: 16rem; overflow: auto; scrollbar-width: thin; padding: clamp(1.3rem,3vw,2.2rem); scroll-behavior: smooth; }
.about-scroll-content { min-height: 16rem; animation: aboutRead 34s linear infinite alternate; }
.about-scroll:hover .about-scroll-content, .about-scroll:focus .about-scroll-content { animation-play-state: paused; }
.about-file-label, .character-theme span { display: block; color: var(--paper); font-size: .7rem; font-weight: 900; letter-spacing: .16em; }
.about-scroll h3 { margin: .35rem 0 1.2rem; color: #fff1dd; font-size: clamp(1.7rem,4vw,3rem); font-style: italic; line-height: .95; text-transform: uppercase; }
.about-scroll p { max-width: 42rem; margin: 0 0 1.25rem; text-shadow: 0 .1rem .8rem rgba(0,0,0,.9); }
.about-scroll-end { padding-top: 1rem; color: var(--paper); font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-align: right; }
.character-theme { display: grid; grid-template-columns: minmax(8rem,1fr) minmax(12rem,1.4fr); align-items: center; gap: 1rem; padding: .85rem 1.1rem; border-top: 1px solid rgba(246,215,172,.24); background: rgba(34,9,34,.88); }
.character-theme strong { display: block; overflow: hidden; color: #fff1dd; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.character-theme audio { width: 100%; height: 2.25rem; accent-color: var(--red); }
.soundcloud-widget { display: block; width: 100%; height: 5.5rem; border: 0; }
.theme-volume { grid-column: 1 / -1; display: grid; grid-template-columns: 7.5rem minmax(0,1fr) 3rem; align-items: center; gap: .7rem; color: #fff1dd; font-size: .72rem; font-weight: 900; letter-spacing: .1em; }
.theme-volume input { width: 100%; accent-color: var(--red); cursor: pointer; }
.theme-volume output { color: var(--paper); text-align: right; }
.theme-empty { margin: 0; padding: .9rem 1.2rem; color: #c8b3c5; border-top: 1px solid rgba(246,215,172,.18); font-size: .82rem; font-style: italic; }
@keyframes aboutRead { 0%, 12% { transform: translateY(0); } 86%, 100% { transform: translateY(calc(-1 * var(--about-scroll-distance, 0px))); } }
.relationship-list { display: grid; gap: .7rem; }
.relationship-list article { display: grid; grid-template-columns: 4rem 1fr; gap: .85rem; align-items: center; border-left: .24rem solid var(--blue); padding: .8rem 1rem; background: rgba(255,255,255,.045); }
.relationship-list img,.relationship-initials { width: 4rem; height: 4rem; display: grid; place-items: center; object-fit: cover; border: 1px solid rgba(246,215,172,.35); color: var(--paper); background: #111a31; font-size: 1.1rem; font-weight: 950; }
.relationship-list strong { display: block; color: #fff; }
.relationship-list small { color: var(--cyan); }
.relationship-list p { margin-bottom: 0; }
.gallery-strip { position: relative; min-height: inherit; height: min(46rem, calc(100svh - 9rem)); overflow: hidden; overscroll-behavior: contain; touch-action: pan-x; background: #081021; }
.gallery-strip-hint { position: absolute; z-index: 2; top: 5.1rem; left: 1.3rem; margin: 0; padding: .4rem .65rem; color: #fff1dd; pointer-events: none; background: rgba(13,8,25,.74); font-size: .68rem; font-weight: 900; letter-spacing: .12em; }
.gallery-strip-mascot { position: absolute; z-index: 1; right: .8rem; bottom: .7rem; width: min(25vw, 15rem); max-height: 56%; object-fit: contain; object-position: bottom right; pointer-events: none; opacity: .34; filter: drop-shadow(.6rem .8rem .8rem rgba(0,0,0,.58)) saturate(1.15); mix-blend-mode: screen; }
.gallery-strip-track { height: 100%; min-height: 0; display: flex; align-items: center; gap: .8rem; overflow-x: auto; overflow-y: hidden; padding: 0 .8rem; scroll-snap-type: x mandatory; scrollbar-color: var(--red) #0b1020; scrollbar-width: thin; }
/* Keep each picture's real proportions: wide art is wide, so visitors can browse
   the full image directly instead of opening every landscape image in a lightbox. */
.gallery-strip-item { flex: 0 0 auto; width: max-content; max-height: min(46rem, calc(100svh - 9rem)); padding: 0; border: 0; background: #091224; cursor: zoom-in; scroll-snap-align: start; }
/* Do not upscale a small uploaded original just to fill the gallery height.
   Larger art scales down cleanly; smaller art stays at its native, sharper size. */
.gallery-strip-item img,.gallery-strip-item video { width: auto; max-width: none; height: auto; max-height: min(46rem, calc(100svh - 9rem)); display: block; object-fit: contain; object-position: center; transition: filter .2s ease, transform .25s ease; }
.gallery-strip-item:hover img,.gallery-strip-item:focus-visible img,.gallery-strip-item:hover video,.gallery-strip-item:focus-visible video { filter: brightness(1.14); transform: scale(1.018); }
.gallery-strip-item.is-video { position: relative; cursor: pointer; }
.gallery-video-badge { position: absolute; right: .65rem; bottom: .65rem; padding: .3rem .45rem; color: #fff1dd; background: rgba(10,5,18,.8); font-size: .66rem; font-weight: 950; letter-spacing: .12em; }
.gallery-strip-item:focus-visible { outline: .2rem solid var(--paper); outline-offset: -.3rem; }
body.is-gallery-lightbox-open { overflow: hidden; }
.gallery-lightbox { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; overflow: auto; padding: 4.5rem 1.5rem 2rem; background: rgba(4,5,12,.94); }
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox-close { position: fixed; z-index: 2; top: 1.25rem; right: 1.25rem; padding: .7rem 1rem; border: 1px solid var(--paper); color: #351024; background: var(--paper); font-weight: 950; letter-spacing: .1em; cursor: pointer; }
.gallery-lightbox-visual { max-width: min(88vw,74rem); padding: 0; background: transparent; cursor: zoom-in; transition: max-width .25s ease; }
.gallery-lightbox-visual img,.gallery-lightbox-visual video { display: block; max-width: 100%; max-height: calc(100svh - 7rem); margin: auto; object-fit: contain; }
.gallery-lightbox-visual video { width: min(88vw,74rem); background: #000; }
.gallery-lightbox p { position: fixed; bottom: 1.1rem; margin: 0; color: #fff1dd; font-size: .7rem; font-weight: 900; letter-spacing: .14em; }
.gallery-lightbox.is-zoomed { place-items: start center; }
.gallery-lightbox.is-zoomed .gallery-lightbox-visual { max-width: min(160vw,110rem); cursor: zoom-out; }
.gallery-lightbox.is-zoomed .gallery-lightbox-visual img { max-height: none; }
.empty-state { color: #8fa2bf; font-style: italic; }

.mobile-nav {
  position: fixed;
  left: 50%;
  bottom: calc(1.75rem + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: .25rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: .42rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 1.45rem;
  background: rgba(5,10,24,.88);
  box-shadow: 0 .8rem 2.8rem rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.mobile-nav a,
.mobile-nav button,
.mobile-nav .nav-active {
  min-width: 4.3rem;
  min-height: 3.35rem;
  display: grid;
  grid-template-rows: 1.35rem auto;
  place-items: center;
  align-content: center;
  gap: .18rem;
  border: 0;
  border-radius: 1.05rem;
  color: #8fa1bd;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible,
.mobile-nav button:hover,
.mobile-nav button:focus-visible {
  color: #fff;
  outline: none;
  background: rgba(8,124,255,.22);
}

.mobile-nav span:not(.nav-active),
.mobile-nav button > span,
.mobile-nav a > span { font-size: 1.2rem; font-weight: 950; line-height: 1; }
.mobile-nav small { font-size: .62rem; font-weight: 900; letter-spacing: .08em; }
.mobile-nav .nav-active { color: #07101e; background: var(--gold); cursor: default; }
.mobile-nav .nav-active i { width: .7rem; height: .7rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 .22rem rgba(255,37,78,.2); }
.mobile-nav button.is-on { color: var(--cyan); }
.music-now-playing { position: fixed; z-index: 12; left: 50%; bottom: calc(5.75rem + env(safe-area-inset-bottom)); max-width: min(24rem,calc(100vw - 2rem)); overflow: hidden; margin: 0; padding: .45rem .75rem; border: 1px solid rgba(246,215,172,.38); border-radius: 999px; color: #fff1dd; background: rgba(27,8,28,.92); box-shadow: 0 .5rem 1.6rem rgba(0,0,0,.32); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-align: center; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; transform: translateX(-50%); }

body.is-about-overlay-open { overflow: hidden; }
.about-overlay { position: fixed; z-index: 40; inset: 0; overflow: hidden; color: #f9ebd6; background: #120713; animation: aboutOverlayEnter .32s ease both; }
.about-overlay[hidden] { display: none; }
.about-overlay > #aboutOverlayContent, .about-overlay .about-sequence { height: 100%; }
.about-overlay .about-sequence { min-height: 100svh; border: 0; background: #120713; }
.about-overlay .about-backdrop img { opacity: .56; filter: saturate(.25) contrast(.8); }
.about-overlay .about-backdrop::after { background: linear-gradient(90deg, rgba(18,7,20,.97) 3%, rgba(18,7,20,.7) 49%, rgba(18,7,20,.84)), linear-gradient(0deg, rgba(18,7,20,.94), transparent 70%); }
.about-overlay .about-scroll { max-height: calc(100svh - 9.5rem); min-height: calc(100svh - 9.5rem); padding: clamp(6.5rem,11vh,9rem) clamp(2rem,13vw,16rem) 3rem clamp(2rem,18vw,21rem); }
.about-overlay .about-scroll-content { min-height: calc(100svh - 13rem); max-width: 48rem; }
.about-overlay .about-scroll h3 { font-size: clamp(3.2rem,8vw,8rem); }
.about-overlay .about-scroll p { max-width: 42rem; font-size: clamp(1rem,1.55vw,1.35rem); line-height: 1.85; }
.about-overlay .character-theme { position: absolute; z-index: 2; right: clamp(1.2rem,5vw,5rem); bottom: 1.4rem; width: min(34rem,calc(100vw - 2.4rem)); border: 1px solid rgba(246,215,172,.36); background: rgba(34,9,34,.92); }
.about-overlay .theme-empty { position: absolute; z-index: 2; right: 2rem; bottom: 2rem; }
.about-overlay.is-manual-scroll .about-scroll-content { animation-play-state: paused; }
.about-overlay-chrome { position: fixed; z-index: 3; top: 1.3rem; left: clamp(1.2rem,4vw,4rem); right: clamp(1.2rem,4vw,4rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; pointer-events: none; }
.about-overlay-chrome button { pointer-events: auto; padding: .75rem 1rem; border: 1px solid var(--paper); color: #351024; background: var(--paper); box-shadow: .3rem .3rem 0 rgba(255,62,159,.24); font-weight: 950; letter-spacing: .08em; cursor: pointer; }
.about-overlay-chrome span { color: var(--paper); font-size: .7rem; font-weight: 900; letter-spacing: .16em; }
@keyframes aboutOverlayEnter { from { opacity: 0; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 760px) {
  .menu-stage { grid-template-columns: 1fr; align-content: center; gap: 1.5rem; }
  .menu-copy { align-self: auto; padding: 0; }
  .menu-copy p { display: none; }
  .main-menu { gap: .42rem; }
  .menu-item { min-height: 3.5rem; }
  .character-card { grid-template-columns: 1fr; }
  .character-visual { min-height: 28rem; }
  .cast-title-row { align-items: start; flex-direction: column; }
  .menu-hint { display: none; }
  .mobile-nav { bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
  .mobile-nav a, .mobile-nav button, .mobile-nav .nav-active { min-width: 3.8rem; }
}

.section-screen { overflow-x: hidden; overflow-y: auto; }
.about-page .page-shell { justify-content: flex-start; padding-top: clamp(3rem,7vw,6rem); }
.about-page .page-shell h1 { margin-top: 2.2rem; }
.about-page .page-shell::after,
.about-page .page-emblem,
.updates-page .page-shell::after,
.updates-page .page-emblem,
.contact-page .page-shell::after,
.contact-page .page-emblem { display: none; }
.about-page .page-shell > :not(.page-emblem),
.updates-page .page-shell > :not(.page-emblem),
.contact-page .page-shell > :not(.page-emblem) { width: min(100%, 52rem); max-width: 52rem; margin-left: auto; margin-right: auto; }
.about-copy { display: grid; gap: 1rem; }
.about-copy p { margin: 0; }
.about-copy .about-lead { color: #fff1dd; font-size: clamp(1.2rem,2vw,1.5rem); font-weight: 800; line-height: 1.55; }
.content-note { margin: .5rem 0; padding: 1.35rem 1.45rem; border: 1px solid rgba(255,143,208,.34); border-left: .35rem solid var(--red); background: rgba(42,10,37,.76); box-shadow: .65rem .65rem 0 rgba(246,215,172,.06); }
.content-note > span { color: var(--paper); font-size: .72rem; font-weight: 900; letter-spacing: .18em; }
.content-note h2 { margin: .25rem 0 .8rem; color: #fff1dd; font-size: clamp(1.45rem,2.7vw,2.15rem); font-style: italic; text-transform: uppercase; }
.content-note p { color: #d9c5d6; font-size: 1rem; line-height: 1.62; }
.content-note p + p { margin-top: .8rem; }
.about-signoff { color: #efcfe1 !important; font-style: italic; }

.updates-page .page-shell { justify-content: flex-start; padding-top: clamp(3rem,7vw,6rem); }
.updates-page .page-shell h1 { margin-top: 2.2rem; }
.updates-feed { display: grid; gap: 1.25rem; }
.update-post { padding: clamp(1.35rem,3vw,2.25rem); border: 1px solid rgba(246,215,172,.25); border-left: .35rem solid var(--red); background: linear-gradient(125deg, rgba(50,15,45,.9), rgba(22,7,25,.88)); box-shadow: .8rem .8rem 0 rgba(246,215,172,.06); }
.update-post header { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .75rem; border-bottom: 1px solid rgba(246,215,172,.14); color: #bfa6bb; font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.update-post header span { color: var(--paper); }
.update-post h2 { margin: 1.1rem 0 .85rem; color: #fff1dd; font-size: clamp(1.8rem,4vw,3rem); font-style: italic; line-height: 1; text-transform: uppercase; }
.update-post p { margin: 0; color: #d9c5d6; font-size: 1rem; line-height: 1.68; }
.update-post p + p { margin-top: .9rem; }

.contact-page .page-shell { justify-content: flex-start; padding-top: clamp(3rem,7vw,6rem); }
.contact-page .page-shell h1 { margin-top: 2.2rem; }
.contact-copy { display: grid; gap: 1.4rem; }
.contact-copy .contact-lead { margin: 0; color: #efd9e8; font-size: clamp(1.1rem,2vw,1.35rem); line-height: 1.55; }
.contact-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.contact-card { min-height: 16rem; display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid rgba(246,215,172,.25); border-top: .3rem solid var(--red); background: linear-gradient(145deg, rgba(51,15,46,.92), rgba(22,7,25,.9)); box-shadow: .65rem .65rem 0 rgba(246,215,172,.06); }
.contact-card > span { color: var(--paper); font-size: .72rem; font-weight: 900; letter-spacing: .16em; }
.contact-card h2 { margin: .65rem 0 .7rem; color: #fff1dd; font-size: clamp(1.5rem,3vw,2.15rem); font-style: italic; text-transform: uppercase; }
.contact-card p { margin: 0; color: #d6bfd2; font-size: 1rem; line-height: 1.55; }
.contact-card strong { margin-top: auto; padding-top: 1.2rem; color: var(--cyan); font-size: .76rem; letter-spacing: .12em; }
.contact-card .contact-action { display: inline-flex; align-items: center; justify-content: center; margin-top: auto; padding: .8rem 1rem; border: 1px solid rgba(255,143,208,.6); color: #fff1dd; background: rgba(160,54,124,.2); font-size: .76rem; font-weight: 950; letter-spacing: .1em; text-decoration: none; }
.contact-card .contact-action:hover, .contact-card .contact-action:focus-visible { border-color: var(--paper); color: #351024; outline: none; background: var(--paper); }

@media (max-width: 760px) {
  .about-page .page-shell { padding-top: 2.5rem; }
  .updates-page .page-shell { padding-top: 2.5rem; }
  .contact-page .page-shell { padding-top: 2.5rem; }
  .about-page .page-shell::after { opacity: .18; }
  .content-note { padding: 1.1rem; }
  .update-post header { align-items: flex-start; flex-direction: column; gap: .3rem; }
  .contact-links { grid-template-columns: 1fr; }
  .contact-card { min-height: 13rem; }
}

/* Story Forge asset facelift */
:root {
  --ink: #100815;
  --blue: #a0367c;
  --cyan: #ff8fd0;
  --red: #ff3e9f;
  --gold: #f6d7ac;
  --paper: #ead1b5;
  --plum: #2a102c;
}

body { font-family: "Trebuchet MS", "Arial Narrow", Arial, sans-serif; }

.title-screen {
  place-items: center start;
  background-image: linear-gradient(90deg, rgba(10,3,14,.18), rgba(10,3,14,.76) 55%, rgba(10,3,14,.96)), url('/showcase/assets/optimized/eye-gradient-background.jpg');
  background-position: center;
  background-size: cover;
}

.title-screen::before {
  opacity: .18;
  background-image: radial-gradient(circle, rgba(255,139,208,.7) 0 1px, transparent 1.5px);
  background-size: 38px 38px;
  transform: none;
}

.title-mascot {
  position: absolute;
  z-index: 1;
  left: clamp(-8rem, -5vw, -2rem);
  bottom: -7%;
  width: min(62vw, 48rem);
  max-height: 94vh;
  object-fit: contain;
  filter: drop-shadow(1.5rem 1.8rem 2.5rem rgba(0,0,0,.72));
  animation: mascotFloat 5s ease-in-out infinite;
}

.title-lockup { margin-left: clamp(17rem, 43vw, 48rem); width: min(52vw, 45rem); transform: none; }
.title-emblem { width: clamp(4rem, 7vw, 6.5rem); aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 2px solid rgba(246,215,172,.72); box-shadow: 0 0 2rem rgba(255,62,159,.35); }
.eyebrow { color: var(--paper); text-shadow: 0 2px 0 #6e234f; }
.title-lockup h1 { line-height: .76; filter: drop-shadow(.5rem .7rem 0 rgba(0,0,0,.42)); }
.title-lockup h1 span { margin-right: .72em; color: #fff7eb; -webkit-text-stroke-color: #682153; text-shadow: .06em .06em 0 #2d0b2d, .11em .11em 0 rgba(255,62,159,.25); }
.title-lockup h1 strong { margin-left: .55em; color: #241020; background: linear-gradient(100deg, #f0d2ad, #fff1da 48%, #d99caa); -webkit-text-stroke-color: #7c315e; box-shadow: none; text-shadow: .035em .035em 0 rgba(255,255,255,.65); }
.title-note { border-color: var(--red); color: #efdbe9; background: rgba(27,8,28,.72); }
.press-start { bottom: clamp(4.7rem, 8vh, 6rem); background: rgba(34,8,31,.86); box-shadow: inset 0 0 0 2px rgba(255,139,208,.6), 0 0 30px rgba(255,62,159,.28); }

.speed-lines, .orbit { opacity: .12; }
.corner-mark { background: linear-gradient(90deg, var(--red) 0 46%, var(--paper) 46% 55%, #7e2f86 55% 100%); }

.menu-screen, .section-screen, .cast-screen {
  background-image: linear-gradient(105deg, rgba(13,4,16,.95), rgba(29,8,31,.78)), url('/showcase/assets/optimized/eye-gradient-background.jpg');
  background-position: center;
  background-size: cover;
  background-attachment: scroll;
}

.menu-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 47%, rgba(255,255,255,.04) 47% 47.1%, transparent 47.1%);
}

.menu-copy { position: relative; align-self: center; padding: 0; }
.menu-host { display: block; width: min(26vw, 18rem); max-height: 34vh; margin: 0 0 -2rem auto; object-fit: contain; object-position: bottom; border-radius: 48% 48% 10% 10%; filter: drop-shadow(1rem 1.2rem 1.5rem rgba(0,0,0,.72)); mask-image: linear-gradient(#000 76%, transparent); }
.menu-copy small { color: var(--paper); }
.menu-copy h2 { color: #fff3e0; text-shadow: .06em .06em 0 #6f2555; }
.menu-copy p { color: #d6bcd2; }

.menu-item {
  grid-template-columns: 3.2rem 3.35rem 1fr auto;
  color: #d7bbd1;
  background: linear-gradient(90deg, rgba(38,13,38,.95), rgba(18,7,24,.86));
  border: 1px solid rgba(246,215,172,.12);
  clip-path: polygon(2.5% 0, 100% 0, 97.5% 100%, 0 100%);
}
.menu-item::before { color: var(--paper); background: rgba(246,215,172,.06); }
.menu-item::after { content: ""; width: 2.8rem; height: 2.8rem; grid-column: 2; grid-row: 1; border-radius: .45rem; background-image: var(--art); background-size: 160%; background-position: 50% 34%; box-shadow: inset 0 0 0 1px rgba(246,215,172,.35); }
.menu-item:hover, .menu-item:focus-visible, .menu-item.is-selected { background: linear-gradient(90deg, #b32c7d, #63235f 70%, #301335); filter: drop-shadow(.75rem .75rem 0 rgba(246,215,172,.22)); }
.menu-item:hover::after, .menu-item:focus-visible::after, .menu-item.is-selected::after { box-shadow: 0 0 0 2px var(--paper), 0 0 1rem rgba(255,62,159,.55); }
.menu-item::before { grid-column: 1; grid-row: 1; }
.menu-item { text-indent: 0; }

.mobile-nav { border-color: rgba(246,215,172,.28); background: rgba(28,9,29,.9); }
.mobile-nav .nav-active { color: #301125; background: linear-gradient(#f8e5c8,#dbacaa); }

.cast-layout, .page-shell { position: relative; z-index: 1; }
.cast-layout::before, .page-shell::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 20% 15%, rgba(255,62,159,.2), transparent 26rem); }
.cast-title-row h1, .page-shell h1 { color: #fff1dd; text-shadow: .05em .05em 0 #6f2555; }
.roster button { color: #d1b9ce; background: rgba(34,12,36,.9); border-color: rgba(246,215,172,.2); }
.roster button:hover, .roster button:focus-visible, .roster button[aria-selected="true"] { border-color: var(--paper); background: linear-gradient(115deg, #a92d7b, #4b1c4b); }
.character-card { border-color: rgba(246,215,172,.28); background: linear-gradient(135deg, rgba(51,20,47,.96), rgba(17,6,20,.98)); box-shadow: 1.2rem 1.2rem 0 rgba(246,215,172,.08); }
.character-visual { background-image: linear-gradient(155deg, rgba(142,44,111,.32), rgba(17,7,22,.76)), url('/showcase/assets/brand/st-jerfferson-city.webp'); background-size: cover; background-position: center; }
.character-visual::after { background: linear-gradient(90deg, var(--red), #7e2f86); }
.profile-tabs button[aria-selected="true"] { color: #351024; background: var(--paper); border-color: var(--paper); }
.relationship-list article { border-left-color: var(--red); }

.page-shell { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.page-shell::after { content: ""; position: absolute; right: 0; top: 50%; width: min(42vw, 31rem); aspect-ratio: 1; transform: translateY(-50%); background: url('/showcase/assets/brand/pretty-kitty-studios.webp') center/cover; border: 1px solid rgba(246,215,172,.35); border-radius: 1rem; box-shadow: 1rem 1rem 0 rgba(255,62,159,.12); opacity: .78; }
.page-shell > :not(.page-emblem) { max-width: 48%; }
.page-emblem { position: absolute; right: min(4vw, 3rem); bottom: 14%; z-index: 2; width: min(20vw, 13rem); filter: drop-shadow(.8rem .8rem 1rem rgba(0,0,0,.72)); }

@keyframes mascotFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-.7rem) rotate(1deg); } }

@media (max-width: 760px) {
  .title-screen { place-items: start center; background-position: 55% center; }
  .title-mascot { left: 50%; bottom: 13%; width: min(92vw, 31rem); max-height: 54vh; transform: translateX(-50%); animation: none; opacity: .72; }
  .title-lockup { margin: 12vh auto 0; width: 94vw; }
  .title-emblem { width: 3.8rem; }
  .title-lockup h1 span { font-size: clamp(3.8rem, 19vw, 7rem); }
  .title-lockup h1 strong { font-size: clamp(3.2rem, 16vw, 6rem); }
  .title-note { margin-top: 1rem; }
  .press-start { bottom: clamp(7.8rem, 14vh, 9rem); }
  .menu-stage { align-content: start; overflow-y: auto; padding-top: 2rem; }
  .menu-host { position: absolute; right: -.5rem; top: -1rem; width: 7rem; height: 7rem; margin: 0; border-radius: 50%; mask-image: none; opacity: .9; }
  .menu-copy h2 { font-size: 3.3rem; }
  .menu-copy p { display: block; max-width: calc(100% - 7.5rem); font-size: .83rem; line-height: 1.35; }
  .menu-item { grid-template-columns: 2.7rem 2.75rem 1fr auto; min-height: 3.8rem; transform: none; }
  .menu-item:hover, .menu-item:focus-visible, .menu-item.is-selected { transform: translateX(-.35rem) scale(1.015); }
  .menu-item::after { width: 2.35rem; height: 2.35rem; }
  .gallery-strip-mascot { width: 9rem; max-height: 34%; opacity: .26; }
  .page-shell::after { top: 2rem; right: 0; width: 48vw; transform: none; opacity: .36; }
  .page-shell > :not(.page-emblem) { max-width: 100%; }
  .page-emblem { right: 1rem; bottom: 7rem; width: 8rem; opacity: .8; }
}

.cast-controls { display: flex; align-items: flex-end; gap: 1rem; }
.cast-controls p { margin: 0 0 .7rem; }
.edit-mode-controls { display: grid; justify-items: end; gap: .45rem; }
.edit-mode-controls p { margin: 0; }
.editor-top-actions { display: flex; gap: .45rem; }
.edit-mode-toggle { border: 1px solid rgba(246,215,172,.45); border-radius: .25rem; padding: .68rem .9rem; color: #d9c5d6; background: rgba(43,16,43,.88); font-weight: 900; letter-spacing: .08em; cursor: pointer; }
.edit-mode-toggle:hover, .edit-mode-toggle:focus-visible { color: #fff; border-color: var(--cyan); outline: none; }
.edit-mode-toggle[aria-pressed="true"] { color: #351024; border-color: var(--paper); background: linear-gradient(#f8e5c8,#dbaaaa); box-shadow: 0 0 0 4px rgba(255,62,159,.14); }
.add-character { border: 1px solid rgba(255,143,208,.7); border-radius: .25rem; padding: .68rem .9rem; color: #fff1dd; background: var(--red); font: inherit; font-weight: 900; letter-spacing: .06em; cursor: pointer; }
.add-character:hover,.add-character:focus-visible { border-color: var(--paper); background: #c4216b; outline: none; }
.sort-control { display: grid; gap: .28rem; min-width: 12rem; }
.sort-control span { color: var(--paper); font-size: .75rem; font-weight: 900; letter-spacing: .18em; }
.sort-control select { width: 100%; border: 1px solid rgba(246,215,172,.4); border-radius: .25rem; padding: .65rem 2.25rem .65rem .8rem; color: #fff1dd; background: #2b102b; font: inherit; font-weight: 800; cursor: pointer; }
.sort-control select:hover, .sort-control select:focus-visible { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px rgba(255,143,208,.12); }
.roster button strong { display: block; color: inherit; font-size: .92rem; }
.roster button small { display: block; margin-top: .18rem; color: #a98ca6; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.roster button[aria-selected="true"] small { color: #f4d6e8; }

.series-browser { margin: 1.2rem 0 .35rem; }
.series-tabs { display: flex; gap: .45rem; overflow-x: auto; padding: .2rem .15rem .85rem; scrollbar-width: thin; }
.series-tabs button { flex: 0 0 auto; border: 1px solid rgba(246,215,172,.24); border-radius: 99px; padding: .62rem 1rem; color: #cbb2c7; background: rgba(31,10,32,.78); font: inherit; font-size: .82rem; font-weight: 900; cursor: pointer; }
.series-tabs button:hover, .series-tabs button:focus-visible { color: #fff; border-color: var(--cyan); outline: none; }
.series-tabs button[aria-selected="true"] { color: #351024; border-color: var(--paper); background: linear-gradient(#f8e5c8,#dbaaaa); box-shadow: 0 .35rem 1.2rem rgba(0,0,0,.25); }
.series-lore { position: relative; min-height: 24rem; display: grid; grid-template-columns: minmax(15rem,.6fr) minmax(20rem,1.4fr); overflow: hidden; border: 1px solid rgba(246,215,172,.26); background: linear-gradient(120deg, rgba(48,15,44,.96), rgba(17,6,20,.96)); box-shadow: .8rem .8rem 0 rgba(255,62,159,.08); }
.series-lore-art { min-height: 24rem; background-position: center; background-size: cover; }
.series-lore > div:last-child { align-self: stretch; overflow-y: auto; max-height: 34rem; padding: clamp(2rem,4vw,4rem); scrollbar-color: var(--red) rgba(255,255,255,.08); scrollbar-width: thin; }
.series-lore-label { color: var(--paper); font-size: .72rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.series-lore h2 { margin: .28rem 0 .7rem; color: #fff1dd; font-size: clamp(1.8rem,3.6vw,3.2rem); font-style: italic; line-height: .95; text-transform: uppercase; }
.series-lore p { max-width: 52rem; margin: 0; color: #d7c4d4; font-size: 1.08rem; line-height: 1.8; white-space: pre-line; }
.cast-layout.is-series-presentation { position: relative; min-height: 100svh; padding-bottom: 12rem; }
.cast-layout.is-series-presentation .series-browser { margin-bottom: 0; }
.cast-layout.is-series-presentation .series-lore { min-height: calc(100svh - 19rem); grid-template-columns: minmax(20rem,.7fr) minmax(24rem,1.3fr); }
.cast-layout.is-series-presentation .series-lore-art { min-height: inherit; }
.cast-layout.is-series-presentation .series-lore > div:last-child { max-height: calc(100svh - 19rem); padding: clamp(2rem,6vw,6rem); }
.cast-layout.is-series-presentation .series-lore h2 { font-size: clamp(3rem,7vw,7rem); }
.cast-layout.is-series-presentation .series-lore p { font-size: clamp(1rem,1.45vw,1.3rem); line-height: 1.9; }
.cast-layout.is-series-presentation .roster { position: absolute; z-index: 4; right: 1rem; bottom: calc(6.6rem + env(safe-area-inset-bottom)); left: 1rem; margin: 0; padding: .65rem; border: 1px solid rgba(246,215,172,.26); background: rgba(9,5,18,.86); box-shadow: 0 .7rem 1.8rem rgba(0,0,0,.45); backdrop-filter: blur(16px); }
.cast-layout.is-series-presentation .character-card { display: none; }

.character-editor { position: fixed; top: 1rem; right: 1rem; bottom: calc(6.2rem + env(safe-area-inset-bottom)); z-index: 50; width: min(36rem,calc(100vw - 2rem)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; margin: 0; padding: clamp(1rem,2.5vw,1.6rem); border: 1px solid rgba(255,143,208,.65); border-top: .35rem solid var(--red); border-radius: .45rem; background: rgba(27,8,28,.97); box-shadow: -1rem 1rem 3rem rgba(0,0,0,.62), .75rem .75rem 0 rgba(246,215,172,.07); backdrop-filter: blur(18px); }
.editor-heading { position: sticky; top: -1.6rem; z-index: 2; display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin: -1.6rem -1.6rem 1.2rem; padding: 1.35rem 1.6rem 1rem; border-bottom: 1px solid rgba(246,215,172,.18); background: rgba(27,8,28,.98); }
.editor-heading span { color: var(--paper); font-size: .7rem; font-weight: 900; letter-spacing: .16em; }
.editor-heading h3 { margin: .2rem 0 0; color: #fff1dd; font-size: 1.55rem; font-style: italic; text-transform: uppercase; }
.editor-heading small { display: block; margin-top: .35rem; color: #bda6ba; }
.editor-close { flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border: 1px solid rgba(246,215,172,.3); border-radius: 50%; color: #fff1dd; background: rgba(255,255,255,.04); font-size: 1.55rem; line-height: 1; cursor: pointer; }
.editor-close:hover, .editor-close:focus-visible { color: #351024; border-color: var(--paper); outline: none; background: var(--paper); }
.editor-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; }
.editor-fields label { display: grid; gap: .35rem; color: var(--paper); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.editor-fields .editor-wide { grid-column: 1 / -1; }
.editor-fields input, .editor-fields select, .editor-fields textarea { width: 100%; border: 1px solid rgba(246,215,172,.3); border-radius: .2rem; padding: .72rem .8rem; color: #fff; background: #160919; font: inherit; font-size: 1rem; line-height: 1.45; text-transform: none; resize: vertical; }
.editor-fields input:focus, .editor-fields select:focus, .editor-fields textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px rgba(255,143,208,.12); }
.editor-upload-field { display: grid; gap: .35rem; color: var(--paper); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.editor-upload-row { display: grid; grid-template-columns: 4.25rem 1fr auto; align-items: center; gap: .55rem; }
.editor-upload-row img { width: 4.25rem; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; border: 1px solid rgba(246,215,172,.3); background: #091224; }
.editor-upload-row button, .editor-file-button { min-height: 2.75rem; display: grid; place-items: center; border: 1px solid rgba(246,215,172,.35); padding: .65rem .75rem; color: #e8d8e5; background: rgba(255,255,255,.035); font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-align: center; cursor: pointer; }
.editor-upload-row button:hover, .editor-upload-row button:focus-visible, .editor-file-button:hover, .editor-file-button:focus-within { color: #351024; border-color: var(--paper); outline: none; background: var(--paper); }
.editor-file-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.editor-gallery { margin-top: .35rem; padding-top: 1rem; border-top: 1px solid rgba(246,215,172,.2); }
.editor-gallery-heading span { color: var(--paper); font-size: .7rem; font-weight: 900; letter-spacing: .16em; }
.editor-gallery-heading h4 { margin: .2rem 0 .8rem; color: #fff1dd; font-size: 1.15rem; text-transform: uppercase; }
.editor-gallery-list { display: grid; gap: .7rem; }
.editor-gallery-item { display: grid; grid-template-columns: 4.5rem minmax(0,1fr); gap: .7rem; padding: .6rem; border: 1px solid rgba(246,215,172,.2); background: rgba(0,0,0,.18); }
.editor-gallery-item > img,.editor-gallery-item > video { width: 4.5rem; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; background: #091224; }
.editor-gallery-item-fields { min-width: 0; display: grid; gap: .5rem; }
.editor-gallery-item-fields input[type="text"] { padding: .55rem .65rem; }
.editor-gallery-buttons { display: flex; flex-wrap: wrap; gap: .45rem; }
.editor-gallery-buttons button, .editor-gallery-buttons .editor-file-button { min-height: 2.35rem; padding: .45rem .62rem; }
.editor-gallery-empty { margin: 0; padding: .75rem; color: #bda6ba; border: 1px dashed rgba(246,215,172,.25); font-style: italic; text-transform: none; }
.editor-gallery-add { margin-top: .7rem; color: #351024; border-color: var(--paper); background: var(--paper); }
.relationship-editor { display: grid; gap: 1rem; padding: 1rem; border: 1px solid rgba(246,215,172,.22); background: rgba(255,255,255,.035); }
.relationship-add-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.relationship-add-fields .editor-wide { grid-column: 1 / -1; }
.relationship-add-fields > button { min-height: 2.6rem; border: 1px solid var(--paper); color: #351024; background: var(--paper); font-weight: 950; cursor: pointer; }
.relationship-editor-list { display: grid; gap: .55rem; }
.relationship-editor-item { display: grid; grid-template-columns: 3.3rem minmax(0,1fr) auto; gap: .7rem; align-items: center; padding: .55rem; background: rgba(4,8,18,.55); }
.relationship-editor-item img,.relationship-editor-item > span { width: 3.3rem; height: 3.3rem; display: grid; place-items: center; object-fit: cover; color: var(--paper); background: #17213a; font-weight: 900; }
.relationship-editor-item strong,.relationship-editor-item small { display: block; }
.relationship-editor-item small { color: var(--cyan); }
.relationship-editor-item p { margin: .2rem 0 0; font-size: .8rem; line-height: 1.35; }
.relationship-editor-item button { padding: .45rem; border: 1px solid rgba(255,255,255,.25); color: #ffdbe9; background: transparent; font-size: .68rem; font-weight: 900; cursor: pointer; }
.theme-editor { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; padding: 1rem; border: 1px solid rgba(246,215,172,.22); background: rgba(255,255,255,.025); }
.theme-editor > div, .theme-editor > .theme-toggle { grid-column: 1 / -1; }
.theme-editor h4 { margin: .2rem 0 .45rem; color: #fff1dd; font-size: 1.05rem; text-transform: uppercase; }
.theme-editor p { margin: 0; color: #c8b3c5; font-size: .83rem; line-height: 1.5; text-transform: none; }
.series-editor { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; padding: 1rem; border: 1px solid rgba(255,143,208,.3); background: linear-gradient(135deg,rgba(93,20,70,.28),rgba(0,0,0,.12)); }
.series-editor > div, .series-editor > .editor-wide { grid-column: 1 / -1; }
.series-editor h4 { margin: .2rem 0 .45rem; color: #fff1dd; font-size: 1.05rem; text-transform: uppercase; }
.series-editor p { margin: 0; color: #c8b3c5; font-size: .83rem; line-height: 1.5; text-transform: none; }
.series-editor > button, .series-add-row button { min-height: 2.7rem; border: 1px solid var(--paper); padding: .65rem .75rem; color: #351024; background: var(--paper); font-weight: 950; letter-spacing: .04em; cursor: pointer; }
.series-add-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .7rem; align-items: end; }
.theme-toggle { display: flex !important; align-items: center; gap: .65rem; padding: .65rem .75rem; border: 1px solid rgba(246,215,172,.2); background: rgba(0,0,0,.16); cursor: pointer; }
.theme-toggle input { width: 1.1rem !important; accent-color: var(--red); }
.janitor-sync { margin-top: .35rem; padding: 1rem; border: 1px solid rgba(255,143,208,.35); background: linear-gradient(135deg,rgba(93,20,70,.38),rgba(0,0,0,.14)); }
.janitor-sync > span { color: var(--paper); font-size: .7rem; font-weight: 900; letter-spacing: .16em; }
.janitor-sync h4 { margin: .25rem 0 .55rem; color: #fff1dd; font-size: 1.15rem; text-transform: uppercase; }
.janitor-sync p { margin: 0 0 .8rem; color: #d7c4d3; font-size: .9rem; font-weight: 500; line-height: 1.5; letter-spacing: 0; text-transform: none; }
.janitor-bookmark, .janitor-profile-link { display: block; padding: .72rem .8rem; color: #351024; background: var(--paper); font-size: .72rem; font-weight: 950; letter-spacing: .05em; text-align: center; text-decoration: none; }
.janitor-profile-link { margin-top: .5rem; color: var(--cyan); border: 1px solid rgba(255,143,208,.4); background: transparent; }
.sync-dialog { width: min(46rem,calc(100vw - 2rem)); max-height: min(46rem,calc(100svh - 2rem)); overflow: auto; border: 1px solid rgba(255,143,208,.65); border-top: .4rem solid var(--red); border-radius: .45rem; padding: clamp(1rem,3vw,1.6rem); color: #f7eaf3; background: rgba(27,8,28,.98); box-shadow: 0 2rem 6rem rgba(0,0,0,.8); }
.sync-dialog::backdrop { background: rgba(2,3,10,.82); backdrop-filter: blur(8px); }
.sync-dialog-heading > span { color: var(--paper); font-size: .72rem; font-weight: 900; letter-spacing: .16em; }
.sync-dialog-heading h2 { margin: .3rem 0; color: #fff1dd; font-size: clamp(1.8rem,5vw,3rem); font-style: italic; text-transform: uppercase; }
.sync-dialog-heading p { color: #cbb7c7; }
.sync-review-list { display: grid; gap: .65rem; margin: 1rem 0; }
.sync-review-item { display: grid; grid-template-columns: auto 3.5rem minmax(0,1fr); align-items: center; gap: .75rem; padding: .7rem; border: 1px solid rgba(246,215,172,.2); background: rgba(255,255,255,.035); }
.sync-review-item img { width: 3.5rem; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; background: #091224; }
.sync-review-item strong, .sync-review-item small { display: block; }
.sync-review-item small { margin-top: .18rem; color: var(--cyan); }
.sync-review-item p { margin: .35rem 0 0; color: #cbb7c7; font-size: .86rem; line-height: 1.4; }
.sync-dialog-actions { position: sticky; bottom: -1.6rem; display: flex; gap: .65rem; margin: 1rem -1.6rem -1.6rem; padding: 1rem 1.6rem; background: rgba(27,8,28,.98); }
.sync-dialog-actions button { border: 1px solid rgba(246,215,172,.35); padding: .75rem 1rem; color: #e8d8e5; background: transparent; font-weight: 900; cursor: pointer; }
.sync-dialog-actions button:first-child { color: #351024; border-color: var(--paper); background: var(--paper); }
.editor-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.editor-actions button { border: 1px solid rgba(246,215,172,.35); padding: .68rem .9rem; color: #d9c5d6; background: transparent; font-weight: 900; cursor: pointer; }
.editor-actions button:hover, .editor-actions button:focus-visible { color: #fff; border-color: var(--cyan); outline: none; }
.editor-actions .editor-save { color: #351024; border-color: var(--paper); background: var(--paper); }
.editor-actions .editor-delete { color: #ffd6dc; border-color: rgba(255, 103, 130, .65); background: rgba(102, 19, 34, .32); }
.editor-actions .editor-delete:hover, .editor-actions .editor-delete:focus-visible { border-color: #ff899a; background: rgba(144, 25, 48, .55); }
.editor-status { min-height: 1.2rem; margin: .75rem 0 0; color: var(--cyan); font-size: .82rem; font-weight: 900; }
.is-editing-cast .character-card { border-color: rgba(255,143,208,.62); }
.is-editing-cast .character-visual { align-self: start; min-height: 0; height: clamp(18rem,52vh,30rem); }

@media (max-width: 760px) {
  /* Phone editor: keep controls comfortably tappable and keep Save in reach. */
  .cast-layout { padding: 1rem 1rem calc(6.5rem + env(safe-area-inset-bottom)); }
  .cast-brand-mascot { top: -1.4rem; left: auto; right: -.35rem; width: 5.4rem; max-height: 5.7rem; opacity: .92; }
  .cast-controls { width: 100%; align-items: stretch; flex-direction: column; gap: .45rem; }
  .cast-controls p { margin: 0; }
  .edit-mode-controls { justify-items: stretch; }
  .editor-top-actions { width: 100%; }
  .editor-top-actions button { flex: 1; }
  .sort-control { min-width: 0; width: 100%; }
  .series-lore { grid-template-columns: 1fr; }
  .series-lore { min-height: 20rem; }
  .series-lore-art { min-height: 12rem; }
  .series-lore > div:last-child { max-height: 30rem; padding: 1.4rem; }
  .cast-layout.is-series-presentation { padding-bottom: 11rem; }
  .cast-layout.is-series-presentation .series-lore { min-height: calc(100svh - 20rem); grid-template-columns: 1fr; }
  .cast-layout.is-series-presentation .series-lore-art { min-height: 12rem; }
  .cast-layout.is-series-presentation .series-lore > div:last-child { max-height: calc(100svh - 32rem); padding: 1.5rem; }
  .cast-layout.is-series-presentation .series-lore h2 { font-size: clamp(3rem,14vw,5rem); }
  .cast-layout.is-series-presentation .roster { right: .65rem; bottom: calc(5.9rem + env(safe-area-inset-bottom)); left: .65rem; }
  .character-editor { inset: .35rem .35rem calc(.35rem + env(safe-area-inset-bottom)); width: auto; padding: 1rem; border-radius: .8rem; }
  .editor-heading { top: -1rem; margin: -1rem -1rem 1rem; padding: 1rem; }
  .editor-fields { grid-template-columns: 1fr; }
  .editor-fields .editor-wide { grid-column: auto; }
  .editor-fields input, .editor-fields select, .editor-fields textarea { min-height: 2.9rem; font-size: 16px; }
  .editor-fields textarea { min-height: 8rem; }
  .editor-close, .editor-file-button, .editor-upload-row button, .editor-gallery-buttons button, .relationship-add-fields > button { min-height: 2.9rem; }
  .editor-actions { position: sticky; z-index: 3; bottom: -1rem; margin: 1rem -1rem -1rem; padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom)); background: rgba(27,8,28,.98); box-shadow: 0 -.6rem 1.2rem rgba(0,0,0,.25); }
  .editor-actions button { min-height: 3rem; flex: 1 1 8rem; font-size: .82rem; }
  .editor-actions .editor-save { flex-basis: 100%; font-size: .92rem; }
  .theme-editor { grid-template-columns: 1fr; }
  .theme-editor > div, .theme-editor > .theme-toggle { grid-column: auto; }
  .series-editor { grid-template-columns: 1fr; }
  .series-editor > div, .series-editor > .editor-wide { grid-column: auto; }
  .series-add-row { grid-template-columns: 1fr; }
  .character-theme { grid-template-columns: 1fr; }
  .about-overlay .about-scroll { max-height: calc(100svh - 12rem); min-height: calc(100svh - 12rem); padding: 6rem 1.5rem 6.4rem; }
  .about-overlay .about-scroll-content { min-height: calc(100svh - 14rem); }
  .about-overlay .about-scroll h3 { font-size: clamp(3rem,14vw,5rem); }
  .about-overlay .about-scroll p { font-size: 1rem; line-height: 1.75; }
  .about-overlay .character-theme { right: 1rem; bottom: calc(4.8rem + env(safe-area-inset-bottom)); width: calc(100vw - 2rem); }
  .about-overlay .theme-empty { right: 1rem; bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .about-overlay-chrome { top: .85rem; left: 1rem; right: 1rem; }
  .about-overlay-chrome span { display: none; }
  .character-card.is-about-presentation { min-height: auto; }
  .character-card.is-about-presentation .character-copy { display: block; }
  .character-card.is-about-presentation .profile-tabs { margin: 1.5rem 0; }
  .character-card.is-about-presentation .about-sequence { min-height: 26rem; }
  .character-card.is-about-presentation .about-scroll { max-height: 20rem; padding: 1.5rem; }
  .character-card.is-about-presentation .about-scroll-content { min-height: 20rem; }
  .editor-upload-row { grid-template-columns: 3.7rem 1fr; }
  .editor-upload-row img { width: 3.7rem; grid-row: span 2; }
  .sync-review-item { grid-template-columns: 1fr 3.2rem; }
  .sync-review-item > input { grid-row: 1 / span 2; }
}
