/* TodoHub discovery experience. Existing layout, player lifecycle and native reel
   scrolling remain the source of truth; this layer gives them a cohesive look. */
:root {
  --paper:#100e16;
  --panel:#1b1822;
  --ink:#f8f4f6;
  --muted:#b9aeba;
  --pink:#f50070;
  --blush:#3d2035;
  --line:#39313f;
  --radius:20px;
  background:var(--paper);
  color-scheme:dark;
}
body{background:radial-gradient(ellipse at 55% -20%,#322036 0%,#18121f 36%,#100e16 75%);color:var(--ink)}
button:focus-visible,a:focus-visible,input:focus-visible{outline-color:#ff80b8}
.sidebar{background:#15121b;border-right:1px solid #3a2e3d}
.brand>span{color:#fff}.brand i,.mobile-brand i{background:#ff167d}
.search-launch{background:#24202c;color:#ddd3df;border:1px solid #3c3443;border-radius:14px;min-height:46px;font-size:12px}
.search-launch:hover{background:#302838;border-color:#70536b}.search-launch kbd{border-color:#635669;color:#d0c4d0}
.main-nav button{color:#cec3cf;border-radius:13px;font-size:14px}
.main-nav button:hover,.studio-link:hover{background:#29212d;color:#fff}
.main-nav button.selected{background:#402338;color:#ff8bb9}
.count{background:#403242;color:#eee1e9}
.nav-rule{border-color:#3a303e}.small-label,.lab-link,.sidebar-foot{color:#ad9fad}
.studio-link small{color:#b8aabb}.sidebar .studio-wordmark{filter:brightness(0) invert(1)}
.creator-note{background:linear-gradient(135deg,#49273e,#2c2235);border:1px solid #6f425d;color:#fff}
.creator-note p{color:#e3cbdc}.creator-note button{color:#ffadd0}
.topbar{background:#16131dd9;border-bottom:1px solid #3a2e3d}
.feed-tabs button{color:#b8abba;font-size:14px}
.feed-tabs button[aria-selected=true]{color:#fff}
.feed-tabs button[aria-selected=true]:after{height:4px;background:#ff167d}
.experiment{color:#cbbdca}.avatar{background:#412c3a;border:1px solid #6a465a}
.workspace{max-width:1390px;grid-template-columns:minmax(400px,1fr) 264px;gap:52px}
.feed-heading h1{color:#fff;font-size:26px;letter-spacing:-.03em}
.feed-heading>span{color:#c5b6c5}
.genre-bar button{background:#29232f;color:#dfd2de;border:1px solid #483a49;border-radius:12px;padding:9px 16px}
.genre-bar button.active{background:#fff;color:#211a22;border-color:#fff}
.genre-bar button:hover{box-shadow:inset 0 0 0 1px #f6a9cb}
.feed-wrap{max-width:540px}
#feed{border:1px solid #74627b;border-radius:22px;box-shadow:0 22px 70px #0008,0 0 0 1px #ffffff0a}
.reel{background:#17121d}
.reel img.cover{opacity:.94}
.reel:after{background:linear-gradient(180deg,#100b1b8a 0%,#100b1b0a 27%,#100b1b35 48%,#100b1bd9 77%,#0d0912fa 100%)}
.reel-top{top:20px;left:22px;right:22px}
.preview-label{color:#fff;background:#19121fce;border-color:#ffffff42;font-size:10px;font-weight:700;letter-spacing:.08em}
.preview-label i{background:#ff72b1}
.sound-button,.reel-actions .icon-circle{background:#211927c9;border-color:#ffffff54}
.sound-button:hover,.reel-actions button:hover .icon-circle{background:#55324c;border-color:#ff9bc8}
.reel-content{left:26px;right:26px;bottom:24px}
.reel h2{font-size:clamp(32px,3vw,46px);line-height:1.05;letter-spacing:-.035em}
.reel .description{color:#f8f1f7;font-size:14px;line-height:1.5}
.tags{gap:6px}.tags span{background:#ffffff20;border:1px solid #ffffff2c;border-radius:8px;color:#fff;padding:5px 8px}.tags .tag-bullet{border:0;background:none}
.reel-actions{right:17px;gap:10px}
.reel-actions button{font-size:11px;color:#fff}
.reel-actions .icon-circle{width:46px;height:46px}
.reel-actions button[aria-pressed=true]{color:#ff91bf}
.play-button{background:#ed006c;color:#fff;border-radius:14px;min-height:54px;font-size:15px;box-shadow:0 8px 24px #c9006155}
.play-button:hover{background:#ff2586}
.play-caption{color:#e5d6e2}
.page-controls button{background:#28212e;color:#f5e9f2;border-color:#625267}
.page-controls button:hover{background:#5c2946;color:#fff;border-color:#ef9cc2}
.page-controls>span,.feed-foot{color:#baaab8}.feed-position{color:#fff}
.rail-title h2{color:#fff;font-size:21px}.rail-title>svg{color:#ff71ac}.rail-intro{color:#bcacba;font-size:13px}
.queue-item{background:#221c28;border:1px solid #3b303f;margin:0 0 9px;padding:9px;border-radius:13px;transition:background .15s,border-color .15s}
.queue-item:hover{background:#302334;border-color:#8b4d74}.queue-item strong{color:#fff;font-size:13px}.queue-item:hover strong{color:#ffafd0}.queue-item small,.queue-item>svg{color:#c5b3c4}
.queue-item>img{width:52px;height:58px;border-radius:9px}
.studio-feature{background:linear-gradient(140deg,#46273f,#302039 68%,#282135);border:1px solid #65415e;color:#fff}
.studio-feature>.studio-wordmark{filter:brightness(0) invert(1)}
.studio-feature h2{color:#fff}.studio-feature p{color:#e1ccdc}.studio-feature button{color:#ffb3d3}.feature-dots i{background:#a47d9a}.rail-fine{color:#b9a9b8}
.initial-loading,.empty-feed{background:#17121d}.empty-feed p{color:#e6d9e5}
/* Panels are intentionally lighter than the dark stage, with dark text. */
dialog{background:#faf7f8;color:#251c27}dialog .dialog-head button{color:#332737}#panel-body p{color:#665666}
#panel-body .search-input{background:#fff;color:#251c27;border-color:#cfc0cd}#panel-body .queue-item{background:#f3edf1;border-color:#e1d4de}
#panel-body .queue-item strong{color:#2b202b}#panel-body .queue-item small,#panel-body .queue-item>svg{color:#6e5c6d}
#panel-body .queue-item:hover{background:#fce7f1;border-color:#d99ab9}.dialog-head button{background:#f2e8ef}
.lab-status{color:#5e525e}.lab-status strong{color:#251c27}.lab-controls button{color:#352836}.no-results{color:#665666}
#toast{background:#fff;color:#241a24;box-shadow:0 8px 28px #0006}
.player-dock{background:#1c1620;border-color:#624554}.player-return{background:#54253e;border-color:#a96081;color:#fff}.player-return:hover,.player-return:focus-visible{background:#743252}.player-action{color:#f4e6f0}
.runtime-loading{background:#120e17}.launch-card{background:#1a131de8;border-color:#ffffff30}
/* A preview and an information panel form one card. Secondary actions belong
   to the panel toolbar, never to an arbitrary position over the video. */
.reel:not(.sponsor){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;align-content:stretch}
.reel:not(.sponsor):after{content:none}
.reel-preview{position:relative;min-width:0;min-height:0;overflow:hidden;background:#0e0d14}
.reel-preview:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#0d0b174d,transparent 42%,#0d0b1726);pointer-events:none}
.reel-preview>img.cover,.reel-preview>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:1}
.reel-top{top:16px;left:16px;right:16px;gap:12px}
.preview-label{min-height:32px;padding:7px 10px;border-radius:8px;line-height:1.2;font-size:9px;letter-spacing:.07em}
.sound-button{min-width:40px;min-height:40px;border-radius:10px;padding:10px;backdrop-filter:none}
.sound-button svg{width:18px;height:18px}
.reel-details{position:relative;z-index:2;min-width:0;background:#1c1722;border-top:1px solid #493b50}
.reel-content{position:static;left:auto;right:auto;bottom:auto;margin:0;padding:18px 20px;display:grid;grid-template-columns:minmax(0,1fr) 164px;column-gap:20px;row-gap:7px}
.reel-content>.maker,.reel-content>h2,.reel-content>.description,.reel-content>.tags{max-width:none;min-width:0;margin:0;grid-column:1}
.reel-content>.maker{grid-row:1;min-height:18px;gap:7px}
.maker .studio-wordmark{width:101px;max-height:20px}
.maker .verified{width:14px;height:14px;flex-basis:14px;padding:3px}
.reel-content>h2{grid-row:2;font-size:clamp(24px,2vw,30px);line-height:1.12;letter-spacing:-.025em;text-shadow:none;text-wrap:balance}
.reel-content>.description{grid-row:3;font-size:12px;line-height:1.45;text-shadow:none;color:#e2d6e4}
.reel-content>.tags{grid-row:4;align-self:end;gap:5px;font-size:10px;line-height:1.2}
.reel-content>.tags span{padding:4px 6px;border-radius:6px;background:#2a2332;border-color:#4b3c54;color:#d8ccdc}
.reel-content>.play-button{grid-column:2;grid-row:2 / 4;align-self:center;min-height:50px;border-radius:10px;font-size:14px;box-shadow:none}
.reel-content>.play-caption{grid-column:2;grid-row:4;align-self:center;min-width:0;margin:0;color:#bdafc3;font-size:10px;line-height:1.35;text-align:center}
.reel-actions{position:static;top:auto;bottom:auto;left:auto;right:auto;align-self:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0;padding:8px 16px 12px;border-top:1px solid #392e41;flex-shrink:0}
.reel-actions button{min-width:0;min-height:44px;padding:8px 5px;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:7px;background:#272030;border:1px solid #4c3d55;border-radius:9px;color:#e9e0ed;font-size:11px;font-weight:600;line-height:1.2;text-shadow:none}
.reel-actions .icon-circle{display:grid;place-items:center;flex:0 0 18px;width:18px;height:18px;background:none;border:0;border-radius:0;backdrop-filter:none}
.reel-actions svg{width:18px;height:18px;stroke-width:1.8}
.reel-actions button:hover{background:#3c2941;border-color:#b279a0;color:#fff}
.reel-actions button:hover .icon-circle{background:none;border:0}
.reel-actions button[aria-pressed=true]{background:#48243c;border-color:#b25b87;color:#ffacd1}
.reel-actions button:focus-visible{outline:2px solid #ffb0d3;outline-offset:2px;border-radius:9px}
.page-controls{top:50%;transform:translateY(-50%)}
.page-controls button{width:40px;height:40px;border-radius:10px}
.page-controls>span{display:none}
.feed-foot{justify-content:center;max-width:540px;font-size:11px}
.feed-position{margin-left:4px}
@media(max-width:1250px){
  .workspace{grid-template-columns:minmax(350px,1fr) 225px;gap:36px}.feed-wrap{max-width:520px}
  .reel-content{grid-template-columns:minmax(0,1fr) 148px;column-gap:14px;padding:16px}
}
@media(max-width:1050px){.workspace{max-width:760px;display:block}.feed-wrap{max-width:540px}}
@media(max-width:760px){
  body{background:#100e16}.topbar{background:#17131e;border-color:#403240}
  .mobile-brand{color:#fff}.mobile-brand>span{color:#ff2987}
  .feed-tabs button{font-size:12px;color:#c6b9c5}.mobile-search{color:#f3e7ee}.mobile-search:hover{background:#3c2837}
  .workspace{max-width:none}.feed-wrap{max-width:none}
  #feed{border:0;border-radius:0;box-shadow:none}
  .reel-top{left:max(16px,env(safe-area-inset-left,0px));right:max(16px,env(safe-area-inset-right,0px));top:14px}
  .reel-content{display:flex;flex-direction:column;gap:7px;padding:14px max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px));margin:0}
  .reel-content>.maker{min-height:18px}
  .reel-content>h2{font-size:28px;line-height:1.1}
  .reel-content>.description{font-size:12px;line-height:1.4}
  .reel-content>.tags{align-self:flex-start;font-size:10px;gap:5px;margin:1px 0 3px}
  .reel-content>.play-button{width:100%;min-height:48px;flex-shrink:0;font-size:14px}
  .reel-content>.play-caption{font-size:10px;line-height:1.3;margin:0;min-height:13px;align-self:center}
  .reel-actions{gap:6px;padding:8px max(12px,env(safe-area-inset-right,0px)) 10px max(12px,env(safe-area-inset-left,0px))}
  .reel-actions button{min-height:44px;font-size:10px;gap:5px;padding:7px 3px}
  .reel-actions .icon-circle,.reel-actions svg{width:17px;height:17px;flex-basis:17px}
  /* Phones browse with native vertical swipes; desktop retains arrow buttons. */
  .page-controls{display:none}
  .page-controls button{width:40px;height:40px;background:#191622dd;color:#fff;border-color:#ffffff50}
  .feed-foot{display:none}
  .mobile-nav{background:#18131d;border-color:#423442}
  .mobile-nav button,.mobile-nav .studio-home{color:#d0c2cf}
  .mobile-nav .selected{color:#ff8cbb}.mobile-nav .selected:before{background:#52233e}
}
@media(max-width:360px){
  .reel-content{padding-left:12px;padding-right:12px}.reel-content>h2{font-size:25px}
  .reel-actions{gap:4px;padding-left:8px;padding-right:8px}.reel-actions button{gap:4px}
}
/* Short portrait windows keep the primary action and all secondary controls;
   nonessential genre and summary copy gives the preview room to breathe. */
@media(max-width:760px) and (max-height:600px){
  .feed-foot{display:none}
  .reel-content{gap:5px;padding-top:10px;padding-bottom:8px}
  .reel-content>h2{font-size:24px}
  .reel-content>.description,.reel-content>.tags{display:none}
  .reel-content>.play-button{min-height:44px}
  .reel-content>.play-caption{font-size:10px}
  .reel-actions{padding-top:6px;padding-bottom:8px}
  .preview-label{font-size:8px;min-height:29px}
  .sound-button{min-width:36px;min-height:36px;padding:9px}
  .page-controls{top:62px}
}
/* Landscape phones use a genuine side panel, avoiding a stack of controls
   over the tiny remaining video area. Each reel still occupies one snap. */
@media(min-width:500px) and (max-width:760px) and (max-height:450px){
  .reel:not(.sponsor){grid-template-columns:minmax(0,1fr) 260px;grid-template-rows:minmax(0,1fr)}
  .reel-details{display:flex;flex-direction:column;justify-content:center;min-height:0;border-top:0;border-left:1px solid #493b50}
  .reel-content{gap:5px;padding:10px 12px 8px}
  .reel-content>h2{font-size:23px}
  .reel-content>.maker{min-height:16px}.maker .studio-wordmark{width:91px}
  .reel-content>.play-button{min-height:44px}
  .reel-content>.play-caption{font-size:9px}
  .reel-actions{gap:4px;padding:6px 8px 8px}
  .reel-actions button{flex-direction:column;gap:3px;min-height:44px;padding:5px 2px;font-size:9px}
  .reel-actions .icon-circle,.reel-actions svg{width:16px;height:16px;flex-basis:16px}
  .reel-top{left:12px;right:12px;top:12px}.preview-label{max-width:calc(100% - 46px)}
  .page-controls{top:auto;bottom:12px;left:12px;right:auto}
}
@media(min-width:761px) and (max-height:600px){
  .workspace{display:block}.feed-wrap{flex:none;height:max(360px,calc(100dvh - 100px))}.right-rail{display:none}
}
@media(prefers-reduced-motion:reduce){.queue-item{transition:none}}
