.story-rail {
  --story-forest: #173d2e;
  --story-rule: #d2dfcf;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(4px, 1.15vw, 14px);
  min-width: 0;
}

.story-rail-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(88px, 12vw, 115px);
  gap: clamp(6px, .9vw, 12px);
  margin: 0;
  padding: 8px 7px 14px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #8aa48e transparent;
  scroll-snap-type: inline proximity;
  list-style: none;
}

.story-entry { min-width: 0; scroll-snap-align: start; }
.story-cover {
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  padding: 3px 2px;
  border: 0;
  border-radius: 10px;
  color: var(--story-forest);
  background: transparent;
  text-align: center;
}
.story-cover:focus-visible { outline-offset: 1px; }
.story-cover-picture {
  position: relative;
  display: block;
  width: clamp(59px, 8.5vw, 77px);
  aspect-ratio: 1;
  border: 2px solid #398251;
  border-radius: 50%;
  padding: 4px;
  background: #fff;
}
.story-cover-media {
  position: absolute;
  inset: 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 68% 26%, #3c7250, #133e2d 74%);
}
.story-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}
.story-cover:hover .story-cover-picture, .story-cover:focus-visible .story-cover-picture {
  border-color: #649b22;
  box-shadow: inset 0 0 0 2px #d2f745;
}
.story-monogram {
  color: #e6ffc5;
  font-weight: 850;
  font-size: 1.14rem;
  letter-spacing: -.04em;
}
.story-cover-title {
  font-weight: 820;
  font-size: .91rem;
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.story-cover-subtitle { color: #52685a; font-weight: 650; font-size: .72rem; line-height: 1.2; overflow-wrap: anywhere; }
.story-rail-control {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  margin-top: clamp(15px, 3vw, 29px);
  border: 1px solid var(--story-rule);
  border-radius: 9px;
  color: #244d39;
  background: #f9fcf6;
  line-height: 1;
  font-size: 1.4rem;
}
.story-rail-control:hover:not(:disabled) { border-color: #5a8264; background: #e9f2df; }
.story-rail-control:disabled { opacity: .36; cursor: default; }
.story-rail-empty { grid-column: 1 / -1; color: #52685a; }

.home-page .story-rail { gap: clamp(2px, .65vw, 8px); }
.home-page .story-rail-list {
  grid-auto-columns: clamp(68px, 8vw, 93px);
  gap: clamp(3px, .65vw, 8px);
  padding: 2px 4px 4px;
}
.home-page .story-cover { gap: 2px; padding: 2px 1px; }
.home-page .story-cover-picture { width: clamp(47px, 6.4vw, 61px); }
.home-page .story-cover-media { inset: 3px; }
.home-page .story-monogram { font-size: .97rem; }
.home-page .story-cover-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: .78rem;
  letter-spacing: -.014em;
  text-wrap: wrap;
}
.home-page .story-cover-subtitle { font-size: .68rem; }
.home-page .story-rail-control { width: 33px; height: 38px; margin-top: 13px; }

.story-reading { overflow: hidden; }
.story-reader {
  --story-forest: #173a2b;
  --story-rule: #d7e2d4;
  --story-soft: #ecf2e7;
  --story-muted: #51665a;
  --story-paper: #fafcf7;
  width: min(1060px, calc(100% - 36px));
  height: min(850px, 91dvh);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid #7b9782;
  border-radius: 19px;
  overflow: hidden;
  color: #1b3226;
  background: var(--story-paper);
  box-shadow: 0 19px 70px #0a20164a;
  touch-action: pan-y pinch-zoom;
}
.story-reader[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.story-reader::backdrop { background: #091e16cf; }
.story-reader-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 57px;
  padding: 7px clamp(14px, 3vw, 29px);
  color: #f3f8f2;
  background: var(--story-forest);
}
.story-reader .story-reader-label {
  flex: 1;
  margin: 0;
  color: #e8fac6;
  font-size: .9rem;
  font-weight: 780;
  line-height: 1.2;
}
.story-reader .story-reader-position {
  flex: none;
  margin: 0;
  color: #d8e9db;
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}
.story-reader-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #8da995;
  border-radius: 8px;
  color: #fff;
  background: #294b3b;
  line-height: 1;
  font-size: 1.5rem;
}
.story-reader-close:hover { background: #3b5f4b; }
.story-reader-close:focus-visible { outline-color: #d2f745; }
.story-reader-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  scrollbar-gutter: stable;
  padding: clamp(14px, 3.9vw, 44px);
}
.story-person {
  margin-bottom: clamp(10px, 2.4vw, 26px);
  padding-bottom: clamp(11px, 1.7vw, 18px);
  border-bottom: 1px solid var(--story-rule);
}
.story-reader .story-person-name {
  padding: 0;
  margin: 0;
  color: #123924;
  font-size: clamp(1.7rem, 4.1vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.048em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.story-reader .story-person-sport { margin: 5px 0 0; color: var(--story-muted); font-size: .88rem; font-weight: 780; }
.story-reader .story-person-bio { margin: 9px 0 0; max-width: 70ch; white-space: pre-line; }
.story-reader .story-person-source { margin: 7px 0 0; font-size: .75rem; }
.story-reader .story-person-source a { color: var(--story-muted); text-underline-offset: .17em; }
.story-reader :is(.story-person-name,.story-article-title):focus { outline: none; }
.story-reader-content { min-width: 0; }
.story-reader-content.with-story-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 25%);
  align-items: start;
  gap: clamp(17px, 3vw, 35px);
}
.story-reader-article { min-width: 0; }
.story-article { overflow-wrap: anywhere; }
.story-article-title {
  margin: 0 0 8px;
  color: #1b3d2a;
  font-size: clamp(1.28rem, 2.8vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.038em;
}
.story-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10px;
  margin-bottom: 12px;
  color: var(--story-muted);
  font-size: .86rem;
}
.story-source-name { color: #355c42; font-weight: 800; }
.story-article-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2.25;
  margin: 0 0 16px;
  border-radius: 12px;
  background: var(--story-soft);
}
.story-article-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-reader .story-article-lead { margin: 0 0 14px; font-weight: 750; }
.story-article-body { max-width: 69ch; line-height: 1.65; }
.story-article-body p { margin: 0 0 1em; white-space: pre-line; }
.story-article-body h4 { margin: 1em 0 .45em; color: #244b35; font-weight: 820; }
.story-article-sources {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--story-rule);
}
.story-article-sources h4 { margin: 0 0 6px; }
.story-article-sources ul { display: flex; flex-wrap: wrap; gap: 5px 15px; margin: 0; padding: 0; list-style: none; }
.story-article-sources a { color: #2b5b39; text-underline-offset: 3px; font-size: .92rem; font-weight: 760; }
.story-index {
  grid-column: 2;
  grid-row: 1;
  padding: 9px;
  border: 1px solid var(--story-rule);
  border-radius: 11px;
  overflow-wrap: anywhere;
  background: #f1f5eb;
}
.with-story-index .story-reader-article { grid-column: 1; grid-row: 1; }
.story-index summary {
  display: list-item;
  padding: 5px 4px;
  color: #204d35;
  font-size: .88rem;
  font-weight: 820;
  cursor: pointer;
}
.story-index-list { list-style: none; margin: 6px 0 0; padding: 0; }
.story-index-list li + li { margin-top: 5px; }
.story-index-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 39px;
  padding: 7px 6px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #1b3c29;
  background: transparent;
  font-size: .82rem;
  line-height: 1.3;
}
.story-index-item:hover { background: #e6efdf; }
.story-index-item[aria-current="true"] { border-color: #88aa7f; background: #e0edda; font-weight: 820; }
.story-index-item time { color: #52695a; font-size: .74rem; font-weight: 650; }
.story-reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px clamp(14px, 3vw, 29px) max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--story-rule);
  background: #edf4e7;
}
.story-reader-step {
  min-height: 43px;
  padding: 6px 13px;
  border: 1px solid #94af94;
  border-radius: 8px;
  color: #1d4732;
  background: #f9fcf6;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.2;
}
.story-reader-next { border-color: #9cbc5a; background: #d8f487; }
.story-reader-step:hover:not(:disabled) { border-color: #427c4d; background: #deedcd; }
.story-reader-step:disabled { opacity: .46; cursor: default; }

@media (max-width: 720px) {
  .story-rail-control { width: 30px; height: 38px; }
  .story-reader { width: calc(100% - 14px); height: min(92dvh, 840px); border-radius: 13px; }
  .story-reader-head { min-height: 52px; }
  .story-reader-scroll { scrollbar-gutter: auto; }
  .story-reader-content.with-story-index { display: block; }
  .story-index { margin: 0 0 13px; padding: 7px 8px; }
  .story-article-photo { aspect-ratio: 1.65; margin-bottom: 12px; border-radius: 9px; }
  .story-reader-step { max-width: 49%; padding-inline: 8px; }
}

@media (max-width: 500px) {
  .home-page .story-rail-list { grid-auto-columns: clamp(58px, 17.5vw, 74px); gap: 4px; }
  .home-page .story-cover-picture { width: clamp(40px, 11.7vw, 51px); }
  .home-page .story-cover-title { font-size: .72rem; }
  .home-page .story-cover-subtitle { display: none; }
  .home-page .story-rail-control { width: 27px; height: 34px; margin-top: 5px; }
}

@media (prefers-reduced-motion: no-preference) {
  .story-reader[open] { animation: story-reader-open 220ms ease-out; }
}
@keyframes story-reader-open {
  from { opacity: .64; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
