:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #121c3d;
  color: #fff6df;
}

body { margin: 0; }
a { color: #ffe3a1; text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 2px solid #ffe3a1; outline-offset: 4px; }

.story-site, main {
  width: min(90%, 980px);
  margin-inline: auto;
}

.story-site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid #fff6df30;
}

.story-site a:first-child { font-weight: 700; text-decoration: none; }

.story-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(1.25rem, 5vw, 3.5rem);
  align-items: center;
  margin-block: clamp(1.5rem, 5vw, 4rem);
}

.story-intro img {
  display: block;
  width: 100%;
  max-width: 310px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 30px #070b2250;
}

h1 { font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.13; margin: 0; }
p { line-height: 1.65; }
.story-subtitle { color: #e4cbff; font-size: 1.15rem; }
.story-open {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 1rem;
  border-radius: 8px;
  background: #f4d28e;
  color: #182344;
  font-weight: 700;
  text-decoration: none;
}

.story-languages { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-block-start: 1.25rem; }
.story-languages [aria-current="page"] { color: #fff6df; font-weight: 700; }
.story-chapters, .story-related { margin-block: 2rem 3rem; }
details { background: #202b4b; border-radius: 8px; margin-block: .5rem; }
summary { cursor: pointer; padding: .9rem 1.15rem; font-weight: 600; }
.chapter-text { padding: 0 1.15rem .65rem; max-width: 70ch; }
.story-related li { margin-block: .5rem; }

@media (max-width: 620px) {
  .story-intro { grid-template-columns: 1fr; }
  .story-intro img { width: min(72%, 230px); margin-inline: auto; }
}
