* {
    box-sizing: border-box;
}

/* ── Audio play buttons ───────────────────────────────────────────────────── */

/* ── Dialogue speaker attribution ────────────────────────────────────────── */

.dialogue[data-speaker]::before {
    content: attr(data-speaker) ": ";
    color: var(--speaker-color, #a08858);
    font-style: normal;
    font-size: 0.85em;
    font-family: Georgia, serif;
}

.audio-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.4;
    padding: 3px;
    vertical-align: middle;
    transition:
        opacity 0.15s,
        color 0.15s;
    color: inherit;
    margin-left: 0.5em;
    flex-shrink: 0;
}

.audio-play-btn:hover {
    opacity: 0.85;
}

.audio-play-btn.playing {
    opacity: 1;
    color: #c9a84c;
    border-color: #c9a84c;
}

.audio-play-btn.playing .icon-play {
    display: none;
}
.audio-play-btn.playing .icon-pause {
    display: block !important;
}

.memoir-audio-btn {
    width: 20px;
    height: 20px;
}

.memoir-audio-btn-private {
    opacity: 0.6;
    position: relative;
}

.memoir-audio-btn-private::before {
    content: "🔒";
    font-size: 8px;
    position: absolute;
    top: -4px;
    right: -4px;
    line-height: 1;
}

/* ── Sticky audio player bar ──────────────────────────────────────────────── */

#audio-player-bar {
    display: none;
    position: fixed !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    z-index: 99;
    background: #1a1a1a;
    border-top: 1px solid #333;
    padding: 0.4rem 1rem;
    align-items: center;
    gap: 0.75rem;
    color: #e8e0d0;
    height: 48px;
    box-sizing: border-box;
}

#audio-player-bar.visible {
    display: flex;
}

.apb-left,
.apb-right {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.apb-btn {
    background: transparent;
    border: none;
    color: #e8e0d0;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.2rem 0.35rem;
    border-radius: 3px;
    opacity: 0.55;
    transition: opacity 0.15s;
    line-height: 1;
}

.apb-btn:hover {
    opacity: 1;
}

.apb-center {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.apb-title {
    font-size: 0.75rem;
    color: #c9a84c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
    max-width: 220px;
}

.apb-scrubber-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}

.apb-time {
    font-size: 0.7rem;
    color: #888;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

#apb-scrubber {
    flex: 1;
    height: 3px;
    accent-color: #c9a84c;
    cursor: pointer;
    min-width: 60px;
}

@media (max-width: 500px) {
    .apb-title {
        display: none;
    }
    .apb-time {
        display: none;
    }
}

/* Push memoir bars above the audio player when it's visible */
body:has(#audio-player-bar.visible) #memoir-login-bar,
body:has(#audio-player-bar.visible) #memoir-logout-bar {
    bottom: 48px;
}

.voice-play-btn {
    width: 18px;
    height: 18px;
    margin-left: 0.4em;
    vertical-align: middle;
}

body {
    font-family: Georgia, serif;
    background: #1a1a1a;
    color: #e8e0d0;
    margin: 0;
    padding: 2rem clamp(1rem, 4vw, 3rem);
    padding-top: calc(2rem + 44px); /* leave room for fixed nav */
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* world.html uses a wider container */
.container-wide {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

h1 {
    font-size: 1.8rem;
    color: #c9a84c;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
}

h2 {
    font-size: 1.1rem;
    color: #a08858;
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    scroll-margin-top: calc(
        44px + 1.5rem
    ); /* clear fixed nav + a little breathing room */
}

h3 {
    font-size: 1rem;
    color: #a08858;
    margin-top: 2rem;
    margin-bottom: 0.25rem;
}

p {
    line-height: 1.8;
    margin: 1rem 0;
}

a {
    color: #a08858;
    text-decoration: none;
}

a:hover {
    color: #c9a84c;
    text-decoration: underline;
}

a.nav {
    display: inline-block;
    color: #a08858;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: sans-serif;
    margin-right: 1.5rem;
}

a.nav:hover {
    color: #c9a84c;
}

a.back {
    display: inline-block;
    margin-bottom: 2rem;
    color: #a08858;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: sans-serif;
}

a.back:hover {
    color: #c9a84c;
}

a.ref {
    color: #a08858;
    text-decoration: none;
    border-bottom: 1px dotted #a08858;
}

a.ref:hover {
    color: #c9a84c;
    border-bottom-color: #c9a84c;
}

.subtitle {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 2rem;
}

.chapter-subtitle {
    font-size: 0.95rem;
    color: #777;
    margin-top: -0.25rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.dialogue {
    color: #d4c4a0;
    font-style: italic;
    margin: 0.75rem 0 0.75rem 1.5rem;
    display: block;
}

.scene-break {
    text-align: center;
    color: #555;
    margin: 2.5rem 0;
    letter-spacing: 0.5rem;
}

.scene-img {
    max-width: 800px;
    max-height: 400px;
    width: 100%;
    object-fit: cover;
    border-radius: 4px;
    margin: 1.5rem auto 0.5rem;
    border: 1px solid #333;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.15s;
}

.scene-img:hover {
    opacity: 0.85;
}

.image-caption {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

#lightbox.open {
    display: flex;
}

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #444;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

/* index.html session list */
.session-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.session-list li {
    border-bottom: 1px solid #2a2a2a;
}

.session-list a {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 1rem 0.25rem;
    text-decoration: none;
    color: #e8e0d0;
    transition: color 0.15s;
}

.session-list a:hover {
    color: #c9a84c;
}

.session-number {
    font-size: 0.8rem;
    color: #555;
    min-width: 5rem;
}

.session-title {
    font-size: 1rem;
}

.session-subtitle {
    font-size: 0.85rem;
    color: #777;
    margin-left: auto;
    font-style: italic;
}

/* world.html components */
.tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    margin-left: 0.5rem;
    vertical-align: middle;
    font-family: sans-serif;
    letter-spacing: 0.03rem;
}

.tag-ally {
    background: #1a3a1a;
    color: #6abf6a;
    border: 1px solid #2a5a2a;
}
.tag-neutral {
    background: #2a2a1a;
    color: #b0a040;
    border: 1px solid #4a4a20;
}
.tag-unknown {
    background: #2a2a2a;
    color: #777;
    border: 1px solid #444;
}
.tag-enemy {
    background: #3a1a1a;
    color: #bf6a6a;
    border: 1px solid #5a2a2a;
}
.tag-visited {
    background: #1a2a3a;
    color: #6a9abf;
    border: 1px solid #2a4a5a;
}

.tag-location {
    background: #1a2a1a;
    color: #6abf7a;
    border: 1px solid #2a4a2a;
}

.tag-with-party {
    background: #1a2a3a;
    color: #7ab0d0;
    border: 1px solid #2a4a6a;
}

.tag-handed-off {
    background: #2a2a1a;
    color: #a09050;
    border: 1px solid #4a4a20;
}

.card mark {
    background: #7a6a20;
    color: #f0e0a0;
    border-radius: 2px;
    padding: 0 1px;
}

.world-jumps {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.world-jumps a {
    font-size: 0.85rem;
    color: #a08858;
    text-decoration: none;
    border: 1px solid #3a3020;
    border-radius: 3px;
    padding: 0.3rem 0.7rem;
    transition:
        background 0.15s,
        color 0.15s;
}

.world-jumps a:hover {
    background: #2a2010;
    color: #c9a84c;
}

.world-search-wrap {
    margin: 1.5rem 0 2rem;
}

.world-search-wrap input[type="search"] {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem 0.75rem;
    background: #111118;
    border: 1px solid #2a2a3a;
    border-radius: 4px;
    color: #ccc;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
}

.world-search-wrap input[type="search"]:focus {
    border-color: #5a5a8a;
}

.card {
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 0;
    margin: 0.6rem 0;
    background: #1f1f1f;
    scroll-margin-top: calc(44px + 1.5rem);
}

.card-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
}

.card-name a[id] {
    display: inline-block;
}

.card-header::after {
    content: "▸";
    margin-left: auto;
    color: #555;
    font-size: 0.75rem;
    transition: transform 0.15s;
    flex-shrink: 0;
}

.card.open .card-header::after {
    transform: rotate(90deg);
}

.card-body {
    display: none;
    padding: 0 1.25rem 1rem;
    border-top: 1px solid #2a2a2a;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.card.open .card-body {
    display: flex;
}

.card .card-body .card-portrait {
    flex: 0 0 120px;
    margin: 0;
    flex-shrink: 0;
    align-self: flex-start;
    order: 2;
}

.card .card-body .card-body-content {
    order: 1;
    flex: 1;
    min-width: 0;
}

.card .card-body .card-body-content p {
    margin: 0.25rem 0;
}

.card-name {
    font-size: 1.05rem;
    color: #e8e0d0;
    font-weight: bold;
}

.card-meta {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.card p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.card-portrait {
    width: 120px;
    height: 150px;
    object-fit: cover;
    object-position: top;
    border-radius: 3px;
    border: 1px solid #333;
    cursor: zoom-in;
    transition: opacity 0.15s;
    order: 2;
}

.card-portrait:hover {
    opacity: 0.85;
}

.card-place {
    width: 200px;
    height: 120px;
    object-fit: cover;
    object-position: center;
    border-radius: 3px;
    border: 1px solid #333;
    cursor: zoom-in;
    transition: opacity 0.15s;
    flex: 0 0 200px;
    flex-shrink: 0;
    align-self: flex-start;
    order: 2;
}

.card-place:hover {
    opacity: 0.85;
}

.divider {
    border: none;
    border-top: 1px solid #2a2a2a;
    margin: 2.5rem 0;
}

/* world.html h2 overrides (section headers, gold + border) */
.world h2 {
    font-size: 1.2rem;
    color: #c9a84c;
    margin-top: 3rem;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 0.4rem;
    text-transform: none;
    letter-spacing: normal;
}

/* ── Inline memoir callouts ────────────────────────────────────────────────── */

.memoir-callout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #16161f;
    border-left: 4px solid var(--char-color, #5a5a9a);
    border-radius: 0 4px 4px 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.memoir-callout-portrait {
    width: 100px;
    object-fit: cover;
    object-position: top;
    border-radius: 3px;
    border: 1px solid #555;
    flex-shrink: 0;
}

.memoir-callout-body {
    flex: 1;
}

.memoir-callout-name {
    font-size: 0.8rem;
    font-family: sans-serif;
    color: var(--char-color, #8888bb);
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.memoir-callout p {
    margin: 0.5rem 0;
    color: #e8e0d0;
    line-height: 1.7;
    font-size: 1rem;
}

.memoir-callout p:first-child {
    margin-top: 0;
}
.memoir-callout p:last-child {
    margin-bottom: 0;
}

.memoir-callout .private-note {
    background: transparent;
    border-left: none;
    padding: 0;
    margin: 0.5rem 0 0;
    font-size: 1rem;
    font-style: italic;
    color: #c0b8d8;
}

/* ── Memoir login bar ──────────────────────────────────────────────────────── */

#memoir-login-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111122;
    border-top: 1px solid #333355;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    font-family: sans-serif;
    font-size: 0.82rem;
    color: #8888bb;
    z-index: 100;
}

#memoir-login-bar input[type="password"] {
    background: #1a1a2e;
    border: 1px solid #444466;
    color: #e8e0d0;
    padding: 0.25rem 0.5rem;
    font-size: 0.82rem;
    font-family: sans-serif;
    border-radius: 3px;
    width: 160px;
}

#memoir-login-bar input[type="password"]::placeholder {
    color: #555577;
}

#memoir-login-bar button {
    background: transparent;
    border: 1px solid #555577;
    color: #a08858;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: sans-serif;
    transition:
        border-color 0.15s,
        color 0.15s;
}

#memoir-login-bar button:hover {
    border-color: #c9a84c;
    color: #c9a84c;
}

#memoir-pw-error {
    color: #c44;
    font-size: 0.78rem;
}

/* ── Logout bar ────────────────────────────────────────────────────────────── */

#memoir-logout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111122;
    border-top: 1px solid #333355;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: sans-serif;
    font-size: 0.82rem;
    color: #8888bb;
    z-index: 100;
}

#memoir-logout-bar strong {
    color: #c9a84c;
}

#memoir-logout-bar button {
    background: transparent;
    border: 1px solid #555577;
    color: #8888bb;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: sans-serif;
    transition:
        border-color 0.15s,
        color 0.15s;
}

#memoir-logout-bar button:hover {
    border-color: #c9a84c;
    color: #c9a84c;
}

/* ── Floating top nav ──────────────────────────────────────────────────────── */

#site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: #111118;
    border-bottom: 1px solid #2a2a3a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    font-family: sans-serif;
    font-size: 0.82rem;
    z-index: 200;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-campaign {
    color: #8888bb;
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    transition: color 0.15s;
}
.nav-campaign:hover {
    color: #a08858;
    text-decoration: none;
}

.nav-link {
    color: #a08858;
    text-decoration: none;
    transition: color 0.15s;
}
.nav-link:hover {
    color: #c9a84c;
    text-decoration: none;
}

/* ── Sessions dropdown ─────────────────────────────────────────────────────── */

.nav-dropdown-wrap {
    position: relative;
}

.nav-dropdown-btn {
    background: transparent;
    border: none;
    color: #a08858;
    font-size: 0.82rem;
    font-family: sans-serif;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition:
        color 0.15s,
        background 0.15s;
    white-space: nowrap;
}
.nav-dropdown-btn:hover {
    color: #c9a84c;
    background: #1a1a28;
}

.nav-arrow {
    font-size: 0.7rem;
    opacity: 0.6;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 340px;
    max-height: 60vh;
    overflow-y: auto;
    background: #111118;
    border: 1px solid #2a2a3a;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 300;
}
.nav-dropdown.open {
    display: block;
}

.nav-dropdown-item {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #e8e0d0;
    border-bottom: 1px solid #1e1e2a;
    transition: background 0.12s;
}
.nav-dropdown-item:last-child {
    border-bottom: none;
}
.nav-dropdown-item:hover {
    background: #1a1a28;
}
.nav-dropdown-item.active {
    background: #16161f;
}

.nav-session-number {
    grid-row: 1;
    grid-column: 1;
    font-size: 0.72rem;
    color: #8888bb;
    align-self: center;
}
.nav-dropdown-item.active .nav-session-number {
    color: #c9a84c;
}

.nav-session-title {
    grid-row: 1;
    grid-column: 2;
    font-size: 0.88rem;
    color: #e8e0d0;
}
.nav-dropdown-item.active .nav-session-title {
    color: #c9a84c;
}

.nav-session-subtitle {
    grid-row: 2;
    grid-column: 2;
    font-size: 0.76rem;
    color: #555;
    font-style: italic;
    margin-top: 0.15rem;
}

/* ── Prev/next session footer ──────────────────────────────────────────────── */

#session-footer {
    display: flex;
    justify-content: space-between;
    margin: 4rem 0 0;
    padding: 1.25rem clamp(1rem, 4vw, 3rem);
    border-top: 1px solid #2a2a2a;
    background: #111118;
    font-family: sans-serif;
    font-size: 0.85rem;
    position: relative;
    left: calc(-1 * clamp(1rem, 4vw, 3rem));
    width: 100vw;
}

#session-footer a {
    color: #a08858;
    text-decoration: none;
    transition: color 0.15s;
}
#session-footer a:hover {
    color: #c9a84c;
}

.session-footer-prev {
    text-align: left;
}
.session-footer-next {
    text-align: right;
}

/* ── Chapter TOC ───────────────────────────────────────────────────────────── */

/*
 * The TOC has two states:
 *   collapsed — only the toggle button (☰) is visible, fixed to the right edge
 *   expanded  — the full panel slides in, still fixed to the right edge
 *
 * On wide viewports (≥1360px) it auto-expands and floats in the gutter beside
 * the text without overlapping. On narrower viewports it stays collapsed until
 * the user clicks the button.
 */

#chapter-toc {
    position: fixed;
    top: 100px;
    right: 0;
    z-index: 50;
    font-family: sans-serif;
    font-size: 0.78rem;
    line-height: 1.5;
}

/* Toggle button — visible when panel is closed */
#toc-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: #16161f;
    border: 1px solid #2a2a3a;
    border-right: none;
    border-radius: 4px 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #a08858;
    font-size: 1rem;
    transition:
        color 0.15s,
        background 0.15s,
        opacity 0.15s;
    user-select: none;
    flex-shrink: 0;
}

#toc-toggle:hover {
    color: #c9a84c;
    background: #1e1e2e;
}

/* Hide toggle when panel is open */
#chapter-toc.open #toc-toggle {
    display: none;
}

/* The panel — slides in from the right */
#toc-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 210px;
    background: #16161f;
    border: 1px solid #2a2a3a;
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 0.75rem 1rem;
    box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.4);
    /* slide-in setup */
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.22s ease,
        opacity 0.18s ease;
}

#chapter-toc.open #toc-panel {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.toc-label {
    font-size: 0.68rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#toc-close {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

#toc-close:hover {
    color: #c9a84c;
}

#chapter-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc-counter;
}

#chapter-toc li {
    counter-increment: toc-counter;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

#chapter-toc li::before {
    content: counter(toc-counter);
    font-size: 0.65rem;
    color: #444;
    min-width: 1em;
    flex-shrink: 0;
}

#chapter-toc a {
    color: #a08858;
    text-decoration: none;
    border-bottom: none;
    transition: color 0.15s;
    line-height: 1.3;
}

#chapter-toc a:hover {
    color: #c9a84c;
}

#chapter-toc a.toc-active {
    color: #c9a84c;
}

/*
 * Wide viewport — auto-expand and pull into the gutter so it doesn't overlap
 * the text. At ≥1360px the gutter exists; we switch to sticky-in-flow layout.
 */
@media (min-width: 1680px) {
    #chapter-toc {
        /* switch from fixed to sticky-in-flow */
        position: sticky;
        top: 60px;
        float: right;
        clear: right;
        /* pull into the gutter outside the container */
        width: 190px;
        margin-right: calc(-190px - 2rem);
        margin-left: 0;
        margin-bottom: 2rem;
        right: auto;
        /* always show the panel */
    }

    #toc-toggle {
        display: none; /* hide the button — panel is always open */
    }

    #toc-panel {
        position: static;
        width: auto;
        box-shadow: none;
        border-radius: 4px;
        border: 1px solid #2a2a3a;
        border-right: 1px solid #2a2a3a;
        right: auto;
        /* always fully visible — override transition state */
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transition: none;
    }

    #toc-close {
        display: none; /* no close button when auto-expanded */
    }
}

/* ── Responsive breakpoints ────────────────────────────────────────────────── */

@media (max-width: 600px) {
    body {
        padding: 1rem;
        padding-top: calc(1rem + 44px);
    }

    h1 {
        font-size: 1.4rem;
    }

    .nav-dropdown {
        min-width: calc(100vw - 2rem);
        left: 50%;
        transform: translateX(-50%);
    }

    .session-list a {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .session-subtitle {
        margin-left: 0;
        width: 100%;
    }

    .card.open .card-body {
        flex-direction: column;
    }

    .card-portrait,
    .card-place {
        width: 100%;
        height: 160px;
        order: 1;
        flex: none;
    }

    .card .card-body .card-body-content {
        order: 2;
    }

    #session-footer {
        font-size: 0.78rem;
    }

    .memoir-callout {
        flex-direction: column;
        gap: 0.5rem;
    }
}
