.tn-playlist { --tn-ink: #27231f; --tn-muted: #726a61; --tn-accent: #77452c; max-width: 860px; margin: auto; padding: 24px 20px 180px; color: var(--tn-ink); font-family: system-ui, sans-serif; }
.tn-playlist-identity { display: grid; gap: 24px; }
.tn-playlist-cover { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; box-shadow: 0 12px 36px #27231f1f; margin: auto; }
.tn-artwork-placeholder { display: grid; place-items: center; background: #eee6dc; font-size: 72px; }
.tn-playlist h1 { font-family: Georgia, serif; font-size: clamp(30px, 6vw, 48px); line-height: 1.08; margin: 10px 0; overflow-wrap: anywhere; }
.tn-playlist-eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--tn-muted); }
.tn-playlist-curator { color: var(--tn-accent); font-size: 18px; }
.tn-playlist-actions { display: flex; gap: 12px; margin-top: 22px; }
.tn-playlist button, .tn-persistent-player button { min-height: 44px; min-width: 44px; cursor: pointer; font: inherit; border: 0; border-radius: 8px; }
.tn-playlist-actions button { flex: 1; padding: 12px 20px; background: #eee6dc; color: var(--tn-accent); font-weight: 650; }
.tn-playlist button:focus-visible, .tn-persistent-player button:focus-visible, .tn-playlist summary:focus-visible { outline: 3px solid #77452c; outline-offset: 3px; }
.tn-playlist button:disabled, .tn-persistent-player button:disabled { opacity: .5; cursor: default; }
.tn-playlist-description { white-space: pre-wrap; line-height: 1.65; margin: 28px 0; }
.tn-track-list { list-style: none; margin: 0; padding: 0; }
.tn-track-list li { border-top: 1px solid #27231f15; }
.tn-track-list .is-current { background: #eee6dc80; border-radius: 8px; }
.tn-track-select { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 8px; background: transparent; color: inherit; }
.tn-track-number { flex: 0 0 20px; text-align: center; color: var(--tn-muted); font-size: 13px; }
.tn-track-select img, .tn-track-art { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.tn-track-art { display: grid; place-items: center; background: #eee6dc; }
.tn-track-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.tn-track-copy strong { overflow-wrap: anywhere; font-weight: 600; }
.tn-track-copy > span { font-size: 13px; color: var(--tn-muted); }
.tn-track-duration { font-size: 12px; color: var(--tn-muted); font-variant-numeric: tabular-nums; }
.tn-track-details { margin: 0 8px 8px 44px; font-size: 12px; color: var(--tn-muted); overflow-wrap: anywhere; }
.tn-track-details summary { padding: 6px; width: fit-content; min-height: 32px; cursor: pointer; }
.tn-persistent-player { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; padding: 12px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: #fcf8f2f5; backdrop-filter: blur(18px); border-top: 1px solid #27231f25; color: #27231f; font-family: system-ui, sans-serif; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; }
.tn-player-track { display: grid; gap: 3px; align-content: center; min-width: 0; }
.tn-player-identity { display: flex; gap: 12px; align-items: center; min-width: 0; }
.tn-player-identity img { width: 44px; height: 44px; object-fit: cover; flex-shrink: 0; border-radius: 6px; }
.tn-player-track strong, .tn-player-track span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-player-track span { font-size: 12px; color: #726a61; }
.tn-player-controls { display: flex; gap: 4px; }
.tn-player-controls button { background: transparent; color: inherit; }
.tn-player-progress { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.tn-player-progress input { flex: 1; min-width: 0; accent-color: #77452c; min-height: 28px; }
.tn-player-status { grid-column: 1 / -1; font-size: 12px; margin: 0; }
.tn-player-status:empty { display: none; }
.tn-apple-library-action { margin: 12px 0; font: 13px/1.5 system-ui, sans-serif; }
.tn-apple-library-action button { min-height: 44px; padding: 10px 14px; border-radius: 8px; border: 0; background: #eee6dc; color: #77452c; cursor: pointer; }
.tn-apple-library-action p { margin: 6px 0 0; color: #726a61; }
.tn-apple-library-action p:empty { display: none; }
.tn-persistent-player .tn-apple-library-action { grid-column: 1 / -1; margin: 0; max-height: 130px; overflow: auto; }
.tn-persistent-player .tn-player-continue { grid-column: 1 / -1; background: #eee6dc; color: #77452c; padding: 10px 14px; }
.tn-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (min-width: 640px) { .tn-playlist { padding-top: 48px; } .tn-playlist-identity { grid-template-columns: 280px 1fr; align-items: end; gap: 32px; } .tn-persistent-player { padding-left: max(24px, calc((100vw - 860px) / 2)); padding-right: max(24px, calc((100vw - 860px) / 2)); } }
@media (prefers-reduced-motion: reduce) { .tn-playlist *, .tn-persistent-player * { scroll-behavior: auto; } }
.tn-source-picker { color: #27231f; font-family: system-ui, sans-serif; }
.tn-source-picker form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.tn-source-picker label { grid-column: 1 / -1; }
.tn-source-picker input { min-height: 44px; min-width: 0; padding: 8px; border: 1px solid #726a6170; border-radius: 6px; font: inherit; font-size: 16px; }
.tn-source-picker button { min-height: 44px; min-width: 44px; padding: 8px 12px; border: 0; border-radius: 6px; font: inherit; background: #eee6dc; color: #77452c; cursor: pointer; }
.tn-source-picker button:disabled { opacity: .5; cursor: default; }
.tn-source-picker ul { list-style: none; padding: 0; }
.tn-source-picker li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #27231f15; }
.tn-source-picker li img { width: 44px; height: 44px; object-fit: cover; border-radius: 5px; }
.tn-source-picker li > div { flex: 1; min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.tn-source-picker li span, .tn-source-picker li p { font-size: 13px; color: #726a61; margin: 0; }
.tn-upload-fields { grid-column: 1 / -1; display: grid; gap: 8px; border: 0; padding: 0; min-width: 0; }
.tn-upload-fields select { min-height: 44px; padding: 8px; font: inherit; font-size: 16px; }
.tn-upload-fields .tn-source-check { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.tn-source-check input { flex: 0 0 auto; width: 20px; min-height: 20px; height: 20px; }

.tn-playlist-editor { display: grid; gap: .8rem; min-width: 0; }
.tn-playlist-editor label { display: grid; gap: .35rem; }
.tn-playlist-editor input:not([type=checkbox]), .tn-playlist-editor textarea, .tn-playlist-editor select { width: 100%; min-height: 44px; padding: .6rem; border: 1px solid currentColor; border-radius: .5rem; background: transparent; color: inherit; box-sizing: border-box; }
.tn-playlist-editor li { padding: 1rem 0; border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent); }
.tn-playlist-editor button { min-height: 44px; padding: .5rem .8rem; }

.tn-listening-options { max-width: 820px; margin: 16px auto; padding: 12px 20px; color: #726a61; font: 14px/1.5 system-ui, sans-serif; }
.tn-listening-options summary { min-height: 44px; display: list-item; cursor: pointer; padding-top: 10px; }
.tn-listening-options button { min-height: 44px; padding: 10px 16px; background: #eee6dc; color: #77452c; border: 0; border-radius: 8px; cursor: pointer; }

.tn-external-player button { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 8px; background: #eee6dc; color: #77452c; font: inherit; cursor: pointer; }
.tn-external-player p { font-size: 13px; line-height: 1.5; color: #726a61; }

/* LOX listening shell: restrained monochrome transport, no platform emoji. */
.tn-playlist { --tn-ink: #eee; --tn-muted: #999; --tn-accent: #eee; }
.tn-playlist-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: transparent; border: 1px solid #ffffff40; color: #eee; font-weight: 400; white-space: nowrap; }
.tn-transport-icon { flex: 0 0 auto; width: 20px; height: 20px; }
.tn-playlist button:focus-visible, .tn-persistent-player button:focus-visible, .tn-playlist summary:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.tn-track-list li { border-color: #ffffff20; }
.tn-track-list .is-current { background: #ffffff08; }
.tn-persistent-player { background: #080808f5; color: #eee; border-top: 1px solid #ffffff24; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 16px; }
.tn-player-track span { color: #999; }
.tn-player-controls { grid-row: 3; justify-content: center; align-items: center; gap: clamp(28px, 12vw, 64px); }
.tn-player-controls button { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border-radius: 0; }
.tn-player-controls .tn-transport-icon { width: 24px; height: 24px; }
.tn-player-controls .tn-player-primary { position: relative; width: 64px; height: 64px; border: 1px solid #ffffff60; border-radius: 50%; }
.tn-player-connect-label { position: absolute; top: calc(100% + 4px); font-size: 11px; white-space: nowrap; color: #bbb; }
.tn-player-controls:has(.tn-player-connect-label) { padding-bottom: 18px; }
.tn-player-progress { grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 0; color: #999; font-size: 12px; }
.tn-player-progress input { grid-column: 1 / -1; width: 100%; margin: 0; height: 44px; min-height: 44px; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.tn-player-progress input::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(to right, #eee var(--tn-progress, 0%), #ffffff30 var(--tn-progress, 0%)); }
.tn-player-progress input::-moz-range-track { height: 1px; background: #ffffff30; }
.tn-player-progress input::-moz-range-progress { height: 1px; background: #eee; }
.tn-player-progress input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 8px; height: 8px; margin-top: -3.5px; border-radius: 50%; background: #eee; opacity: 0; }
.tn-player-progress input::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #eee; opacity: 0; }
.tn-player-progress input:focus-visible { outline: 1px solid #ffffff60; outline-offset: 2px; }
.tn-player-progress input:focus-visible::-webkit-slider-thumb, .tn-player-progress input:hover::-webkit-slider-thumb, .tn-player-progress input:active::-webkit-slider-thumb { opacity: 1; }
.tn-player-progress input:focus-visible::-moz-range-thumb, .tn-player-progress input:hover::-moz-range-thumb { opacity: 1; }
.tn-player-remaining { text-align: right; }
.tn-apple-library-action button, .tn-persistent-player .tn-player-continue, .tn-listening-options button { background: transparent; border: 1px solid #ffffff40; color: #ddd; font-weight: 400; white-space: nowrap; }
.tn-apple-library-action p, .tn-listening-options { color: #999; }
.tn-persistent-player .tn-apple-library-action p { max-height: 72px; overflow: auto; }
.tn-playlist { padding-bottom: 380px; }

.tn-player-help { grid-column: 1 / -1; font-size: 12px; }
.tn-player-help summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: inherit; }
.tn-player-help p { overflow-wrap: anywhere; }
.tn-persistent-player { max-height: 60svh; overflow-y: auto; }

.tn-note-playlist { --tn-dial-height: 0px; }

/* Stable compact dock: streaming status never changes transport geometry. */
.tn-persistent-player { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 48px 44px 20px; gap: 0 8px; padding-top: 8px; overflow: visible; max-height: none; }
.tn-player-identity { grid-column: 1; grid-row: 1; gap: 8px; }
.tn-player-identity img { width: 36px; height: 36px; }
.tn-player-track strong { font-size: 13px; line-height: 18px; }
.tn-player-track span { font-size: 11px; line-height: 16px; }
.tn-player-controls { grid-column: 2; grid-row: 1; gap: 0; padding: 0; }
.tn-player-controls button { width: 44px; height: 44px; }
.tn-player-controls .tn-player-primary { width: 44px; height: 44px; }
.tn-player-controls .tn-transport-icon { width: 20px; height: 20px; }
.tn-player-controls:has(.tn-player-connect-label) { padding-bottom: 0; }
.tn-player-connect-label { top: auto; bottom: -2px; font-size: 9px; background: #080808; }
.tn-player-progress { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 34px minmax(0, 1fr) 38px; gap: 8px; align-items: center; font-size: 10px; }
.tn-player-progress input { grid-column: 2; grid-row: 1; touch-action: pan-y; }
.tn-player-elapsed { grid-column: 1; grid-row: 1; }
.tn-player-remaining { grid-column: 3; grid-row: 1; }
.tn-player-status, .tn-player-status:empty { display: block; grid-column: 1; grid-row: 3; min-width: 0; height: 20px; line-height: 20px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-player-options { grid-column: 2; grid-row: 3; font-size: 11px; }
.tn-player-options > summary { cursor: pointer; line-height: 20px; list-style: none; text-align: right; color: #999; }
.tn-player-options-panel, .tn-player-help { position: absolute; bottom: calc(100% + 8px); right: 16px; left: 16px; padding: 12px; background: #151515; border: 1px solid #ffffff30; border-radius: 8px; max-height: 35svh; overflow-y: auto; }
.tn-player-help { left: 16px; right: auto; width: min(320px, calc(100vw - 32px)); box-sizing: border-box; }
.tn-player-help:not([open]) { padding: 0 8px; }
.tn-player-help summary { min-height: 32px; }
.tn-playlist { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
.tn-player-options > summary { position: relative; }
.tn-player-options > summary::before { content: ""; position: absolute; inset: -12px 0; }
.tn-persistent-player summary:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.tn-player-status-quiet { color: transparent; }
.tn-player-options > summary { font-size: 22px; min-width: 44px; text-align: center; }

/* Everyday listening needs only identity, transport and progress. */
.tn-persistent-player { grid-template-rows: 48px 44px; }
.tn-player-status, .tn-player-status:empty { position: absolute; grid-area: auto; bottom: calc(100% + 8px); left: 16px; right: 16px; height: auto; white-space: normal; background: #151515; border-radius: 8px; padding: 8px 12px; }
.tn-player-status:empty, .tn-player-status-quiet { display: none; }
.tn-playlist { padding-bottom: calc(136px + env(safe-area-inset-bottom)); }


/* A quiet eye beside Previous. The glyph is small; the tap target stays 44px. */
.tn-player-controls .tn-visualizer-toggle { width: 44px; height: 44px; opacity: .65; }
.tn-player-controls .tn-visualizer-toggle[aria-pressed=true] { opacity: 1; }
.tn-visualizer-stage { position: fixed; inset: 0; z-index: 49; background: #050505; color: #eee; font: 13px system-ui, sans-serif; }
.tn-visualizer-artwork { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .25; }
.tn-visualizer-canvas { position: absolute; inset: 0 0 calc(136px + env(safe-area-inset-bottom)); overflow: hidden; }
.tn-visualizer-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tn-visualizer-topbar { position: absolute; top: max(12px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tn-visualizer-topbar select, .tn-visualizer-topbar button { min-height: 44px; max-width: 65vw; border: 1px solid #ffffff30; border-radius: 8px; background: #101010d9; color: inherit; font: inherit; padding: 8px 12px; cursor: pointer; }
.tn-visualizer-topbar :focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
@media (max-width: 359px) { .tn-player-identity img { width: 28px; height: 28px; } .tn-player-controls button { width: 40px; min-width: 40px; } .tn-player-controls .tn-player-primary { width: 40px; height: 44px; } }


.tn-youtube-player { position: fixed; z-index: 51; right: 12px; bottom: calc(112px + env(safe-area-inset-bottom, 0px)); width: min(480px, calc(100vw - 24px)); background: #000; color: #fff; border: 1px solid #444; }
.tn-youtube-player[hidden] { display: none; }
.tn-youtube-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font: 12px/1.4 system-ui, sans-serif; }
.tn-youtube-heading a { color: #fff; }
.tn-youtube-heading button { color: #fff; background: #000; border: 1px solid #888; padding: 8px; cursor: pointer; }
.tn-youtube-frame, .tn-youtube-frame iframe { display: block; width: 100%; min-height: 200px; height: 270px; border: 0; }
.tn-youtube-player > p { padding: 8px 12px; margin: 0; font: 12px/1.5 system-ui, sans-serif; }
@media (max-width: 520px) { .tn-youtube-frame, .tn-youtube-frame iframe { height: max(200px, calc((100vw - 24px) * .5625)); } }
@media (max-height: 540px) { .tn-youtube-player { bottom: auto; top: 0; width: 360px; } .tn-youtube-frame, .tn-youtube-frame iframe { height: 200px; } .tn-youtube-player > p { max-height: 36px; overflow: auto; } }
