/* The story library presents interactive scenarios as a cinema poster wall; the site header/footer stay shared. */
@font-face {
    font-family: "Story Title Serif";
    src: url("/static/fonts/stories/story-titles.woff2?v=1") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
.stories-page {
    --story-blue: #274463;
    --story-ink: #151922;
    --story-muted: #566070;
    --story-line: #dce1ea;
    --story-surface: #ffffff;
    padding: 28px 0 40px;
    color: var(--story-ink);
    background: #f2f4f8;
}
.stories-page [hidden] { display: none !important; }
.stories-page a, .stories-page button, .stories-page summary { touch-action: manipulation; }
.stories-page button { font: inherit; cursor: pointer; }
.stories-page :is(a, button, input, summary):focus-visible, .stories-banner:focus-visible { outline: 3px solid var(--story-blue); outline-offset: 4px; }
.stories-catalog h2 { margin: 0; color: var(--story-ink); font-weight: 750; letter-spacing: -.03em; line-height: 1.3; }
.stories-page-title, .stories-result-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stories-banner { --dash-banner-interval: 4500; position: relative; outline-offset: 4px; }
.stories-banner .dash-banner-track { position: relative; display: grid; grid-template-columns: minmax(0, 3fr) repeat(2, minmax(0, 1fr)); gap: 14px; height: var(--dash-banner-height); transform: none; transition: none; overflow: visible; clip-path: inset(-12px -12px -26px round 12px); touch-action: pan-y; }
.stories-banner.is-enhanced .dash-banner-slide { position: absolute; top: 0; left: 0; height: 100%; }
.stories-banner .story-feature { --story-scene-ink: 8 23 35; --story-scene-light: #e7eff4; display: block; min-height: 0; opacity: 1; transform: none; transition: none; min-width: 0; flex: none; position: relative; overflow: hidden; border-radius: 12px; isolation: isolate; background: rgb(var(--story-scene-ink)); box-shadow: 0 6px 16px rgb(12 18 28 / 14%); }
.stories-banner .story-feature[data-trpg-key="dont-rescue-princess"] { --story-scene-ink: 20 31 24; --story-scene-light: #f3eedd; }
.stories-banner .story-feature[data-trpg-key="rewrite-reality"] { --story-scene-ink: 15 19 30; --story-scene-light: #eceef4; }
.stories-banner .story-feature.active { box-shadow: 0 14px 28px rgb(var(--story-scene-ink) / 26%), 0 4px 8px rgb(var(--story-scene-ink) / 14%); }
/* Recess the previews without scaling their text or changing the carousel's horizontal geometry. */
.stories-banner.is-enhanced .story-feature:not(.active) { top: 16px; height: calc(100% - 32px); }
.stories-banner:not(.is-enhanced) .story-feature:not(.active) { margin-block: 16px; }
.story-feature picture, .story-feature img { display: block; width: 100%; height: 100%; }
.story-feature img { object-fit: cover; object-position: center; }
.stories-banner.is-enhanced .story-feature.active img { animation: story-scene-drift 6.5s ease-out both; }
.stories-banner.paused .story-feature.active img { animation-play-state: paused; }
@keyframes story-scene-drift {
    from { transform: scale(1.015) translateX(.2%); }
    to { transform: scale(1.065) translateX(-.5%); }
}
.story-feature::before { content: ""; position: absolute; z-index: 2; inset: 0; border: 1px solid rgb(255 255 255 / 22%); border-radius: inherit; box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%); pointer-events: none; }
.story-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 32%, rgb(var(--story-scene-ink) / 32%) 56%, rgb(var(--story-scene-ink) / 94%) 100%); pointer-events: none; }
.story-feature.active::after { background: linear-gradient(90deg, rgb(var(--story-scene-ink) / 80%), rgb(var(--story-scene-ink) / 38%) 38%, transparent 72%), linear-gradient(0deg, rgb(var(--story-scene-ink) / 94%), rgb(var(--story-scene-ink) / 22%) 52%, transparent 78%); }
.story-feature-copy { position: absolute; left: 20px; right: 20px; bottom: 22px; z-index: 1; color: #fff; text-shadow: 0 2px 8px rgb(var(--story-scene-ink) / 30%); }
.story-feature h2 { margin: 0; color: #fff; font-family: "Story Title Serif", Georgia, "Songti SC", serif; font-size: 20px; font-weight: 700; line-height: 1.32; letter-spacing: -.015em; overflow-wrap: break-word; text-wrap: balance; }
.story-feature p { margin: 9px 0 0; color: #f1f5fa; font-size: 14px; line-height: 1.5; }
.story-feature .story-feature-meta { color: #d7dfe5; font-size: 13px; font-weight: 400; }
.story-feature-hook { display: none; }
.story-feature-action { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin-top: 20px; padding: 0 20px; box-sizing: border-box; border: 1px solid rgb(255 255 255 / 50%); border-radius: 6px; background: var(--story-scene-light); color: rgb(var(--story-scene-ink)); font-size: 14px; font-weight: 700; text-decoration: none; text-shadow: none; box-shadow: 0 4px 14px rgb(0 0 0 / 22%); transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s; }
.story-feature-action:hover { background: #fff; border-color: #fff; color: rgb(var(--story-scene-ink)); box-shadow: 0 6px 18px rgb(0 0 0 / 28%); }
.story-feature-action:active { transform: translateY(1px); }
.stories-page .story-feature-action:focus-visible { outline-color: #fff; }
.stories-banner.is-enhanced .story-feature.active :is(h2, .story-feature-hook, .story-feature-meta) { animation: story-copy-arrive .65s cubic-bezier(.22,.61,.36,1) both; }
.stories-banner.is-enhanced .story-feature.active .story-feature-hook { animation-delay: .08s; }
.stories-banner.is-enhanced .story-feature.active .story-feature-meta { animation-delay: .16s; }
@keyframes story-copy-arrive {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}
.story-feature-state { display: inline-block; margin-top: 8px; font-size: 13px; }
.stories-banner.is-enhanced .story-feature:not(.active) :is(.story-feature-action, .story-feature-state) { display: none; }
.stories-banner .story-feature.active .story-feature-copy { left: 32px; right: 32px; bottom: 30px; max-width: 60%; }
.stories-banner .story-feature.active h2 { font-size: clamp(30px, 2.6vw, 40px); line-height: 1.2; }
.stories-banner .story-feature.active .story-feature-hook { display: block; margin-top: 12px; font-size: 16px; }
.story-feature-preview { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; border-radius: inherit; }
.stories-page .story-feature-preview:focus-visible { outline-offset: -4px; outline-color: white; box-shadow: inset 0 0 0 7px var(--story-blue); }
.stories-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; }
.stories-banner .dash-banner-arrow { position: static; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0 0 3px; border: 1px solid var(--story-line); border-radius: 50%; color: var(--story-ink); background: var(--story-surface); opacity: 1; box-shadow: 0 2px 6px rgb(15 23 42 / 6%); transform: none; font-size: 24px; line-height: 1; transition: border-color .18s, background-color .18s, color .18s; }
.stories-banner .dash-banner-arrow:hover { border-color: #b7c3d4; background: #fff; color: var(--story-blue); }
.stories-banner:not(.is-enhanced) .stories-carousel-controls { visibility: hidden; }
.stories-dots { display: flex; align-items: center; justify-content: center; height: 44px; }
.stories-banner .dash-banner-dot { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.stories-banner .dash-banner-dot::before { content: ""; position: static; width: 8px; height: 6px; border-radius: 8px; background: #c3cbd8; transform: none; animation: none; transition: width .2s, background-color .2s; }
.stories-banner .dash-banner-dot::after { display: none; }
.stories-banner .dash-banner-dot.active::before { width: 28px; background: var(--story-blue); }

/* Harmonize the shared quick-play strip with the neutral cinema-gallery canvas. */
.stories-page .dash-recent-games {
    margin-top: 8px;
    margin-bottom: 1.85rem;
    border-color: var(--story-line);
    background: linear-gradient(100deg, #ffffff, #f6f8fb);
    box-shadow: 0 8px 22px rgb(15 23 42 / 5%), inset 0 1px 0 rgb(255 255 255 / 92%);
}
.stories-page .dash-recent-games::after {
    background: linear-gradient(90deg, var(--story-blue), #6c89a8);
    opacity: .8;
}
.stories-page .dash-recent-games-mark {
    border-color: var(--story-line);
    background: var(--story-surface);
    color: var(--story-blue);
    box-shadow: 0 3px 8px rgb(15 23 42 / 5%);
}
.stories-page .dash-recent-games-title { color: var(--story-ink); }
.stories-page .dash-recent-browse:hover .dash-recent-games-title { color: var(--story-blue); }
.stories-page .dash-recent-games-heading-copy small,
.stories-page .dash-recent-story-progress { color: var(--story-muted); }
.stories-page .dash-recent-game-link {
    border-color: #dde3ec;
    background: var(--story-surface);
    color: var(--story-ink);
    box-shadow: 0 3px 10px rgb(15 23 42 / 4%), inset 0 1px 0 #fff;
}
.stories-page .dash-recent-game-link:hover {
    border-color: #b7c5d8;
    background: #fff;
    box-shadow: 0 7px 16px rgb(15 23 42 / 9%), inset 0 1px 0 #fff;
}
.stories-page .dash-recent-game-copy small { color: var(--story-blue); }
.stories-page .dash-recent-game-arrow {
    border-color: #c8d3e2;
    background: #edf2f8;
    color: #203752;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 70%);
}
.stories-page .dash-recent-game-link:hover .dash-recent-game-arrow {
    border-color: var(--story-blue);
    background: var(--story-blue);
    color: #fff;
    box-shadow: 0 2px 6px rgb(39 68 99 / 24%);
}
.stories-page .dash-recent-placeholder {
    border-color: #cfd7e3;
    background: rgb(255 255 255 / 58%);
}
.stories-page .dash-recent-placeholder-mark,
.stories-page .dash-recent-placeholder .dash-recent-game-copy strong { color: #677283; }

.stories-catalog { margin-top: 20px; }
.stories-catalog-heading { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.stories-catalog h2 { font-size: 26px; }
.stories-page .stories-idea-entry { display: flex; flex: none; }
.stories-page .stories-idea-entry a { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 12px 0 4px; border-radius: 10px; color: var(--story-blue); background: transparent; font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background-color .2s, color .2s; }
.stories-page .stories-idea-entry a:is(:hover, :focus-visible) { background: #e6ebf2; color: var(--story-ink); }
.stories-page .stories-idea-entry a:active { background: #dbe2ec; }
.stories-page .dash-catalog-search-icon { color: var(--story-muted); }
.stories-page .dash-catalog-search input { border-color: #d5dce6; border-radius: 10px; color: var(--story-ink); background: var(--story-surface); }
.stories-page .dash-catalog-search input::placeholder { color: #6e7888; }
.stories-page .dash-catalog-search input:hover { border-color: #b7c3d4; }
.stories-idea-art { display: block; pointer-events: none; }
.stories-idea-bulb { transform-origin: 20px 26px; animation: story-idea-float 3.8s ease-in-out infinite; }
.stories-idea-spark { animation: story-idea-glow 3.6s ease-in-out infinite; }
.stories-catalog.is-idea-paused :is(.stories-idea-bulb, .stories-idea-spark) { animation-play-state: paused; }
@keyframes story-idea-float {
    0%, 100% { transform: rotate(0deg); }
    45% { transform: rotate(-7deg); }
    65% { transform: rotate(-2deg); }
}
@keyframes story-idea-glow {
    0%, 100% { opacity: .4; }
    50% { opacity: 1; }
}

/* Full-bleed cinema poster grid: each story leads with its own still and atmospheric scrim. */
.stories-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 18px; }
.story-card {
    --story-scene-ink: 10 21 31;
    --story-scene-accent: #f0c27d;
    --story-card-accent: #9ec0dd;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    min-height: 410px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgb(var(--story-scene-ink) / 28%);
    border-radius: 10px;
    background: rgb(var(--story-scene-ink));
    box-shadow: 0 10px 24px rgb(12 18 28 / 15%), 0 2px 6px rgb(12 18 28 / 10%);
}
/* Subtle cinema frame hairline inside the poster edge. */
.story-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
    border: 1px solid rgb(255 255 255 / 15%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%);
    pointer-events: none;
}
.story-card--released { transition: transform .28s cubic-bezier(.22, .61, .36, 1), box-shadow .28s ease, border-color .24s ease; }

/* Per-story deep cinema ink and spotlight accent derived from each poster's lighting. */
.story-card[data-trpg-key="sleeper"] { --story-scene-ink: 8 20 30; --story-scene-accent: #ff9f72; --story-card-accent: #ff9f72; }
.story-card[data-trpg-key="reborn"] { --story-scene-ink: 19 26 36; --story-scene-accent: #f26b4e; --story-card-accent: #d9462f; }
.story-card[data-trpg-key="dont-rescue-princess"] { --story-scene-ink: 19 30 23; --story-scene-accent: #f0d79e; --story-card-accent: #f0d79e; }
.story-card[data-trpg-key="rewrite-reality"] { --story-scene-ink: 14 18 28; --story-scene-accent: #f2a7a7; --story-card-accent: #f2a7a7; }
.story-card[data-trpg-key="last-lit-store"] { --story-scene-ink: 13 22 28; --story-scene-accent: #f2c27d; --story-card-accent: #f2c27d; }
.story-card[data-trpg-key="hongmen"] { --story-scene-ink: 29 16 12; --story-scene-accent: #f3c178; --story-card-accent: #f3c178; }
.story-card[data-trpg-key="dnd"] { --story-scene-ink: 14 21 30; --story-scene-accent: #f4ca6e; --story-card-accent: #f4ca6e; }
.story-card[data-trpg-key="showdown"] { --story-scene-ink: 14 19 31; --story-scene-accent: #f3b56f; --story-card-accent: #f3b56f; }
.story-card[data-trpg-key="cthulhu"] { --story-scene-ink: 11 24 22; --story-scene-accent: #9dd8ba; --story-card-accent: #9dd8ba; }
.story-card[data-trpg-key="foundation-squad"] { --story-scene-ink: 17 26 22; --story-scene-accent: #ecd491; --story-card-accent: #ecd491; }
.story-card[data-trpg-key="killer-protects-detective"] { --story-scene-ink: 23 14 16; --story-scene-accent: #f1c482; --story-card-accent: #f1c482; }
.story-card[data-trpg-key="marvel-cinematic-heroic-age"] { --story-scene-ink: 11 20 34; --story-scene-accent: #9dd4f7; --story-card-accent: #9dd4f7; }

.story-card-cover {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: rgb(var(--story-scene-ink));
}
.story-card-cover > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}
.story-card--released .story-card-cover > img {
    transition: transform .65s cubic-bezier(.22, .61, .36, 1), filter .35s ease;
}
/* Multi-stop theatrical scrim: upper artwork breathes unobstructed; bottom copy stays AAA-legible. */
.story-card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgb(var(--story-scene-ink) / 34%) 0%, transparent 18%),
        linear-gradient(180deg,
            transparent 22%,
            rgb(var(--story-scene-ink) / 46%) 44%,
            rgb(var(--story-scene-ink) / 88%) 62%,
            rgb(var(--story-scene-ink) / 97%) 80%,
            rgb(var(--story-scene-ink) / 99%) 100%);
}
.story-card-cover .story-cover-atmosphere { z-index: 1; }

/* Hand-tuned poster focal points so faces and dramatic subjects sit cleanly above the bottom scrim. */
.story-card[data-trpg-key="sleeper"] img, .story-feature[data-trpg-key="sleeper"] img { object-position: 56% 18%; }
.story-card[data-trpg-key="reborn"] img { object-position: 50% 15%; }
.story-card[data-trpg-key="dont-rescue-princess"] img { object-position: 63% 18%; }
.story-card[data-trpg-key="rewrite-reality"] img, .story-feature[data-trpg-key="rewrite-reality"] img { object-position: 50% 20%; }
.story-card[data-trpg-key="last-lit-store"] img { object-position: 52% 20%; }
.story-card[data-trpg-key="hongmen"] img { object-position: 50% 42%; }
.story-card[data-trpg-key="dnd"] img { object-position: 50% 20%; }
.story-card[data-trpg-key="showdown"] img { object-position: 50% 30%; }
.story-card[data-trpg-key="cthulhu"] img { object-position: 55% 26%; }
.story-card[data-trpg-key="foundation-squad"] img { object-position: 46% 22%; }
.story-card[data-trpg-key="killer-protects-detective"] img { object-position: 50% 18%; }
.story-card[data-trpg-key="marvel-cinematic-heroic-age"] img { object-position: 46% 24%; }

.story-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 24px);
    padding: 4px 10px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 4px;
    background: rgb(var(--story-scene-ink) / 72%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #f3f6fa;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: .04em;
    pointer-events: none;
}
.story-card-category::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--story-scene-accent);
}

.story-card-copy {
    position: relative;
    z-index: 3;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(168px, 14.5vw, 206px) 16px 16px;
    color: #f4f6f9;
}
.story-card h3 {
    margin: 0;
    color: #ffffff;
    font: 700 clamp(20px, 1.45vw, 24px)/1.3 "Story Title Serif", Georgia, "Songti SC", serif;
    letter-spacing: -.015em;
    text-shadow: 0 2px 10px rgb(0 0 0 / 48%);
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.story-card-description {
    margin: 7px 0 12px;
    color: rgb(235 240 247 / 88%);
    font-size: 13.5px;
    line-height: 1.58;
    text-shadow: 0 1px 4px rgb(0 0 0 / 40%);
    text-wrap: pretty;
}
.story-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    padding-top: 9px;
    border-top: 1px solid rgb(255 255 255 / 15%);
    color: rgb(217 224 234 / 86%);
    font-size: 12.5px;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
}
.story-card-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.story-card-meta svg { flex: none; color: var(--story-scene-accent); }
.story-card-difficulty[data-difficulty="hard"],
.story-card-difficulty[data-difficulty="hard"] svg { color: #f6b277; }

.story-card-footer { margin-top: 11px; }
.stories-page .story-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 9px 14px;
    box-sizing: border-box;
    border: 1px solid rgb(255 255 255 / 26%);
    border-radius: 6px;
    background: rgb(255 255 255 / 14%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
    letter-spacing: .02em;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.story-card--released .story-card-action::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 10px;
}
.stories-page .story-card-action:focus-visible { outline: none; }
.story-card-action:focus-visible::after { outline: 3px solid var(--story-scene-accent); outline-offset: -3px; }
.stories-page .story-card--released .story-card-action:active {
    background: #ffffff;
    border-color: #ffffff;
    color: rgb(var(--story-scene-ink));
}
.story-card--released:active { transform: translateY(1px); }

/* Upcoming titles: desaturated cinema teaser poster with dashed coming-soon slate. */
.story-card:not(.story-card--released) {
    border-color: rgb(var(--story-scene-ink) / 22%);
    box-shadow: 0 6px 16px rgb(12 18 28 / 10%);
}
.story-card:not(.story-card--released) .story-card-cover > img {
    filter: saturate(.55) brightness(.78);
}
.story-card:not(.story-card--released) .story-card-category {
    color: rgb(225 232 240 / 82%);
}
.story-card:not(.story-card--released) .story-card-category::before {
    opacity: .65;
}
.story-card:not(.story-card--released) h3 { color: rgb(242 245 250 / 90%); }
.story-card:not(.story-card--released) .story-card-description { color: rgb(212 220 230 / 78%); }
.stories-page .story-card-action:disabled {
    min-height: 44px;
    gap: 12px;
    border: 0;
    background: transparent;
    color: rgb(214 222 232 / 78%);
    font-size: 13px;
    font-weight: 550;
    letter-spacing: .06em;
    cursor: default;
}
.story-card-action:disabled::before, .story-card-action:disabled::after {
    content: "";
    width: 24px;
    border-top: 1px dashed rgb(255 255 255 / 34%);
}

@media (hover: hover) and (pointer: fine) {
    .story-card--released:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 36px rgb(var(--story-scene-ink) / 28%), 0 4px 10px rgb(12 18 28 / 14%);
    }
    .story-card--released:hover .story-card-cover > img {
        transform: scale(1.045);
    }
    .stories-page .story-card--released:hover .story-card-action:not(:active) {
        background: color-mix(in srgb, var(--story-scene-accent) 22%, #ffffff);
        border-color: color-mix(in srgb, var(--story-scene-accent) 36%, #ffffff);
        color: rgb(var(--story-scene-ink));
        box-shadow: 0 6px 18px rgb(0 0 0 / 28%);
    }
}

.stories-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 18px; margin: 28px 0 8px; font-size: 14px; color: var(--story-muted); }
.stories-pagination button, .stories-empty button { min-width: 80px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--story-line); border-radius: 8px; color: var(--story-blue); background: var(--story-surface); }
.stories-pagination button:hover:not(:disabled), .stories-empty button:hover { border-color: #b7c3d4; background: #fff; }
.stories-pagination button:disabled { color: #8c96a6; cursor: default; background: #e8ecf2; }
.stories-empty { text-align: center; padding: 50px 16px; color: var(--story-muted); }
.stories-page .stories-intro { border-top-color: var(--story-line); }
.stories-page .locale-scope-note { border-color: var(--story-line); background: var(--story-surface); color: var(--story-muted); }

@media (max-width: 1100px) and (min-width: 769px) {
    .stories-banner .story-feature.active .story-feature-copy { max-width: none; }
    .story-feature-copy { left: 14px; right: 14px; }
    .story-feature h2 { font-size: 18px; }
}
@media (min-width: 1280px) {
    .stories-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
    .stories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .story-card { min-height: 390px; }
    .story-card-copy { padding-top: clamp(148px, 22vw, 196px); }
}
@media (max-width: 768px) {
    .stories-page { padding-top: 22px; }
    .stories-page > .container { padding: 0 20px; }
    .stories-banner .dash-banner-track { display: flex; overflow: hidden; clip-path: none; border-radius: 12px; }
    .stories-banner:not(.is-enhanced) .dash-banner-track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .stories-banner:not(.is-enhanced) .story-feature { flex: 0 0 100%; height: 100%; margin-block: 0; scroll-snap-align: start; }
    .stories-banner.is-enhanced .story-feature:not(.active) { top: 0; height: 100%; }
    .stories-banner .story-feature.active .story-feature-copy { left: 22px; right: 22px; bottom: 22px; max-width: none; }
    .stories-banner .story-feature.active h2 { font-size: 28px; }
    .stories-banner .story-feature.active .story-feature-hook { margin-top: 10px; font-size: 14px; }
    .stories-banner .story-feature.active .story-feature-action { margin-top: 16px; }
    .stories-banner .story-feature[data-trpg-key="rewrite-reality"] img { object-position: left 32%; }
    .stories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    .stories-catalog { margin-top: 12px; }
    .stories-catalog-heading { flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
    .stories-catalog h2 { font-size: 23px; }
    .stories-page .dash-recent-games { margin-bottom: 20px; }
}
@media (max-width: 540px) {
    .stories-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .story-card { min-height: 368px; }
    .story-card-copy { padding: 170px 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .stories-page *, .stories-page *::before { transition: none !important; animation: none !important; }
    .story-card:has(a):hover, .story-card--released:active, .story-card--released:hover .story-card-cover > img, .stories-page .dash-recent-game-link:hover { transform: none; }
    .story-feature-action:active { transform: none; }
}
