/* SoundWave update 2 — light theme, threaded comments, badges, a11y, skeleton, gestures, print. Same tokens as the precompiled Tailwind build. */
:root{color-scheme:dark}
html[data-theme=light]{color-scheme:light;--color-bg:#fafafa;--color-surface:#f2f2f2;--color-elevated:#ffffff;--color-pill:#ececec;--color-border:#e2e2e2;--color-fg:#141414;--color-muted:#555;--color-subtle:#808080;--color-wave-dim:#d4d4d4;--color-primary-fg:#fff}
@media (prefers-color-scheme:light){html[data-theme=auto]{color-scheme:light;--color-bg:#fafafa;--color-surface:#f2f2f2;--color-elevated:#fff;--color-pill:#ececec;--color-border:#e2e2e2;--color-fg:#141414;--color-muted:#555;--color-subtle:#808080;--color-wave-dim:#d4d4d4;--color-primary-fg:#fff}}
html[data-theme=light] body{background:var(--color-bg);color:var(--color-fg)}
html[data-theme=light] .shadow-2xl{box-shadow:0 12px 32px rgba(0,0,0,.18)}
html[data-theme=light] #fp{--color-fg:#f4f4f5;--color-muted:#c8c8c8;--color-subtle:#9a9a9a;--color-elevated:#1c1c1c;--color-pill:#2a2a2a;--color-border:#333;color:#f4f4f5}
html[data-theme=light] .sw-sheet,html[data-theme=light] .sw-dialog{background:#fff;color:#141414}
/* a11y */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px;border-radius:6px}
button:focus:not(:focus-visible),a:focus:not(:focus-visible){outline:none}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* honeypot */
.sw-hp{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}
/* notification bell badge */
.sw-badge{position:absolute;top:2px;right:2px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--color-primary);color:#fff;font:700 10px/16px system-ui,sans-serif;text-align:center;box-shadow:0 0 0 2px var(--color-bg)}
.sw-unread{background:color-mix(in srgb,var(--color-primary) 9%,transparent)}
.sw-unread::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--color-primary);align-self:center;margin-right:-4px}
/* badges */
.sw-pro{display:inline-block;margin-left:2px;padding:1px 6px;border-radius:4px;background:linear-gradient(135deg,var(--color-primary),#ffb400);color:#fff;font:800 10px/16px system-ui,sans-serif;letter-spacing:.06em;vertical-align:middle}
/* threaded comments */
.sw-cmt{display:flex;gap:10px;padding:10px 16px}
.sw-cmt.is-child{padding:8px 0 0}
.sw-cbody{white-space:pre-line;word-break:break-word}
.sw-cacts{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:4px;font-size:12px;font-weight:600;color:var(--color-subtle)}
.sw-cacts button{display:inline-flex;align-items:center;gap:4px;min-height:28px;color:inherit}
.sw-cacts button:hover{color:var(--color-fg)}
.sw-cacts .is-on{color:var(--color-primary)}
.sw-cacts .is-on svg{fill:currentColor}
.sw-ckids{margin-top:4px;padding-left:2px;border-left:2px solid var(--color-border);padding-left:10px}
.sw-pin{display:inline-flex;align-items:center;gap:3px;padding:0 6px;border-radius:999px;background:var(--color-pill);color:var(--color-primary);font-size:11px;font-weight:700}
/* details / disclosure */
.sw-details summary{cursor:pointer;list-style:none;padding:8px 0}
.sw-details summary::-webkit-details-marker{display:none}
.sw-details[open] summary{color:var(--color-fg)}
/* checkbox */
.sw-check{width:18px;height:18px;accent-color:var(--color-primary)}
/* audio settings sheet */
.sw-aset{display:flex;flex-direction:column;gap:8px}
.sw-aset-h{margin-top:6px;font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--color-muted)}
.sw-radio.is-dis{opacity:.45}
.sw-switch{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:14px}
.sw-switch input{width:18px;height:18px;accent-color:var(--color-primary)}
/* audio ad bar */
.sw-adbar{position:fixed;left:8px;right:8px;bottom:calc(env(safe-area-inset-bottom) + 132px);z-index:70;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:var(--color-elevated);color:var(--color-fg);font-size:13px;box-shadow:0 10px 30px rgba(0,0,0,.4)}
.sw-adbar a{margin-left:auto;color:var(--color-primary);font-weight:700;white-space:nowrap}
.sw-adbar a+a{margin-left:0}
.sw-adtag{padding:1px 6px;border-radius:4px;background:#ffb400;color:#111;font-weight:800;font-size:11px}
/* tip sheet */
.sw-tip{text-align:center}
.sw-tip img{display:block;margin:0 auto 10px;width:240px;height:auto;border-radius:12px;background:#fff;padding:8px}
.sw-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.sw-embed-prev{display:block;width:100%;height:166px;margin:10px 0;border:0;border-radius:12px;background:#141414}
/* playlist drag & drop */
.sw-grip{cursor:grab;touch-action:none}
.sw-dragging{position:relative;z-index:5;background:var(--color-elevated);box-shadow:0 10px 28px rgba(0,0,0,.35);border-radius:8px;opacity:.95}
/* PJAX skeleton */
#app.sw-loading{position:relative}
#app.sw-loading>*{opacity:.35;transition:opacity .15s}
#app.sw-loading::after{content:"";position:fixed;left:0;right:0;top:0;height:3px;z-index:90;background:linear-gradient(90deg,transparent,var(--color-primary),transparent);background-size:50% 100%;animation:sw-bar 1s linear infinite}
@keyframes sw-bar{from{background-position:-50% 0}to{background-position:150% 0}}
.sw-skel{border-radius:8px;background:linear-gradient(90deg,var(--color-elevated) 25%,var(--color-pill) 50%,var(--color-elevated) 75%);background-size:200% 100%;animation:sw-shimmer 1.2s infinite}
@keyframes sw-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
/* pull to refresh */
.sw-ptr{position:fixed;left:50%;top:8px;z-index:95;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--color-elevated);box-shadow:0 4px 14px rgba(0,0,0,.35);transform:translate(-50%,0)}
.sw-ptr span{width:16px;height:16px;border-radius:50%;border:2px solid var(--color-subtle);border-top-color:transparent}
.sw-ptr.is-ready span{border-color:var(--color-primary);border-top-color:transparent}
.sw-ptr.is-done{opacity:0;transition:opacity .25s}
/* studio charts */
.sw-bars rect{fill:var(--color-primary)}
.sw-bars text{fill:var(--color-subtle);font-size:9px}
.sw-stat{border-radius:12px;background:var(--color-elevated);padding:12px}
.sw-stat b{display:block;font-size:20px;font-weight:800;color:var(--color-fg)}
.sw-stat span{font-size:12px;color:var(--color-muted)}
/* invoice */
.sw-invoice{background:#fff;color:#111;border-radius:12px;padding:20px}
.sw-invoice table{width:100%;border-collapse:collapse;font-size:13px}
.sw-invoice td,.sw-invoice th{padding:8px 4px;border-bottom:1px solid #eee;text-align:left}
@media print{
  body{background:#fff!important;color:#111!important}
  #dock,#mini,#fp,#bottomNav,#toast,#layer,.sw-noprint,header,nav,.sw-adbar{display:none!important}
  .app-pad{padding:0!important}
  .sw-invoice{box-shadow:none;border-radius:0;padding:0}
}
