body:has(.storyteller-study) {
  animation: none;
}

body:has(.storyteller-study) .workroom-bar {
  background: #211923;
}

body:has(.storyteller-study) .workroom-bar__crumbs :is(.crumb-sep, .crumb-current) {
  color: #e5cdbb;
}

body:has(.storyteller-study) .drawer-tabs {
  background: #30252d;
  border-bottom-color: #94734e;
}

body:has(.storyteller-study) .drawer-tabs__link { color: #e5d5c7; }

body:has(.storyteller-study) .drawer-tabs__link.is-active {
  color: #bce7d6;
  border-bottom-color: #8fc4af;
}

.storyteller-study {
  --study-cream: #fff1de;
  --study-muted: #e4cdb9;
  --study-brass: #eac18a;
  --study-border: #a37e54;
  --study-paper: #f2e7d4;
  --study-plum: #352734;
  --study-teal: #27403c;
  background: var(--study-paper);
  color: var(--study-cream);
}

[data-theme="dark"] .storyteller-study {
  --study-paper: #241c25;
}

.storyteller-study__wrap {
  width: min(calc(100% - 2 * clamp(1rem, 4vw, 3rem)), 72rem);
  margin-inline: auto;
}

.storyteller-study__hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(25rem, 35vw, 32rem);
  border-bottom: 1px solid var(--study-border);
  background: #2d2229;
}

.storyteller-study__art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 53%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
  mask-image: linear-gradient(to right, transparent, #000 38%);
}

.storyteller-study__hero-copy {
  max-width: 56%;
  padding-block: clamp(1.5rem, 4vw, 3rem);
}

.storyteller-study__back,
.storyteller-study__enter {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--study-border);
  border-radius: 0.25rem;
  text-decoration: none;
}

.storyteller-study__back {
  background: #2d2229db;
  color: var(--study-brass);
  font-size: 0.9rem;
}

.storyteller-study__back:hover { color: var(--study-cream); }

.storyteller-study__hero h1 {
  margin: 1rem 0 0.65rem;
  color: var(--study-cream);
  font: 500 clamp(2.75rem, 6vw, 5.9rem)/0.99 var(--font-heading);
  overflow-wrap: anywhere;
}

.storyteller-study__intro {
  max-width: 26rem;
  color: var(--study-muted);
  font: italic clamp(1.08rem, 1.7vw, 1.38rem)/1.43 var(--font-heading);
}

.storyteller-study__intro :last-child { margin-bottom: 0; }

.storyteller-study__body { padding-block: clamp(1.3rem, 4vw, 3.35rem); }

.storyteller-study__game {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  border: 1px solid var(--study-border);
  border-radius: 0.45rem;
  box-shadow: 0 0.6rem 1.65rem #261a2430;
  overflow: hidden;
}

.storyteller-study__game-copy {
  padding: clamp(1.25rem, 3.5vw, 2.55rem);
  background: var(--study-plum);
}

.storyteller-study__game h2 {
  margin: 0 0 0.4rem;
  color: var(--study-cream);
  font: 500 clamp(2rem, 4vw, 3.5rem)/1.1 var(--font-heading);
}

.storyteller-study__game p { margin: 0 0 1.2rem; color: var(--study-muted); }

.storyteller-study__enter {
  background: var(--study-brass);
  color: #34232b;
  font-size: 0.9rem;
  font-weight: 650;
}

.storyteller-study__enter:hover { background: var(--study-cream); color: #34232b; text-decoration: underline; }

.storyteller-study__reading {
  display: grid;
  align-content: center;
  padding: clamp(0.85rem, 3vw, 1.8rem) clamp(1.25rem, 3.5vw, 2.35rem);
  border-left: 1px solid var(--study-border);
  background: var(--study-teal);
}

.storyteller-study__reading a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.2rem;
  padding-block: 0.6rem;
  color: var(--study-cream);
}

.storyteller-study__reading a + a { border-top: 1px solid #9c805c; }

.storyteller-study__reading strong {
  display: block;
  font: 500 1.5rem/1.12 var(--font-heading);
}

.storyteller-study__reading a span span {
  display: block;
  margin-top: 0.2rem;
  color: #dfdfca;
  font-size: 0.87rem;
}

.storyteller-study__reading a:hover { color: var(--study-brass); text-decoration: none; }
.storyteller-study__reading a:hover strong { text-decoration: underline; text-underline-offset: 0.15em; }
.storyteller-study__arrow { color: var(--study-brass); }

.storyteller-study a:focus-visible {
  outline: 2px solid var(--study-brass);
  outline-offset: 3px;
}

@media (max-width: 46rem) {
  body:has(.storyteller-study) .drawer-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-inline: 0.5rem;
  }

  body:has(.storyteller-study) .drawer-tabs__link {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .storyteller-study__hero { min-height: 0; }
  .storyteller-study__hero-copy { max-width: none; padding-bottom: 0.75rem; }
  .storyteller-study__hero h1 { max-width: 16ch; }

  .storyteller-study__art {
    position: static;
    width: 100%;
    height: clamp(11.5rem, 51vw, 16rem);
    object-position: center 54%;
    mask-image: linear-gradient(to bottom, transparent, #000 21%);
  }

  .storyteller-study__game { grid-template-columns: minmax(0, 1fr); }
  .storyteller-study__reading { border-left: 0; border-top: 1px solid var(--study-border); }
}

@media (prefers-reduced-motion: reduce) {
  .storyteller-study a { transition: none; }
}
