@font-face {
    font-family: Book;
    src: local('Georgia')
}

* {
    box-sizing: border-box
}

:root {
    --bg: #101112;
    --paper: #181a1d;
    --ink: #f4f5f7;
    --muted: #a0a5ae;
    --accent: #3889ff;
    --line: #30343b;
    --accent-muted: #85b5ff;
    --reader-size: 20px;
    --reader-leading: 1.85;
    color-scheme: dark
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.5 'Segoe UI', Arial, sans-serif
}

button,
input,
select,
textarea {
    font: inherit
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent
}

button {
    cursor: pointer;
    color: inherit
}

button:disabled {
    cursor: default;
    opacity: .4
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-muted);
    outline-offset: 4px
}

button {
    border: 0;
    background: none
}

a {
    color: inherit
}

button,
select {
    touch-action: manipulation
}

button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5
}

[hidden] {
    display: none !important
}

.topbar {
    height: 78px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 38px;
    gap: 40px;
    background: var(--paper);
    max-width: 1200px;
    margin: auto;
}

.brand {
    font: 700 32px Georgia, serif;
    display: flex;
    align-items: center;
    text-decoration: none;
    letter-spacing: -1.5px
}

.brand svg {
    width: 27px;
    height: 30px;
    stroke: var(--accent);
    stroke-width: 1.5;
    fill: none;
    margin-right: 9px
}

.brand-dot {
    color: var(--accent-muted)
}

.main-nav {
    align-self: stretch;
    display: flex;
    align-items: stretch;
    gap: 30px;
    margin-left: 58px
}

.nav-tab {
    border-bottom: 2px solid transparent;
    font-size: 14px;
    color: var(--muted);
    padding: 0 3px
}

.nav-tab.active {
    border-color: var(--accent);
    color: var(--accent)
}

.top-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    color: var(--muted)
}

.status-dot {
    height: 6px;
    width: 6px;
    border-radius: 50%;
    background: #3889ff
}

.status-dot.offline {
    background: var(--accent-muted)
}

.avatar {
    margin-left: 20px;
    background: #222936;
    border: 1px solid #36445a;
    height: 34px;
    width: 34px;
    border-radius: 50%;
    font: 16px Georgia
}

.workspace {
    display: grid;
    grid-template-columns: 266px minmax(0, 1fr);
    min-height: calc(100dvh - 78px)
}

.sidebar {
    border-right: 1px solid var(--line);
    padding: 30px 24px 0;
    display: flex;
    flex-direction: column
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2.2px;
    color: var(--muted);
    font-weight: 600
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    gap: 19px
}

.sidebar-tabs button {
    font-size: 12px;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    color: var(--muted)
}

.sidebar-tabs button.active {
    color: var(--accent);
    border-color: var(--accent)
}

#mark-count {
    font-size: 10px;
    margin-left: 3px
}

.contents-list,
.marks-list {
    padding: 14px 0
}

.chapter-group {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    margin: 16px 0 7px
}

.release-link {
    width: 100%;
    text-align: left;
    padding: 11px 10px;
    margin: 2px 0;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    gap: 12px;
    align-items: center
}

.release-link .release-number {
    color: #9299a5;
    font: 12px Georgia
}

.release-link.active {
    background: #202d42;
    color: var(--accent)
}

.release-link.active .release-number {
    color: var(--accent)
}

.release-link .release-state {
    margin-left: auto;
    color: #85b5ff;
    font-size: 12px
}

.sidebar-bottom {
    margin-top: auto;
    padding: 24px 0
}

.plain-button {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    padding: 5px 0
}

.plain-button:hover {
    color: var(--accent)
}

.membership {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin-top: 18px
}

.membership-icon {
    font-size: 29px;
    color: var(--accent-muted)
}

.membership strong,
.membership small {
    display: block
}

.membership strong {
    font-weight: 500;
    font-size: 12px
}

.membership small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px
}

.reading-room {
    padding: 23px 48px 120px;
    min-width: 0;
    position: relative;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto
}

.reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 19px
}

.breadcrumb {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
    color: var(--muted)
}

.breadcrumb strong {
    font-weight: 500;
    color: var(--ink)
}

.reader-tools {
    display: flex;
    gap: 15px;
    align-items: center
}

.icon-button {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: 4px;
    flex-shrink: 0
}

.icon-button:hover,
.text-button:hover {
    background: #3889ff1a
}

.icon-button.selected {
    color: var(--accent-muted)
}

.text-button {
    font-family: Georgia;
    font-size: 20px;
    padding: 2px 8px
}

.folio {
    background: var(--paper);
    border: 1px solid #30343b;
    box-shadow: 0 5px 18px #00000022;
    padding: 25px 58px 0;
    max-width: 950px;
    margin: auto
}

.running-head {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    letter-spacing: 1.7px;
    color: #979fab;
    margin-bottom: 26px
}

.page-clip {
    height: calc(100dvh - 356px);
    min-height: 330px;
    max-height: 850px;
    overflow: hidden;
    position: relative
}

.book-flow {
    height: 100%;
    width: 100%;
    column-gap: 80px;
    column-fill: auto;
    font: var(--reader-size)/var(--reader-leading) Georgia, 'Times New Roman', serif;
    position: relative;
    transition: transform .18s ease;
    overflow-wrap: anywhere
}

.book-flow h1 {
    font: 36px/1.25 Georgia;
    letter-spacing: -.7px;
    margin: 10px 0 18px;
    color: var(--ink);
    max-width: 650px
}

.chapter-heading {
    break-inside: avoid;
    padding: 0 0 18px
}

.chapter-heading .chapter-kicker {
    font: 11px/1.5 'Segoe UI', sans-serif;
    letter-spacing: 2px;
    color: var(--accent-muted);
    display: block;
    margin: 3px 0 20px
}

.chapter-heading p {
    font: italic 15px/1.6 Georgia;
    color: var(--muted);
    margin: 0
}

.chapter-heading .ornament {
    display: block;
    font: 23px/1 Georgia;
    color: var(--accent-muted);
    margin: 27px 0 3px
}

.passage {
    position: relative;
    margin: 0 0 1.1em
}

.passage p {
    margin: 0;
    display: inline
}

.passage-actions {
    display: inline-flex;
    gap: 3px;
    margin-left: 5px;
    vertical-align: baseline;
    white-space: nowrap
}

.passage-button {
    font: 12px/1 'Segoe UI';
    color: #a2adbd;
    padding: 4px;
    border-radius: 2px
}

.passage-button:hover {
    background: #253c5f;
    color: var(--accent)
}

.author-note-marker {
    color: var(--accent-muted);
    font: 12px Georgia;
    vertical-align: super;
    padding: 0 4px
}

.book-flow .sentence {
    border-radius: 2px
}

.book-flow .sentence.spoken {
    background: #24487b;
    box-shadow: 0 0 0 3px #24487b
}

.illustration-row {
    display: flex;
    gap: 15px;
    break-inside: avoid;
    margin: 24px 0
}

.illustration-row figure {
    margin: 0;
    min-width: 0;
    flex: 1
}

.illustration {
    display: block;
    width: 100%;
    aspect-ratio: 2/1;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #1f242c;
    border: 1px solid #3c4655;
    cursor: zoom-in
}

.illustration-row figcaption {
    font: italic 12px/1.5 Georgia;
    color: var(--muted);
    text-align: center;
    margin-top: 8px
}

.release-stamp {
    font: 10px/1.5 'Segoe UI';
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 32px;
    break-inside: avoid
}

.page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #30343b;
    padding: 14px 0;
    margin-top: 23px;
    gap: 12px
}

.page-footer>span {
    font-size: 8px;
    letter-spacing: 1.2px;
    color: #979fab
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 16px
}

.page-controls span {
    font: 12px Georgia;
    color: var(--muted);
    min-width: 42px;
    text-align: center
}

.reader-under {
    max-width: 950px;
    margin: 17px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font: italic 12px Georgia;
    color: #a0a5ae
}

.tiny-star {
    color: var(--accent-muted);
    font: 18px Georgia;
    vertical-align: middle;
    margin-right: 6px
}

.audio-dock {
    position: fixed;
    bottom: 0;
    left: 266px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 22px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 20px 38px;
    z-index: 4;
    height: 91px
}

.audio-heading {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 185px
}

.headphone-icon {
    height: 40px;
    width: 40px;
    border: 1px solid #34445c;
    background: #202d42;
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-size: 23px;
    color: var(--accent)
}

.audio-heading strong,
.audio-heading small {
    display: block
}

.audio-heading strong {
    font-size: 12px;
    font-weight: 500
}

.audio-heading small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px
}

.playback {
    display: flex;
    align-items: center;
    gap: 10px
}

.playback>.icon-button {
    position: relative;
    font-size: 27px;
    color: var(--muted)
}

.playback small {
    font: 8px 'Segoe UI';
    position: absolute;
    bottom: 5px
}

.play-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    display: grid;
    place-items: center
}

.audio-track {
    flex: 1;
    min-width: 80px;
    max-width: 400px
}

.audio-track input {
    width: 100%;
    accent-color: var(--accent);
    height: 3px;
    display: block;
    margin: 8px 0 9px
}

.audio-track>div {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--muted)
}

#audio-speed {
    background: none;
    border: 0;
    font-size: 12px;
    color: var(--muted);
    max-width: 65px
}

.follow-button {
    white-space: nowrap;
    font-size: 11px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted)
}

.follow-button.selected {
    background: #202d42;
    color: var(--accent);
    border-color: #344c6e
}

.mobile-menu {
    display: none
}

.protected-content {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none
}

.protected-content img {
    -webkit-user-drag: none
}

.empty-state {
    padding: 45px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 15px
}

.empty-state h2 {
    font: 28px Georgia;
    color: var(--ink)
}

.locked-state {
    padding: 45px 15px
}

.locked-state h1 {
    font: 35px Georgia
}

.locked-state p {
    font: 16px/1.7 'Segoe UI'
}

.primary,
.secondary,
.danger {
    padding: 10px 17px;
    border-radius: 4px;
    font-size: 13px
}

.primary {
    background: var(--accent);
    color: #fff
}

.secondary {
    border: 1px solid #3b424e;
    background: var(--paper)
}

.danger {
    color: #ff777e;
    border: 1px solid #733c42
}

.button-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 22px
}

.muted {
    color: var(--muted)
}

.small {
    font-size: 12px
}

.field {
    display: block;
    margin: 16px 0
}

.field>span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 7px
}

.field input,
.field select,
.field textarea,
.studio input[type=text],
.studio textarea,
.studio select {
    width: 100%;
    padding: 10px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink)
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6
}

.field input[type=checkbox] {
    width: auto;
    margin-right: 8px
}

.field input[type=range] {
    padding: 0;
    accent-color: var(--accent)
}

.check-row {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--muted)
}

dialog {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    padding: 26px;
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: 85dvh;
    box-shadow: 0 20px 90px #00000088
}

dialog::backdrop {
    background: #000000aa;
    backdrop-filter: blur(3px)
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 14px
}

.dialog-header h2 {
    font: 26px Georgia;
    margin: 0
}

.dialog-header button {
    font-size: 27px
}

.dialog-quote {
    font: italic 18px/1.7 Georgia;
    border-left: 2px solid var(--accent-muted);
    padding-left: 18px;
    color: var(--muted)
}

.author-note-body {
    font: 18px/1.8 Georgia;
    white-space: pre-wrap
}

.dialog-meta {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-muted);
    margin-bottom: 20px
}

.toast {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 13px 20px;
    border-radius: 5px;
    box-shadow: 0 5px 20px #0002;
    max-width: 90vw;
    z-index: 30;
    font-size: 13px
}

.mark-card {
    border-bottom: 1px solid var(--line);
    padding: 12px 0
}

.mark-card button {
    text-align: left;
    width: 100%;
    padding: 0
}

.mark-card strong {
    font: 14px Georgia;
    display: block;
    margin-bottom: 5px
}

.mark-card p {
    font: 12px/1.5 Georgia;
    color: var(--muted);
    margin: 5px 0
}

.mark-card small {
    font-size: 10px;
    color: var(--accent-muted)
}

.mark-card .mark-actions {
    display: flex;
    gap: 15px;
    margin-top: 8px
}

.mark-actions button {
    font-size: 10px;
    color: var(--muted);
    width: auto
}

.download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--line);
    padding: 16px 0
}

.download-row strong {
    display: block;
    font: 16px Georgia
}

.download-row small {
    font-size: 11px;
    color: var(--muted)
}

.download-row button {
    font-size: 12px
}

.lightbox {
    max-width: 1100px;
    width: 90vw
}

.lightbox-image {
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    cursor: zoom-in
}

.lightbox-image.zoomed {
    max-height: none;
    width: 150%;
    max-width: none;
    cursor: zoom-out
}

.studio {
    max-width: 1500px;
    margin: 0 auto;
    padding: 35px 45px
}

.studio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px
}

.studio-header h1 {
    font: 34px Georgia;
    margin: 5px 0
}

.studio-header p {
    color: var(--muted);
    margin: 5px 0
}

.studio-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 35px
}

.studio-nav {
    border-right: 1px solid var(--line);
    padding-right: 22px
}

.studio-release {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 10px;
    border-radius: 4px;
    margin-bottom: 5px
}

.studio-release.active {
    background: #202d42
}

.studio-release strong {
    display: block;
    font: 16px Georgia
}

.studio-release small {
    font-size: 10px;
    color: var(--muted);
    display: block;
    margin-top: 5px
}

.studio-tabs {
    display: flex;
    gap: 25px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px
}

.studio-tabs button {
    padding: 12px 0;
    font-size: 13px;
    border-bottom: 2px solid transparent
}

.studio-tabs button.active {
    border-color: var(--accent)
}

.editor-heading {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px
}

.editor-heading .field {
    margin: 0 0 15px
}

.image-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0
}

.studio-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 24px 0;
    flex-wrap: wrap
}

.studio-actions>div {
    display: flex;
    gap: 10px
}

.notice {
    padding: 13px 16px;
    border-left: 2px solid var(--accent-muted);
    background: #3889ff0c;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
    margin: 15px 0
}

.audio-upload {
    padding: 22px;
    border: 1px dashed #485365;
    background: var(--paper);
    border-radius: 5px
}

.audio-upload label {
    font-size: 13px
}

.audio-upload input {
    margin: 15px 0;
    max-width: 100%
}

.studio audio {
    width: 100%;
    margin: 15px 0
}

.timing-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 190px;
    gap: 15px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 4px;
    padding: 18px;
    margin-bottom: 12px
}

.timing-number {
    font: 13px Georgia;
    color: var(--accent-muted)
}

.timing-book {
    font: 17px/1.7 Georgia;
    margin: 0 0 10px
}

.timing-transcript {
    font: 12px/1.6 'Segoe UI';
    color: var(--muted);
    margin: 0
}

.timing-controls {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 8px
}

.timing-controls label {
    font-size: 10px;
    color: var(--muted);
    width: calc(50% - 4px)
}

.timing-controls input[type=number] {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 7px;
    color: var(--ink);
    font-size: 12px;
    margin-top: 4px
}

.timing-controls .check-row {
    width: 100%;
    font-size: 11px
}

.timing-controls button {
    font-size: 11px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 3px
}

.timing-row.reviewed {
    border-left: 3px solid #3889ff
}

.timing-row.uncertain {
    border-left: 3px solid var(--accent-muted)
}

.studio-preview {
    font: 19px/1.9 Georgia;
    max-width: 750px;
    margin: auto;
    background: var(--paper);
    padding: 35px
}

.studio-preview h1 {
    font: 32px/1.3 Georgia
}

.studio-preview img {
    width: 100%
}

.studio-preview aside {
    font: 14px/1.7 'Segoe UI';
    padding: 15px;
    border-left: 2px solid var(--accent-muted);
    background: var(--bg)
}

.release-date {
    font-size: 10px;
    color: var(--accent-muted)
}

@media(min-width:1550px) {
    .reading-room {
        padding-top: 35px
    }

    .page-clip {
        height: calc(100dvh - 385px)
    }

    .folio {
        padding-left: 80px;
        padding-right: 80px
    }

    .book-flow h1 {
        font-size: 43px
    }
}

@media(max-width:1100px) {
    .reading-room {
        padding-left: 25px;
        padding-right: 25px
    }

    .folio {
        padding-left: 32px;
        padding-right: 32px
    }

    .audio-dock {
        padding: 15px 22px;
        gap: 12px
    }

    .audio-heading {
        min-width: 0
    }

    .audio-heading small {
        display: none
    }

    .audio-heading strong {
        max-width: 100px
    }

    .headphone-icon {
        display: none
    }

    .topbar {
        padding: 0 25px
    }

    .main-nav {
        margin-left: 35px
    }

    .audio-track {
        min-width: 60px
    }
}

@media(max-width:800px) {
    .workspace {
        grid-template-columns: 210px minmax(0, 1fr)
    }

    .sidebar {
        padding: 23px 15px 0
    }

    .audio-dock {
        left: 210px
    }

    .audio-heading {
        display: none
    }

    .folio {
        padding: 20px 24px 0
    }

    .book-flow h1 {
        font-size: 29px
    }

    .book-flow {
        font-size: 18px
    }

    .reader-under>span {
        display: none
    }

    .reader-under {
        justify-content: end
    }

    .page-footer>span:last-child {
        display: none
    }

    .main-nav {
        margin-left: 0;
        gap: 18px
    }

    .topbar {
        gap: 25px
    }

    .studio {
        padding: 25px
    }

    .studio-layout {
        grid-template-columns: 170px minmax(0, 1fr);
        gap: 20px
    }

    .timing-row {
        grid-template-columns: 20px 1fr
    }

    .timing-controls {
        grid-column: 2
    }

    .timing-controls label {
        width: 75px
    }

    .timing-controls .check-row {
        width: auto
    }
}

@media(max-width:720px) {
    .topbar {
        height: 64px;
        padding: 0 15px;
        gap: 12px
    }

    .brand {
        font-size: 27px
    }

    .brand svg {
        width: 22px
    }

    .main-nav {
        margin-left: auto;
        gap: 15px
    }

    .nav-tab {
        font-size: 11px
    }

    .top-status>span {
        display: none
    }

    .avatar {
        margin-left: 0;
        width: 29px;
        height: 29px
    }

    .top-status {
        margin-left: 0
    }

    .mobile-menu {
        display: inline-flex;
        width: 24px;
        font-size: 18px
    }

    .workspace {
        display: block;
        min-height: calc(100dvh - 64px)
    }

    .sidebar {
        display: none;
        position: fixed;
        left: 0;
        top: 64px;
        bottom: 0;
        width: 260px;
        background: var(--bg);
        z-index: 8;
        box-shadow: 15px 0 35px #00000088;
        overflow: auto
    }

    .sidebar.open {
        display: flex
    }

    .reading-room {
        padding: 15px 12px 100px
    }

    .reader-toolbar {
        margin-bottom: 12px
    }

    .breadcrumb {
        font-size: 11px;
        gap: 7px
    }

    .reader-tools {
        gap: 5px
    }

    .folio {
        padding: 20px 20px 0
    }

    .running-head {
        font-size: 8px;
        letter-spacing: 1px;
        margin-bottom: 20px
    }

    .page-clip {
        height: calc(100dvh - 305px);
        min-height: 260px
    }

    .book-flow {
        font-size: var(--reader-size);
        line-height: var(--reader-leading)
    }

    .book-flow h1 {
        font-size: 30px
    }

    .chapter-heading .chapter-kicker {
        margin: 0 0 14px;
        font-size: 10px
    }

    .chapter-heading .ornament {
        margin-top: 18px
    }

    .page-footer {
        padding: 8px 0;
        margin-top: 15px
    }

    .page-footer>span {
        font-size: 7px;
        max-width: 85px
    }

    .page-controls {
        gap: 9px
    }

    .reader-under {
        margin-top: 9px
    }

    .audio-dock {
        left: 0;
        gap: 10px;
        padding: 12px 15px;
        height: 80px
    }

    .playback {
        gap: 3px
    }

    .play-button {
        width: 35px;
        height: 35px
    }

    .playback>.icon-button {
        width: 24px
    }

    .follow-button {
        font-size: 10px;
        padding: 7px
    }

    #audio-speed {
        font-size: 11px;
        width: 46px
    }

    .audio-track {
        min-width: 45px
    }

    .illustration-row {
        flex-direction: column
    }

    .illustration {
        aspect-ratio: 2.2
    }

    .studio {
        padding: 20px 15px
    }

    .studio-header {
        align-items: start;
        gap: 12px
    }

    .studio-header h1 {
        font-size: 28px
    }

    .studio-header p {
        font-size: 12px
    }

    .studio-layout {
        display: block
    }

    .studio-nav {
        display: flex;
        overflow: auto;
        border: 0;
        border-bottom: 1px solid var(--line);
        padding: 0 0 10px;
        margin-bottom: 20px
    }

    .studio-release {
        min-width: 160px
    }

    .studio-release strong {
        font-size: 14px
    }

    .editor-heading {
        display: block
    }

    .timing-row {
        padding: 12px;
        gap: 8px
    }

    .studio-actions .button-row {
        margin: 0
    }

    .dialog-header h2 {
        font-size: 23px
    }

    .image-fields {
        grid-template-columns: 1fr
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important
    }
}

@media print {

    .protected-content,
    .sidebar,
    .audio-dock,
    .studio {
        display: none !important
    }

    body:after {
        content: 'This book is available in the Margin reader. Printing book content is disabled.';
        display: block;
        padding: 40px
    }
}

.reading-room {
    height: calc(100dvh - 78px);
    min-height: 610px;
    display: flex;
    flex-direction: column;
    padding-bottom: 112px
}

.reader-toolbar,
.reader-under {
    flex-shrink: 0
}

.folio {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%
}

.running-head,
.page-footer {
    flex-shrink: 0
}

.page-clip {
    height: auto;
    min-height: 0;
    max-height: none;
    flex: 1
}

.sidebar {
    max-height: calc(100dvh - 78px);
    overflow-y: auto
}

.reader-under {
    width: 100%
}

.book-flow .illustration {
    max-height: 250px
}

.book-flow .illustration-row {
    max-height: 100%
}

.scene-break {
    display: flex;
    align-items: center;
    gap: 14px;
    break-inside: avoid;
    margin: 1.65em auto;
    color: var(--accent-muted);
    font: 13px/1 Georgia, serif;
    text-align: center
}

.scene-break::before,
.scene-break::after {
    content: "";
    height: 1px;
    background: #607086;
    flex: 1
}

.studio-preview .scene-break {
    max-width: 420px
}

.author-html-content {
    min-width: 0;
    overflow-wrap: anywhere
}

.author-html-content hr {
    height: 1px;
    margin: 1.65em 0;
    border: 0;
    background: #607086
}

.book-flow .author-html-content.spoken {
    background: #24487b;
    box-shadow: 0 0 0 3px #24487b;
    border-radius: 2px
}

.html-passage {
    break-inside: auto
}

.html-passage>.passage-actions {
    margin-top: .35em
}

.authored-content {
    min-width: 0
}

.authored-content>:first-child {
    margin-top: 0
}

.authored-content p {
    margin: 0 0 1.1em
}

.authored-content h2,
.authored-content h3,
.authored-content h4 {
    break-after: avoid;
    font-family: Georgia, serif
}

.authored-content h2 {
    font-size: 1.55em
}

.authored-content h3 {
    font-size: 1.3em
}

.authored-content blockquote {
    margin: 1.35em 0;
    padding-left: 1em;
    border-left: 2px solid var(--accent-muted);
    color: var(--muted)
}

.authored-content hr {
    height: 1px;
    margin: 1.7em 0;
    border: 0;
    background: #607086
}

.authored-content ul,
.authored-content ol {
    margin: 1em 0;
    padding-left: 1.7em
}

.authored-content table {
    width: 100%;
    margin: 1.35em 0;
    border-collapse: collapse;
    break-inside: avoid;
    font: 14px/1.5 'Segoe UI', sans-serif
}

.authored-content th,
.authored-content td {
    padding: 7px 9px;
    border: 1px solid var(--line);
    text-align: left
}

.authored-content th {
    background: #202733
}

.authored-content figure[data-sc-asset] {
    margin: 1.4em 0;
    break-inside: avoid;
    text-align: center
}

.authored-content figure[data-sc-asset] img {
    display: block;
    max-width: 100%;
    max-height: 360px;
    margin: auto;
    object-fit: contain;
    cursor: zoom-in
}

.authored-content figcaption {
    margin-top: 8px;
    color: var(--muted);
    font: italic 12px/1.5 Georgia, serif
}

.authored-block {
    position: relative
}

.authored-block>.passage-actions {
    display: inline-flex
}

.authored-content .sentence.spoken {
    background: #24487b;
    box-shadow: 0 0 0 3px #24487b;
    border-radius: 2px
}

.studio-preview .authored-content {
    font: 19px/1.9 Georgia, serif
}

.book-flow {
    transition: none
}

.release-details {
    border-bottom: 1px solid var(--line);
    padding: 0 0 17px;
    margin-bottom: 18px
}

.release-details>summary {
    cursor: pointer;
    color: var(--ink);
    font-size: 13px
}

.release-details>summary>span {
    color: var(--muted);
    margin-left: 15px;
    font-size: 12px
}

.release-details[open] .editor-heading {
    margin-top: 20px
}

.manuscript-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg);
    padding: 12px 0;
    z-index: 3;
    margin-bottom: 12px
}

.manuscript-toolbar>div {
    display: flex;
    gap: 9px;
    align-items: center;
    flex-wrap: wrap
}

.manuscript-toolbar .small {
    margin-right: 8px;
    font-size: 11px
}

.manuscript-sheet {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 48px 54px;
    min-height: 65vh;
    max-width: 1050px
}

.manuscript-sheet>h2 {
    font: 30px/1.35 Georgia;
    margin: 0 0 32px;
    color: var(--ink)
}

.manuscript {
    font: 20px/1.85 Georgia, serif;
    min-height: 45vh;
    outline: none;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    caret-color: var(--accent)
}

.manuscript:focus-visible {
    outline: none
}

.manuscript:empty:before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none
}

.manuscript p,
.manuscript>div {
    margin: 0 0 1em;
    padding: 0;
    border: 0;
    background: none
}

.manuscript ::selection {
    background: #2864b3;
    color: #fff
}

.manuscript .annotated-passage {
    text-decoration: underline;
    text-decoration-color: #85b5ff70;
    text-decoration-style: dotted;
    text-underline-offset: 5px
}

.manuscript-help {
    font-size: 12px;
    color: var(--muted);
    margin: 16px 0 30px
}

.primary,
.play-button,
.toast {
    background: #2773dc;
    color: #fff
}

.primary:hover,
.play-button:hover {
    background: #3483ef
}

.danger:hover {
    background: #ff777e18
}

.notice {
    border-color: var(--accent)
}

.timing-row.uncertain {
    border-color: #b85560
}

.manuscript a {
    color: inherit;
    text-decoration: none
}

.studio-body {
    min-width: 0
}

@media(max-width:1100px) {
    .manuscript-sheet {
        padding: 32px
    }

    .manuscript-toolbar {
        align-items: start;
        flex-wrap: wrap
    }

    .manuscript-toolbar #save-status {
        display: none
    }
}

@media(max-width:620px) {
    .manuscript-sheet {
        padding: 23px 19px
    }

    .manuscript-sheet>h2 {
        font-size: 25px;
        margin-bottom: 24px
    }

    .manuscript {
        font-size: 18px
    }

    .manuscript-toolbar {
        position: static;
        gap: 10px
    }

    .manuscript-toolbar button {
        font-size: 12px;
        padding: 8px 10px
    }

    .release-details>summary>span {
        display: block;
        margin: 6px 0 0
    }
}

@media(max-width:620px) {
    .reading-room {
        height: calc(100dvh - 64px);
        min-height: 560px;
        padding-bottom: 94px
    }

    .sidebar {
        max-height: calc(100dvh - 64px)
    }

    .book-flow .illustration {
        max-height: 180px
    }
}

.release-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 28px;
    margin-bottom: 24px;
    max-width: 950px
}

.release-panel h2 {
    font: 26px Georgia;
    margin: 0 0 12px
}

.release-panel input[type=datetime-local] {
    max-width: 340px
}

.release-panel textarea {
    min-height: 200px;
    resize: vertical
}

.post-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px
}

.post-images figure {
    margin: 0;
    min-width: 0;
    padding: 14px;
    background: var(--bg);
    border-radius: 4px
}

.post-images img {
    width: 100%;
    height: 160px;
    object-fit: contain
}

.post-images .button-row {
    flex-wrap: wrap
}

.post-images a {
    text-decoration: none;
    font-size: 12px
}

.studio-tabs {
    flex-wrap: wrap
}

#stop-audio {
    font-size: 18px
}

#stop-audio:hover {
    color: #ff777e
}

@media(max-width:620px) {
    .release-panel {
        padding: 18px
    }

    .studio-tabs button {
        padding: 10px 8px;
        font-size: 12px
    }
}