:root {
  --story-ink: #2f1911;
  --story-brown: #7a422c;
  --story-russet: #9f563a;
  --story-gold: #d6a23a;
  --story-paper: #fffdf8;
  --story-cream: #f5ecdc;
  --story-muted: #7b6358;
}

.story-shell {
  background: var(--story-paper);
}

.story-shell .post-head-wrapper-text-only {
  background:
    linear-gradient(rgba(47, 25, 17, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 25, 17, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #6f3b29, #2f1911) !important;
  background-size: 22px 22px, 22px 22px, auto;
}

.story-shell .post-head-wrapper-text-only .post-title {
  color: #fffaf1;
  font-family: "Lora", "source-han-serif-tc", serif;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.story-name-page .post-head-wrapper-text-only {
  display: none;
}

.story-name-page .post-body-wrapper {
  padding: 0;
}

.story-name-gate {
  min-height: 42rem;
  margin: 0 !important;
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.3rem, 7vw, 5.5rem) !important;
  background:
    radial-gradient(circle at 50% 20%, rgba(214, 162, 58, 0.16), transparent 24rem),
    linear-gradient(rgba(122, 66, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 66, 44, 0.035) 1px, transparent 1px),
    var(--story-paper);
  background-size: auto, 28px 28px, 28px 28px, auto;
}

.story-name-card {
  position: relative;
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.story-chapter-index[hidden] {
  display: none;
}

.story-chapter-index {
  position: relative;
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

.story-sigil {
  position: relative;
  width: 5.4rem;
  height: 5.4rem;
  margin: 0 auto 1.5rem;
  color: var(--story-gold);
}

.story-sigil::before,
.story-sigil::after,
.story-sigil-orbit {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.story-sigil::after {
  inset: 0.52rem;
  border-color: rgba(214, 162, 58, 0.5);
}

.story-sigil-orbit {
  inset: 1.02rem -0.34rem;
  border-color: rgba(214, 162, 58, 0.42);
  transform: rotate(52deg);
}

.story-sigil-star {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

.story-name-eyebrow {
  margin: 0 0 0.7rem !important;
  color: var(--story-russet);
  font-family: "Montserrat", "Roboto", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.story-name-card h1 {
  margin: 0 0 1.15rem !important;
  border: 0 !important;
  color: var(--story-ink);
  font-family: "Lora", "source-han-serif-tc", serif;
  font-size: clamp(2rem, 6vw, 3.25rem) !important;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.025em;
}

.story-name-lead {
  max-width: 34rem;
  margin: 0 auto 2.1rem !important;
  color: var(--story-muted);
  font-size: 0.98rem;
  line-height: 1.9;
}

.story-name-form {
  max-width: 31rem;
  margin: 0 auto;
  text-align: left;
}

.story-name-form > label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--story-ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.story-mystery-label {
  margin-left: 0.18em;
  color: var(--story-russet);
  font-family: "Fira Mono", "Cousine", monospace;
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.story-name-input-wrap {
  position: relative;
}

.story-name-input-wrap input {
  width: 100%;
  height: 3.5rem;
  padding: 0 3.2rem 0 1.1rem;
  border: 1px solid rgba(122, 66, 44, 0.42);
  border-radius: 1px;
  outline: 0;
  color: var(--story-ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 4px rgba(122, 66, 44, 0.035);
  font-family: "Lora", "source-han-serif-tc", serif;
  font-size: 1.08rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.story-name-input-wrap input:focus {
  border-color: var(--story-gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(214, 162, 58, 0.16), inset 0 0 0 1px rgba(214, 162, 58, 0.15);
}

.story-name-input-wrap input[aria-invalid="true"] {
  border-color: #a53c34;
  box-shadow: 0 0 0 3px rgba(165, 60, 52, 0.12);
}

.story-name-input-mark {
  position: absolute;
  top: 50%;
  right: 1.15rem;
  color: var(--story-gold);
  transform: translateY(-50%);
  pointer-events: none;
}

.story-name-hint,
.story-name-error {
  margin: 0.5rem 0 0 !important;
  font-size: 0.76rem;
  line-height: 1.6;
}

.story-name-hint {
  color: var(--story-muted);
}

.story-name-error {
  min-height: 1.25rem;
  color: #94372f;
  font-weight: 700;
}

.story-name-error.is-record-error {
  position: relative;
  margin-top: 0.72rem !important;
  padding: 0.72rem 0.85rem 0.72rem 7.4rem;
  border: 1px solid rgba(35, 117, 204, 0.3);
  color: #254d77;
  background: rgba(35, 117, 204, 0.065);
  font-family: "Fira Mono", "Cousine", monospace;
  font-weight: 500;
}

.story-name-error.is-record-error::before {
  content: "RECORD LOOKUP";
  position: absolute;
  top: 50%;
  left: 0.85rem;
  color: rgba(35, 117, 204, 0.75);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transform: translateY(-50%);
}

.story-gender-fieldset {
  margin: 1.05rem 0 0;
  padding: 0;
  border: 0;
}

.story-gender-fieldset legend {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  width: 100%;
  margin: 0 0 0.55rem;
  padding: 0;
  color: var(--story-ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.story-gender-fieldset legend small {
  color: var(--story-muted);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0;
}

.story-gender-options {
  display: block;
}

.story-gender-options > p {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0 !important;
}

.story-gender-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.story-gender-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.8rem;
  margin: 0;
  border: 1px solid rgba(122, 66, 44, 0.28);
  color: var(--story-muted);
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-family: "Lora", "source-han-serif-tc", serif;
  font-size: 0.9rem;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.story-gender-options label span {
  color: var(--story-gold);
  font-family: sans-serif;
}

.story-gender-options input:focus-visible + label {
  outline: 2px solid rgba(214, 162, 58, 0.48);
  outline-offset: 2px;
}

.story-gender-options input:checked + label {
  border-color: var(--story-brown);
  color: var(--story-ink);
  background: rgba(245, 236, 220, 0.9);
  box-shadow: inset 0 0 0 2px rgba(122, 66, 44, 0.08);
}

.story-name-preview {
  margin: 1.15rem 0 1.35rem;
  padding: 1rem 1.1rem;
  border-left: 2px solid var(--story-gold);
  background: rgba(245, 236, 220, 0.55);
}

.story-name-preview > span {
  display: block;
  margin-bottom: 0.36rem;
  color: var(--story-muted);
  font-family: "Montserrat", "Roboto", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.story-name-preview p {
  margin: 0 !important;
  color: #4d3228;
  font-family: "Lora", "source-han-serif-tc", serif;
  font-size: 0.94rem;
  line-height: 1.7;
}

.story-name-preview strong {
  color: inherit;
  font-weight: inherit;
}

.story-name-preview b {
  margin: 0 0.12em;
  color: rgba(122, 66, 44, 0.55);
}

.story-name-submit {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  width: 100%;
  min-height: 4.25rem;
  padding: 0.75rem 3.5rem 0.75rem 1.2rem;
  border: 1px solid var(--story-brown);
  border-radius: 1px;
  color: #fffaf1;
  background: linear-gradient(135deg, var(--story-brown), #542e1f);
  box-shadow: 0 12px 30px rgba(84, 46, 31, 0.18);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.story-name-submit span {
  grid-column: 1;
  align-self: end;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.story-name-submit [data-story-submit-label],
.story-name-submit i {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.story-name-submit small {
  grid-column: 1;
  align-self: start;
  margin-top: 0.16rem;
  color: rgba(255, 250, 241, 0.7);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.story-name-submit i {
  position: absolute;
  top: 50%;
  right: 1.3rem;
  font-family: sans-serif;
  font-size: 1.25rem;
  font-style: normal;
  transform: translateY(-50%);
}

.story-name-submit:hover,
.story-name-submit:focus-visible {
  filter: brightness(1.08);
  box-shadow: 0 16px 36px rgba(84, 46, 31, 0.25);
  transform: translateY(-1px);
}

.story-local-note {
  margin: 1.1rem 0 0 !important;
  color: var(--story-muted);
  font-size: 0.73rem;
  line-height: 1.6;
  text-align: center;
}

.story-local-note span {
  color: var(--story-gold);
}

.story-index-sigil {
  width: 4.8rem;
  height: 4.8rem;
}

.story-chapter-index h1 {
  margin: 0 0 0.8rem !important;
  border: 0 !important;
  color: var(--story-ink);
  font-family: "Lora", "source-han-serif-tc", serif;
  font-size: clamp(2rem, 5vw, 3rem) !important;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.025em;
}

.story-index-lead {
  margin: 0 auto 2rem !important;
  color: var(--story-muted);
  font-size: 0.96rem;
  line-height: 1.8;
}

.story-index-lead span {
  color: inherit;
  font-weight: inherit;
}

.story-index-list {
  margin-bottom: 1.35rem;
  text-align: left;
}

.story-index-list > p {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0 !important;
}

.story-index-card {
  position: relative;
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  min-height: 11rem;
  padding: 1.35rem !important;
  border: 1px solid rgba(122, 66, 44, 0.24);
  color: var(--story-ink) !important;
  background:
    linear-gradient(rgba(122, 66, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 66, 44, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.72);
  background-size: 22px 22px, 22px 22px, auto;
  box-shadow: 0 12px 30px rgba(47, 25, 17, 0.06);
  text-decoration: none !important;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.story-index-card::after {
  content: "✦";
  position: absolute;
  right: 1rem;
  bottom: 0.55rem;
  color: rgba(122, 66, 44, 0.09);
  font-size: 3.5rem;
  line-height: 1;
  pointer-events: none;
}

.story-index-number {
  margin-bottom: 1.25rem;
  color: var(--story-russet);
  font-family: "Montserrat", "Roboto", sans-serif;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.story-index-card strong {
  position: relative;
  z-index: 1;
  color: inherit !important;
  font-family: "Lora", "source-han-serif-tc", serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.55;
}

.story-index-card:hover,
.story-index-card:focus-visible {
  border-color: rgba(122, 66, 44, 0.55);
  background-color: #fffdf8;
  box-shadow: 0 16px 36px rgba(47, 25, 17, 0.11);
  transform: translateY(-2px);
}

.story-index-edit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 1rem !important;
  border-bottom: 1px solid rgba(122, 66, 44, 0.35);
  color: var(--story-brown) !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none !important;
}

.story-index-edit:hover,
.story-index-edit:focus-visible {
  border-bottom-color: var(--story-brown);
  color: var(--story-ink) !important;
}

.story-reading-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.05rem 1.5rem;
  border-bottom: 1px solid rgba(122, 66, 44, 0.15);
  color: var(--story-muted);
  font-family: "Montserrat", "Roboto", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.story-reading-index {
  color: var(--story-russet);
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.story-reading-rule {
  width: 1px;
  height: 1rem;
  background: rgba(122, 66, 44, 0.22);
}

.story-reader-identity {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-reader-identity strong {
  color: inherit;
}

.story-rename-link {
  margin-left: auto;
  color: var(--story-russet) !important;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.story-rename-link:hover,
.story-rename-link:focus-visible {
  color: var(--story-ink) !important;
  text-decoration: underline !important;
}

.story-chapter {
  max-width: 48rem;
  margin: 0 auto !important;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.4rem, 5vw, 3.5rem) clamp(2.2rem, 4vw, 3rem) !important;
  color: var(--story-ink);
  font-family: "Lora", "source-han-serif-tc", serif;
  font-size: clamp(1rem, 1.3vw, 1.08rem);
  line-height: 2.05;
}

.story-chapter p {
  margin: 0 0 1.25em !important;
}

.story-chapter blockquote {
  margin: 1.45rem 0 !important;
  padding: 0.85rem 1rem 0.85rem 1.2rem !important;
  border-left: 3px solid rgba(84, 46, 31, 0.72) !important;
  color: #171717 !important;
  background: rgba(84, 46, 31, 0.055);
  font-style: normal;
}

.story-chapter blockquote * {
  color: #171717 !important;
  -webkit-text-fill-color: #171717;
}

.story-chapter blockquote p {
  margin: 0 !important;
}

.story-chapter strong {
  color: #542e1f;
}

.story-chapter h2 {
  margin-top: 4rem !important;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(122, 66, 44, 0.18);
  color: var(--story-ink);
  font-size: 1.25rem;
}

.story-chapter .story-protagonist-label {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.story-chapter-navigation {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 clamp(1.4rem, 5vw, 3.5rem) clamp(2.8rem, 6vw, 4.5rem);
}

.story-chapter-navigation-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(122, 66, 44, 0.18);
  color: var(--story-muted);
  font-family: "Montserrat", "Roboto", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.story-chapter-navigation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem;
}

.story-chapter-nav-card {
  position: relative;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 6.7rem;
  padding: 1.05rem 1.15rem !important;
  border: 1px solid rgba(122, 66, 44, 0.22);
  border-radius: 1px;
  font-family: "Montserrat", "Roboto", sans-serif;
  line-height: 1.45;
  text-decoration: none !important;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.story-chapter-nav-card-prev {
  color: var(--story-brown) !important;
  background: #fffdf8;
}

.story-chapter-nav-card-next {
  align-items: flex-end;
  color: #fffaf1 !important;
  background: linear-gradient(135deg, var(--story-brown), #542e1f);
  text-align: right;
}

.story-chapter-nav-card-next .story-chapter-nav-direction,
.story-chapter-nav-card-next .story-chapter-nav-direction i {
  color: #fffaf1 !important;
  -webkit-text-fill-color: #fffaf1;
  opacity: 0.92;
}

.story-chapter-nav-direction {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.72;
}

.story-chapter-nav-direction i {
  font-family: sans-serif;
  font-size: 0.9rem;
  font-style: normal;
  letter-spacing: 0;
}

.story-chapter-nav-card strong {
  overflow: hidden;
  color: inherit !important;
  font-size: clamp(0.88rem, 2vw, 1.03rem);
  font-weight: 700;
  text-overflow: ellipsis;
}

.story-chapter-nav-card:hover,
.story-chapter-nav-card:focus-visible {
  border-color: rgba(122, 66, 44, 0.55);
  box-shadow: 0 10px 24px rgba(84, 46, 31, 0.13);
  transform: translateY(-2px);
}

.story-chapter-nav-card-next:hover,
.story-chapter-nav-card-next:focus-visible {
  color: #fff !important;
  background: linear-gradient(135deg, #8f4d33, #5c3121);
}

@media (max-width: 600px) {
  .story-name-gate {
    min-height: auto;
    padding-top: 3.2rem !important;
    padding-bottom: 3.2rem !important;
  }

  .story-name-card h1 {
    font-size: 2.1rem !important;
  }

  .story-chapter-index h1 {
    font-size: 2rem !important;
  }

  .story-index-list > p {
    grid-template-columns: 1fr;
  }

  .story-index-card {
    min-height: 8.8rem;
    padding: 1.1rem !important;
  }

  .story-reading-bar {
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
  }

  .story-reader-identity {
    order: 3;
    width: 100%;
  }

  .story-rename-link {
    margin-left: auto;
  }

  .story-chapter {
    padding: 2.3rem 1.2rem !important;
    font-size: 1rem;
    line-height: 1.95;
  }

  .story-chapter-navigation {
    padding: 0 1.2rem 2.6rem;
  }

  .story-chapter-navigation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .story-chapter-nav-card {
    min-height: 5.5rem;
    padding: 0.9rem 1rem !important;
  }

  .story-chapter-nav-card-next {
    align-items: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-name-submit,
  .story-name-input-wrap input,
  .story-gender-options label,
  .story-index-card,
  .story-chapter-nav-card {
    transition: none;
  }
}

/* Ambient spellwork lives behind opted-in reading surfaces. */
body {
  background: #090d22;
}

#app {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}

.story-magic-backdrop {
  --story-shift-x: 0px;
  --story-shift-y: 0px;
  --story-shift-x-reverse: 0px;
  --story-shift-y-reverse: 0px;
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 17% 18%, rgba(133, 99, 255, 0.22), transparent 30rem),
    radial-gradient(circle at 91% 12%, rgba(68, 170, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 68% 94%, rgba(236, 174, 76, 0.12), transparent 34rem),
    linear-gradient(145deg, #080b1b 0%, #11102d 44%, #081629 100%);
}

.story-magic-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(138, 207, 255, 0.6) 0 1px, transparent 1.5px);
  background-position: 0 0, 37px 51px;
  background-size: 83px 83px, 127px 127px;
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.28) 70%, transparent);
}

.story-magic-aurora {
  position: absolute;
  border-radius: 50%;
  opacity: 0.46;
  filter: blur(62px);
  will-change: transform;
  animation: story-aurora-breathe 12s ease-in-out infinite alternate;
}

.story-magic-aurora-violet {
  top: -18rem;
  left: -8rem;
  width: 44rem;
  height: 42rem;
  background: rgba(113, 73, 239, 0.44);
  transform: translate3d(var(--story-shift-x), var(--story-shift-y), 0);
}

.story-magic-aurora-blue {
  top: 14%;
  right: -18rem;
  width: 48rem;
  height: 48rem;
  background: rgba(38, 145, 221, 0.34);
  transform: translate3d(var(--story-shift-x-reverse), var(--story-shift-y), 0);
  animation-delay: -4s;
}

.story-magic-aurora-gold {
  right: 8%;
  bottom: -24rem;
  width: 42rem;
  height: 40rem;
  background: rgba(225, 158, 63, 0.22);
  transform: translate3d(var(--story-shift-x), var(--story-shift-y-reverse), 0);
  animation-delay: -8s;
}

.story-magic-circle {
  position: absolute;
  border-radius: 50%;
  color: rgba(171, 213, 255, 0.74);
  filter: drop-shadow(0 0 8px rgba(111, 181, 255, 0.28));
  will-change: transform;
}

.story-magic-circle-large {
  left: -12rem;
  bottom: -9rem;
  width: min(43vw, 38rem);
  min-width: 27rem;
  aspect-ratio: 1;
  opacity: 0.52;
  transform: translate3d(var(--story-shift-x), var(--story-shift-y-reverse), 0) rotate(-8deg);
}

.story-magic-circle-small {
  top: 6rem;
  right: -8rem;
  width: min(28vw, 24rem);
  min-width: 18rem;
  aspect-ratio: 1;
  color: rgba(233, 190, 102, 0.66);
  opacity: 0.38;
  transform: translate3d(var(--story-shift-x-reverse), var(--story-shift-y), 0) rotate(14deg);
}

.story-magic-ring,
.story-magic-axis {
  position: absolute;
  display: block;
}

.story-magic-ring {
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(130, 202, 255, 0.045), 0 0 18px rgba(130, 202, 255, 0.055);
}

.story-magic-ring::before,
.story-magic-ring::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid currentColor;
  background: #0d1530;
  transform: translate(-50%, -50%) rotate(45deg);
}

.story-magic-ring::before {
  top: 0;
}

.story-magic-ring::after {
  top: 100%;
}

.story-magic-ring-outer {
  inset: 0;
  border-style: dashed;
  animation: story-ring-turn 46s linear infinite;
}

.story-magic-ring-middle {
  inset: 13%;
  border-width: 2px;
  animation: story-ring-turn-reverse 34s linear infinite;
}

.story-magic-ring-inner {
  inset: 31%;
  border-style: dotted;
  animation: story-ring-turn 22s linear infinite;
}

.story-magic-axis {
  top: 50%;
  right: 8%;
  left: 8%;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  transform-origin: center;
}

.story-magic-axis-a {
  transform: rotate(45deg);
}

.story-magic-axis-b {
  transform: rotate(-45deg);
}

.story-magic-glyph,
.story-magic-core {
  position: absolute;
  color: currentColor !important;
  font-family: Georgia, serif;
  font-style: normal;
  line-height: 1;
  text-shadow: 0 0 12px currentColor;
}

.story-magic-glyph {
  font-size: 1rem;
}

.story-magic-glyph-north {
  top: -0.45rem;
  left: calc(50% - 0.45rem);
}

.story-magic-glyph-east {
  top: calc(50% - 0.45rem);
  right: -0.45rem;
}

.story-magic-glyph-south {
  bottom: -0.45rem;
  left: calc(50% - 0.45rem);
}

.story-magic-glyph-west {
  top: calc(50% - 0.45rem);
  left: -0.45rem;
}

.story-magic-core {
  top: 50%;
  left: 50%;
  font-size: 2rem;
  transform: translate(-50%, -50%);
  animation: story-core-pulse 3.8s ease-in-out infinite;
}

.story-magic-motes {
  position: absolute;
  inset: 0;
}

.story-mote {
  position: absolute;
  top: var(--story-mote-top);
  left: var(--story-mote-left);
  width: var(--story-mote-size);
  height: var(--story-mote-size);
  border-radius: 50%;
  opacity: 0;
  background: var(--story-mote-color);
  box-shadow: 0 0 7px var(--story-mote-color), 0 0 18px color-mix(in srgb, var(--story-mote-color), transparent 35%);
  animation: story-mote-drift var(--story-mote-duration) ease-in-out var(--story-mote-delay) infinite;
}

.story-magic-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 11rem rgba(1, 3, 14, 0.48);
}

.story-magic-backdrop.is-paused *,
.story-magic-backdrop.is-paused *::before,
.story-magic-backdrop.is-paused *::after {
  animation-play-state: paused !important;
}

.stream-container {
  z-index: 1;
}

.side-container,
.extra-container,
.single-column-header-container,
.single-column-nav-container {
  z-index: 4;
}

.stream-container,
.single-column-header-container {
  position: relative;
}

.side-container {
  position: fixed;
  background: linear-gradient(180deg, rgba(12, 14, 39, 0.34), rgba(7, 15, 34, 0.58));
  box-shadow: inset -1px 0 rgba(190, 216, 255, 0.08);
}

.extra-container {
  position: fixed;
}

.side-container .nav-title,
.side-container .nav-subtitle,
.side-container .nav-link-item,
.side-container .nav-footer,
.side-container .nav-footer a {
  color: rgba(243, 241, 255, 0.91) !important;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.42);
}

.side-container .nav-subtitle,
.side-container .nav-footer {
  color: rgba(210, 217, 239, 0.68) !important;
}

.side-container .nav-head:hover,
.side-container .nav-head.active,
.side-container .nav-link-list .nav-link-item:hover,
.side-container .nav-link-list .nav-link-item.active {
  border-right-color: rgba(218, 188, 120, 0.85);
  color: #fff !important;
  background: rgba(170, 154, 255, 0.09);
}

.stream-container .post-list-container {
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.46), 0 22px 70px rgba(0, 0, 0, 0.38);
}

.story-shell {
  background: transparent;
}

.story-shell .post-body-wrapper {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 106% 18%, rgba(105, 116, 208, 0.075), transparent 22rem),
    radial-gradient(circle at -8% 72%, rgba(213, 165, 73, 0.07), transparent 24rem),
    repeating-linear-gradient(103deg, rgba(108, 70, 43, 0.012) 0 1px, transparent 1px 9px);
}

.story-paper-dreamscape {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: min(62rem, 100%);
  min-height: 44rem;
  overflow: hidden;
  pointer-events: none;
}

.story-paper-scene-wash {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0.46;
  animation: story-paper-scene-wash-drift 21s ease-in-out infinite alternate;
}

.story-paper-scene-wash-violet {
  top: -12%;
  left: -8%;
  width: 54%;
  height: 48%;
  background: radial-gradient(
    ellipse at center,
    rgba(131, 105, 207, 0.13) 0%,
    rgba(131, 105, 207, 0.055) 44%,
    transparent 76%
  );
}

.story-paper-scene-wash-blue {
  top: 18%;
  right: -11%;
  width: 52%;
  height: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(87, 164, 211, 0.115) 0%,
    rgba(87, 164, 211, 0.045) 46%,
    transparent 77%
  );
  animation-delay: -7s;
  animation-duration: 26s;
}

.story-paper-scene-wash-gold {
  bottom: -16%;
  left: 18%;
  width: 58%;
  height: 44%;
  background: radial-gradient(
    ellipse at center,
    rgba(221, 171, 73, 0.1) 0%,
    rgba(221, 171, 73, 0.04) 45%,
    transparent 76%
  );
  animation-delay: -14s;
  animation-duration: 30s;
}

.story-paper-scene-lines {
  position: absolute;
  inset: -3% -2%;
  width: 104%;
  height: 106%;
  overflow: visible;
  opacity: 0.52;
  animation: story-paper-scene-lines-drift 32s ease-in-out infinite alternate;
}

.story-paper-scene-flow {
  fill: none;
  stroke: rgba(95, 106, 169, 0.13);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-dasharray: 3 16 42 11;
  vector-effect: non-scaling-stroke;
  animation: story-paper-scene-flow 34s linear infinite;
}

.story-paper-scene-flow-b {
  stroke: rgba(173, 121, 48, 0.115);
  stroke-dasharray: 1 12 34 18;
  animation-direction: reverse;
  animation-duration: 41s;
}

.story-paper-scene-flow-c {
  stroke: rgba(64, 145, 188, 0.105);
  stroke-dasharray: 2 21 56 13;
  animation-duration: 49s;
}

.story-paper-scene-constellation {
  fill: rgba(103, 114, 176, 0.14);
  stroke: rgba(103, 114, 176, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation: story-paper-scene-constellation-pulse 7.5s ease-in-out infinite alternate;
}

.story-paper-scene-constellation-right {
  fill: rgba(184, 130, 49, 0.13);
  stroke: rgba(184, 130, 49, 0.11);
  animation-delay: -3.8s;
}

.story-paper-scene-mote {
  position: absolute;
  top: var(--story-scene-y);
  left: var(--story-scene-x);
  color: rgba(112, 120, 180, 0.24) !important;
  font-family: Georgia, serif;
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1;
  text-shadow: 0 0 0.55rem rgba(108, 138, 202, 0.18);
  opacity: 0.18;
  animation: story-paper-scene-mote-drift 12s ease-in-out var(--story-scene-delay) infinite;
}

.story-paper-scene-mote:nth-of-type(3n) {
  color: rgba(185, 132, 45, 0.22) !important;
  text-shadow: 0 0 0.55rem rgba(202, 151, 62, 0.15);
}

.story-paper-sigil {
  --story-paper-sigil-glow: rgba(95, 112, 204, 0.12);
  position: absolute;
  z-index: 0;
  width: 22rem;
  height: 22rem;
  color: rgba(82, 91, 163, 0.2);
  border-radius: 50%;
  filter: drop-shadow(0 0 0.7rem var(--story-paper-sigil-glow));
  pointer-events: none;
  transform-origin: center;
  animation: story-paper-sigil-breathe 8s ease-in-out infinite alternate;
}

.story-paper-sigil-cool {
  top: 4.5rem;
  right: -13rem;
}

.story-paper-sigil-warm {
  --story-paper-sigil-glow: rgba(203, 145, 55, 0.1);
  bottom: 7rem;
  left: -13rem;
  color: rgba(164, 112, 38, 0.19);
  animation-delay: -4s;
}

.story-paper-sigil-dial,
.story-paper-sigil-orbit,
.story-paper-sigil-geometry {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.story-paper-sigil-dial {
  inset: 0;
  background: repeating-conic-gradient(
    from 4deg,
    currentColor 0deg 0.75deg,
    transparent 0.75deg 8deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 0 47.1%, #000 47.6% 49.2%, transparent 49.7%);
  mask-image: radial-gradient(circle, transparent 0 47.1%, #000 47.6% 49.2%, transparent 49.7%);
  animation: story-ring-turn 64s linear infinite;
}

.story-paper-sigil-orbit {
  border: 1px solid currentColor;
  box-shadow:
    inset 0 0 1.6rem rgba(121, 118, 179, 0.035),
    0 0 0.8rem var(--story-paper-sigil-glow);
}

.story-paper-sigil-orbit::before,
.story-paper-sigil-orbit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid currentColor;
  background: rgba(255, 253, 248, 0.72);
  transform: translate(-50%, -50%) rotate(45deg);
}

.story-paper-sigil-orbit::before {
  top: 0;
}

.story-paper-sigil-orbit::after {
  top: 100%;
}

.story-paper-sigil-orbit-outer {
  inset: 6%;
  border-style: dashed;
  animation: story-ring-turn 44s linear infinite;
}

.story-paper-sigil-orbit-inner {
  inset: 22%;
  border-style: double;
  border-width: 3px;
  animation: story-ring-turn-reverse 31s linear infinite;
}

.story-paper-sigil-geometry {
  inset: 34%;
  border: 1px solid currentColor;
  border-radius: 0;
  animation: story-paper-sigil-geometry-turn 26s linear infinite;
}

.story-paper-sigil-geometry::before,
.story-paper-sigil-geometry::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -35%;
  width: 170%;
  height: 1px;
  background: currentColor;
  transform-origin: center;
}

.story-paper-sigil-geometry::after {
  transform: rotate(90deg);
}

.story-paper-sigil-glyph,
.story-paper-sigil-core {
  position: absolute;
  color: currentColor !important;
  font-family: Georgia, serif;
  font-style: normal;
  line-height: 1;
  text-shadow: 0 0 0.6rem var(--story-paper-sigil-glow);
}

.story-paper-sigil-glyph {
  font-size: 0.85rem;
}

.story-paper-sigil-glyph-north {
  top: -0.43rem;
  left: calc(50% - 0.38rem);
}

.story-paper-sigil-glyph-east {
  top: calc(50% - 0.38rem);
  right: -0.38rem;
}

.story-paper-sigil-glyph-south {
  bottom: -0.43rem;
  left: calc(50% - 0.38rem);
}

.story-paper-sigil-glyph-west {
  top: calc(50% - 0.38rem);
  left: -0.38rem;
}

.story-paper-sigil-core {
  top: 50%;
  left: 50%;
  font-size: 1.25rem;
  transform: translate(-50%, -50%);
  animation: story-paper-sigil-core-pulse 3.4s ease-in-out infinite;
}

.story-shell .post-body-wrapper > :not(.story-paper-sigil):not(.story-paper-dreamscape) {
  position: relative;
  z-index: 1;
}

.story-shell .post-head-wrapper-text-only {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 12%, rgba(128, 197, 255, 0.2), transparent 23rem),
    radial-gradient(circle at 8% 120%, rgba(223, 172, 76, 0.16), transparent 20rem),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(120deg, #1c1537, #111d35 55%, #211328) !important;
  background-size: auto, auto, 24px 24px, 24px 24px, auto;
}

.story-shell .post-head-wrapper-text-only::before {
  content: "";
  position: absolute;
  top: -15rem;
  right: -8rem;
  width: 27rem;
  height: 27rem;
  border: 1px solid rgba(198, 222, 255, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 3.2rem rgba(181, 209, 255, 0.025),
    0 0 0 6rem rgba(181, 209, 255, 0.025),
    0 0 45px rgba(104, 179, 255, 0.08);
  animation: story-ring-turn 58s linear infinite;
}

.story-shell .post-head-wrapper-text-only::after {
  content: "✦";
  position: absolute;
  top: 50%;
  right: clamp(1rem, 5vw, 3rem);
  color: rgba(239, 201, 126, 0.36);
  font-size: 1.25rem;
  line-height: 1;
  text-shadow: 0 0 16px rgba(255, 208, 125, 0.55);
  transform: translateY(-50%);
  animation: story-core-pulse 3.8s ease-in-out infinite;
}

.story-shell .post-head-wrapper-text-only .post-title {
  position: relative;
  z-index: 1;
}

.story-magic-cursor-layer {
  --story-cursor-x: -100px;
  --story-cursor-y: -100px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.story-magic-cursor-ring,
.story-magic-cursor-core {
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(var(--story-cursor-x), var(--story-cursor-y), 0) translate(-50%, -50%);
  transition: width 150ms ease, height 150ms ease, opacity 150ms ease, border-color 150ms ease;
  will-change: transform;
}

.story-magic-cursor-ring {
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid rgba(144, 205, 255, 0.58);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(105, 183, 255, 0.24), inset 0 0 8px rgba(126, 194, 255, 0.1);
}

.story-magic-cursor-core {
  color: rgba(255, 220, 149, 0.9) !important;
  font-family: Georgia, serif;
  font-size: 0.62rem;
  line-height: 1;
  text-shadow: 0 0 8px rgba(255, 212, 122, 0.8);
}

.story-magic-cursor-layer.is-visible .story-magic-cursor-ring,
.story-magic-cursor-layer.is-visible .story-magic-cursor-core {
  opacity: 1;
}

.story-magic-cursor-layer.is-over-control .story-magic-cursor-ring {
  width: 2.5rem;
  height: 2.5rem;
  border-color: rgba(255, 211, 126, 0.76);
  box-shadow: 0 0 14px rgba(255, 204, 112, 0.28), inset 0 0 10px rgba(255, 216, 142, 0.1);
}

.story-magic-cursor-layer.is-clicking .story-magic-cursor-ring {
  width: 3.15rem;
  height: 3.15rem;
  border-color: rgba(255, 221, 154, 0.9);
  opacity: 0.42;
}

@keyframes story-ring-turn {
  to { transform: rotate(360deg); }
}

@keyframes story-ring-turn-reverse {
  to { transform: rotate(-360deg); }
}

@keyframes story-core-pulse {
  0%, 100% { opacity: 0.42; filter: brightness(0.9); }
  50% { opacity: 1; filter: brightness(1.4); }
}

@keyframes story-aurora-breathe {
  0% { scale: 0.92; opacity: 0.32; }
  100% { scale: 1.08; opacity: 0.56; }
}

@keyframes story-mote-drift {
  0% { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.55); }
  22% { opacity: 0.72; }
  72% { opacity: 0.34; }
  100% { opacity: 0; transform: translate3d(var(--story-mote-sway), -74px, 0) scale(1.12); }
}

@keyframes story-paper-sigil-breathe {
  from { opacity: 0.64; transform: scale(0.975) rotate(-1.2deg); }
  to { opacity: 1; transform: scale(1.025) rotate(1.2deg); }
}

@keyframes story-paper-sigil-geometry-turn {
  to { transform: rotate(-360deg); }
}

@keyframes story-paper-sigil-core-pulse {
  0%, 100% { opacity: 0.36; transform: translate(-50%, -50%) scale(0.86); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.16); }
}

@keyframes story-paper-scene-wash-drift {
  0% { transform: translate3d(-3%, -2%, 0) scale(0.94); }
  100% { transform: translate3d(6%, 5%, 0) scale(1.08); }
}

@keyframes story-paper-scene-lines-drift {
  0% { transform: translate3d(-1.4%, 0.8%, 0) rotate(-0.4deg); }
  100% { transform: translate3d(1.8%, -1.2%, 0) rotate(0.55deg); }
}

@keyframes story-paper-scene-flow {
  to { stroke-dashoffset: -180; }
}

@keyframes story-paper-scene-constellation-pulse {
  0% { opacity: 0.34; transform: scale(0.97); }
  100% { opacity: 0.9; transform: scale(1.035); }
}

@keyframes story-paper-scene-mote-drift {
  0%, 100% { opacity: 0.12; transform: translate3d(0, 0.75rem, 0) scale(0.72); }
  48% { opacity: 0.54; transform: translate3d(var(--story-scene-travel), -1.1rem, 0) scale(1.08); }
  72% { opacity: 0.28; }
}

@media (max-width: 1020px) {
  .single-column-nav-container {
    background: transparent;
    box-shadow: none;
  }

  .single-column-header-container .single-column-header-title,
  .single-column-header-container .single-column-header-subtitle,
  .single-column-nav-container .navbar-brand,
  .single-column-nav-container .nav-dropdown-toggle .material-icons {
    color: rgba(247, 245, 255, 0.94) !important;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
  }

  .single-column-nav-container .nav-background {
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .single-column-nav-container .nav-dropdown-toggle {
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(214, 225, 255, 0.12) !important;
    border-radius: 50%;
    background: rgba(11, 15, 36, 0.72) !important;
    box-shadow: 0 0.3rem 1rem rgba(2, 5, 18, 0.18);
  }

  .single-column-nav-container .navbar-brand {
    margin-left: 0.55rem;
    padding: 0.22rem 0.75rem !important;
    border: 1px solid rgba(214, 225, 255, 0.1);
    border-radius: 999px;
    background: rgba(11, 15, 36, 0.68);
    box-shadow: 0 0.3rem 1rem rgba(2, 5, 18, 0.14);
  }

  .stream-container .post-list-container {
    background: rgba(255, 253, 248, 0.975);
  }

  .story-magic-circle-large {
    left: -12rem;
    bottom: 4rem;
    width: 30rem;
  }

  .story-magic-circle-small {
    top: 2rem;
    right: -9rem;
    width: 20rem;
  }

  .story-paper-sigil {
    width: 19rem;
    height: 19rem;
  }

  .story-paper-sigil-cool {
    right: -13rem;
  }

  .story-paper-sigil-warm {
    left: -13rem;
  }

  .story-paper-dreamscape {
    height: min(54rem, 100%);
    min-height: 40rem;
  }

  .story-paper-scene-lines {
    opacity: 0.42;
  }
}

@media (max-width: 600px) {
  .story-magic-backdrop::before {
    opacity: 0.2;
  }

  .story-magic-circle-large {
    opacity: 0.3;
  }

  .story-magic-circle-small {
    opacity: 0.24;
  }

  .story-shell .post-head-wrapper-text-only::after {
    display: none;
  }

  .story-paper-sigil {
    opacity: 0.72;
  }

  .story-paper-scene-wash {
    opacity: 0.34;
  }

  .story-paper-scene-mote:nth-of-type(even) {
    display: none;
  }
}

@media (pointer: coarse) {
  .story-magic-cursor-layer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-magic-backdrop *,
  .story-magic-backdrop *::before,
  .story-magic-backdrop *::after,
  .story-shell .post-head-wrapper-text-only::before,
  .story-shell .post-head-wrapper-text-only::after,
  .story-paper-sigil,
  .story-paper-sigil *,
  .story-paper-dreamscape,
  .story-paper-dreamscape * {
    animation: none !important;
  }

  .story-mote {
    display: none;
  }

  .story-magic-cursor-layer {
    display: none;
  }
}
