:root {
  font-family: var(--rs-font, system-ui, sans-serif);
  color: var(--rs-text, #e4e4e7);
  background: var(--rs-background, #151517);
  color-scheme: dark;
  font-synthesis: none;
  --muted: var(--rs-muted, #92929c);
  --line: var(--rs-border, #323235);
  --accent: var(--rs-active, #b4a6e4);
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .32; cursor: default; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.app-shell { height: 100dvh; display: grid; grid-template-columns: 80px minmax(0, 1fr) 80px; }
.site-header { display: flex; position: static; inset: auto; margin: 0; padding: 0; width: auto; height: 100%; max-height: none; overflow: visible; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border: 0; border-right: 1px solid var(--line); background: var(--rs-background); color: inherit; }
.site-header:popover-open { position: fixed; inset: 0 auto 0 0; width: 80px; }
.brand { text-decoration: none; }
.brand img { display: block; }
.navigation { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.nav-item { color: var(--muted); }
.nav-item.active { background: var(--rs-active); border-color: var(--rs-active-border); color: var(--rs-ink); }
main { grid-column: 2; min-width: 0; min-height: 0; overflow: hidden; }
.browse-view { --swipe-hint-space: 0px; position: relative; height: 100%; display: grid; place-items: center; padding: 16px; touch-action: pinch-zoom; }
.browse-view:has(.swipe-hint:not([hidden])) { --swipe-hint-space: 48px; padding-top: calc(16px + var(--swipe-hint-space)); }
.swipe-hint { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 24px); padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--rs-surface); color: var(--muted); font-size: 12px; line-height: 1.4; }
.swipe-hint .text-button { flex-shrink: 0; padding: 6px; }
.watch-layout { width: min(440px, calc((100dvh - 32px - var(--swipe-hint-space)) * .5625), calc(100vw - 192px)); aspect-ratio: 9 / 16; max-height: 100%; min-height: 0; }
.watch-layout .player-area { height: 100%; }
.player-area { width: 100%; min-height: 0; overflow: hidden; background: #09090b; border: 1px solid #303035; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0; }
.player-area > p { font-size: 13px; color: var(--muted); padding: 0 12px; text-align: center; }
.player-area > .outline-button { flex-shrink: 0; max-width: calc(100% - 24px); text-align: center; }
.player-area iframe { display: block; width: 100%; height: 100%; border: 0; min-width: 200px; min-height: 200px; }
.text-button { border: 0; background: none; color: #b7aecf; padding: 0; font-size: 12px; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.text-button[aria-pressed=true] { color: #e0ccff; }
.playback-controls { position: fixed; top: 0; right: 0; bottom: 0; width: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border-left: 1px solid var(--line); }
.circle-button { flex-shrink: 0; }
.circle-button { width: var(--rs-control-size); height: var(--rs-control-size); border-radius: 50%; display: inline-grid; place-content: center; font-size: 24px; font-weight: 400; border: 1px solid var(--rs-control-border); background: var(--rs-surface); line-height: 1; transition: background-color .15s, border-color .15s, color .15s; }
.circle-button:hover:not(:disabled) { background: var(--rs-surface-hover); }
.circle-button[aria-pressed=true] { background: var(--rs-active); border-color: var(--rs-active-border); color: var(--rs-ink); }
.nav-item.active:hover, .circle-button[aria-pressed=true]:hover { background: var(--rs-active-hover); }
.circle-button svg { width: var(--rs-icon-size); height: var(--rs-icon-size); fill: currentColor; stroke: none; }
#favourite-button[aria-pressed=true] { background: var(--rs-pink); border-color: #f4a1d2; }
a.circle-button:hover { text-decoration: none; background: #343439; }
.circle-button[aria-disabled=true] { opacity: .32; pointer-events: none; }
.outline-button { border: 1px solid #494950; background: #252529; padding: 9px 14px; border-radius: 5px; font-size: 13px; }
.outline-button:hover { background: #333338; }
.volume-popout { position: fixed; inset: auto; margin: 0; width: 120px; padding: 16px; border: 1px solid var(--rs-control-border); border-radius: 14px; background: var(--rs-surface); color: var(--rs-text); box-shadow: 0 8px 30px #0006; font-size: 13px; }
.volume-heading { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px; }
.volume-heading output, #volume-status { color: var(--muted); }
#volume-slider { display: block; writing-mode: vertical-lr; direction: rtl; width: 44px; height: 144px; margin: 16px auto; accent-color: var(--accent); cursor: pointer; }
#mute-button { min-width: 76px; }
.page-panel { min-width: 0; }
h1 { margin: 0 0 28px; font-size: 24px; font-weight: 600; letter-spacing: -.4px; }
h2 { font-size: 15px; font-weight: 550; margin: 0 0 16px; }
.page-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1, .section-heading h2 { margin: 0; }
.section-heading { margin-bottom: 20px; }
.settings-section { border-top: 1px solid var(--line); padding: 24px 0; }
.settings-section p { margin: 12px 0 0; }
.source-row { display: flex; align-items: center; gap: 15px; padding: 12px 0; font-size: 14px; cursor: pointer; }
.source-row span { flex: 1; }
.source-row small { color: var(--muted); font-size: 12px; }
.source-row input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.muted { font-size: 13px; line-height: 1.8; color: var(--muted); }
.selection-stats { margin: 0; }
.selection-stats > div { display: flex; justify-content: space-between; margin: 12px 0; font-size: 13px; }
.selection-stats dt { color: var(--muted); }
.selection-stats dd { margin: 0; }
.policy-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: #b7aecf; }
.saved-list { display: grid; gap: 12px; }
.saved-row { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 5px; }
.saved-info { min-width: 0; flex: 1; }
.saved-info h2 { font-size: 14px; margin: 0 0 6px; overflow-wrap: anywhere; }
.saved-info p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.warning { border-left: 2px solid #c9ad79; padding: 0 12px; color: #dec9a9; font-size: 13px; line-height: 1.7; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content; padding: 12px 16px; border: 1px solid #55555e; background: #303035; border-radius: 5px; font-size: 12px; line-height: 1.6; opacity: 0; pointer-events: none; }
.toast.visible { opacity: 1; }
@media (max-height: 500px) {
  .browse-view { padding: 8px; }
  .watch-layout { width: min(440px, calc((100dvh - 16px) * .5625), calc(100vw - 176px)); }
  .site-header, .navigation, .playback-controls { gap: 10px; }
  .circle-button { width: 40px; height: 40px; }
}
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  body { --mobile-top: 0px; --mobile-bottom: var(--mobile-rail-height); }
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); padding-top: var(--mobile-top); padding-bottom: var(--mobile-bottom); }
  main { grid-column: 1; grid-row: 1; }
  .browse-view { padding: 8px; }
  .watch-layout { width: min(440px, calc((100dvh - var(--mobile-top) - var(--mobile-bottom) - 24px - var(--swipe-hint-space)) * .5625), calc(100vw - 32px)); }
  .playback-controls { top: auto; left: 50%; right: auto; bottom: var(--mobile-safe-bottom); transform: translateX(-50%); z-index: 3; width: calc(5 * var(--mobile-control-size) + 4 * var(--mobile-control-gap)); height: var(--mobile-rail-height); flex-direction: row; justify-content: center; gap: var(--mobile-control-gap); padding: 0; border: 0; background: transparent; }
  .playback-controls .circle-button { width: var(--mobile-control-size); height: var(--mobile-control-size); }
  .saved-row { gap: 12px; flex-wrap: wrap; }
  .saved-info { flex-basis: 100%; }
  .toast { bottom: calc(var(--mobile-bottom) + 12px); }
  .volume-popout { width: min(224px, calc(100vw - 24px)); }
  .volume-heading { flex-direction: row; gap: 12px; }
  #volume-slider { writing-mode: horizontal-tb; direction: ltr; width: 100%; height: 24px; margin: 16px 0; }
}
@media (max-height: 500px) and (max-width: 1000px) {
  .watch-layout { width: min(440px, calc(100vw - 24px)); height: 100%; aspect-ratio: auto; }
}
:root { color-scheme: dark; }
dialog { max-width: 440px; width: calc(100% - 48px); border: 1px solid #494153; border-radius: 20px; background: #19171f; color: #f7f3ff; padding: 24px; }
dialog::backdrop { background: #09080de8; }
#share-url { width: 100%; padding: 12px; margin: 12px 0; font: inherit; border: 1px solid var(--rs-control-border); border-radius: 8px; background: var(--rs-surface); color: var(--rs-text); }
.share-actions { display: flex; flex-wrap: wrap; gap: 12px; }
#share-dialog a { color: var(--rs-active); }
#share-status { font-size: 14px; }
#privacy-consent { max-width: 480px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; }
#privacy-consent h1 { margin-bottom: 16px; }
#privacy-consent p, #privacy-consent li { font-size: 14px; line-height: 1.65; color: var(--muted); }
#privacy-consent a { color: var(--rs-active); text-underline-offset: 3px; }
#privacy-consent .welcome-eyebrow { margin-top: 0; color: var(--rs-active); font-size: 12px; }
.welcome-privacy { margin: 20px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.welcome-privacy h2 { font-size: 15px; margin: 0; }
.welcome-rules { margin: 16px 0; font-size: 13px; }
.welcome-rules summary { cursor: pointer; color: var(--muted); }
.welcome-rules ul { padding-left: 20px; }
#accept-privacy { width: 100%; margin-top: 8px; }
#privacy-consent .welcome-alternative { font-size: 12px; margin-bottom: 0; text-align: center; }
@media (min-height: 501px) and (max-height: 600px) {
  .site-header, .navigation { gap: 10px; }
  .site-header .circle-button { width: 40px; height: 40px; }
}
dialog p { line-height: 1.6; color: #c5bfce; }
dialog a { color: #c2a6ff; }
@media (prefers-reduced-motion: reduce) { .circle-button { transition: none; } }
