/* ClipLab app shell: left rail, top bar, hero, tiles.
   Loaded only on signed-in app pages. styles.css still owns buttons,
   panels, modals and the marketing site. Everything here is namespaced
   cl- so nothing collides with the older Studio markup. */

/* Tate Clipper product surface: clip + X only — never show these chrome bits. */
html.product-tate #btnYouTube,
html.product-tate #btnTwitch,
html.product-tate #studioLink,
html.product-tate #clUpgrade,
body.product-tate #btnYouTube,
body.product-tate #btnTwitch,
body.product-tate #studioLink,
body.product-tate #clUpgrade {
  display: none !important;
}

:root {
  --cl-side-w: 244px;
  --cl-side-w-collapsed: 68px;
  --cl-top-h: 60px;
  --cl-rail: #0b0b12;
  --cl-rail-line: rgba(139, 92, 246, 0.14);
}
html.product-tate {
  --cl-rail: #0a0a0a;
  --cl-rail-line: rgba(245, 166, 35, 0.1);
}

/* The shell owns the scroll, not the body, so the rail stays put. */
body.cl-shelled {
  overflow: hidden;
}

.cl-app {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100%;
}

/* ------------------------------------------------------------------ rail */

.cl-side {
  flex: 0 0 var(--cl-side-w);
  width: var(--cl-side-w);
  background: var(--cl-rail);
  border-right: 1px solid var(--cl-rail-line);
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0.6rem 0.5rem;
  gap: 0.15rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  transition: flex-basis 0.16s ease, width 0.16s ease;
}

.cl-side::-webkit-scrollbar {
  width: 6px;
}
.cl-side::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 3px;
}

.cl-brand-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.35rem 0.7rem;
}

.cl-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.cl-brand img {
  width: 24px;
  height: 24px;
}

.cl-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.13rem 0.4rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-muted);
  white-space: nowrap;
}

.cl-badge.pro {
  background: var(--accent-grad);
  color: #0a0a12;
}

.cl-collapse {
  margin-left: auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 7px;
  color: var(--text-dim);
  cursor: pointer;
  flex: none;
}

.cl-collapse:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* account card */

.cl-acct {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.55rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.cl-acct:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--border-strong);
}

.cl-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: #0a0a12;
  background: var(--accent-grad);
  text-transform: uppercase;
}

.cl-acct-txt {
  min-width: 0;
  flex: 1;
}

.cl-acct-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cl-acct-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.22rem;
}

.cl-acct-caret {
  flex: none;
  color: var(--text-dim);
}

.cl-side-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.48rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.cl-side-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.cl-sec {
  margin-top: 0.95rem;
  padding: 0 0.55rem 0.35rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cl-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cl-link {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: background 0.13s ease, color 0.13s ease;
}

.cl-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.cl-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 600;
}

.cl-link svg {
  flex: none;
  width: 17px;
  height: 17px;
  stroke-width: 1.7;
  opacity: 0.85;
}

.cl-link .cl-tag {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.34rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.cl-link .cl-tag.new {
  background: rgba(52, 211, 153, 0.16);
  color: var(--success);
}

/* Gated by plan. Visible on purpose: hiding a feature you could buy sells
   nothing, so it stays in the list wearing a padlock. */
.cl-link.gated {
  opacity: 0.62;
}

.cl-link.gated::after {
  content: "🔒";
  margin-left: auto;
  font-size: 0.72rem;
  opacity: 0.75;
}

.cl-link.gated .cl-tag {
  display: none;
}

/* A locked row still reads as part of the nav, it just refuses to go anywhere. */
.cl-link.locked {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: not-allowed;
  opacity: 0.5;
}

.cl-link.locked:hover {
  background: transparent;
  color: var(--text-muted);
}

.cl-link .cl-dot {
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
}

.cl-spacer {
  flex: 1 1 auto;
  min-height: 0.9rem;
}

/* collapsed rail */

.cl-app.collapsed .cl-side {
  flex-basis: var(--cl-side-w-collapsed);
  width: var(--cl-side-w-collapsed);
}

.cl-app.collapsed .cl-side .cl-hide-collapsed,
.cl-app.collapsed .cl-link span,
.cl-app.collapsed .cl-link .cl-tag,
.cl-app.collapsed .cl-sec,
.cl-app.collapsed .cl-acct-txt,
.cl-app.collapsed .cl-acct-caret,
.cl-app.collapsed .cl-side-btn span {
  display: none;
}

.cl-app.collapsed .cl-link,
.cl-app.collapsed .cl-acct {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.cl-app.collapsed .cl-brand-row {
  flex-direction: column;
  gap: 0.5rem;
}

.cl-app.collapsed .cl-collapse {
  margin-left: 0;
  transform: rotate(180deg);
}

/* ------------------------------------------------------------------ main */

.cl-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cl-top {
  flex: none;
  height: var(--cl-top-h);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1.1rem;
  border-bottom: 1px solid var(--cl-rail-line);
  background: rgba(7, 7, 12, 0.72);
  backdrop-filter: blur(14px);
}

.cl-top-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cl-top-title {
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cl-top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.cl-iconbtn {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.cl-iconbtn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.cl-iconbtn .cl-bell-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--bg);
}

.cl-credits {
  display: flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.32rem 0.62rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.cl-credits .cl-bolt {
  color: var(--warn);
}

.cl-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 1.6rem 4rem;
  scroll-behavior: smooth;
}

.cl-wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.cl-wrap-narrow {
  width: min(820px, 100%);
  margin: 0 auto;
}

/* ------------------------------------------------------------- popovers */

.cl-pop {
  position: fixed;
  z-index: 240;
  min-width: 236px;
  max-width: min(360px, calc(100vw - 1.4rem));
  padding: 0.4rem;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: #101018;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.68);
  display: none;
}

.cl-pop.open {
  display: block;
  animation: clPop 0.13s ease;
}

@keyframes clPop {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
}

.cl-pop-head {
  padding: 0.5rem 0.6rem 0.42rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cl-pop-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.52rem 0.6rem;
  border-radius: 9px;
  font-size: 0.85rem;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.cl-pop-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.cl-pop-item svg {
  flex: none;
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.cl-pop-item .cl-tag {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.34rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  white-space: nowrap;
}

.cl-pop-item .cl-chev {
  margin-left: auto;
  color: var(--text-dim);
}

.cl-pop-sep {
  height: 1px;
  margin: 0.35rem 0.3rem;
  background: var(--border);
}

.cl-pop-scroll {
  max-height: min(60vh, 420px);
  overflow-y: auto;
}

/* updates feed */

#clUpdatesPop {
  width: 372px;
}

.cl-upd {
  display: block;
  padding: 0.62rem 0.6rem;
  border-radius: 10px;
  cursor: default;
}

.cl-upd + .cl-upd {
  border-top: 1px solid var(--border);
  border-radius: 0;
}

.cl-upd-t {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.cl-upd-b {
  margin-top: 0.22rem;
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.cl-upd-d {
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.cl-upd.unread .cl-upd-t::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.42rem;
  border-radius: 50%;
  background: var(--accent-3);
}

/* language list */

.cl-lang-item {
  justify-content: space-between;
}

.cl-lang-item.sel {
  color: var(--accent-3);
  font-weight: 600;
}

/* --------------------------------------------------------------- hero */

.cl-hero {
  position: relative;
  padding: 1.4rem 0 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* the giant wordmark sitting behind the drop card */
.cl-hero-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  font-size: clamp(4.5rem, 15vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.032);
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.cl-drop {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 1.05rem;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: rgba(15, 15, 24, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cl-drop.dragging {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22), 0 28px 70px rgba(0, 0, 0, 0.5);
}

.cl-drop-input {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.cl-drop-input:focus-within {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.055);
}

.cl-drop-input svg {
  flex: none;
  color: var(--text-dim);
}

.cl-drop-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.93rem;
}

.cl-drop-input input::placeholder {
  color: var(--text-dim);
}

.cl-drop-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 0.75rem 0 0.15rem;
  flex-wrap: wrap;
}

.cl-alt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.cl-alt:hover {
  color: var(--text);
}

.cl-drop-go {
  width: 100%;
  margin-top: 0.7rem;
  padding: 0.82rem;
  border-radius: 12px;
  border: 0;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent-grad);
  color: #08080f;
  transition: filter 0.14s ease, transform 0.14s ease;
}

.cl-drop-go:hover {
  filter: brightness(1.08);
}

.cl-drop-go:active {
  transform: translateY(1px);
}

.cl-drop-note {
  position: relative;
  z-index: 1;
  margin-top: 0.72rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}

/* ------------------------------------------------------------- tiles */

.cl-tiles {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.15rem;
  margin: 1.9rem auto 0;
  width: min(1000px, 100%);
}

.cl-tile {
  position: relative;
  width: 92px;
  padding: 0.4rem 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 12px;
}

.cl-tile:hover {
  color: var(--text);
}

.cl-tile-ic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.cl-tile:hover .cl-tile-ic {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.cl-tile-ic svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.7;
}

.cl-tile-name {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

.cl-tile-tag {
  position: absolute;
  top: -2px;
  right: 4px;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.08rem 0.3rem;
  border-radius: 5px;
  background: #24243a;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}

.cl-tile-tag.new {
  background: var(--accent-grad);
  border-color: transparent;
  color: #0a0a12;
}

.cl-tile.soon .cl-tile-ic {
  opacity: 0.5;
}

/* --------------------------------------------------------- page bits */

.cl-h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.cl-sub {
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.cl-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.cl-card {
  padding: 1.15rem 1.25rem;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.cl-card + .cl-card {
  margin-top: 0.9rem;
}

.cl-card-t {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cl-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.62;
}

.cl-card p + p {
  margin-top: 0.7rem;
}

.cl-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.9rem;
}

.cl-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.5rem;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.14);
  color: var(--warn);
}

.cl-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-dim);
}

.cl-empty h3 {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}

/* ------------------------------------------------------------ first run */

.cl-first {
  position: relative;
  width: min(760px, 100%);
  margin: 0.4rem auto 0;
  padding: 1.5rem 1.6rem;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(ellipse 70% 130% at 12% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    rgba(16, 16, 26, 0.9);
}

.cl-first-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.cl-first-h {
  margin-top: 0.4rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.cl-first-p {
  margin-top: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 62ch;
}

.cl-first-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.cl-first-steps {
  display: flex;
  gap: 1.3rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cl-first-steps b {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-right: 0.4rem;
  border-radius: 50%;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.cl-first-x {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
}

/* Destination length warning inside the setup modal. */
.len-warn {
  margin-top: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.55;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.09);
  color: #fcd34d;
}

.len-warn b {
  color: #fde68a;
}

.len-warn.ok {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
}

/* toast */

.cl-toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%) translateY(14px);
  z-index: 400;
  padding: 0.65rem 1rem;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: #14141f;
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cl-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------- responsive */

.cl-side-scrim {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, 0.55);
  display: none;
}

.cl-side-scrim.open {
  display: block;
}

.cl-menu-btn {
  display: none;
}

@media (max-width: 900px) {
  .cl-menu-btn {
    display: grid;
  }

  .cl-side {
    position: fixed;
    z-index: 200;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-104%);
    transition: transform 0.18s ease;
  }

  .cl-app.side-open .cl-side {
    transform: none;
  }

  .cl-app.collapsed .cl-side {
    flex-basis: var(--cl-side-w);
    width: var(--cl-side-w);
  }

  .cl-collapse {
    display: none;
  }

  .cl-page {
    padding: 1.1rem 1rem 3.5rem;
  }

  #clUpdatesPop {
    width: min(372px, calc(100vw - 1.4rem));
  }
}

@media (max-width: 560px) {
  .cl-tile {
    width: 78px;
  }

  .cl-credits {
    display: none;
  }

  .cl-hero-mark {
    font-size: 4.2rem;
  }
}


/* ------------------------------------------------- release-note window */
/* Opens over the app rather than in a new tab: a release note is something you
   read and dismiss, not somewhere you navigate to and have to find your way
   back from. */

.cl-news-scrim {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  padding: 2.2rem 1.2rem;
  overflow-y: auto;
}

.cl-news-scrim.open {
  display: block;
  animation: clFade 0.16s ease;
}

@keyframes clFade { from { opacity: 0; } }

.cl-news-win {
  width: min(680px, 100%);
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: #0f0f18;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: clRise 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes clRise { from { transform: translateY(14px); opacity: 0; } }

.cl-news-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.35rem 0.9rem;
}

.cl-news-hi {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cl-news-hs {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.cl-news-x {
  margin-left: auto;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.cl-news-x:hover { color: var(--text); border-color: var(--border-strong); }

.cl-news-body { padding: 0 1.35rem 1.5rem; }

.cl-news-img {
  width: 100%;
  border-radius: 13px;
  border: 1px solid var(--border);
  display: block;
  margin-bottom: 1.15rem;
  aspect-ratio: 12 / 5;
  object-fit: cover;
}

.cl-news-kick {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-3);
  text-transform: uppercase;
}

.cl-news-title {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 0.45rem;
}

.cl-news-by {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.4rem;
}

.cl-news-p {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 0.9rem;
  white-space: pre-line;
}

.cl-news-rule {
  height: 1px;
  background: var(--border);
  margin: 1.4rem 0 1.1rem;
}

.cl-news-rn {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text);
}

.cl-news-sec { margin-top: 1rem; }

.cl-news-lab {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.cl-news-ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.89rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.cl-news-ul li::marker { color: var(--accent); }

.cl-news-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.35rem 1.35rem;
}

.cl-news-nav button {
  flex: 1;
  padding: 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.cl-news-nav button:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.cl-news-nav button:disabled { opacity: 0.35; cursor: default; }


/* Native select popups inherit the OS palette, which on a dark page renders
   near-black text on near-black. Styling the option list is the only fix that
   works across browsers. */
select {
  color: var(--text);
  background-color: #14141f;
}

select option {
  background-color: #14141f;
  color: #f4f4f8;
}

select option:checked,
select option:hover {
  background-color: #2a2a3d;
  color: #ffffff;
}

/* Thumbnail inside a bell notification. */
.cl-upd-img {
  width: 100%;
  border-radius: 9px;
  border: 1px solid var(--border);
  aspect-ratio: 12 / 5;
  object-fit: cover;
  margin-bottom: 0.5rem;
  display: block;
}


/* --------------------------------------------- director's review panel */
/* Smith returning fewer clips than asked for must read as a decision, not a
   failure. Showing the count, the summary and every rejection reason is what
   makes the difference. */

.cl-review {
  margin: 0 0 1.1rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.09), rgba(139, 92, 246, 0.02));
}

.cl-review-h {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  flex-wrap: wrap;
}

.cl-review-tag {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.14rem 0.45rem;
  border-radius: 5px;
  background: var(--accent-grad);
  color: #0a0a12;
}

.cl-review-s {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.cl-review-more {
  margin-top: 0.7rem;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--accent-3);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}

.cl-review-list {
  margin-top: 0.75rem;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}

.cl-review-list.open { display: flex; }

.cl-review-row {
  display: flex;
  gap: 0.6rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-muted);
  padding: 0.5rem 0.6rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
}

.cl-review-row b { color: var(--text); font-weight: 600; }

.cl-review-evi {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.cl-review-evi .k { color: var(--text-muted); font-weight: 600; }

/* ------------------------------------------------------------- confirm
   Replaces the native confirm() for anything destructive. The browser dialog
   can only show the bare domain and two neutral buttons, which is the wrong
   shape for a decision like disconnecting a channel: the user needs to know
   what survives it and what does not before they answer. */

.cl-confirm-back {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 1.2rem;
  background: rgba(4, 4, 10, 0.72); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.14s ease;
}
.cl-confirm-back.on { opacity: 1; }

.cl-confirm {
  width: 100%; max-width: 460px;
  background: var(--panel, #12121a);
  border: 1px solid var(--line, rgba(255,255,255,0.09));
  border-radius: 16px; padding: 1.25rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  transform: translateY(6px) scale(0.99);
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.cl-confirm-back.on .cl-confirm { transform: none; }

.cl-confirm-h { display: flex; gap: 0.85rem; align-items: flex-start; }
.cl-confirm-h h3 { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.cl-confirm-h p { margin: 0.35rem 0 0; font-size: 0.88rem; line-height: 1.55;
                  color: var(--text-dim); }

.cl-confirm-ic {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; font-size: 0.95rem;
  background: rgba(122,162,255,0.14); color: #9dc0ff;
}
.cl-confirm-ic.danger { background: rgba(220,70,60,0.15); color: #ff8c7d; }

.cl-confirm-d {
  margin-top: 0.95rem; padding: 0.75rem 0.9rem; border-radius: 11px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--line, rgba(255,255,255,0.07));
  font-size: 0.84rem; line-height: 1.6; color: var(--text-dim);
}
.cl-confirm-d ul { margin: 0; padding-left: 1.05rem; }
.cl-confirm-d li + li { margin-top: 0.3rem; }
.cl-confirm-d b { color: var(--text); font-weight: 600; }

.cl-confirm-a {
  display: flex; justify-content: flex-end; gap: 0.55rem; margin-top: 1.15rem;
}

.btn-danger {
  background: #b23b30; color: #fff; border: 1px solid #c9483c;
}
.btn-danger:hover { background: #c9453a; }

/* --------------------------------------------------------- youtube menu */

.cl-ytmenu {
  position: fixed; z-index: 310; min-width: 250px; padding: 0.3rem;
  background: var(--panel, #12121a);
  border: 1px solid var(--line, rgba(255,255,255,0.1));
  border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.cl-ytmenu button {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 9px; padding: 0.5rem 0.65rem;
  color: var(--text); font: inherit;
}
.cl-ytmenu button:hover { background: rgba(255,255,255,0.06); }
.cl-ytmenu button.danger { color: #ff8c7d; }
.cl-ytmenu button.danger:hover { background: rgba(220,70,60,0.12); }
.cl-ytm-l { display: block; font-size: 0.87rem; }
.cl-ytm-s { display: block; font-size: 0.76rem; color: var(--text-dim); margin-top: 0.1rem; }
