html body main article.audiobook { padding: 8rem 0 2rem; }
@media (max-width: 750px) { html body main article.audiobook { padding-top: 10rem; } }
.audiobook { --ab-gold: #f0c779; --ab-muted: #c9bca9; color: #f4eee4; background: radial-gradient(ellipse at 15% 15%, #40302455, transparent 50%); }
.audiobook *, .audiobook *::before, .audiobook *::after { box-sizing: border-box; }
.audiobook [hidden] { display: none !important; }
.audiobook .ab-experience { width: calc(100% - 3rem); max-width: 480px; padding: 1.5rem 1.75rem; border: 1px solid #bd8b4340; border-radius: 1rem; background: linear-gradient(145deg, #302b2544, #17161377); }
.ab-artwork { width: 240px; max-width: 100%; margin: 0 auto 2rem; }
.ab-artwork img { display: block; width: 100%; border-radius: .4rem; box-shadow: 0 .7rem 1.5rem #0006; }
.audiobook .ab-player h2 { text-align: center; font-size: 1.05rem; font-weight: 500; margin: 0 0 .65rem; }
.audiobook .ab-status { text-align: center; font-size: .78rem; color: var(--ab-muted); margin: 0 0 1rem; }
.audiobook input[type=range], .audiobook input[type=checkbox] { accent-color: var(--ab-gold); }
.ab-seek { width: 100%; height: 1rem; margin: .75rem 0 .4rem; }
.ab-time { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; font-size: .75rem; color: var(--ab-muted); font-variant-numeric: tabular-nums; }
.ab-time > :last-child { text-align: right; }
.ab-time > :nth-child(2) { font-size: .7rem; }
.ab-transport { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin: 1.5rem 0 1.2rem; }
.ab-transport button { position: relative; display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; color: #e3d4bd; border-radius: 50%; }
.ab-transport button:hover:enabled { background-color: #f0c77912; }
.ab-transport svg { width: 1.35rem; height: 1.35rem; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ab-transport .ab-skip { width: 3rem; height: 3rem; }
.ab-skip svg { width: 2.5rem; height: 2.5rem; fill: none; stroke-width: 1.6; }
.ab-skip span { position: absolute; font-size: .75rem; font-weight: 700; }
.ab-transport .ab-play { width: 3.5rem; height: 3.5rem; font-size: 1.25rem; background: linear-gradient(145deg, #f4d697, #b88842); color: #211a12; box-shadow: 0 .2rem .7rem #0006; }
.audiobook button:disabled { opacity: .4; }
.ab-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.ab-actions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: #f4eee4; min-height: 4.5rem; border-radius: .5rem; }
.ab-actions button:hover:enabled { background: #f0c7790b; }
.ab-actions strong { font-size: 1.3rem; line-height: 1.3; color: var(--ab-gold); }
.ab-actions svg { width: 1.7rem; height: 1.7rem; fill: none; stroke: var(--ab-gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ab-actions span { font-size: .7rem; font-weight: 500; line-height: 1.4; }
.ab-secondary-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-top: 1rem; border-top: 1px solid #f0c77915; }
.ab-more-controls { flex: 1 1 8rem; }
.ab-more-controls summary, .ab-secondary-controls > button { color: var(--ab-muted); font-size: .7rem; padding: .9rem 0; min-height: 2.75rem; }
.ab-more-controls summary { cursor: pointer; }
.ab-settings { display: flex; flex-wrap: wrap; gap: .8rem; padding: .5rem 1rem .5rem 0; }
.ab-settings label { display: flex; flex-direction: column; gap: .4rem; font-size: .7rem; color: var(--ab-muted); min-width: 0; flex: 1 1 5rem; }
.ab-settings select, .ab-dialog select { border: 1px solid #8e775355; border-radius: .35rem; color: #f4eee4; background: #24211c; padding: .6rem; min-height: 2.75rem; width: 100%; }
.ab-settings input[type=range] { width: 100%; min-height: 2.75rem; }
.ab-continuous { color: var(--ab-muted); font-size: .75rem; min-height: 2.75rem; display: flex; align-items: center; gap: .5rem; }
.ab-more-controls > button { color: var(--ab-gold); font-size: .75rem; padding: .75rem 0; }
.audiobook .ab-listening-note { margin: .5rem 0 1rem; color: var(--ab-muted); font-size: .7rem; line-height: 1.6; }
.ab-visual { padding: .5rem 0; }
.ab-visual canvas { display: block; width: 100%; height: 75px; }
.ab-visual span { display: block; font-size: .7rem; color: var(--ab-muted); line-height: 1.5; }
.ab-dialog { width: min(440px, calc(100% - 2rem)); max-height: 85dvh; padding: 2.75rem 1.75rem 1.5rem; color: #f4eee4; background: #25221d; border: 1px solid #9d7139; border-radius: 1rem; box-shadow: 0 1rem 3rem #0009; }
.ab-dialog::backdrop { background: #080807b8; backdrop-filter: blur(3px); }
html:has(.ab-dialog[open]) { overflow-y: hidden; }
.audiobook .ab-dialog h2 { font-size: 1.05rem; text-align: center; margin: 0 0 1.5rem; }
.ab-dialog-close { position: absolute; top: .4rem; right: .6rem; font-size: 2rem; color: #f4eee4; width: 2.75rem; height: 2.75rem; }
.audiobook input[type=search] { width: 100%; background: #17161366; color: #f4eee4; border: 1px solid #8e775355; padding: .7rem .8rem; border-radius: .4rem; font-size: .85rem; }
.audiobook input::placeholder { color: #b5a794; }
.audiobook .ab-track-list, .audiobook .ab-bookmark-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.audiobook .ab-track-list li, .audiobook .ab-bookmark-list li { margin: 0; border-bottom: 1px solid #f0c77920; }
.ab-track { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: center; width: 100%; min-height: 3rem; text-align: left; padding: .8rem .25rem; color: #e3d8c7; font-size: .9rem; }
.ab-track:hover { background: #f0c7790a; }
.ab-track[aria-current=true] { color: var(--ab-gold); font-weight: 700; }
.ab-track-state { color: var(--ab-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.ab-dialog-footer { display: flex; justify-content: space-between; gap: 1rem; margin: 1.25rem 0 0; color: var(--ab-muted); font-size: .7rem; }
.ab-dialog-footer a { color: var(--ab-gold); text-decoration: none; }
.audiobook .ab-dialog p { font-size: .85rem; color: var(--ab-muted); }
.ab-bookmark-list li { display: flex; align-items: center; gap: .5rem; }
.ab-bookmark-list .ab-track { flex: 1; }
.ab-bookmark-delete { color: var(--ab-muted); width: 2.75rem; min-height: 2.75rem; font-size: 1.5rem; flex-shrink: 0; }
.audiobook .ab-retry { color: var(--ab-gold); padding: .75rem; }
.audiobook :focus-visible { outline: 2px solid var(--ab-gold); outline-offset: 4px; }
.ab-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.audiobook .ab-preview-link { color: var(--ab-gold); font-size: .8rem; margin: 1.5rem; text-decoration: none; text-align: center; line-height: 1.5; }
.audiobook .ab-preview-link:hover { text-decoration: underline; }
@media (max-width: 600px) { .audiobook .ab-experience { padding: 1rem .75rem; width: calc(100% - 2rem); border: 0; background: none; } .ab-artwork { width: 220px; margin-bottom: 1.75rem; } }
@media (max-width: 350px) { .ab-transport { gap: .2rem; } .ab-transport button { min-width: 2.25rem; min-height: 2.5rem; } .ab-actions span { font-size: .65rem; } .ab-dialog { padding-left: 1rem; padding-right: 1rem; } }

.ab-dialog { overflow: hidden; }
.audiobook .ab-track-list { max-height: calc(85dvh - 13rem); overflow-y: auto; scrollbar-color: #9d7139 #25221d; }
.audiobook .ab-bookmark-list { max-height: calc(85dvh - 9rem); overflow-y: auto; scrollbar-color: #9d7139 #25221d; }
/* Center the shapes optically, independently of text glyph baselines. */
.ab-transport .ab-play svg { width: 1.6rem; height: 1.6rem; stroke: none; display: block; }
.ab-skip span { left: 50%; top: 50%; transform: translate(-50%, -50%) translate(1px, 2px); line-height: 1; }
.ab-bookmarks-link { display: block; margin: .35rem auto 0; padding: .65rem 1rem; color: var(--ab-gold); font-size: .75rem; min-height: 2.75rem; }
.ab-speed-list { max-height: calc(85dvh - 7rem); overflow-y: auto; scrollbar-color: #9d7139 #25221d; }
.ab-speed-option { display: flex; align-items: center; gap: 1rem; padding: .9rem .8rem; min-height: 3rem; border-bottom: 1px solid #f0c77925; font-size: .9rem; }
.ab-speed-option:has(input:checked) { color: var(--ab-gold); background: #f0c77908; }
.ab-speed-option input { width: 1.15rem; height: 1.15rem; accent-color: var(--ab-gold); margin: 0; flex-shrink: 0; }
.ab-bookmarks-sheet { position: fixed; inset: auto 0 0; margin: 0 auto; width: min(600px, 100%); max-height: 65dvh; padding: 2.5rem 1rem 1.25rem; border-radius: 1rem 1rem 0 0; }
.ab-sheet-handle { position: absolute; top: .6rem; left: 50%; transform: translateX(-50%); width: 2rem; height: .2rem; border-radius: 2rem; background: #f0c77966; }
.audiobook .ab-bookmarks-sheet h2 { margin-bottom: 1rem; }
.audiobook .ab-bookmarks-sheet .ab-bookmark-list { max-height: calc(65dvh - 6rem); margin: 0; padding: .1rem; }
.audiobook .ab-bookmark-list .ab-bookmark-card { display: grid; grid-template-columns: 1fr auto; gap: .6rem 1rem; position: relative; padding: 1rem; margin: 0 0 .75rem; border: 1px solid #bd8b4377; border-radius: .85rem; }
.ab-bookmark-date { grid-column: 1; font-size: .65rem; font-weight: 700; color: var(--ab-muted); text-transform: uppercase; }
.audiobook .ab-bookmark-card h3 { grid-column: 1; font-size: .95rem; font-weight: 500; margin: 0; }
.ab-bookmark-position { grid-column: 1; font-size: .8rem; color: var(--ab-muted); font-variant-numeric: tabular-nums; }
.ab-bookmark-start { grid-column: 2; grid-row: 3; border-radius: 2rem; padding: .6rem .8rem; color: #211a12; background: var(--ab-gold); font-size: .7rem; font-weight: 700; min-height: 2.75rem; align-self: center; }
.ab-bookmark-delete { grid-column: 2; grid-row: 1 / 3; align-self: start; justify-self: end; }
@media (max-width: 350px) { .ab-bookmark-card { gap: .5rem; } .ab-bookmark-start { grid-column: 1 / -1; grid-row: 4; justify-self: end; } }
.ab-speed-option input { appearance: none; border: 2px solid var(--ab-muted); border-radius: 50%; background: transparent; }
.ab-speed-option input:checked { border-color: var(--ab-gold); background: var(--ab-gold); box-shadow: inset 0 0 0 4px #25221d; }
.ab-bookmarks-sheet { max-width: 100%; }
