/* Audio Kotha — story detail glass pass. Scoped to /story/* so other pages are untouched. */
body[data-page^="story/"] .crumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--muted);
    padding: 9px 13px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(37, 99, 235, .10);
    box-shadow: 0 10px 26px -22px rgba(15, 35, 95, .45);
    backdrop-filter: blur(8px);
    margin-top: 10px;
}
body[data-page^="story/"] .crumbs a { color: var(--blue-700); font-weight: 700; }
body[data-page^="story/"] .crumbs svg { color: #9FB3D1; }

body[data-page^="story/"] .story-hero {
    position: relative;
    padding: 22px 0 18px;
    overflow: hidden;
}
body[data-page^="story/"] .story-hero::before {
    content: "";
    position: absolute;
    inset: -30px -10px auto;
    height: 420px;
    pointer-events: none;
    background:
        radial-gradient(520px 260px at 18% 22%, rgba(37, 99, 235, .14), transparent 70%),
        radial-gradient(420px 300px at 88% 8%, rgba(147, 197, 253, .18), transparent 72%);
}
body[data-page^="story/"] .story-hero-grid {
    position: relative;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
}

/* Cover */
body[data-page^="story/"] .story-cover-wrap {
    position: relative;
    overflow: hidden;
    padding: 10px;
    border-radius: 26px;
    background: linear-gradient(155deg, rgba(255, 255, 255, .96), rgba(230, 240, 255, .72));
    border: 1px solid rgba(37, 99, 235, .14);
    box-shadow: 0 30px 60px -34px rgba(15, 35, 95, .55), inset 0 1px 0 #fff;
    animation: srUp .5s cubic-bezier(.2, .8, .2, 1) both;
}
body[data-page^="story/"] .story-cover-wrap::before {
    content: "";
    position: absolute;
    inset: -40% -70% auto;
    height: 180px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: rotate(-18deg);
    pointer-events: none;
}
body[data-page^="story/"] .story-cover {
    border-radius: 18px;
    box-shadow: 0 18px 40px -26px rgba(15, 35, 95, .5);
    background: var(--blue-50);
}
body[data-page^="story/"] .story-cover img { transition: transform .5s ease; }
body[data-page^="story/"] .story-cover-wrap:hover .story-cover img { transform: scale(1.04); }
body[data-page^="story/"] .cover-badges { margin-top: 11px; }
body[data-page^="story/"] .cover-badges .pill {
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(37, 99, 235, .14);
    box-shadow: 0 8px 18px -14px rgba(15, 35, 95, .45);
    backdrop-filter: blur(8px);
}

/* Intro panel */
body[data-page^="story/"] .story-intro {
    padding: 24px 26px 22px;
    border-radius: 22px;
    background: linear-gradient(150deg, rgba(255, 255, 255, .94), rgba(240, 246, 255, .76));
    border: 1px solid rgba(37, 99, 235, .12);
    box-shadow: 0 26px 56px -36px rgba(15, 35, 95, .5), inset 0 1px 0 #fff;
    backdrop-filter: blur(10px);
    animation: srUp .56s .06s cubic-bezier(.2, .8, .2, 1) both;
}
body[data-page^="story/"] .genre-chip {
    background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(219, 234, 254, .6));
    border: 1px solid rgba(37, 99, 235, .13);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    transition: transform .18s ease, box-shadow .18s ease;
}
body[data-page^="story/"] .genre-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -14px rgba(37, 99, 235, .55);
}
body[data-page^="story/"] .story-intro h1 {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.06;
    letter-spacing: -.045em;
    background: linear-gradient(105deg, var(--ink) 15%, #1D4ED8 85%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
body[data-page^="story/"] .story-alt-title { margin-bottom: 10px; }
body[data-page^="story/"] .story-synopsis {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--ink-2);
    max-width: 64ch;
}
body[data-page^="story/"] .story-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    border: 0;
    margin: 20px 0 18px;
}
body[data-page^="story/"] .sm-item {
    min-width: 0;
    gap: 9px;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(255, 255, 255, .92), rgba(239, 245, 255, .62));
    border: 1px solid rgba(37, 99, 235, .10);
    box-shadow: 0 12px 28px -24px rgba(15, 35, 95, .5), inset 0 1px 0 #fff;
    transition: transform .18s ease, border-color .18s ease;
}
body[data-page^="story/"] .sm-item:hover { transform: translateY(-2px); border-color: rgba(37, 99, 235, .24); }
body[data-page^="story/"] .sm-ico {
    background: linear-gradient(145deg, #EFF6FF, #DBEAFE);
    border-color: rgba(37, 99, 235, .12);
    color: var(--blue-700);
}
body[data-page^="story/"] .sm-item strong { font-size: 16px; }
body[data-page^="story/"] .story-creators { gap: 12px; margin-bottom: 20px; }
body[data-page^="story/"] .person {
    padding: 8px 12px 8px 8px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(15, 35, 95, .07);
}
body[data-page^="story/"] .avatar {
    box-shadow: 0 8px 20px -14px rgba(15, 35, 95, .55);
}
body[data-page^="story/"] .story-actions .btn-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    border-color: transparent;
    box-shadow: 0 18px 34px -18px rgba(37, 99, 235, .65);
}
body[data-page^="story/"] .story-actions .btn-soft {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(37, 99, 235, .14);
    box-shadow: inset 0 1px 0 #fff;
}
body[data-page^="story/"] .story-actions .btn:hover { transform: translateY(-2px); }
body[data-page^="story/"] .btn-icon.js-fav.is-active {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    color: #B91C1C;
}
body[data-page^="story/"] .resume-note {
    padding: 8px 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(37, 99, 235, .12);
    box-shadow: inset 0 1px 0 #fff;
}

/* Main panels */
body[data-page^="story/"] .story-body-grid { gap: 24px; }
body[data-page^="story/"] .episode-panel,
body[data-page^="story/"] .comments-panel,
body[data-page^="story/"] .side-card.glass {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, .11);
    background: linear-gradient(155deg, rgba(255, 255, 255, .96), rgba(244, 249, 255, .78));
    box-shadow: 0 22px 48px -36px rgba(15, 35, 95, .48), inset 0 1px 0 #fff;
    backdrop-filter: blur(8px);
    animation: srCardIn .38s .1s cubic-bezier(.2, .8, .2, 1) both;
}
body[data-page^="story/"] .episode-panel::before,
body[data-page^="story/"] .comments-panel::before,
body[data-page^="story/"] .side-card.glass::before {
    content: "";
    position: absolute;
    inset: 0 18px auto;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, .5), transparent);
    pointer-events: none;
}
body[data-page^="story/"] .panel-head { margin-bottom: 18px; }
body[data-page^="story/"] .panel-head h2 { font-size: 20px; }
body[data-page^="story/"] .panel-note {
    padding: 6px 10px;
    border-radius: 99px;
    background: rgba(37, 99, 235, .07);
    border: 1px solid rgba(37, 99, 235, .11);
}
body[data-page^="story/"] .episode-list { gap: 6px; }
body[data-page^="story/"] .ep-row {
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 35, 95, .07);
    background: linear-gradient(140deg, rgba(255, 255, 255, .92), rgba(239, 245, 255, .55));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    animation: srCardIn .32s both;
    animation-delay: calc(var(--i, 0) * 35ms);
}
body[data-page^="story/"] .ep-row:nth-child(1) { --i: 0; }
body[data-page^="story/"] .ep-row:nth-child(2) { --i: 1; }
body[data-page^="story/"] .ep-row:nth-child(3) { --i: 2; }
body[data-page^="story/"] .ep-row:nth-child(4) { --i: 3; }
body[data-page^="story/"] .ep-row:nth-child(5) { --i: 4; }
body[data-page^="story/"] .ep-row:nth-child(6) { --i: 5; }
body[data-page^="story/"] .ep-row:nth-child(7) { --i: 6; }
body[data-page^="story/"] .ep-row:nth-child(8) { --i: 7; }
body[data-page^="story/"] .ep-row:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, .22);
    box-shadow: 0 16px 32px -24px rgba(15, 35, 95, .48);
}
body[data-page^="story/"] .ep-row.is-current {
    background: linear-gradient(135deg, rgba(37, 99, 235, .13), rgba(219, 234, 254, .5));
    border-color: rgba(37, 99, 235, .24);
}
body[data-page^="story/"] .ep-play {
    width: 38px;
    height: 38px;
    background: linear-gradient(145deg, #3B82F6, #1D4ED8);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 24px -14px rgba(37, 99, 235, .75);
}
body[data-page^="story/"] .ep-row.is-locked .ep-play {
    background: linear-gradient(145deg, #EEF3FA, #DBE5F4);
    color: var(--muted);
    box-shadow: none;
}
body[data-page^="story/"] .ep-num { font-weight: 800; }
body[data-page^="story/"] .ep-title { font-weight: 700; }
body[data-page^="story/"] .ep-lock {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
}
body[data-page^="story/"] .ep-read {
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(15, 35, 95, .08);
}
body[data-page^="story/"] .ep-read:hover {
    background: var(--blue-50);
    color: var(--blue-700);
    border-color: rgba(37, 99, 235, .18);
}

/* Comments */
body[data-page^="story/"] .comments-panel { margin-top: 24px; }
body[data-page^="story/"] .comment-form {
    border-radius: 16px;
    background: rgba(247, 250, 255, .62);
    border: 1px solid rgba(15, 35, 95, .07);
    padding: 14px;
}
body[data-page^="story/"] .field textarea,
body[data-page^="story/"] .cf-field textarea {
    background: rgba(255, 255, 255, .92);
    border-color: rgba(15, 35, 95, .11);
}
body[data-page^="story/"] .comment {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(15, 35, 95, .07);
}
body[data-page^="story/"] .pill-verified {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #047857;
}

/* Side rail */
body[data-page^="story/"] .story-side { gap: 16px; }
body[data-page^="story/"] .side-card.glass { padding: 18px; }
body[data-page^="story/"] .side-card h3 { font-size: 14.5px; }
body[data-page^="story/"] .detail-list > div {
    padding: 7px 9px;
    border-radius: 9px;
}
body[data-page^="story/"] .detail-list > div:nth-child(odd) { background: rgba(239, 245, 255, .6); }
body[data-page^="story/"] .tag-cloud .tag {
    background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(219, 234, 254, .55));
    border: 1px solid rgba(37, 99, 235, .12);
    transition: transform .18s ease, box-shadow .18s ease;
}
body[data-page^="story/"] .tag-cloud .tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -14px rgba(37, 99, 235, .5);
}
body[data-page^="story/"] .side-story {
    padding: 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
body[data-page^="story/"] .side-story:hover {
    transform: translateX(2px);
    background: rgba(239, 245, 255, .72);
    border-color: rgba(37, 99, 235, .14);
}
body[data-page^="story/"] .ss-cover { border-radius: 10px; overflow: hidden; }
body[data-page^="story/"] .side-tip {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 18px;
    color: #EAF2FF;
    background: linear-gradient(155deg, #0B1533, #173A78);
    border: 1px solid rgba(147, 197, 253, .22);
    box-shadow: 0 26px 54px -34px rgba(15, 35, 95, .72);
}
body[data-page^="story/"] .side-tip::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -70px;
    top: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, .28), transparent 68%);
    pointer-events: none;
}
body[data-page^="story/"] .side-tip > * { position: relative; }
body[data-page^="story/"] .side-tip h3 { color: #fff; }
body[data-page^="story/"] .side-tip p { color: #B9CDEB; }
body[data-page^="story/"] .side-tip .btn-primary {
    background: #fff;
    color: var(--blue-dark);
    border-color: transparent;
}

/* Focus, motion and responsive */
body[data-page^="story/"] a:focus-visible,
body[data-page^="story/"] button:focus-visible,
body[data-page^="story/"] textarea:focus-visible,
body[data-page^="story/"] input:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .55);
    outline-offset: 2px;
}
@keyframes srUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes srCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 1180px) {
    body[data-page^="story/"] .story-hero-grid { grid-template-columns: 270px minmax(0, 1fr); gap: 24px; }
    body[data-page^="story/"] .story-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    body[data-page^="story/"] .story-body-grid { grid-template-columns: 1fr; }
    body[data-page^="story/"] .story-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 680px) {
    body[data-page^="story/"] .head-actions .btn-primary { display: none; }
    body[data-page^="story/"] .story-hero-grid { grid-template-columns: 1fr; gap: 16px; }
    body[data-page^="story/"] .story-cover-wrap { display: flex; gap: 14px; align-items: flex-start; padding: 8px; }
    body[data-page^="story/"] .story-cover { width: 128px; flex: none; }
    body[data-page^="story/"] .cover-badges { margin-top: 0; align-self: flex-start; flex-direction: column; }
    body[data-page^="story/"] .story-intro { padding: 18px; }
    body[data-page^="story/"] .story-intro h1 { font-size: 28px; }
    body[data-page^="story/"] .story-side { grid-template-columns: 1fr; }
    body[data-page^="story/"] .ep-row { padding: 9px; }
    body[data-page^="story/"] .ep-summary { white-space: normal; }
    body[data-page^="story/"] .cf-foot { flex-direction: column; align-items: stretch; }
}
@media (max-width: 430px) {
    body[data-page^="story/"] .story-cover { width: 108px; }
    body[data-page^="story/"] .cover-badges .pill { font-size: 9px; }
    body[data-page^="story/"] .story-metrics { gap: 7px; }
    body[data-page^="story/"] .sm-item { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    body[data-page^="story/"] * { animation: none !important; transition: none !important; }
}
