/* RyuStudio. Опоры: Apple (тихий текст, 28px карточки, без теней) + Wise (жирный плотный заголовок, таблетки,
   активное — заливкой акцента). Цвета — пары с вариантов лого ryu wave, меняются вместе с картиной на фоне. */
@property --deep { syntax: "<color>"; inherits: true; initial-value: #0b143c; }
@property --light { syntax: "<color>"; inherits: true; initial-value: #a6c4e6; }
@property --tint { syntax: "<color>"; inherits: true; initial-value: #808080; }

:root {
  --deep: #0b143c; --light: #a6c4e6; --tint: #808080;
  --text: #1d1d1f; --muted: #5f6068; --glass: rgb(255 255 255 / .42); --glass-strong: rgb(255 255 255 / .66);
  --edge: rgb(255 255 255 / .55); --hover: rgb(0 0 0 / .05);
  --on-art: #ffffff;
  --r-xl: 28px; --r-lg: 20px; --pill: 999px; --side: 252px; --gap: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.3, 1.3, .4, 1);
  font-family: "Manrope", -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
  transition: --deep 1.6s var(--ease), --light 1.6s var(--ease), --tint 1.6s var(--ease);
}
:root[data-theme="dark"] {
  --text: #f5f5f7; --muted: #a3a4ad; --glass: rgb(12 13 20 / .36); --glass-strong: rgb(12 13 20 / .58);
  --edge: rgb(255 255 255 / .10); --hover: rgb(255 255 255 / .07);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #f5f5f7; --muted: #a3a4ad; --glass: rgb(12 13 20 / .36); --glass-strong: rgb(12 13 20 / .58);
    --edge: rgb(255 255 255 / .10); --hover: rgb(255 255 255 / .07);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--deep); color: var(--text);
  font-size: 17px; line-height: 1.47; letter-spacing: -.01em; font-weight: 500; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; cursor: pointer; }
.ph, .ph-fill { font-size: 21px; line-height: 1; flex: none; }
:focus-visible { outline: 2px solid var(--light); outline-offset: 3px; border-radius: 12px; }

/* стекло: оттенок берётся из текущей картины */
.glass {
  background: color-mix(in srgb, var(--glass) 90%, var(--tint));
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  box-shadow: inset 0 0 0 1px var(--edge);
}

/* картина на фоне */
.art { position: fixed; inset: 0; z-index: 0; overflow: hidden; transition: filter 1s var(--ease), transform 1s var(--ease); }
.art .layer {
  position: absolute; inset: -3%; background: center / cover no-repeat; opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.art .layer.on { opacity: 1; animation: drift 48s ease-in-out infinite alternate; }
.art.soft { filter: blur(5px); }
@keyframes drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.07) translate3d(-1%, -.6%, 0); } }
.scrim {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; transition: background 1s var(--ease);
  background: linear-gradient(180deg, rgb(0 0 0 / .18), transparent 30%, transparent 55%, rgb(0 0 0 / .45));
}
/* рабочие экраны: картина уходит за матовое стекло */
body.work .art { filter: blur(34px) saturate(120%); transform: scale(1.08); }
body.work .scrim { background: color-mix(in srgb, var(--glass) 35%, transparent); }
body.clear .art { filter: none; transform: none; }
body.clear .scrim { background: transparent; }
body.clear .app { opacity: 0; pointer-events: none; }

.app { position: relative; z-index: 1; display: flex; min-height: 100vh; padding: var(--gap); gap: var(--gap); transition: opacity .5s var(--ease); }

/* меню */
.side {
  position: sticky; top: var(--gap); height: calc(100vh - 2 * var(--gap)); width: var(--side); flex: none;
  display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 14px; border-radius: var(--r-xl);
  transition: width .5s var(--spring);
}
.brand { display: flex; align-items: center; height: 44px; padding: 0 12px; margin-bottom: 22px; }
.wordmark, .mark { display: block; background: var(--text); transition: background 1.6s var(--ease); }
.wordmark { width: 148px; aspect-ratio: 520 / 86; -webkit-mask: url(wordmark-mask.png) left / contain no-repeat; mask: url(wordmark-mask.png) left / contain no-repeat; }
.mark { display: none; width: 46px; aspect-ratio: 160 / 65; -webkit-mask: url(mark-mask.png) center / contain no-repeat; mask: url(mark-mask.png) center / contain no-repeat; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.side a:not(.brand), .fold {
  display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 16px; border-radius: var(--pill);
  color: var(--muted); font-weight: 500; white-space: nowrap; transition: background .25s, color .25s;
}
.side a:not(.brand):hover, .fold:hover { background: var(--hover); color: var(--text); }
.side .nav a.on { background: var(--light); color: var(--deep); font-weight: 600; }
.side a.new { margin-top: 14px; background: var(--deep); color: var(--light); font-weight: 600; }
.side a.new:hover { background: var(--deep); color: #fff; }
.side a.new.on { box-shadow: 0 0 0 2px var(--light); }
:root[data-theme="dark"] .side a.new { background: var(--text); color: var(--deep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side a.new { background: var(--text); color: var(--deep); } }
.fold { margin-top: auto; }
.lbl { transition: opacity .2s; }
.app.folded { --side: 82px; }
.app.folded .lbl { opacity: 0; pointer-events: none; width: 0; overflow: hidden; }
.app.folded .wordmark { display: none; }
.app.folded .mark { display: block; }
.app.folded .brand { justify-content: center; padding: 0; }
.app.folded .side a:not(.brand), .app.folded .fold { justify-content: center; padding: 0; gap: 0; }

/* верх */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.top { position: sticky; top: var(--gap); z-index: 3; display: flex; gap: 10px; }
.search { flex: 1; max-width: 480px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 20px; border-radius: var(--pill); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 4px; height: 50px; padding: 0 6px 0 18px; border-radius: var(--pill); }
.tools button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.tools button:hover { background: var(--hover); }
.health { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin-right: 8px; }
.health.ok { background: #34c759; box-shadow: 0 0 0 4px rgb(52 199 89 / .2); }
.health.bad { background: #ff453a; }

/* экраны */
.view { flex: 1; display: flex; flex-direction: column; gap: var(--gap); }
.hero { min-height: 52vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 12px 28px; color: var(--on-art); }
.hero h1, .sheet h1 { margin: 0; font-weight: 800; letter-spacing: -.05em; line-height: .92; }
.hero h1 { font-size: clamp(56px, 9vw, 128px); text-shadow: 0 2px 6px rgb(0 0 0 / .18), 0 8px 48px rgb(0 0 0 / .42); }
.hero p {
  align-self: flex-start; margin: 18px 0 0; max-width: 46ch; padding: 10px 18px; border-radius: var(--r-lg);
  font-size: 17px; color: #fff; background: rgb(0 0 0 / .28);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
}
.sheet { border-radius: var(--r-xl); padding: 32px; }
.sheet h1 { font-size: clamp(40px, 5.4vw, 72px); color: var(--text); }
.sheet .sub { margin: 14px 0 0; color: var(--muted); max-width: 52ch; }
.sheet h2 { margin: 0 0 18px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.stat { padding: 20px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass-strong) 60%, transparent); }
.stat b { display: block; font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.empty { display: flex; align-items: center; gap: 20px; margin-top: 28px; padding: 22px 24px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass-strong) 60%, transparent); }
.empty .badge { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--light); color: var(--deep); flex: none; }
.empty .badge .ph-fill { font-size: 24px; }
.empty p { margin: 0; color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: var(--pill); background: var(--deep); color: var(--light); font-weight: 600; font-size: 15px; }

/* управление фоном */
.artbar { position: fixed; right: var(--gap); bottom: var(--gap); z-index: 4; display: flex; gap: 2px; padding: 5px; border-radius: var(--pill); }
.artbar button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.artbar button:hover { background: var(--hover); }
body.clear .artbar #bgClear { background: var(--light); color: var(--deep); }

@media (prefers-reduced-motion: reduce) {
  .art .layer.on { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* телефон: меню — плавающая панель снизу */
@media (max-width: 760px) {
  :root { --gap: 10px; }
  .app { padding: var(--gap) var(--gap) 96px; }
  .side {
    position: fixed; top: auto; left: var(--gap); right: var(--gap); bottom: var(--gap); z-index: 5;
    width: auto; height: 66px; flex-direction: row; align-items: center; justify-content: space-around; padding: 8px;
  }
  .brand, .fold { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .side a:not(.brand) { width: 48px; height: 48px; padding: 0; justify-content: center; }
  .side a.new { margin: 0; }
  .lbl { display: none; }
  .top { position: static; }
  .search { height: 46px; padding: 0 16px; }
  .tools { height: 46px; padding-left: 14px; }
  .hero { min-height: 42vh; padding: 0 6px 20px; }
  .hero p { font-size: 17px; }
  .sheet { padding: 22px; }
  .artbar { display: none; }
}

/* ---------- галерея ---------- */
.hero.compact { min-height: 30vh; padding-bottom: 18px; }
.galbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: flex; gap: 2px; padding: 5px; border-radius: var(--pill); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg a {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--pill);
  color: var(--muted); font-weight: 600; white-space: nowrap; transition: background .25s, color .25s;
}
.seg a:hover { color: var(--text); background: var(--hover); }
.seg a b { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; opacity: .7; }
.seg a.on { background: var(--light); color: var(--deep); }
.seg a.on b { opacity: .8; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px; border-radius: var(--pill); font-weight: 600; color: var(--text); }
.pill b:not(:empty) { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--pill); background: var(--light); color: var(--deep); font-size: 13px; display: grid; place-items: center; }
#ftoggle[aria-expanded="true"] { background: var(--deep); color: var(--light); }
:root[data-theme="dark"] #ftoggle[aria-expanded="true"] { background: var(--text); color: var(--deep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #ftoggle[aria-expanded="true"] { background: var(--text); color: var(--deep); } }

.gal { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.gal.nofilters { grid-template-columns: minmax(0, 1fr); }
.gal.nofilters .filters { display: none; }
.filters { position: sticky; top: calc(var(--gap) + 64px); max-height: calc(100vh - 2 * var(--gap) - 64px); overflow: auto; padding: 14px 10px; border-radius: var(--r-xl); scrollbar-width: thin; }
.filters details + details { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--edge); }
.filters summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  padding: 8px 10px; border-radius: 12px; font-weight: 700; font-size: 15px; letter-spacing: -.01em;
}
.filters summary::-webkit-details-marker { display: none; }
.filters summary:hover { background: var(--hover); }
.filters summary .ph { font-size: 16px; color: var(--muted); transition: transform .3s var(--ease); }
.filters details:not([open]) summary .ph { transform: rotate(-90deg); }
.chk { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; cursor: pointer; font-size: 15px; }
.chk:hover { background: var(--hover); }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk .box { width: 20px; height: 20px; border-radius: 7px; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--muted) 70%, transparent); transition: background .2s, box-shadow .2s; }
.chk .box .ph { font-size: 13px; opacity: 0; color: var(--deep); }
.chk input:checked + .box { background: var(--light); box-shadow: none; }
.chk input:checked + .box .ph { opacity: 1; }
.chk input:focus-visible + .box { outline: 2px solid var(--light); outline-offset: 2px; }
.chk .t { flex: 1; min-width: 0; }
.chk .n { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.chk.zero { opacity: .45; }
.reset { margin: 10px 10px 4px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.reset:hover { color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: var(--gap); }
.card { border-radius: var(--r-xl); padding: 8px; display: flex; flex-direction: column; }
.card .media {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border-radius: 21px; overflow: hidden;
  background: color-mix(in srgb, var(--deep) 82%, #000); cursor: zoom-in;
}
.card .media video, .card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .media.tall video, .card .media.tall img { object-fit: contain; }
.card .media.blank { display: grid; place-items: center; background: linear-gradient(140deg, var(--deep), color-mix(in srgb, var(--deep) 55%, var(--light))); color: var(--light); }
.card .media.blank .ph-light { font-size: 54px; opacity: .9; }
.card .play {
  position: absolute; left: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(0 0 0 / .35); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity .3s;
}
.card .play .ph-fill { font-size: 15px; }
.card.playing .play { opacity: 0; }
.cap { padding: 14px 10px 6px; display: flex; flex-direction: column; flex: 1; }
.cap h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.cap p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--pill); font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--hover); }
.chip.warn { color: var(--deep); background: color-mix(in srgb, var(--light) 70%, transparent); }
.take {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px 0 12px;
  border-radius: var(--pill); font-size: 14px; font-weight: 700; background: var(--deep); color: var(--light); transition: transform .3s var(--spring);
}
.take .ph, .take .ph-fill { font-size: 17px; }
.take:active { transform: scale(.94); }
.card.picked { box-shadow: inset 0 0 0 2px var(--light); }
.card.picked .take { background: var(--light); color: var(--deep); }
:root[data-theme="dark"] .take { background: var(--text); color: var(--deep); }
:root[data-theme="dark"] .card.picked .take { background: var(--light); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .take { background: var(--text); color: var(--deep); }
  :root:not([data-theme="light"]) .card.picked .take { background: var(--light); }
}
.none { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 24px; border-radius: var(--r-xl); }
.none p { margin: 0; }
.more { display: flex; justify-content: center; padding: 18px 0 8px; }
.more:empty { display: none; }

/* подборка «Взять» */
.tray {
  position: fixed; left: 50%; bottom: var(--gap); transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(760px, calc(100vw - 2 * var(--gap) - 220px));
  padding: 6px 6px 6px 22px; border-radius: var(--pill); background: var(--glass-strong);
}
.tray[hidden] { display: none; }
.tray .count { white-space: nowrap; font-weight: 600; }
.tray .names { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 14px; }
.tray .btn { flex: none; }
.tray .icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.tray .icon:hover { background: var(--hover); }

/* карточка крупно */
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: rgb(0 0 0 / .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .3s var(--ease); }
.modal[hidden] { display: none; }
.modal .panel {
  position: relative; width: min(1080px, 100%); max-height: calc(100vh - 48px); overflow: auto; border-radius: 32px; padding: 10px;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; background: var(--glass-strong);
  animation: rise .5s var(--spring);
}
.modal .big { border-radius: 24px; overflow: hidden; background: #000; display: grid; place-items: center; aspect-ratio: 16 / 10; align-self: start; }
.modal .big.tall { aspect-ratio: 9 / 13; }
.modal .big video, .modal .big img { width: 100%; height: 100%; object-fit: contain; }
.modal .big.blank { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 24px; text-align: center; color: var(--light); background: linear-gradient(140deg, var(--deep), color-mix(in srgb, var(--deep) 55%, var(--light))); }
.modal .big.blank .ph-light { font-size: 72px; }
.modal .big.blank p { margin: 0; max-width: 34ch; font-size: 15px; opacity: .85; }
.modal .info { padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.modal .kick { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.modal h2 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.045em; line-height: 1; padding-right: 40px; }
.modal .en { margin: -4px 0 0; color: var(--muted); font-size: 15px; }
.modal .info > p { margin: 0; }
.modal .story { color: var(--muted); font-size: 15px; }
.modal .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.modal .lbl2 { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.takebox { display: block; padding: 12px 14px; border-radius: 14px; background: var(--hover); font: 500 13.5px/1.45 ui-monospace, "SF Mono", Consolas, monospace; word-break: break-word; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.btn.ghost { background: var(--hover); color: var(--text); }
.btn .ph, .btn .ph-fill { font-size: 18px; }
.modal .x { position: absolute; top: 18px; right: 18px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--text); }
body.modal-on { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.97); } }

.toast {
  position: fixed; left: 50%; top: 22px; z-index: 20; transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: var(--pill); background: var(--text); color: var(--deep); font-weight: 600; font-size: 15px;
  transition: opacity .3s, transform .4s var(--spring);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .gal { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; max-height: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 14px; }
  .filters details + details { margin-top: 0; padding-top: 0; border-top: 0; }
}
@media (max-width: 760px) {
  .hero.compact { min-height: 22vh; }
  .galbar { gap: 8px; }
  .seg { flex: 1 1 100%; }
  .seg a { padding: 0 14px; }
  .seg a i { display: none; }
  .pill { height: 46px; }
  .filters { display: block; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .tray { bottom: 86px; width: calc(100vw - 2 * var(--gap)); max-width: none; padding-left: 16px; }
  .tray .names { display: none; }
  .modal { padding: 0; align-items: end; }
  .modal .panel { grid-template-columns: 1fr; border-radius: 28px 28px 0 0; max-height: 92vh; }
  .modal h2 { font-size: 28px; }
}

/* ---------- проекты ---------- */
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 26px; }
.pcard { display: flex; align-items: center; gap: 16px; padding: 10px 20px 10px 10px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass-strong) 60%, transparent); transition: background .25s; }
.pcard:hover { background: var(--glass-strong); }
.pthumb { width: 64px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--deep); flex: none; }
.pthumb video { width: 100%; height: 100%; object-fit: cover; }
.pmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pmeta b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.pmeta span { color: var(--muted); font-size: 14px; }

.proj { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "head head" "stage panel" "tl tl"; gap: var(--gap); }
.phead { grid-area: head; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.phead h1 { margin: 0; font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.back, .iconb { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--text); }
.back { background: var(--glass-strong); }
.back:hover, .iconb:hover { background: var(--hover); }
.iconb[disabled] { opacity: .35; cursor: default; }
.vers { margin-left: auto; display: flex; gap: 4px; padding: 4px; border-radius: var(--pill); background: var(--glass); }
.vers button { height: 38px; padding: 0 16px; border-radius: var(--pill); color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.vers button:hover { color: var(--text); }
.vers button.on { background: var(--light); color: var(--deep); }

.stage { grid-area: stage; border-radius: var(--r-xl); padding: 10px; display: grid; place-items: center; min-width: 0; }
.stage video { display: block; height: clamp(300px, calc(100vh - 530px), 680px); max-width: 100%; aspect-ratio: 9 / 16; border-radius: 20px; background: #000; cursor: pointer; object-fit: contain; }

.panel { grid-area: panel; border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; max-height: calc(clamp(300px, calc(100vh - 530px), 680px) + 20px); overflow: auto; scrollbar-width: thin; }
.panel h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.panel .sub { margin: 0; color: var(--muted); font-size: 15px; }
.ph2 { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.ph2 .kick { color: var(--muted); font-size: 14px; font-weight: 600; }
.panel .lbl2 { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.panel textarea {
  width: 100%; resize: vertical; padding: 12px 14px; border-radius: 16px; border: 0; outline: none; font: inherit; font-size: 15px; color: var(--text);
  background: var(--hover); box-shadow: inset 0 0 0 1px var(--edge);
}
.panel textarea:focus { box-shadow: inset 0 0 0 2px var(--light); }
.panel .acts { margin: 0; padding: 0; }
.alts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.alt { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 14px; }
.alt:hover { background: var(--hover); }
.alt.on { background: color-mix(in srgb, var(--light) 35%, transparent); }
.alt .play { background: var(--deep); color: var(--light); width: 36px; height: 36px; }
.alt .play .ph-fill { font-size: 15px; }
.alt > .iconb:not(.play) { width: 36px; height: 36px; }
.alt .an { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.alt .an em { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: var(--pill); background: var(--deep); color: var(--light); margin-left: 4px; }
.alt .an small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.alt .pick { height: 32px; padding: 0 14px; border-radius: var(--pill); font-size: 13.5px; font-weight: 700; background: var(--hover); }
.alt .pick:hover { background: var(--light); color: var(--deep); }
.alt.on .pick { background: var(--deep); color: var(--light); }

.notes { display: flex; flex-direction: column; gap: 6px; }
.note { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 12px; border-radius: 16px; background: var(--hover); }
.note .nt { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; color: var(--deep); background: var(--light); border-radius: var(--pill); height: 26px; padding: 0 10px; align-self: start; }
.note .nb { font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.note .nk { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.note .nacts { grid-column: 2; display: flex; gap: 2px; justify-content: flex-end; }
.note .nacts .iconb { width: 32px; height: 32px; }
.note .nacts .ph { font-size: 17px; }
.note .nstat { position: absolute; left: 12px; bottom: 14px; font-size: 12px; font-weight: 600; color: var(--muted); }
.note.st-in-work .nt { background: var(--deep); color: var(--light); }
.note.st-done { opacity: .6; }
.note.st-done .nb { text-decoration: line-through; }
.btn.send { align-self: flex-start; margin-top: 6px; }
.trk { display: flex; flex-wrap: wrap; gap: 6px; }
.trk input { position: absolute; opacity: 0; pointer-events: none; }
.trk span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--pill); background: var(--hover); font-size: 14px; font-weight: 600; cursor: pointer; }
.trk input:checked + span { background: var(--light); color: var(--deep); }
.trk input:focus-visible + span { outline: 2px solid var(--light); outline-offset: 2px; }

/* таймлайн */
.tl { grid-area: tl; border-radius: var(--r-xl); padding: 10px 10px 12px; min-width: 0; }
.tlbar { display: flex; align-items: center; gap: 10px; padding: 0 4px 8px; flex-wrap: wrap; }
.playb { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--deep); color: var(--light); flex: none; }
.playb .ph-fill { font-size: 18px; }
.time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; min-width: 120px; }
.lanesel { display: flex; gap: 2px; padding: 3px; border-radius: var(--pill); background: var(--hover); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.lanesel button { height: 34px; padding: 0 14px; border-radius: var(--pill); font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.lanesel button.on { background: var(--text); color: var(--deep); }
.addnote { margin-left: auto; height: 40px; }
.tlview { position: relative; overflow: hidden; border-radius: 18px; background: color-mix(in srgb, var(--glass-strong) 55%, transparent); cursor: grab; touch-action: pan-y; user-select: none; outline: none; }
.tlview:focus-visible { box-shadow: inset 0 0 0 2px var(--light); }
.tlview.dragging { cursor: grabbing; }
.prog { position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 3; background: var(--hover); }
.prog i { display: block; height: 100%; width: 0; background: var(--light); }
.tltrack { position: absolute; left: 0; top: 0; bottom: 0; will-change: transform; }
.tick { position: absolute; top: 7px; height: 8px; border-left: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); }
.tick.big { height: 14px; border-color: var(--muted); }
.tick b { position: absolute; left: 4px; top: -1px; font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.lane { position: absolute; left: 0; border-radius: 10px; background: color-mix(in srgb, var(--hover) 60%, transparent); }
.lname {
  position: absolute; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 9px 0 7px;
  border-radius: var(--pill); font-size: 11.5px; font-weight: 700; color: var(--muted); pointer-events: none;
  background: color-mix(in srgb, var(--glass-strong) 85%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lname .ph { font-size: 13px; }
.m {
  position: absolute; height: 24px; padding: 0 10px; border-radius: 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: -.005em;
  background: #fff; color: #1d1d1f; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); transition: background .15s, color .15s;
}
.m:not(.span) { border-radius: var(--pill); }
.m:hover { box-shadow: inset 0 0 0 1.5px var(--deep); }
.m.on { background: #111114; color: #fff; box-shadow: none; }
.m.sel { box-shadow: 0 0 0 2.5px var(--light); }
.m-note { background: var(--light); color: var(--deep); box-shadow: none; }
.m-note.st-in-work { background: var(--deep); color: var(--light); }
.m-note.st-done { opacity: .5; text-decoration: line-through; }
.tlview .head { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; z-index: 2; background: var(--text); pointer-events: none; }
.tlview .head::before { content: ""; position: absolute; left: -6px; top: 0; width: 14px; height: 10px; border-radius: 0 0 7px 7px; background: var(--text); }

@media (max-width: 1100px) {
  .proj { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "tl" "panel"; }
  .panel { max-height: none; }
  .stage video { height: min(64vh, 620px); }
}
@media (max-width: 760px) {
  .phead h1 { font-size: 26px; flex: 1; }
  .vers { margin-left: 0; width: 100%; overflow-x: auto; }
  .stage { padding: 6px; }
  .stage video { height: 56vh; border-radius: 16px; }
  .addnote { margin-left: 0; }
  .time { min-width: 0; }
  .tlbar { gap: 8px; }
  .panel { padding: 16px; }
}

/* ---------- стили ---------- */
body:not([data-route="gallery"]) #tray { display: none; }
.mixbar .btn[disabled] { opacity: .5; cursor: default; }
.dots { display: inline-flex; margin-right: auto; }
.dots i { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px var(--glass-strong); margin-right: -4px; }
.card a.media { display: block; }
.sacts { margin-top: 22px; }
.mygrid { margin-top: var(--gap); }

.spage { display: flex; flex-direction: column; gap: var(--gap); }
.spage .phead .kick { margin: 0 0 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.shero { border-radius: var(--r-xl); padding: 10px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.smedia { border-radius: 22px; overflow: hidden; background: #000; display: grid; place-items: center; aspect-ratio: 16 / 9; align-self: start; }
.smedia.tall { aspect-ratio: 9 / 13; }
.smedia video, .smedia img { width: 100%; height: 100%; object-fit: contain; }
.smedia.blank {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--light);
  background: linear-gradient(140deg, var(--deep), color-mix(in srgb, var(--deep) 55%, var(--light)));
}
.smedia.blank .ph-light { font-size: 64px; }
.smedia.blank p { margin: 0; max-width: 32ch; opacity: .85; font-size: 15px; }
.sinfo { padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sinfo p { margin: 0; }
.sinfo .en { color: var(--muted); font-size: 15px; }
.sinfo .lead { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; }
.sinfo .story { color: var(--muted); font-size: 15px; }
.lbl2 { display: block; margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sinfo .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sinfo .acts { margin-top: auto; padding-top: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 5px; border-radius: var(--pill); background: var(--hover);
  font: 600 12.5px ui-monospace, "SF Mono", Consolas, monospace; color: var(--muted);
}
.sw i { width: 24px; height: 24px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(127 127 127 / .35); }
.sw:hover { color: var(--text); }
.parents { display: flex; flex-direction: column; gap: 4px; }
.parent { display: flex; align-items: center; gap: 12px; padding: 5px 12px 5px 5px; border-radius: 16px; background: var(--hover); }
.parent:hover { box-shadow: inset 0 0 0 1px var(--edge); }
.parent b { display: block; font-size: 15px; }
.parent small { display: block; color: var(--muted); font-size: 13px; }
.pimg { width: 54px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--deep); flex: none; }
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sbody { padding: 28px 32px; }
.sbody > .sub { margin: 0 0 16px; }
.sbody .h2gap { margin-top: 36px; }
.sbody .acts { margin: 8px 0 0; padding: 0; align-items: center; }
.moves { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 10px 0 6px; }
.move { padding: 16px 18px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass-strong) 60%, transparent); }
.move b { display: block; font-size: 16px; letter-spacing: -.02em; }
.move p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; }
.move .fits { color: var(--muted); font-size: 13.5px; }
.move .fits::before { content: "Подходит: "; font-weight: 700; }
.minis { margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card.mini .cap { padding-bottom: 2px; }
.prompt {
  width: 100%; min-height: 52vh; resize: vertical; padding: 18px 20px; border-radius: 18px; border: 0; outline: none; color: var(--text);
  background: var(--hover); box-shadow: inset 0 0 0 1px var(--edge); font: 500 13.5px/1.55 ui-monospace, "SF Mono", Consolas, monospace;
}
.prompt:focus, .inp:focus { box-shadow: inset 0 0 0 2px var(--light); }
.pstate { color: var(--muted); font-size: 14px; font-weight: 600; }
.exs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.ex { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: color-mix(in srgb, var(--glass-strong) 60%, transparent); }
.ex video, .ex img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #000; }
.ex figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 14px; font-size: 14px; color: var(--muted); min-height: 48px; }
.upl { cursor: pointer; }
.inp {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 0; outline: none; font: inherit; font-size: 15px; color: var(--text);
  background: var(--hover); box-shadow: inset 0 0 0 1px var(--edge); resize: vertical;
}
.sbody .inp { max-width: 640px; }
.sbody .lanesel { width: max-content; }
.paledit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pe { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: var(--pill); background: var(--hover); }
.pe input[type="color"] { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.pe input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.pe input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.pe .iconb { width: 30px; height: 30px; }
.iconb.add { background: var(--hover); }

.modal .panel.form { display: flex; flex-direction: column; gap: 8px; width: min(640px, 100%); padding: 28px; }
.form h2 { margin: 0; padding-right: 44px; font-size: 30px; }
.form > .sub { margin: 4px 0 6px; color: var(--muted); font-size: 15px; }
.form .acts { padding-top: 14px; align-items: center; }
.roles { display: flex; flex-direction: column; gap: 6px; }
.role {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "img name sel" "where where where";
  align-items: center; gap: 8px 12px; padding: 8px; border-radius: 18px; background: var(--hover);
}
.role .pimg { grid-area: img; }
.role b { grid-area: name; font-size: 15px; }
.role .lanesel { grid-area: sel; background: var(--glass-strong); }
.role .where { grid-area: where; }
.drop {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 96px; padding: 18px; border-radius: 18px;
  border: 1.5px dashed color-mix(in srgb, var(--text) 30%, transparent); color: var(--muted); cursor: pointer; text-align: center;
}
.drop.over, .drop:hover { border-color: var(--light); color: var(--text); background: var(--hover); }
.flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.flist li { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border-radius: 12px; background: var(--hover); font-size: 14px; }
.flist li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flist small { color: var(--muted); }
.flist b { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .shero { grid-template-columns: minmax(0, 1fr); }
  .smedia.tall { aspect-ratio: 9 / 12; max-height: 70vh; }
}
@media (max-width: 760px) {
  .sbody { padding: 20px 16px; }
  .modal .panel.form { width: 100%; padding: 22px 16px; border-radius: 28px 28px 0 0; }
  .role { grid-template-areas: "img name" "sel sel" "where where"; grid-template-columns: auto minmax(0, 1fr); }
  .role .lanesel { width: max-content; }
  .sbody .lanesel { width: auto; }
}
.spage .phead h1 { color: var(--on-art); text-shadow: 0 2px 14px rgb(0 0 0 / .35); }
.spage .phead .kick { color: var(--on-art); opacity: .8; text-shadow: 0 1px 8px rgb(0 0 0 / .35); }
.mgroup { margin-top: 10px; }
.mgroup summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--hover); cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; }
.mgroup summary::-webkit-details-marker { display: none; }
.mgroup summary span { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.mgroup summary i { transition: transform .3s var(--ease); }
.mgroup[open] summary i { transform: rotate(180deg); }

/* проект: вкладки «Ролик / Сюжет / Раскадровка / Пробы стилей» */
.ptabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--pill); background: var(--glass); flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
.ptabs a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--pill); color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; transition: background .25s, color .25s; }
.ptabs a:hover { color: var(--text); background: var(--hover); }
.ptabs a.on { background: var(--deep); color: var(--light); }
.ptabs .ph, .ptabs .ph-fill { font-size: 18px; }
.proj.pdocs { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "doc"; }
.pdoc { grid-area: doc; display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.sdoc { padding: 28px 32px; }
.dtop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kick { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.okpill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--pill); background: rgb(52 199 89 / .16); color: #1f9d48; font-size: 14px; font-weight: 700; }
:root[data-theme="dark"] .okpill { color: #5ee08a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .okpill { color: #5ee08a; } }
.sheet .dtitle { margin: 12px 0 18px; font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.dmeta { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 0; }
.dmeta > div { padding: 14px 16px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass-strong) 70%, transparent); }
.dmeta dt { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dmeta dd { margin: 4px 0 0; font-size: 15.5px; }
.dpart { margin: 30px 0 12px; font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.srows { display: flex; flex-direction: column; gap: 8px; }
.srow { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; padding: 14px 16px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass-strong) 55%, transparent); font-size: 15.5px; }
.srow .say { font-weight: 700; }
.lbl3 { display: block; margin-bottom: 3px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tpill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--pill); background: var(--light); color: var(--deep); font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform .2s var(--spring); }
.tpill:hover { transform: scale(1.05); }
.tpill .ph-fill { font-size: 12px; }
.facts { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.facts li { margin: 4px 0; }
.dsub { margin: 10px 0 0; max-width: 80ch; }
.arc { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--deep); color: var(--light); }
.arc .ph, .arc .ph-fill { font-size: 26px; margin-top: 1px; }
.arc p { margin: 0; color: #fff; }
.arc b { color: var(--light); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kind { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 800; letter-spacing: .04em; background: var(--hover); color: var(--text); white-space: nowrap; }
.kind.k-d { background: var(--deep); color: var(--light); }
.kind.k-g { background: #ffd23a; color: #1d2a5c; }
.kind.k-c { background: color-mix(in srgb, var(--light) 45%, transparent); }
.sbgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--gap); }
.sbcard { border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; }
.sbimg { display: block; padding: 0; width: 100%; cursor: zoom-in; overflow: hidden; }
.sbimg img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; transition: transform .6s var(--ease); }
.sbimg:hover img { transform: scale(1.03); }
.sbcard .sbimg img { aspect-ratio: 4 / 5; object-position: top; }
.sbbody { padding: 14px 18px 18px; font-size: 15px; }
.sbbody p { margin: 0 0 10px; }
.sbbody .say { font-weight: 700; }
.sbhead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.sbhead b { font-size: 26px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.carry { display: flex; gap: 8px; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--text) 25%, transparent); color: var(--muted); }
.carry .ph { font-size: 18px; }
.stvar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; padding: 18px; border-radius: var(--r-xl); align-items: start; }
.stshots { display: flex; gap: 10px; }
.stshots figure { margin: 0; width: 190px; }
.stshots .sbimg { border-radius: 16px; }
.stshots figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.stinfo h3 { margin: 4px 0 10px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stinfo h3 small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stinfo .num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--deep); color: var(--light); font-size: 15px; }
.stinfo ul { margin: 12px 0 0; padding-left: 20px; font-size: 15.5px; }
.stinfo li { margin: 4px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--pill); font-size: 13px; font-weight: 600; background: var(--hover); color: var(--muted); }
.tag.t-g { background: rgb(52 199 89 / .15); color: #1f9d48; }
.tag.t-w { background: rgb(255 159 10 / .16); color: #c46a00; }
.chosen { background: color-mix(in srgb, var(--light) 70%, var(--glass-strong)); color: var(--deep); }
.chosen p { color: var(--deep); }
.chosen b { color: var(--deep); }
.zoom { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 16px; background: rgb(0 0 0 / .86); cursor: zoom-out; }
.zoom.on { display: grid; }
.zoom figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: 100%; }
.zoom img { max-width: 100%; max-height: calc(100vh - 70px); border-radius: 14px; }
.zoom figcaption { color: #fff; font-weight: 600; }
@media (max-width: 760px) {
  .sdoc { padding: 20px 18px; }
  .srow { grid-template-columns: 1fr; gap: 8px; }
  .stvar { grid-template-columns: 1fr; }
  .stshots figure { width: calc(50% - 5px); }
  .ptabs a { padding: 0 14px; }
}

/* очередь */
.qhead { padding: 28px 32px 22px; }
.qtop { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.qtop h1 { margin: 0; }
.qask { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.qfilters { display: inline-flex; gap: 4px; padding: 4px; margin-top: 22px; border-radius: var(--pill); background: var(--glass); }
.qfilters button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; white-space: nowrap; border-radius: var(--pill); color: var(--muted); font-weight: 600; font-size: 15px; }
.qfilters button:hover { color: var(--text); }
.qfilters button.on { background: var(--deep); color: var(--light); }
.qfilters b { font-size: 12.5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--hover); }
.qfilters b:empty { display: none; }
.qlist { display: flex; flex-direction: column; gap: 10px; }
.qlist > .empty { margin-top: 0; }
.qcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px 20px; border-radius: var(--r-xl); }
.qic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--light); color: var(--deep); }
.qic .ph { font-size: 22px; }
.qline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qline b { font-size: 17px; font-weight: 700; }
.qst { height: 26px; padding: 0 10px; border-radius: var(--pill); display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; background: var(--hover); color: var(--muted); }
.st-queued .qst { background: color-mix(in srgb, var(--light) 60%, transparent); color: var(--deep); }
.st-taken .qst { background: var(--deep); color: var(--light); }
.st-taken .qst::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; animation: qpulse 1.4s ease-in-out infinite; }
@keyframes qpulse { 50% { opacity: .25; } }
.st-done .qst { background: rgb(52 199 89 / .16); color: #1f9d48; }
.st-failed .qst { background: rgb(255 69 58 / .14); color: #d93a30; }
.st-cancelled { opacity: .6; }
.qsub { margin-top: 4px; font-weight: 600; }
.qsub a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent); text-underline-offset: 3px; }
.qfacts { margin-top: 4px; font-size: 14px; color: var(--muted); }
.qnote { margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--glass-strong) 65%, transparent); font-size: 15px; white-space: pre-line; }
.qlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qlinks .btn, .qacts .btn { height: 38px; padding: 0 16px; }
.qacts { display: flex; gap: 8px; }
@media (max-width: 760px) {
  .qhead { padding: 22px 18px; }
  .qcard { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .qacts { grid-column: 1 / -1; }
}
