/* ЧЕКЛИСТЫ — дизайн-система. Всё под .cl: так она живёт и на своём сайте, и внутри десктопного приложения.
   Язык общий с ДОКАМИ (пастельные плитки, большие радиусы, плавающее стекло, пружинная анимация, равноправные
   светлая и тёмная темы), но задачи другие: тут рабочий список с живым прогрессом — поэтому в центре кольцо,
   статусные кружки как в «Напоминаниях» и крупные цели нажатия, а не листы A4. */

.cl {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --r: 18px; --r-tile: 18px; --r-card: 28px; --r-sec: 26px;
  --fs: 15px;

  /* светлая тема — по умолчанию */
  --bg: #e9ebef; --glow-a: rgba(255, 196, 184, 0.5); --glow-b: rgba(190, 210, 255, 0.55);
  --surface: #ffffff; --surface-2: #f3f4f6;
  --sage: #d9e5d9; --blush: #f9d9d2; --sky: #d8e4f7; --lilac: #e5ddf5; --sand: #f3e9d6;
  --label: #16171a; --label-2: rgba(22, 23, 26, 0.62); --label-3: rgba(22, 23, 26, 0.4);
  --sep: rgba(22, 23, 26, 0.1); --fill: rgba(22, 23, 26, 0.06); --fill-2: rgba(22, 23, 26, 0.11);
  --accent: #ff3b30; --accent-soft: rgba(255, 59, 48, 0.12); --on-accent: #ffffff;
  --green: #2fb35c; --orange: #b56f00; --amber-ring: #ff9f0a; --amber-soft: rgba(255, 159, 10, 0.18);
  --indigo: #6d5bd6; --indigo-soft: rgba(109, 91, 214, 0.14); --red: #e0402f;
  --glass: rgba(255, 255, 255, 0.66); --glass-line: rgba(255, 255, 255, 0.9);
  --material: var(--glass);
  --shadow: 0 1px 1px rgba(20, 22, 30, 0.04), 0 18px 50px -14px rgba(20, 22, 30, 0.22);
  --shadow-lg: 0 18px 50px -10px rgba(20, 22, 30, 0.3), 0 0 0 0.5px rgba(20, 22, 30, 0.08);

  font: 400 var(--fs)/1.42 var(--font);
  color: var(--label);
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.003em;
  font-variant-numeric: tabular-nums;
}
.cl[data-theme="dark"] {
  --bg: #0c0d0f; --glow-a: rgba(255, 69, 58, 0.14); --glow-b: rgba(70, 100, 200, 0.14);
  --surface: #1c1d21; --surface-2: #26272c;
  --sage: #222d26; --blush: #36262d; --sky: #222d40; --lilac: #2c2842; --sand: #2f2c23;
  --label: #f4f4f6; --label-2: rgba(244, 244, 246, 0.66); --label-3: rgba(244, 244, 246, 0.4);
  --sep: rgba(255, 255, 255, 0.09); --fill: rgba(255, 255, 255, 0.07); --fill-2: rgba(255, 255, 255, 0.13);
  --accent: #ff453a; --accent-soft: rgba(255, 69, 58, 0.2); --on-accent: #ffffff;
  --green: #30d158; --orange: #ffb340; --amber-ring: #ff9f0a; --amber-soft: rgba(255, 159, 10, 0.2);
  --indigo: #a79bff; --indigo-soft: rgba(167, 155, 255, 0.2); --red: #ff6a59;
  --glass: rgba(40, 41, 46, 0.64); --glass-line: rgba(255, 255, 255, 0.14);
  --shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06), 0 22px 54px -18px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 20px 60px -10px rgba(0, 0, 0, 0.8), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  .cl:not([data-theme]) {
    --bg: #0c0d0f; --glow-a: rgba(255, 69, 58, 0.14); --glow-b: rgba(70, 100, 200, 0.14);
    --surface: #1c1d21; --surface-2: #26272c;
    --sage: #222d26; --blush: #36262d; --sky: #222d40; --lilac: #2c2842; --sand: #2f2c23;
    --label: #f4f4f6; --label-2: rgba(244, 244, 246, 0.66); --label-3: rgba(244, 244, 246, 0.4);
    --sep: rgba(255, 255, 255, 0.09); --fill: rgba(255, 255, 255, 0.07); --fill-2: rgba(255, 255, 255, 0.13);
    --accent: #ff453a; --accent-soft: rgba(255, 69, 58, 0.2); --on-accent: #ffffff;
    --green: #30d158; --orange: #ffb340; --amber-ring: #ff9f0a; --amber-soft: rgba(255, 159, 10, 0.2);
    --indigo: #a79bff; --indigo-soft: rgba(167, 155, 255, 0.2); --red: #ff6a59;
    --glass: rgba(40, 41, 46, 0.64); --glass-line: rgba(255, 255, 255, 0.14);
    --shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06), 0 22px 54px -18px rgba(0, 0, 0, 0.75);
    --shadow-lg: 0 20px 60px -10px rgba(0, 0, 0, 0.8), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    color-scheme: dark;
  }
}

.cl *, .cl *::before, .cl *::after { box-sizing: border-box; }
.cl.page { min-height: 100vh; background: var(--bg); position: relative; isolation: isolate; }
.cl.page::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 600px at 8% -10%, var(--glow-a), transparent 60%), radial-gradient(800px 600px at 100% 10%, var(--glow-b), transparent 60%); }
.cl .logo { display: block; height: 28px; width: auto; }
.cl button, .cl input, .cl textarea { font: inherit; color: inherit; letter-spacing: inherit; }
.cl button { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cl a { color: var(--accent); text-decoration: none; }
.cl :focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
.cl [hidden] { display: none !important; }
.cl svg { display: block; }
.cl .glass { background: var(--glass); -webkit-backdrop-filter: blur(34px) saturate(190%); backdrop-filter: blur(34px) saturate(190%); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-line); }

/* тона плиток */
.cl .t-sage { background: var(--sage); } .cl .t-blush { background: var(--blush); } .cl .t-sky { background: var(--sky); }
.cl .t-lilac { background: var(--lilac); } .cl .t-sand { background: var(--sand); }

/* ---------- кнопки ---------- */
.cl .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 17px; border-radius: 999px; font-weight: 600; font-size: 14px; background: var(--fill); color: var(--label); transition: background 0.2s, transform 0.4s var(--spring), opacity 0.15s; white-space: nowrap; }
.cl .btn:hover { background: var(--fill-2); }
.cl .btn:active { transform: scale(0.95); }
.cl .btn.primary { background: var(--accent); color: var(--on-accent); }
.cl .btn.primary:hover { background: var(--accent); filter: brightness(1.07); }
.cl .btn.plain { background: none; color: var(--accent); padding: 0 10px; }
.cl .btn.plain:hover { background: var(--accent-soft); }
.cl .btn.danger { color: var(--red); }
.cl .btn.round { width: 36px; padding: 0; }
.cl .btn[disabled] { opacity: 0.4; pointer-events: none; }
.cl .btn svg { width: 18px; height: 18px; }

/* ---------- заголовки ---------- */
.cl .large-title { font: 600 46px/1 var(--font); letter-spacing: -0.03em; margin: 0; }
.cl .subtitle { color: var(--label-2); font-size: 16px; margin: 12px 0 0; max-width: 52ch; }
.cl .caption { font-size: 12.5px; color: var(--label-2); }
.cl .footnote { font-size: 13px; color: var(--label-2); }

/* ---------- каркас студии ---------- */
.cl .wrap { max-width: 860px; margin: 0 auto; padding: 0 18px 110px; }
.cl .bar { position: sticky; top: 10px; z-index: 20; width: min(860px, calc(100% - 24px)); margin: 10px auto 0; }
.cl .barin { display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 6px 8px 6px 8px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(34px) saturate(190%); backdrop-filter: blur(34px) saturate(190%); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-line); }
.cl .bar .grow { flex: 1; min-width: 0; }
.cl .bar .back { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--fill); font-weight: 600; font-size: 14px; color: var(--label); transition: background 0.2s, transform 0.4s var(--spring); }
.cl .bar .back:hover { background: var(--fill-2); }
.cl .bar .back:active { transform: scale(0.95); }
.cl .bar .back svg { width: 18px; height: 18px; }
.cl .bar .brandmini { display: flex; align-items: center; gap: 9px; padding-left: 8px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.cl .bar .brandmini .logo { height: 24px; }
.cl .wm { display: block; height: 22px; width: auto; }
.cl .minip { display: none; align-items: center; gap: 9px; min-width: 0; font-weight: 600; font-size: 14px; padding: 0 6px; }
.cl .minip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36vw; }
.cl .bar.compact .minip { display: flex; animation: popin 0.4s var(--spring); }
.cl .name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; min-width: 40px; outline: none; border-radius: 8px; padding: 2px 6px; margin: 0 -6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.cl [contenteditable]:empty::before { content: attr(data-ph); color: var(--label-3); pointer-events: none; }
.cl [contenteditable] { outline: none; }
.cl .savestate { font-size: 12px; color: var(--label-3); min-width: 74px; text-align: right; transition: color 0.2s; padding-right: 4px; }
.cl .savestate.busy { color: var(--orange); }

/* ---------- список чеклистов ---------- */
.cl .listhead { display: flex; align-items: flex-end; gap: 16px; padding: 44px 0 26px; flex-wrap: wrap; }
.cl .listhead > div { flex: 1; min-width: 240px; }
.cl .listhead .wm { height: 54px; margin: 0 0 22px -3px; }
.cl .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 14px; }
.cl .card { position: relative; border-radius: var(--r-card); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; text-align: left; transition: transform 0.5s var(--spring), box-shadow 0.3s; cursor: pointer; min-height: 168px; }
.cl .card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cl .card:active { transform: scale(0.985); }
.cl .card .top { display: flex; align-items: flex-start; gap: 12px; }
.cl .card .ct { flex: 1; font-size: 22px; font-weight: 500; letter-spacing: -0.022em; line-height: 1.12; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: break-word; padding-top: 2px; }
.cl .card .origin { font-size: 12.5px; color: var(--label-2); margin-top: -4px; }
.cl .card .meta { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.cl .card .big { font-size: 13px; color: var(--label-2); }
.cl .card .big b { color: var(--label); font-weight: 600; font-size: 15px; }
.cl .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.cl .card .pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 62%, transparent); font-size: 12px; font-weight: 600; color: var(--label-2); }
.cl .card .pill svg { width: 13px; height: 13px; }
.cl .card .pill.i { background: var(--indigo-soft); color: var(--indigo); }
.cl .card .pill.o { background: var(--amber-soft); color: var(--orange); }
.cl .card .del { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--label-2); opacity: 0; transition: opacity 0.15s; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.cl .card:hover .del { opacity: 1; }
.cl .card .del:hover { color: var(--red); }
.cl .card .del svg { width: 14px; height: 14px; }
.cl .alert { font-size: 12px; font-weight: 600; color: var(--red); }
.cl .empty { text-align: center; padding: 90px 20px; color: var(--label-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cl .empty svg { width: 52px; height: 52px; color: var(--label-3); }
.cl .empty b { color: var(--label); font: 600 24px/1.2 var(--font); letter-spacing: -0.022em; }

/* ---------- кольцо прогресса ---------- */
.cl .ring { position: relative; flex: none; }
.cl .ring svg { transform: rotate(-90deg); }
.cl .ring .trk { stroke: color-mix(in srgb, var(--label) 12%, transparent); }
.cl .ring .val { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--spring), stroke 0.3s; }
.cl .ring.full .val { stroke: var(--green); }
.cl .ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.022em; }

/* ---------- шапка прогресса в редакторе ---------- */
.cl .summary { display: flex; align-items: center; gap: 22px; margin-top: 16px; padding: 24px 26px; border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); transition: background 0.4s; }
.cl .summary { position: relative; overflow: hidden; }
.cl .summary.done { background: var(--sage); }
.cl .summary > *:not(.wmark) { position: relative; z-index: 1; }
.cl .summary .wmark { position: absolute; right: -14px; bottom: -22px; height: 104px; width: auto; opacity: 0.07; pointer-events: none; }
.cl .sigfoot { display: flex; justify-content: center; margin-top: 44px; }
.cl .sigfoot .wm { height: 20px; opacity: 0.45; }
.cl .summary .st { flex: 1; min-width: 0; }
.cl .summary .st h1 { margin: 0; font: 600 32px/1.08 var(--font); letter-spacing: -0.03em; }
.cl .summary .st p { margin: 6px 0 0; }
.cl .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cl .chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; font-size: 12.5px; font-weight: 600; padding: 0 11px; border-radius: 999px; background: var(--fill); color: var(--label-2); }
.cl .chip i { width: 8px; height: 8px; border-radius: 50%; display: block; }

/* ---------- секции и пункты ---------- */
.cl .secs { margin-top: 4px; }
.cl .sec { margin-top: 14px; background: var(--surface); border-radius: var(--r-sec); box-shadow: var(--shadow); padding: 6px 8px 8px; }
.cl .sec-h { display: flex; align-items: center; gap: 6px; padding: 8px 6px 6px 4px; }
.cl .sec-h .stitle { flex: 1 1 auto; min-width: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; border-radius: 8px; padding: 2px 6px; margin-left: -2px; }
.cl .sec-h .stitle:hover, .cl .sec-h .stitle:focus { background: var(--fill); }
.cl .sec-h .scount { flex: none; margin-left: 0; height: 24px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 12.5px; color: var(--label-2); background: var(--sage); }
.cl .sec-h .scount b { color: var(--label); font-weight: 600; margin-right: 1px; }
.cl .sec:nth-of-type(5n+2) .scount { background: var(--sky); }
.cl .sec:nth-of-type(5n+3) .scount { background: var(--lilac); }
.cl .sec:nth-of-type(5n+4) .scount { background: var(--sand); }
.cl .sec:nth-of-type(5n+5) .scount { background: var(--blush); }
.cl .sec-h .chev { width: 28px; height: 28px; display: grid; place-items: center; color: var(--label-2); border-radius: 50%; transition: transform 0.4s var(--spring), background 0.2s; }
.cl .sec-h .chev:hover { background: var(--fill); }
.cl .sec-h .chev svg { width: 15px; height: 15px; }
.cl .sec:not(.col) .chev { transform: rotate(90deg); }
.cl .sec-h .tool { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--label-3); opacity: 0; transition: opacity 0.15s; }
.cl .sec:hover .sec-h .tool, .cl .sec-h .tool:focus-visible { opacity: 1; }
.cl .sec-h .tool:hover { background: var(--fill); color: var(--label); }
.cl .sec-h .tool svg { width: 14px; height: 14px; }
.cl .sbar { height: 4px; margin: 2px 10px 6px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.cl .sbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--accent); transition: width 0.7s var(--spring), background 0.3s; }
.cl .sbar.full i { background: var(--green); }
.cl .group { border-radius: 0; }
.cl .sec.col .group { display: none; }
.cl .sec.col { padding-bottom: 4px; }
.cl .sec.col .sbar { margin-bottom: 8px; }
.cl .item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px 10px 12px; border-radius: 16px; transition: background 0.15s; }
.cl .item:hover { background: var(--fill); }
.cl .item .grip { position: absolute; left: 1px; top: 0; bottom: 0; width: 12px; display: grid; place-items: center; color: var(--label-3); opacity: 0; cursor: grab; touch-action: none; }
.cl .item:hover .grip { opacity: 1; }
.cl .item .grip svg { width: 8px; height: 14px; }
.cl .item .body { flex: 1; min-width: 0; padding-top: 3px; }
.cl .item .line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.cl .item .txt { font-size: var(--fs); line-height: 1.38; min-width: 40px; word-break: break-word; flex: 0 1 auto; transition: color 0.3s; }
.cl .item.st-done .txt { color: var(--label-3); }
.cl .item .sub { margin-top: 2px; font-size: 13px; color: var(--label-2); display: none; gap: 2px; flex-direction: column; }
.cl .item.has-sub .sub, .cl .item.open-sub .sub { display: flex; }
.cl .item:not(.open-sub) .sub [contenteditable]:empty { display: none; }
.cl .item .sub .link { color: var(--accent); word-break: break-all; }
.cl .item .acts { display: flex; align-items: center; gap: 1px; margin: -5px 0 -5px auto; align-self: flex-start; opacity: 0; transition: opacity 0.15s; padding: 2px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-lg); }
.cl .item:hover .acts, .cl .item:focus-within .acts { opacity: 1; }
.cl .item .acts button { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--label-2); }
.cl .item .acts button:hover { background: var(--fill-2); color: var(--label); }
.cl .item .acts button.on { color: var(--accent); }
.cl .item .acts svg { width: 16px; height: 16px; }
.cl .item.internal .txt { font-style: italic; }
.cl .item.internal { background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--fill) 70%, transparent) 8px 9px); }
.cl .item.dragging { opacity: 0.35; }
.cl .tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--fill); color: var(--label-2); line-height: 1.6; white-space: nowrap; }
.cl .tag.orange { background: var(--amber-soft); color: var(--orange); }
.cl .tag.indigo { background: var(--indigo-soft); color: var(--indigo); }
.cl .tag.red { background: var(--accent-soft); color: var(--accent); }
.cl .tag svg { width: 11px; height: 11px; }

/* ---------- статусный индикатор ---------- */
.cl .dot { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform 0.4s var(--spring); }
.cl button.dot:active { transform: scale(0.82); }
.cl .dot::before { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid var(--label-3); transition: background 0.25s, border-color 0.25s; }
.cl button.dot:hover::before { border-color: var(--label-2); }
.cl .dot svg { position: relative; width: 14px; height: 14px; opacity: 0; transform: scale(0.4); transition: opacity 0.2s, transform 0.5s var(--spring); }
.cl .dot[data-st="doing"]::before { border-color: var(--amber-ring); background: conic-gradient(var(--amber-ring) 0 50%, transparent 50% 100%); background-clip: padding-box; box-shadow: inset 0 0 0 3px var(--surface); }
.cl .dot[data-st="blocked"]::before { border-color: var(--indigo); border-style: dashed; }
.cl .dot[data-st="done"]::before { background: var(--green); border-color: var(--green); }
.cl .dot[data-st="done"] svg { opacity: 1; transform: scale(1); }
.cl .dot.dotpop { animation: dotpop 0.5s var(--spring); }
@keyframes dotpop { 0% { transform: scale(0.8); } 55% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* ---------- быстрое добавление ---------- */
.cl .quick { display: flex; align-items: center; gap: 10px; margin: 4px 4px 0; padding: 0 14px 0 10px; border-radius: 999px; background: var(--fill); transition: background 0.2s, box-shadow 0.2s; }
.cl .quick:focus-within { background: var(--surface); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.cl .quick .plus { width: 26px; height: 26px; display: grid; place-items: center; color: var(--accent); flex: none; }
.cl .quick .plus svg { width: 18px; height: 18px; }
.cl .quick input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; outline: none; font-size: var(--fs); }
.cl .quick input::placeholder { color: var(--label-3); }
.cl .addsec { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 52px; color: var(--label-2); font-weight: 600; border-radius: var(--r-sec); box-shadow: inset 0 0 0 1.8px var(--sep); transition: color 0.2s, box-shadow 0.2s, transform 0.4s var(--spring); }
.cl .addsec:hover { color: var(--accent); box-shadow: inset 0 0 0 1.8px color-mix(in srgb, var(--accent) 50%, transparent); }
.cl .addsec:active { transform: scale(0.99); }
.cl .addsec svg { width: 18px; height: 18px; }

/* ---------- видео из ПРАВОК ---------- */
.cl .vid { margin-top: 8px; display: flex; gap: 12px; align-items: center; background: var(--fill); border-radius: 18px; padding: 6px; max-width: 440px; transition: background 0.2s; }
.cl .vid:hover { background: var(--fill-2); }
.cl .vid .th { position: relative; flex: none; width: 112px; aspect-ratio: 16/9; border-radius: 13px; overflow: hidden; background: #0b0b0d; }
.cl .vid .th img, .cl .vid .th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl .vid .th .pl { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.35), transparent 60%); }
.cl .vid .th .pl svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 4px rgba(0,0,0,.5)); }
.cl .vid .vi { flex: 1; min-width: 0; padding-right: 4px; }
.cl .vid .vt { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl .vid .vs { font-size: 12px; color: var(--label-2); }
.cl .vid .vx { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--label-2); }
.cl .vid .vx:hover { background: var(--fill-2); color: var(--red); }
.cl .vid .vx svg { width: 12px; height: 12px; }

/* ---------- поповеры, шторки, тосты ---------- */
.cl .pop { position: fixed; z-index: 80; min-width: 220px; padding: 6px; border-radius: 22px; background: var(--glass); -webkit-backdrop-filter: blur(34px) saturate(200%); backdrop-filter: blur(34px) saturate(200%); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-line); animation: popin 0.4s var(--spring); transform-origin: top right; }
@keyframes popin { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.cl .pop button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border-radius: 14px; font-size: 14px; font-weight: 500; }
.cl .pop button:hover { background: var(--accent); color: var(--on-accent); }
.cl .pop button.on::after { content: "✓"; margin-left: auto; font-weight: 700; }
.cl .pop button .dot { width: 20px; height: 20px; }
.cl .pop button .dot::before { border-width: 1.6px; inset: 1px; }
.cl .pop hr { border: 0; height: 1px; background: var(--sep); margin: 5px 8px; }
.cl .pop button.danger { color: var(--red); }
.cl .pop button.danger:hover { background: var(--accent); color: var(--on-accent); }
.cl .scrim { position: fixed; inset: 0; z-index: 70; background: rgba(8, 8, 10, 0.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; animation: fade 0.25s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.cl .sheet { width: min(480px, 100%); max-height: min(86vh, 720px); display: flex; flex-direction: column; background: var(--surface); border-radius: 30px; box-shadow: var(--shadow-lg); animation: sheetin 0.55s var(--spring); overflow: hidden; }
.cl .sheet.wide { width: min(760px, 100%); }
@keyframes sheetin { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
.cl .sheet .sh { padding: 24px 24px 6px; }
.cl .sheet .sh h3 { margin: 0; font: 600 22px/1.15 var(--font); letter-spacing: -0.022em; }
.cl .sheet .sh p { margin: 6px 0 0; }
.cl .sheet .sb { padding: 14px 24px; overflow: auto; flex: 1; }
.cl .sheet .sf { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px 22px; }
.cl .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cl .field > label { font-size: 12.5px; font-weight: 600; color: var(--label-2); }
.cl .input { width: 100%; min-height: 42px; padding: 9px 14px; border: 0; border-radius: 14px; background: var(--fill); outline: none; font-size: 15px; transition: box-shadow 0.2s, background 0.2s; }
.cl .input:focus { background: var(--surface); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent); }
.cl .opts { display: flex; flex-direction: column; gap: 4px; }
.cl .opt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; position: relative; border-radius: 16px; background: var(--fill); transition: background 0.2s; }
.cl .opt:hover { background: var(--fill-2); }
.cl .opt:has(input:checked) { background: var(--accent-soft); }
.cl .opt input { position: absolute; opacity: 0; }
.cl .opt .rd { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--label-3); flex: none; display: grid; place-items: center; transition: all 0.3s var(--spring); }
.cl .opt input:checked + .rd { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4.5px var(--surface); }
.cl .opt .ot { flex: 1; min-width: 0; }
.cl .opt .ot b { display: block; font-weight: 600; font-size: 14.5px; }
.cl .opt .ot i { font-style: normal; font-size: 12.5px; color: var(--label-2); }
.cl .opt .ox { width: 26px; height: 26px; border-radius: 50%; color: var(--label-2); display: grid; place-items: center; z-index: 1; }
.cl .opt .ox:hover { color: var(--red); background: var(--fill); }
.cl .opt .ox svg { width: 12px; height: 12px; }
.cl .toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.cl .toast { padding: 11px 20px; border-radius: 999px; background: var(--label); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toastin 0.5s var(--spring); }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(0.94); } to { opacity: 1; transform: none; } }

/* ---------- доступ: переключатель как в iOS ---------- */
.cl .row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.cl .row .rt { flex: 1; min-width: 0; }
.cl .row .rt b { display: block; font-weight: 600; font-size: 15px; }
.cl .switch { position: relative; flex: none; width: 51px; height: 31px; border-radius: 999px; background: var(--fill-2); transition: background 0.3s; cursor: pointer; }
.cl .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.28); transition: transform 0.45s var(--spring); }
.cl .switch[aria-checked="true"] { background: var(--green); }
.cl .switch[aria-checked="true"]::after { transform: translateX(20px); }
.cl .access { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; animation: sheetin 0.55s var(--spring); }
.cl .access .row { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); }
.cl .access .row.t-lilac { background: var(--lilac); }
.cl .access .linkrow { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cl .access .linkrow .input { flex: 1; min-width: 160px; font-family: var(--mono); font-size: 12.5px; }
.cl .access .lockbox { width: 100%; padding: 12px 14px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.cl .access .lockbox span { flex: 1; }
.cl .hist { margin-top: 28px; }
.cl .hist summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--label-2); padding: 4px 6px; list-style: none; }
.cl .hist summary::-webkit-details-marker { display: none; }
.cl .hist ul { margin: 8px 0 0; padding: 6px; list-style: none; background: var(--surface); border-radius: var(--r-sec); box-shadow: var(--shadow); }
.cl .hist li { padding: 10px 12px; font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; border-radius: 14px; }
.cl .hist li:nth-child(odd) { background: var(--fill); }
.cl .hist .who { font-size: 11.5px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--fill-2); color: var(--label-2); }
.cl .hist .who.client { background: var(--amber-soft); color: var(--orange); }

/* ---------- выбор видео из ПРАВОК ---------- */
.cl .vpick { display: grid; grid-template-columns: 200px 1fr; gap: 0; min-height: 360px; }
.cl .vpick .vp-l { padding-right: 12px; margin-right: 14px; display: flex; flex-direction: column; gap: 2px; overflow: auto; max-height: 440px; }
.cl .vpick .vp-l button { text-align: left; padding: 9px 12px; border-radius: 14px; font-size: 14px; font-weight: 500; }
.cl .vpick .vp-l button:hover { background: var(--fill); }
.cl .vpick .vp-l button.on { background: var(--label); color: var(--bg); }
.cl .vpick .vp-r { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-content: start; overflow: auto; max-height: 440px; }
.cl .vpick .vc { text-align: left; border-radius: 18px; overflow: hidden; background: var(--fill); transition: transform 0.4s var(--spring); }
.cl .vpick .vc:hover { transform: scale(1.03); }
.cl .vpick .vc .th { aspect-ratio: 16/9; background: #0b0b0d; display: grid; place-items: center; color: var(--label-3); font-size: 12px; }
.cl .vpick .vc .th img { width: 100%; height: 100%; object-fit: cover; }
.cl .vpick .vc .vt { padding: 8px 11px 1px; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl .vpick .vc .vs { padding: 0 11px 9px; font-size: 11.5px; color: var(--label-2); }
.cl .vpick .msg { grid-column: 1 / -1; color: var(--label-2); padding: 30px 0; text-align: center; }

/* ---------- страница клиента ---------- */
.cl .cwrap { max-width: 700px; margin: 0 auto; padding: 14px 14px 90px; }
.cl .chead { text-align: center; padding: 30px 22px 26px; border-radius: 36px; background: var(--surface); box-shadow: var(--shadow); transition: background 0.5s; }
.cl .chead.done { background: var(--sage); }
.cl .chead .logo { height: 40px; margin: 0 auto 24px; }
.cl .chead h1 { margin: 20px 0 0; font: 600 34px/1.08 var(--font); letter-spacing: -0.03em; }
.cl .chead p { margin: 8px 0 0; }
.cl .chead .ring { margin: 0 auto; }
.cl .cstats { display: flex; justify-content: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.cl .csec { margin-top: 14px; }
.cl .csec .item { cursor: default; padding: 13px 10px 13px 12px; }
.cl .csec .item:hover { background: none; }
.cl .csec .item.tap { cursor: pointer; }
.cl .csec .item.tap:hover { background: var(--fill); }
.cl .csec .item.tap:active { background: var(--fill-2); }
.cl .csec .dot { cursor: default; }
.cl .csec .item.tap .dot { cursor: pointer; }
.cl .csec .item .txt { font-size: 16px; }
.cl .events { margin-top: 14px; }
.cl .events .sec-h { padding-left: 14px; }
.cl .events .row { border-radius: 16px; padding: 10px 12px; }
.cl .events .row:nth-child(even) { background: var(--fill); }
.cl .vplayer { margin-top: 10px; border-radius: 22px; overflow: hidden; background: #000; max-width: 100%; position: relative; }
.cl .vplayer video { width: 100%; display: block; max-height: 60vh; background: #000; }
.cl .vplayer .vbar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--fill); }
.cl .vplayer .vbar .vt { flex: 1; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl .vplayer .poster { position: relative; aspect-ratio: 16/9; background: #0b0b0d; display: grid; place-items: center; cursor: pointer; width: 100%; }
.cl .vplayer .poster .play { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.22); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); display: grid; place-items: center; color: #fff; transition: transform 0.45s var(--spring); }
.cl .vplayer .poster:hover .play { transform: scale(1.1); }
.cl .vplayer .poster .play svg { width: 26px; height: 26px; margin-left: 3px; }
.cl .vplayer .poster video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.cl .gate { max-width: 360px; margin: 16vh auto 0; text-align: center; padding: 34px 28px 28px; border-radius: 36px; background: var(--surface); box-shadow: var(--shadow); }
.cl .gate .lockico { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--lilac); display: grid; place-items: center; color: var(--label-2); }
.cl .gate .lockico svg { width: 28px; height: 28px; }
.cl .gate h1 { margin: 0 0 6px; font: 600 26px/1.15 var(--font); letter-spacing: -0.028em; }
.cl .gate .input { margin-top: 16px; text-align: center; }
.cl .gate .btn { width: 100%; margin-top: 10px; min-height: 44px; font-size: 15px; }
.cl .gate .err { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 10px; }
.cl .gate .logo { height: 46px; margin: 0 auto 24px; }
.cl .cfoot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 36px; color: var(--label-3); font-size: 12.5px; }
.cl .cfoot .wm { height: 20px; opacity: 0.55; }
.cl .shake { animation: shake 0.4s var(--spring); }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- перетаскивание ---------- */
.cl .ghost { position: fixed; z-index: 90; pointer-events: none; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 11px 16px; font-size: 14.5px; max-width: 420px; transform: rotate(0.6deg) scale(1.02); }
.cl .dropline { position: fixed; z-index: 89; height: 3px; border-radius: 3px; background: var(--accent); pointer-events: none; box-shadow: 0 0 12px var(--accent-soft); }
body.cl-noselect { user-select: none; -webkit-user-select: none; cursor: grabbing; }

@media (max-width: 640px) {
  .cl { --fs: 16px; }
  .cl .large-title { font-size: 36px; }
  .cl .wrap { padding: 0 12px 100px; }
  .cl .item .acts { opacity: 1; box-shadow: none; background: none; }
  .cl .item .acts button:not([data-a="more"]) { display: none; }
  .cl .item .acts button[data-a="more"] { background: var(--fill); }
  .cl .item .grip { display: none; }
  .cl .summary { padding: 18px; gap: 16px; border-radius: 28px; }
  .cl .summary .st h1 { font-size: 26px; }
  .cl .vpick { grid-template-columns: 1fr; }
  .cl .vpick .vp-l { border-right: 0; padding: 0 0 8px; margin: 0 0 12px; flex-direction: row; overflow-x: auto; max-height: none; }
  .cl .vpick .vp-l button { white-space: nowrap; }
  .cl .scrim { align-items: end; padding: 0; }
  .cl .sheet { width: 100%; border-radius: 30px 30px 0 0; max-height: 92vh; }
  .cl .savestate { display: none; }
  .cl .minip span { max-width: 26vw; }
  .cl .chead h1 { font-size: 28px; }
}
@media (hover: none) {
  .cl .item .acts { opacity: 1; }
  .cl .card .del { opacity: 1; }
  .cl .sec-h .tool { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cl *, .cl *::before, .cl *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media print {
  .cl .bar, .cl .acts, .cl .grip, .cl .quick, .cl .addsec, .cl .tool, .cl .sbar { display: none !important; }
  .cl.page { background: #fff; }
  .cl.page::before { display: none; }
  .cl .sec, .cl .summary, .cl .chead { box-shadow: none; break-inside: avoid; }
}

/* ---------- кликабельная ссылка в пункте ---------- */
.cl .lnk { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; max-width: 100%; padding: 3px 12px 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 500; line-height: 1.5; text-decoration: none; transition: background 0.2s, transform 0.4s var(--spring); }
.cl .lnk:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.cl .lnk:active { transform: scale(0.96); }
.cl .lnk svg { width: 14px; height: 14px; flex: none; }
.cl .lnk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cl .lnkwrap:empty { display: none; }

@media (max-width: 480px) {
  .cl .summary { flex-direction: column; align-items: flex-start; }
  .cl .bar .brandmini span { display: none; }
}
