/* Short Stories (/short-stories/): three portrait cartoons on the storefront theme.
   Loads after site.css (tokens, nebula body, .glass, .footer, .eyebrow, .lede) and visit-counter.css. */

/* ---- Top bar (same frame as /mind-melt/, but in normal flow so the page scrolls) ---- */
.ti-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  min-height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0;
  background: rgba(3, 2, 12, .6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.ti-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.ti-brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 14px rgba(0, 240, 255, .45), 0 0 28px rgba(0, 240, 255, .2); }
.ti-word { font-family: var(--brand); text-transform: uppercase; line-height: 1; white-space: nowrap; font-size: .92rem; letter-spacing: .04em; color: #dffbff; text-shadow: 0 0 2px #fff, 0 0 8px var(--cyan), 0 0 18px rgba(0, 240, 255, .6); }
.ti-word b { font-weight: 400; color: #ffd9b8; text-shadow: var(--neon-orange); }
.ti-sep { width: 1px; height: 26px; background: linear-gradient(180deg, transparent, rgba(0, 240, 255, .45), transparent); flex: none; }
.ti-here { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ti-here strong { font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; color: #fff; text-shadow: 0 0 8px rgba(255, 92, 200, .55); }
.ti-here span { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }
.ti-bar .nav-visits { margin-left: auto; }
.ti-back { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 7px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 13px; letter-spacing: .04em; border: 1px solid var(--line); background: rgba(0, 168, 204, .08); }
.ti-bar .nav-visits[hidden] + .ti-back, .ti-bar .ti-here + .ti-back { margin-left: auto; }
.ti-back:hover { background: rgba(0, 168, 204, .18); border-color: var(--cyan); box-shadow: 0 0 18px rgba(0, 240, 255, .25); }
.ti-back svg { width: 14px; height: 14px; }
.ti-back:focus-visible, .ti-brand:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (max-width: 560px) {
  .ti-bar { gap: 10px; }
  .ti-brand img { width: 30px; height: 30px; }
  .ti-word { font-size: .8rem; }
  .ti-here strong { font-size: 12px; letter-spacing: .16em; }
  .ti-back { padding: 6px 11px; font-size: 12px; }
}
@media (max-width: 400px) { .ti-word, .ti-sep { display: none; } .ti-here span { display: none; } }

/* ---- Page ---- */
.ss-main { padding-top: 28px; }
.ss-intro { text-align: center; margin: 0 auto 26px; }
.ss-intro .lede { margin: 0 auto; }
.ss-title {
  font-family: var(--brand); text-transform: uppercase; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1; letter-spacing: .04em; margin: 0 0 .35em;
  color: #fff; text-shadow: 0 0 2px #fff, 0 0 10px var(--pink), 0 0 26px rgba(255, 92, 200, .55), 0 0 48px rgba(123, 92, 255, .45);
}

.stories { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); max-width: 1120px; margin-inline: auto; }
@media (min-width: 900px) { .stories { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.story { display: flex; flex-direction: column; padding: 12px; scroll-margin-top: 80px; transition: box-shadow .25s ease, border-color .25s ease; }
.story.is-playing { border-color: rgba(255, 92, 200, .55); box-shadow: 0 10px 40px rgba(0, 0, 0, .35), 0 0 28px rgba(255, 92, 200, .28), inset 0 1px 0 rgba(255, 255, 255, .05); }
.story-frame { position: relative; border-radius: calc(var(--radius) - 6px); overflow: hidden; background: #000; aspect-ratio: 9 / 16; }
.story-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.story-meta { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; padding: 14px 6px 6px; }
.story-num { font-family: var(--mono); font-size: .8rem; letter-spacing: .14em; color: var(--teal); grid-row: 1 / span 2; align-self: start; padding-top: .2em; }
.story-title { margin: 0; font-size: 1.08rem; line-height: 1.25; color: var(--ink); }
.story-sub { margin: 4px 0 0; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim); }
.story-sub time { font-family: var(--mono); letter-spacing: .04em; }

.ss-more { text-align: center; color: var(--ink-dim); margin: 30px auto 0; max-width: 52ch; }
.ss-more a, .footer a { color: var(--cyan); text-decoration: none; }
.ss-more a:hover, .footer a:hover { text-decoration: underline; }

@media (max-width: 899.98px) {
  /* one or two columns: keep each portrait player from towering past the viewport */
  .stories { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); max-width: 720px; }
}
@media (max-width: 559.98px) { .stories { gap: 18px; } .story { padding: 10px; } }
