@font-face {
  font-family: Bricolage;
  src: url("ui.woff") format("woff");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Instrument;
  src: url("serif.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #28182f;
  --muted: #5e4968;
  --pink: #a91362;
  --hot: #ce297a;
  --edge: #e9c7dc;
  --paper: #fff8fc;
  --shell: 80rem;
  --side: clamp(1.125rem, 5vw, 4.5rem);
  font-family: Bricolage, "Trebuchet MS", system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
[hidden] { display: none !important; }
img { display: block; width: 100%; height: auto; }
p, h1, h2, h3, figure { margin: 0; }
p { line-height: 1.6; }
ul, ol { padding-inline-start: 1.35em; }
a { color: inherit; }
button, select, input { font: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid #862e92;
  outline-offset: 4px;
}
::selection { background: #f2b9e4; color: var(--ink); }
em { color: var(--pink); font: italic 400 1.15em/0.85 Instrument, Georgia, serif; }
section[id] { scroll-margin-top: 1.25rem; }

.shell { width: min(var(--shell), 100% - var(--side) * 2); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 5;
  left: 1rem;
  top: 1rem;
  padding: .75rem 1rem;
  background: white;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { background: #fff9fd; border-bottom: 1px solid var(--edge); }
.site-header-inner {
  min-height: 5rem;
  width: min(88rem, 100% - var(--side) * 2);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  text-decoration: none;
}
.brand-mark {
  width: 2.55rem;
  height: 2.55rem;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid #f0aad0;
  border-radius: 50%;
  background: #f9d8ee;
  color: var(--pink);
  flex: 0 0 auto;
}
.brand-mark::before {
  position: absolute;
  content: '';
  width: 1.2rem;
  height: 1.2rem;
  top: .54rem;
  left: .49rem;
  border-radius: 50%;
  box-shadow: -.26rem .19rem 0 var(--pink);
  transform: rotate(-17deg);
}
.brand-mark span { position: absolute; top: .25rem; right: .38rem; font-size: .85rem; }
.brand-wordmark { font-size: .94rem; font-weight: 700; line-height: .96; letter-spacing: -.025em; }
.brand-wordmark strong { display: inline-block; color: var(--pink); font-size: 1.12rem; font-weight: 800; }

.main-nav { display: flex; align-items: center; gap: clamp(.95rem, 2.5vw, 2.4rem); }
.main-nav a {
  position: relative;
  padding-block: .7rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .97rem;
  font-weight: 650;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a[aria-current] { color: var(--pink); }
.main-nav a[aria-current]::after {
  content: '';
  position: absolute;
  bottom: .32rem;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--hot);
}

.header-search {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: .55rem;
  padding: .5rem .65rem .5rem .85rem;
  border: 1px solid #ebcade;
  border-radius: 2rem;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 700;
}
.header-search:hover, .header-search[aria-current] { background: #fce8f4; }
.header-search kbd { padding: .06rem .34rem; border-radius: .26rem; color: #754963; background: #fae9f3; }
.search-icon {
  position: relative;
  display: inline-block;
  width: .8rem;
  height: .8rem;
  border: 1.6px solid currentColor;
  border-radius: 50%;
  margin-right: .18rem;
  flex: 0 0 auto;
}
.search-icon::after {
  position: absolute;
  content: '';
  width: .4rem;
  height: 1.6px;
  right: -.32rem;
  bottom: -.13rem;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(47deg);
}

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 88% 72%, #e3ccfb 0, transparent 52%),
              radial-gradient(ellipse at 24% 16%, #fcd7e9 0, transparent 57%),
              linear-gradient(120deg, #fff0f7 10%, #fae8ff 86%);
  border-bottom: 1px solid #eed3e8;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  width: 68vw;
  height: 22rem;
  border: 1px solid #c98bbc44;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before { top: -8rem; left: -19vw; transform: rotate(-23deg); }
.hero::after { bottom: -15rem; right: -9vw; transform: rotate(-23deg); }
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(1.6rem, 4vw, 4.4rem);
  padding-block: clamp(3.2rem, 5.7vw, 6.1rem);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  color: #7c1d52;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .105em;
  text-transform: uppercase;
}
.eyebrow span:first-child { font-size: 1.1em; color: var(--pink); }
.eyebrow-divider { width: .9rem; height: 1px; background: #b776a2; }
.hero h1 { margin: .95rem 0 1.3rem; }
.hero-script {
  display: block;
  position: relative;
  width: fit-content;
  z-index: 1;
  color: var(--pink);
  font: italic 400 clamp(5rem, 8.5vw, 8.4rem)/.74 Instrument, Georgia, serif;
  letter-spacing: -.045em;
}
.hero-title {
  display: block;
  color: var(--ink);
  font-size: clamp(3rem, 6.65vw, 7.02rem);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.05em;
}
.hero-stop { color: var(--hot); }
.hero-intro { max-width: 28rem; color: #52364f; font-size: clamp(1.08rem, 1.6vw, 1.35rem); line-height: 1.45; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.65rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  border: 1px solid transparent;
  border-radius: 2rem;
  padding: .64rem 1.15rem;
  text-decoration: none;
  font-weight: 750;
  font-size: .99rem;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.button-primary { color: #fff; background: var(--pink); border-color: var(--pink); }
.button-primary:hover { background: #85104d; border-color: #85104d; }
.button-secondary { color: #6a224f; background: #fff9fd; border-color: #d8a2c7; }
.button-secondary:hover { background: #ffe2f2; border-color: #ab518b; }

.hero-art { position: relative; margin: 0 0 .75rem; isolation: isolate; }
.hero-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 1.29;
  padding: .45rem;
  border: 1px solid #f9b7de;
  border-radius: 1.6rem;
  background: #fff2fa;
  box-shadow: .75rem .9rem 0 #c895db90, 0 1.15rem 3.4rem #86297222;
}
.hero-frame img {
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  border-radius: 1.16rem;
  background: #e7b9da;
}
.hero-star { position: absolute; z-index: 2; color: #fff1fc; text-shadow: 0 1px 9px #9c338392; line-height: .8; }
.star-large { right: -.95rem; top: 1.05rem; font-size: clamp(2.7rem, 5vw, 5.2rem); }
.star-small { left: -.87rem; bottom: 1.4rem; font-size: clamp(2rem, 3.7vw, 4.4rem); }
.hero-art figcaption {
  position: absolute;
  z-index: 3;
  right: 1.15rem;
  bottom: 1.1rem;
  border: 1px solid #ffd5eb;
  border-radius: 2rem;
  background: #fff3f9;
  color: #752359;
  padding: .35rem .72rem;
  font-size: .82rem;
  font-weight: 750;
}

.section-space { margin-block: clamp(3.4rem, 6vw, 6rem); }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .7rem 1.2rem; margin-bottom: 1.28rem; }
.section-heading h2, .featured h2 {
  font-size: clamp(2.18rem, 4.1vw, 4.05rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
}
.text-link { color: #8e215a; text-underline-offset: .22em; text-decoration-thickness: 1px; font-weight: 750; }
.text-link:hover { color: #63133d; text-decoration-thickness: 2px; }
.category-grid, .article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2vw, 1.55rem); }
.tone-lore { --card: #fde7f2; --card-line: #e8b8d2; --accent: #8e245b; }
.tone-characters { --card: #f2e8ff; --card-line: #d6b9ed; --accent: #693b8b; }
.tone-world { --card: #e7f4f3; --card-line: #b9dbd7; --accent: #285b60; }
.tone-play { --card: #ffedf2; --card-line: #e9bcca; --accent: #892748; }
.category-card, .entry-card {
  border: 1px solid var(--card-line);
  border-radius: 1.1rem;
  background: var(--card);
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.category-card:hover, .entry-card:hover { border-color: var(--accent); box-shadow: 0 .6rem 1.9rem #602e5621; }
.category-image { aspect-ratio: 2.1; overflow: hidden; background: var(--card); }
.category-image img { height: 100%; object-fit: cover; object-position: center 38%; }
.tone-lore .category-image img { object-position: center 28%; }
.category-copy { padding: 1rem 1.16rem 1.25rem; position: relative; }
.category-symbol {
  display: grid;
  place-items: center;
  position: absolute;
  top: -1.25rem;
  right: .9rem;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  border: 1px solid var(--card-line);
  color: var(--accent);
  background: var(--card);
  font-size: 1.5rem;
}
.category-copy h3, .entry-card h3 { font-size: clamp(1.32rem, 2.2vw, 1.75rem); line-height: 1.15; letter-spacing: -.04em; }
.category-copy p, .entry-card p { margin-top: .46rem; color: var(--muted); }
.entry-card { display: flex; flex-direction: column; padding: 1.22rem 1.25rem; }
.entry-category { color: var(--accent, var(--pink)); font-weight: 800; letter-spacing: .055em; text-transform: uppercase; font-size: .85rem; }
.entry-card h3 { margin-top: .55rem; }
.entry-action { padding-top: 1.05rem; margin-top: auto; color: var(--accent); font-weight: 750; }
.entry-action span { margin-left: .25rem; }

.featured {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  border: 1px solid #edbad7;
  border-radius: 1.4rem;
  overflow: hidden;
  background: linear-gradient(130deg, #fbd9ed, #fcebf6);
}
.featured-art { min-height: 16rem; }
.featured-art img { height: 100%; max-height: 29rem; object-fit: cover; object-position: center 31%; }
.featured-copy { align-self: center; padding: clamp(1.5rem, 5vw, 4rem); }
.featured h2 { margin-block: .65rem 1rem; }
.featured-copy > p:not(.eyebrow) { color: var(--muted); margin-bottom: 1.3rem; max-width: 36rem; font-size: 1.05rem; }

.play-band {
  display: flex;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(3rem, 5.5vw, 5rem);
  padding: clamp(1.2rem, 3vw, 2.2rem);
  border: 1px solid #e0bae2;
  border-radius: 1.1rem;
  background: linear-gradient(110deg, #f7e0f6, #e9dbfa);
}
.play-band h2 { font-size: clamp(1.6rem, 3vw, 2.65rem); letter-spacing: -.05em; }
.play-band p { color: var(--muted); }
.play-band .button { flex-shrink: 0; }

.footer { background: #fceaf5; border-top: 1px solid var(--edge); }
.footer-inner { padding-block: 2.4rem; display: flex; justify-content: space-between; gap: 1.5rem 2rem; }
.footer p { color: var(--muted); margin-top: .62rem; }
.footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.35rem; }
.footer nav a { color: #713354; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: .18em; }

.inner-page { padding-top: 1.1rem; padding-bottom: clamp(3.25rem, 6vw, 6rem); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem .72rem; padding: 0; margin: 0 0 1.35rem; color: var(--muted); font-size: .88rem; }
.breadcrumbs li + li::before { content: '/'; margin-right: .72rem; color: #946682; }
.breadcrumbs a { text-underline-offset: .16em; }
.page-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vw, 3.7rem);
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 1.4rem;
}
.page-intro h1, .simple-intro h1 {
  font-size: clamp(2.75rem, 6.8vw, 6.6rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.055em;
  overflow-wrap: break-word;
}
.page-intro h1 { margin: .62rem 0 .9rem; }
.page-intro p:not(.eyebrow), .simple-intro p { max-width: 38rem; font-size: clamp(1.05rem, 1.7vw, 1.32rem); color: var(--muted); }
.intro-art { position: relative; }
.intro-art img { aspect-ratio: 1.7; object-fit: cover; object-position: center 36%; border-radius: .9rem; border: 1px solid var(--card-line); }
.intro-art figcaption { color: var(--accent); font-weight: 700; font-size: .8rem; margin: .5rem 0 0; }
.article-intro h1 { font-size: clamp(2.7rem, 6.5vw, 5.8rem); }
.article-layout {
  display: grid;
  grid-template-columns: minmax(12rem, .63fr) minmax(0, 1.7fr);
  gap: clamp(1.25rem, 4.8vw, 4.8rem);
  align-items: start;
  margin-top: clamp(2rem, 5vw, 4rem);
}
.toc {
  position: sticky;
  top: 1.2rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--edge);
  border-radius: .9rem;
  background: #fff0f8;
}
.toc h2 { font-size: 1.15rem; }
.toc ul { margin: .6rem 0 0; padding: 0; list-style: none; }
.toc li { margin-top: .63rem; line-height: 1.3; }
.toc a { color: #793c61; text-underline-offset: .17em; text-decoration-thickness: 1px; }
.article-body { max-width: 52rem; }
.article-body section + section { margin-top: 2rem; }
.article-body h2, .source-panel h2, .empty-state h2 { font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -.043em; }
.article-body p { font-size: 1.075rem; line-height: 1.72; margin-top: .68rem; }
.article-body a, .source-panel a { color: #8e215a; font-weight: 700; text-underline-offset: .18em; }
.article-sources { padding-top: 1.1rem; border-top: 1px solid var(--edge); }
.article-sources ul { margin-bottom: 0; }
.article-sources li, .source-panel li { margin: .52rem 0; }
.related { margin-bottom: 0; }

.simple-intro { margin-block: clamp(1.8rem, 4vw, 3.6rem) 2rem; }
.simple-intro p { margin-top: 1rem; }
.wiki-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, .34fr) auto;
  align-items: end;
  gap: .8rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--edge);
  border-radius: 1rem;
  background: #fcebf6;
}
.wiki-search-form label { display: block; margin-bottom: .38rem; font-weight: 750; }
.search-input { position: relative; }
.search-input .search-icon { position: absolute; left: .84rem; top: .95rem; color: var(--muted); pointer-events: none; }
.wiki-search-form input, .wiki-search-form select {
  display: block;
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid #d2a6c0;
  border-radius: .58rem;
  color: var(--ink);
  background: #fffafd;
}
.wiki-search-form input { padding: .45rem .68rem .45rem 2.35rem; }
.wiki-search-form select {
  appearance: none;
  padding: .45rem 2.25rem .45rem .68rem;
  background: linear-gradient(45deg, transparent 50%, #794565 50%) right 1.1rem center / .32rem .32rem no-repeat,
              linear-gradient(135deg, #794565 50%, transparent 50%) right .78rem center / .32rem .32rem no-repeat, #fffafd;
}
.result-count { color: var(--muted); margin-top: 1.15rem; font-weight: 700; }
.search-results { list-style: none; padding: 0; margin-top: .55rem; }
.search-result { display: flex; justify-content: space-between; align-items: center; padding: .95rem .2rem; gap: 1rem; border-bottom: 1px solid var(--edge); }
.search-result h2 { margin: .18rem 0 .1rem; font-size: 1.35rem; }
.search-result h2 a { text-decoration-thickness: 1px; text-underline-offset: .18em; }
.search-result h2 a:hover { color: var(--pink); }
.search-result > span { color: var(--accent); }
.search-result p:not(.entry-category) { color: var(--muted); }
.empty-state { padding: 1.5rem; border: 1px dashed #c496b4; border-radius: .8rem; }
.empty-state p { margin: .4rem 0 1rem; }
.search-more { margin-top: 1.5rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.gallery-card { overflow: hidden; border: 1px solid var(--edge); border-radius: 1rem; background: #fff1fa; }
.gallery-image { display: block; aspect-ratio: 1.45; overflow: hidden; background: #f6ddeb; }
.gallery-image img { height: 100%; object-fit: contain; }
.gallery-image:focus-visible { outline-offset: -5px; }
.gallery-card figcaption { padding: .95rem 1.1rem 1.1rem; }
.gallery-card h2 { font-size: 1.34rem; letter-spacing: -.035em; }
.gallery-card p { color: var(--muted); margin: .2rem 0 .43rem; }
.source-panel { padding: clamp(1.25rem, 4vw, 2.6rem); max-width: 54rem; background: #fff1f9; border: 1px solid var(--edge); border-radius: 1rem; }
.source-panel h2:not(:first-child) { margin-top: 1.55rem; }
.source-panel p { margin-top: .6rem; }

@media (max-width: 960px) {
  .site-header-inner { gap: 1rem; }
  .main-nav { gap: 1rem; }
  .header-search kbd { display: none; }
  .hero-title { font-size: clamp(3rem, 7.1vw, 6.8rem); }
}

@media (max-width: 760px) {
  .site-header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; padding-top: .65rem; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: .5rem; }
  .main-nav a { font-size: .93rem; padding-block: .58rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.65rem; padding-block: 2.65rem 2.2rem; }
  .hero-script { font-size: clamp(4.75rem, 13vw, 7.5rem); }
  .hero-title { font-size: clamp(3.55rem, 12.65vw, 6.15rem); }
  .hero h1 { margin-block: .85rem 1rem; }
  .hero-frame { aspect-ratio: 1.45; }
  .hero-art { margin: 0 .4rem .5rem 0; }
  .category-grid, .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-image { aspect-ratio: 1.75; }
  .page-intro { grid-template-columns: 1fr; }
  .intro-art img { aspect-ratio: 2.05; }
  .footer-inner, .play-band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 500px) {
  .category-grid, .article-grid, .gallery-grid { grid-template-columns: 1fr; }
  .category-image { aspect-ratio: 2.15; }
  .featured, .article-layout { grid-template-columns: 1fr; }
  .featured-art { min-height: 0; aspect-ratio: 1.8; }
  .toc { position: static; }
  .wiki-search-form { grid-template-columns: minmax(0, 1fr) auto; }
  .wiki-search-form div:first-child { grid-column: 1 / -1; }
  .wiki-search-form .search-input { grid-column: auto; }
  .hero-art figcaption { right: .8rem; bottom: .85rem; }
  .footer-inner { padding-block: 1.55rem; }
}

@media (max-width: 360px) {
  .header-search { padding-inline: .65rem; }
  .main-nav a { font-size: .85rem; }
  .hero-title { font-size: clamp(2.95rem, 14.9vw, 3.35rem); }
  .button { padding-inline: .86rem; font-size: .93rem; }
  .actions { gap: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
