/* Saved film original: the ticketing paper palette with a fixed reading face. */
@font-face {
    font-family: "LoveMiCinemaStorySongke";
    src: url("assets/ShanHaiJiGuJiangNanSongKeW-2.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.cinema-story-reader, .cinema-story-reader * { box-sizing: border-box; }
.cinema-story-reader {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 14px clamp(12px, 4%, 24px) 8px;
    border: 1px solid var(--tk-line-soft, rgba(232, 196, 208, .55));
    border-radius: 18px;
    color: var(--tk-text-major, #6b4754);
    background: var(--tk-bg-paper, #fffdfa);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    contain: layout style;
}
.csr-heading { display: flex; flex: 0 0 20px; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; overflow: hidden; }
.csr-title { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; font-size: 12px; font-weight: 600; line-height: 20px; }
.csr-caption { flex-shrink: 0; color: var(--tk-text-body, #815c69); font-size: 10px; line-height: 20px; }
.csr-viewport { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; contain: layout style; }
.csr-page, .csr-measure {
    margin: 0;
    padding: 2px 1px 3px;
    font-family: "LoveMiCinemaStorySongke", "Songti SC", "SimSun", serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    font-synthesis: none;
    line-height: 1.85;
    letter-spacing: .015em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
    text-align: left;
    text-indent: 0;
    tab-size: 4;
}
.csr-page { position: absolute; inset: 0; overflow: hidden; }
.csr-measure { position: absolute; top: 0; right: 0; left: 0; height: auto; visibility: hidden; pointer-events: none; overflow: visible; }
.csr-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; color: var(--tk-text-body, #815c69); font-size: 12px; line-height: 1.8; text-align: center; }
.csr-page[hidden], .csr-status[hidden] { display: none; }
.csr-controls { display: grid; flex: 0 0 44px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; min-height: 44px; }
.csr-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; height: 44px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 12px; background: transparent; color: inherit; font: inherit; font-size: 11px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.csr-controls button:first-child { justify-self: start; }
.csr-controls button:last-child { justify-self: end; }
.csr-controls button [aria-hidden] { font-size: 22px; line-height: 1; }
.csr-controls button:disabled { color: var(--tk-text-faint, #c4a3af); cursor: default; }
.csr-controls button:not(:disabled):active { background: var(--tk-bg-soft, #fff1f2); }
.csr-page-number { min-width: 42px; color: var(--tk-text-body, #815c69); font-size: 10px; line-height: 1.4; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cinema-story-reader:focus { outline: none; }
.cinema-story-reader:focus-visible, .csr-controls button:focus-visible { outline: 2px solid var(--tk-accent-rose, #ea628b); outline-offset: -3px; }
.cinema-story-reader.is-short { gap: 4px; padding-top: 8px; padding-bottom: 4px; border-radius: 12px; }
.cinema-story-reader.is-short .csr-heading { display: none; }
html[data-appearance="dark"] .cinema-story-reader { color: rgba(245, 232, 239, .92); background: #29232c; border-color: rgba(255, 214, 228, .14); }
html[data-appearance="dark"] .csr-caption,
html[data-appearance="dark"] .csr-status,
html[data-appearance="dark"] .csr-page-number { color: #c6aebb; }
html[data-appearance="dark"] .csr-controls button:disabled { color: #766572; }
html[data-appearance="dark"] .csr-controls button:not(:disabled):active { background: #3c303d; }
@media (hover: hover) and (pointer: fine) { .csr-controls button:not(:disabled):hover { background: rgba(232, 196, 208, .14); } }
