/* fybri studio — базовые компоненты и светлая оболочка FYBRI */

:root {
  --bg: #08080c;
  --bg-2: #0e0e15;
  --panel: #12121b;
  --panel-2: #171722;
  --line: #24243a;
  --line-soft: #1c1c2b;
  --text: #edeef5;
  --muted: #9a9ab5;
  --dim: #6d6d88;
  --accent: #6d5cff;
  --accent-2: #ff4d8d;
  --ok: #2fd39a;
  --warn: #ffb020;
  --grad: linear-gradient(95deg, #22c1f0 0%, #3d6dff 28%, #8b46ff 52%, #ff3f8e 74%, #ff9a2e 100%);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .55);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

button { font-family: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #22222f; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2e2e42; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- ЛОГИН-ГЕЙТ ---------- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1100px 620px at 50% -10%, rgba(109, 92, 255, .22), transparent 60%),
    radial-gradient(900px 500px at 80% 110%, rgba(255, 77, 141, .16), transparent 60%),
    var(--bg);
  overflow: auto;
}

.gate__glow {
  position: absolute;
  inset: auto 0 -30% 0;
  height: 60%;
  background: var(--grad);
  filter: blur(140px);
  opacity: .16;
  pointer-events: none;
}

.gate__card {
  position: relative;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px 24px;
  background: rgba(18, 18, 27, .88);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.gate__card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: var(--grad);
  opacity: .5;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.gate__logo {
  width: 100%;
  max-width: 300px;
  align-self: center;
  /* логотип с прозрачным фоном и светлыми буквами — подложка не нужна */
  filter: drop-shadow(0 8px 26px rgba(109, 92, 255, .28));
}

.gate__lead {
  margin: 0 0 4px;
  text-align: center;
  color: var(--muted);
}

.gate__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.gate__error {
  margin: 0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 77, 141, .12);
  border: 1px solid rgba(255, 77, 141, .35);
  color: #ff9ec0;
  font-size: 13px;
  text-align: center;
}

.gate__note {
  margin: 2px 0 0;
  color: var(--dim);
  font-size: 11.5px;
  text-align: center;
}

/* ---------- ОБЩИЕ ЭЛЕМЕНТЫ ---------- */

.field { display: flex; flex-direction: column; gap: 7px; }

.field__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

.field__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field__hint { font-size: 11.5px; color: var(--dim); }

.input {
  width: 100%;
  padding: 11px 13px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.input::placeholder { color: var(--dim); }

.input:focus {
  border-color: #4b45a8;
  box-shadow: 0 0 0 3px rgba(109, 92, 255, .18);
}

.input--area { resize: vertical; min-height: 96px; line-height: 1.55; }

.input--select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s, opacity .15s;
}

.btn:hover { background: #1f1f2e; border-color: #32324c; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--grad);
  border: none;
  color: #0b0b12;
  font-weight: 700;
}

.btn--primary:hover { filter: brightness(1.08); background: var(--grad); }
.btn--primary:disabled { opacity: .5; cursor: not-allowed; filter: none; }

.btn--ghost { background: transparent; }
.btn--lg { padding: 12px 18px; font-size: 14.5px; }
.btn--full { width: 100%; }
.btn--icon { padding: 6px 10px; background: transparent; border-color: transparent; font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .14s;
}

.chip:hover { color: var(--text); border-color: #3a3a58; }

.chip.is-active {
  color: #0b0b12;
  background: var(--grad);
  border-color: transparent;
  font-weight: 650;
}

.chips--presets .chip { font-size: 12px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(109, 92, 255, .14);
  border: 1px solid rgba(109, 92, 255, .3);
  color: #b9b0ff;
  font-size: 11px;
  white-space: nowrap;
}

.badge--ok { background: rgba(47, 211, 154, .12); border-color: rgba(47, 211, 154, .3); color: #7ce8c4; }
.badge--warn { background: rgba(255, 176, 32, .12); border-color: rgba(255, 176, 32, .3); color: #ffd083; }
.badge--muted { background: #1b1b28; border-color: var(--line); color: var(--muted); }

/* ---------- КАРКАС ---------- */

.app { display: flex; flex-direction: column; height: 100%; }

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 8, 12, .9);
  backdrop-filter: blur(10px);
  flex: 0 0 auto;
}

.topbar__brand { display: flex; align-items: center; }

.brand__logo {
  height: 30px;
  object-fit: contain;
}

.topbar__nav { display: flex; gap: 4px; margin-left: 10px; }

.navbtn {
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: all .15s;
}

.navbtn:hover { color: var(--text); background: var(--panel-2); }
.navbtn.is-active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }

.topbar__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.credits {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.credits__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.credits__unit { color: var(--dim); }

.view { flex: 1 1 auto; min-height: 0; }

.view--studio { display: grid; grid-template-columns: 384px 1fr; }

/* ---------- ПАНЕЛЬ ПАРАМЕТРОВ ---------- */

.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-right: 1px solid var(--line-soft);
  background: var(--panel);
  overflow-y: auto;
}

.modeswitch {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}

.modeswitch__btn {
  padding: 9px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.modeswitch__btn:hover { color: var(--text); }

.modeswitch__btn.is-active {
  background: var(--grad);
  color: #0b0b12;
}

.modelpick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.modelpick:hover { border-color: #3a3a58; background: #1c1c29; }

.modelpick__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }

.modelpick__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}

.modelpick__name {
  font-size: 14.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modelpick__price { font-size: 12px; color: var(--muted); }
.modelpick__chev { color: var(--dim); font-size: 13px; }

.group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--dim);
}

.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.row__label { font-size: 13px; color: var(--text); }
.row__sub { font-size: 11.5px; color: var(--dim); }

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #1b1b28;
  cursor: pointer;
  transition: background .15s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .16s, background .16s;
}

.switch.is-on { background: linear-gradient(90deg, #3d6dff, #8b46ff); border-color: transparent; }
.switch.is-on::after { transform: translateX(18px); background: #fff; }

.slider { display: flex; align-items: center; gap: 10px; }

.slider input[type="range"] {
  flex: 1;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: #262636;
  outline: none;
}

.slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #6d5cff;
  cursor: pointer;
}

.slider__value {
  min-width: 46px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
}

.stepper { display: flex; align-items: center; gap: 4px; }

.stepper button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.stepper button:hover { background: #22222f; }
.stepper__value { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border: 1px dashed #32324c;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.drop:hover, .drop.is-over { border-color: #6d5cff; background: #1b1b2b; color: var(--text); }
.drop__hint { color: var(--dim); font-size: 11px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }

.thumb {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.thumb__x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.thumb__tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 4px;
  background: rgba(0, 0, 0, .65);
  font-size: 9.5px;
  text-align: center;
  color: #dcdcf0;
}

.panel__foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  bottom: -18px;
  margin: auto -18px -18px;
  padding: 14px 18px 18px;
  background: linear-gradient(180deg, rgba(18, 18, 27, 0), var(--panel) 28%);
}

.estimate {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}

.estimate__label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); }
.estimate__value { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.estimate__note { margin-left: auto; font-size: 11px; color: var(--dim); text-align: right; }

/* ---------- ХОЛСТ ---------- */

.canvas { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }

.canvas__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 14px;
}

.canvas__title h1 { font-size: 21px; }
.canvas__title p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.canvas__title .badge { margin-top: 8px; }

.results {
  flex: 1;
  overflow-y: auto;
  padding: 6px 24px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-content: start;
}

.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 55vh;
  color: var(--muted);
  text-align: center;
}

.empty h2 { font-size: 17px; color: var(--text); }
.empty p { margin: 0; max-width: 380px; font-size: 13px; }

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.card__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: linear-gradient(140deg, #14141f, #1c1630 55%, #2a1430);
  overflow: hidden;
}

.card__media::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: var(--grad);
  opacity: .18;
  filter: blur(46px);
}

.card__ph { position: relative; z-index: 1; text-align: center; padding: 14px; }
.card__ph b { display: block; font-size: 13px; }
.card__ph span { font-size: 11.5px; color: var(--muted); }

.card__bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.card__bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s; }

/* Живая задача: прогресс у провайдера мы не знаем, поэтому честная «бегущая» полоса. */
.card__bar--live { width: 40% !important; animation: slide 1.6s ease-in-out infinite; }

@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.card__media--filled { background: #000; }
.card__media--filled::after { content: none; }

.card__media--filled img,
.card__media--filled video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__media--filled > * + * { display: none; } /* в ленте показываем первый кадр серии */

.card__error {
  padding: 8px 10px;
  border: 1px solid rgba(255, 77, 141, .3);
  border-radius: var(--radius-sm);
  background: rgba(255, 77, 141, .1);
  color: #ff9ec0;
  font-size: 12px;
}

.card__body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }

.card__prompt {
  font-size: 13px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__actions { display: flex; flex-wrap: wrap; gap: 6px; }

.btn--sm {
  padding: 6px 12px;
  font-size: 12.5px;
  text-decoration: none;
}

.card__meta { display: flex; flex-wrap: wrap; gap: 5px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--dim); }

/* ---------- СТРАНИЦЫ ---------- */

.page { height: 100%; overflow-y: auto; padding: 24px 28px 40px; }
.page__head h1 { font-size: 24px; }
.page__head p { margin: 6px 0 0; color: var(--muted); max-width: 760px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
}

.filters .input { width: 260px; }
.filters .input--select { width: 190px; }

.models__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.mcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color .15s, transform .12s;
}

.mcard:hover { border-color: #33334f; transform: translateY(-1px); }

.mcard__head { display: flex; align-items: flex-start; gap: 10px; }
.mcard__name { font-size: 15px; font-weight: 650; }
.mcard__id { font-family: var(--mono); font-size: 11.5px; color: var(--dim); word-break: break-all; }
.mcard__price { margin-left: auto; text-align: right; font-size: 13px; font-weight: 650; white-space: nowrap; }
.mcard__price small { display: block; font-size: 10.5px; font-weight: 400; color: var(--dim); white-space: normal; max-width: 190px; margin-left: auto; }
.price-guide { margin-top: 14px; border: 1px solid var(--line, rgba(0,0,0,.1)); border-radius: 12px; padding: 0 16px; background: var(--panel, transparent); }
.price-guide summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14px; }
.price-guide__body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; padding: 0 0 16px; font-size: 13.5px; line-height: 1.55; }
.price-guide__body p { margin: 0 0 8px; }
.price-guide__avg h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; }
.price-guide__row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.price-guide__avg small { display: block; margin-top: 8px; font-size: 11.5px; color: var(--dim); }
@media (max-width: 720px) { .price-guide__body { grid-template-columns: 1fr; gap: 12px; } }
.mcard__desc { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mcard__specs { display: flex; flex-direction: column; gap: 5px; }

.spec { display: flex; gap: 8px; font-size: 12px; }
.spec__k { flex: 0 0 96px; color: var(--dim); }
.spec__v { color: var(--muted); word-break: break-word; }

.mcard__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }

/* ---------- ГАЛЕРЕЯ ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

/* ---------- МОДАЛКИ ---------- */

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 4, 8, .72); backdrop-filter: blur(4px); }

.modal__box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1040px, 100%);
  max-height: min(84vh, 900px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal__box--code { width: min(760px, 100%); }

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.modal__head h2 { font-size: 16px; }

.modal__filters { display: flex; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.modal__filters .input { flex: 1; }
.modal__filters .input--select { flex: 0 0 190px; }

.modal__list { overflow-y: auto; padding: 14px 18px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

.modal__foot { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line-soft); }
.modal__hint { font-size: 11.5px; color: var(--dim); }

.tabs { display: flex; gap: 4px; padding: 12px 18px 0; }

.tab {
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.tab.is-active { background: var(--panel-2); border-color: var(--line); color: var(--text); }

.code {
  margin: 12px 18px;
  padding: 14px;
  max-height: 46vh;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #0a0a11;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: #cfd3ff;
  white-space: pre;
}

.pickcard {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: border-color .14s, background .14s;
}

.pickcard:hover { border-color: #3d3d5e; background: #191926; }
.pickcard.is-active { border-color: transparent; box-shadow: 0 0 0 1.5px #6d5cff; }

.pickcard__top { display: flex; align-items: baseline; gap: 8px; }
.pickcard__name { font-size: 14px; font-weight: 650; }
.pickcard__price { margin-left: auto; font-size: 12.5px; color: #b9b0ff; white-space: nowrap; }
.pickcard__id { font-family: var(--mono); font-size: 11px; color: var(--dim); word-break: break-all; }

/* ---------- РЕЖИМ КАЧЕСТВА ---------- */

.profile { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.profile__btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: border-color .14s, color .14s;
}

.profile__btn b { font-size: 12.5px; color: var(--text); }
.profile__btn span { font-size: 10.5px; line-height: 1.3; color: var(--dim); }
.profile__btn:hover { border-color: #3a3a58; }
.profile__btn.is-active { border-color: transparent; box-shadow: 0 0 0 1.5px #6d5cff; background: #1b1a2e; }

/* ---------- РЕДАКТОР ПРОМПТА ---------- */

.ptools { display: flex; flex-wrap: wrap; gap: 5px; }

.ptool {
  padding: 5px 9px;
  border: 1px solid rgba(109, 92, 255, .32);
  border-radius: 8px;
  background: rgba(109, 92, 255, .1);
  color: #cfc9ff;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: background .14s, border-color .14s, opacity .14s;
}

.ptool:hover { background: rgba(109, 92, 255, .2); border-color: rgba(109, 92, 255, .55); }
.ptool:disabled { opacity: .45; cursor: default; }
.ptool--flat { border-color: var(--line); background: transparent; color: var(--muted); }
.ptool--flat:hover { background: var(--panel-2); color: var(--text); border-color: #3a3a58; }

.ptools--sub { align-items: center; }

.plang { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; font-size: 11px; color: var(--dim); }
.plang > span { margin-right: 4px; }

.plang__btn {
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.plang__btn.is-active { border-color: var(--line); background: var(--panel-2); color: var(--text); }

.pinstruct { display: flex; gap: 6px; }
.pinstruct .input { flex: 1; min-width: 0; padding: 8px 11px; font-size: 13px; }

.btn--ai {
  border-color: rgba(109, 92, 255, .4);
  background: rgba(109, 92, 255, .12);
  color: #d6d1ff;
}

.btn--ai:hover { background: rgba(109, 92, 255, .22); border-color: rgba(109, 92, 255, .6); }

.is-busy { position: relative; color: transparent !important; pointer-events: none; }

.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(207, 201, 255, .35);
  border-top-color: #cfc9ff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.input--small { min-height: 0; font-size: 13px; padding: 9px 11px; }
.input--mono { font-family: var(--mono); font-size: 12px; }
.input.is-bad { border-color: rgba(255, 77, 141, .6); }

.field__hint.is-over { color: #ff9ec0; }

.negative { margin-top: 4px; }
.negative .btn { padding: 4px 9px; font-size: 11.5px; }

.estimate__value.is-error { color: #ff9ec0; }

.note {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.45;
}

.note--warn { background: rgba(255, 176, 32, .1); border: 1px solid rgba(255, 176, 32, .3); color: #ffd083; }

/* ---------- РЕФЕРЕНСЫ ВИДЕО ---------- */

.refkind {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.group__title + .row__sub + .refkind,
.group__title + .refkind { padding-top: 0; border-top: none; }

.refrow {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}

.refrow__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.refrow audio, .refrow video { grid-column: 1 / -1; width: 100%; }
.refrow__video { max-height: 140px; border-radius: 8px; background: #000; }

/* ---------- ГОЛОС ---------- */

.ttsmodels { display: flex; flex-direction: column; gap: 6px; }

.ttsmodel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.ttsmodel b { font-size: 13px; }
.ttsmodel span { font-size: 11.5px; color: var(--muted); }
.ttsmodel small { font-size: 11px; color: #b9b0ff; }
.ttsmodel:hover { border-color: #3a3a58; }
.ttsmodel.is-active { border-color: transparent; box-shadow: 0 0 0 1.5px #6d5cff; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.seg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.seg__head { display: flex; align-items: center; gap: 8px; }

.seg__n {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad);
  color: #0b0b12;
  font-size: 11px;
  font-weight: 700;
}

.input--speaker { flex: 1; min-width: 0; padding: 6px 9px; font-size: 13px; font-weight: 600; }
.seg__acts { display: flex; }
.seg__acts .btn--icon { padding: 4px 6px; font-size: 13px; color: var(--muted); }
.seg__acts .btn--icon:disabled { opacity: .3; cursor: default; }
.seg__voice { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.seg__voice .input--select { min-width: 0; }
.seg__foot { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.seg__gap { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); }
.seg__gap .input { width: 84px; padding: 7px 9px; }

.chips--tags { gap: 4px; }
.chip--tag { padding: 3px 8px; font-family: var(--mono); font-size: 11px; }

.voicecard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}

.voicecard.is-active { border-color: transparent; box-shadow: 0 0 0 1.5px #6d5cff; }
.voicecard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal__list--voices { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* Озвучка в ленте: вместо кадра — «волна» и плеер. */
.card__media--audio {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-height: 150px;
  padding: 16px 14px 14px;
}

.wave {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
}

.wave i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--grad); opacity: .85; }
.card__media--audio audio { position: relative; z-index: 1; width: 100%; height: 36px; }

.card__actions--more .btn { padding: 5px 9px; font-size: 12px; }

/* ---------- МОДАЛКИ РЕДАКТОРА ---------- */

.modal__scroll { overflow-y: auto; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }

.libgroup { display: flex; flex-direction: column; gap: 8px; }

.histrow {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}

.histrow__text { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.histrow__acts { display: flex; gap: 4px; }

.pickcard--static { cursor: default; }
.pickcard--static:hover { border-color: var(--line-soft); background: var(--bg-2); }
.variant__text { font-size: 13px; line-height: 1.55; color: var(--text); white-space: pre-wrap; }

.muxform { display: flex; flex-direction: column; gap: 14px; }
.modal__foot--flat { padding: 0; border-top: none; justify-content: flex-end; }

/* ---------- ТОСТ ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 70;
  transform: translateX(-50%);
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
  font-size: 13px;
}

/* ---------- АДАПТИВ ---------- */

@media (max-width: 1080px) {
  .view--studio { grid-template-columns: 340px 1fr; }
}

@media (max-width: 880px) {
  .view--studio { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .panel { border-right: none; border-bottom: 1px solid var(--line-soft); overflow: visible; }
  .panel__foot { position: static; margin: 0; padding: 0; background: none; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
  .topbar__nav { margin-left: 0; order: 3; width: 100%; }
  .page { padding: 18px 14px 30px; }
  .filters .input, .filters .input--select { width: 100%; }
  .modal { padding: 12px; }
  .modal__filters { flex-wrap: wrap; }
  .histrow { grid-template-columns: 1fr; }
}

/* Светлая студия: оформление по референсу FYBRI */
:root {
  --bg: #f5f8ff;
  --bg-2: #f4f7ff;
  --panel: #fff;
  --panel-2: #f8faff;
  --line: #dbe4f7;
  --line-soft: #e7edfa;
  --text: #162448;
  --muted: #687899;
  --dim: #8592ad;
  --accent: #305cf4;
  --accent-2: #d83bea;
  --grad: linear-gradient(100deg, #05bfd7 0%, #2879ed 26%, #6841eb 50%, #dc3ddd 74%, #ff9a55 100%);
  --radius: 17px;
  --radius-sm: 11px;
  --shadow: 0 20px 60px rgba(67, 104, 172, .15);
}

body { background: radial-gradient(circle at 70% -10%, #e6edff, transparent 36%), var(--bg); }
h1, h2, h3 { letter-spacing: -.025em; }
button, input, textarea, select { font-family: var(--font); }
::-webkit-scrollbar-thumb { background: #d3def4; border-color: var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #bbccec; }

.app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  grid-template-rows: 74px minmax(0, 1fr);
  height: 100dvh;
  min-height: 610px;
  background: transparent;
}
.topbar {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  height: auto;
  min-height: 0;
  padding: 0 13px 18px;
  border: 1px solid #e5ecf9;
  border-radius: 0 19px 19px 0;
  background: rgba(255, 255, 255, .9);
  box-shadow: 8px 0 30px rgba(72, 108, 185, .045);
  backdrop-filter: blur(16px);
}
.topbar__brand { height: 116px; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.brand__logo { width: 224px; height: 168px; object-fit: cover; object-position: center; max-width: none; flex: 0 0 auto; }
.topbar__nav { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; }
.navbtn {
  position: relative;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-align: left;
  color: #293a61;
  font-size: 15px;
  font-weight: 560;
}
.navbtn:hover { color: #1848c8; background: #f1f6ff; }
.navbtn.is-active {
  color: #1448ce;
  background: linear-gradient(100deg, #e9f9ff, #f5efff 62%, #fff5e2);
  box-shadow: inset 3px 0 #277ae9;
  font-weight: 700;
}
.topbar__tagline { margin-top: auto; padding: 14px 16px 0; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line-soft); text-decoration: none; }
.topbar__tagline:hover { color: var(--accent); }

.utilitybar {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  min-width: 0;
}
.utilitybar__search { display: block; width: min(540px, 46%); }
.utilitybar__search input {
  width: 100%; height: 44px;
  padding: 0 18px;
  border: 1px solid #d8e3f8;
  border-radius: 22px;
  outline: none;
  background: rgba(255,255,255,.9);
  box-shadow: 0 6px 16px rgba(54, 97, 185, .04);
  color: var(--text);
  font-size: 13px;
}
.utilitybar__search input:focus { border-color: #9dbbff; box-shadow: 0 0 0 3px #e4edff; }
.utilitybar__search input::placeholder { color: #8d9ab4; }
.topbar__right { margin-left: auto; gap: 12px; }
.credits { background: #fff; border-color: var(--line); box-shadow: 0 6px 16px rgba(54, 97, 185, .04); font-weight: 650; }
.credits__dot { background: #5b55eb; }
.credits__unit { color: #61749b; }
.utilitybar__create { min-height: 44px; padding: 0 18px; white-space: nowrap; }
.utilitybar #btn-logout { border: 1px solid var(--line); border-radius: 20px; background: #fff; }

.view { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; }
.view--studio { display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 14px; padding: 0 18px 18px 16px; overflow: hidden; }
.studio__main { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow-y: auto; padding-right: 2px; }

.studio__composer { display: flex; flex-direction: column; gap: 8px; padding: 13px 15px; background: #fff; border: 1px solid var(--line-soft); border-radius: 18px; box-shadow: 0 8px 24px rgba(66, 107, 187, .055); }
.modeswitch { display: flex; align-self: flex-start; gap: 8px; padding: 0; border: 0; background: transparent; }
.modeswitch__btn { min-width: 82px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #334667; font-size: 13px; }
.modeswitch__btn:hover { background: #f4f8ff; color: #2446b0; }
.modeswitch__btn.is-active { color: #1648d6; background: linear-gradient(110deg, #eafbff, #fceaff); border-color: #bccffc; box-shadow: 0 4px 12px rgba(79, 119, 226, .08); }
.prompt { gap: 8px; }
.prompt > .field__head { align-items: center; }
.prompt .field__label { color: #34476f; }
.prompt #prompt { height: 96px; min-height: 96px; max-height: 220px; resize: vertical; background: #fff; border-color: #a9c7fa; border-radius: 12px; font-size: 15px; line-height: 1.52; }
.chips--presets { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.chips--presets .chip { white-space: nowrap; flex: 0 0 auto; }
.ptools { gap: 5px; }
.ptool { background: #f2f5ff; border-color: #dfe7fb; color: #435b90; border-radius: 8px; }
.ptool:hover { background: #eaf0ff; border-color: #b9ccfa; }
.ptool--flat { background: #fff; color: #687899; }
.plang__btn.is-active { background: #edf2ff; }
.btn--ai { background: #eef2ff; color: #3956b6; border-color: #cbd8ff; }
.btn--ai:hover { background: #e3ebff; border-color: #b3c8ff; }

.panel { gap: 12px; padding: 18px; border: 1px solid var(--line-soft); border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(66, 107, 187, .055); }
.panel__heading { font-size: 15px; font-weight: 720; }
.modelpick { padding: 11px 13px; background: #fff; border-color: var(--line); }
.modelpick:hover { background: #f7faff; border-color: #a8bdf1; }
.modelpick__label { color: #64769a; }
.modelpick__price { color: #8391aa; }
.profile { gap: 5px; }
.profile__btn { padding: 8px 7px; background: #fff; }
.profile__btn b { color: #2a3e6b; font-size: 11.5px; }
.profile__btn span { color: #8491a8; font-size: 10px; }
.profile__btn:hover { border-color: #b3c8ff; }
.profile__btn.is-active { background: #f0f5ff; box-shadow: inset 0 0 0 1px #7da5f8; border-color: #a5c2ff; }
#params { display: flex; flex-direction: column; gap: 10px; }
.group { padding: 12px; border-color: var(--line-soft); background: #fbfcff; }
.group__title { color: #67799f; }
.row__sub { color: #8292b0; }
.switch { background: #e0e7f4; }
.switch::after { background: #fff; }
.slider input[type="range"] { background: #d6e2f7; }
.drop { background: #fff; border-color: #bfcff0; }
.drop:hover, .drop.is-over { background: #f0f5ff; border-color: #5791ef; }
.thumb { background: #e6ecf8; }
.refrow { background: #fff; }
.panel__foot { position: sticky; bottom: -18px; margin: auto -18px -18px; padding: 16px 18px 18px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 25%); }
.estimate { background: #f7faff; border-color: var(--line); }

.input { background: #fff; border-color: var(--line); color: var(--text); }
.input::placeholder { color: #9aa8c1; }
.input:focus { border-color: #74a4fb; box-shadow: 0 0 0 3px rgba(69, 125, 246, .12); }
.btn { background: #fff; color: #263a64; border-color: var(--line); }
.btn:hover { background: #f2f6ff; border-color: #b5c9ef; }
.btn--primary { background: var(--grad); color: #fff; border: none; box-shadow: 0 8px 20px rgba(94, 97, 228, .15); }
.btn--primary:hover { background: var(--grad); filter: brightness(1.04); }
.btn--ghost { background: transparent; }
.chip { background: #fff; color: #607192; }
.chip:hover { border-color: #b5c9ef; color: #254cba; }
.chip.is-active { background: linear-gradient(110deg, #e8f8ff, #f5ecff); border-color: #b5caff; color: #214fd2; }
.badge { background: #edf3ff; border-color: #d2dfff; color: #3f5caf; }
.badge--muted { background: #f4f7fd; color: #6e7e9d; }
.badge--warn, .note--warn { background: #fff8e9; border-color: #f4dc9b; color: #9a6500; }
.estimate__value.is-error, .field__hint.is-over { color: #d8466b; }

.canvas { flex: 1 0 300px; min-height: 300px; background: #fff; border: 1px solid var(--line-soft); border-radius: 18px; box-shadow: 0 8px 24px rgba(66, 107, 187, .055); overflow: hidden; }
.canvas__head { align-items: center; padding: 18px 19px 12px; }
.canvas__title h2 { font-size: 17px; font-weight: 720; }
.canvas__title p { color: #8290a8; font-size: 12px; }
.results { padding: 4px 18px 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.empty { min-height: 210px; gap: 7px; }
.empty h2 { font-size: 16px; }
.card { background: #fff; border-color: var(--line); box-shadow: 0 5px 16px rgba(59, 98, 177, .06); }
.card__media { background: #eef3ff; }
.card__media::after { opacity: .08; }
.card__error { color: #bd3c62; }
.card__foot { color: #8290a8; }

.page { padding: 22px 26px 40px; }
.page__head h1 { font-size: 28px; }
.filters, .mcard, .modal__box { background: #fff; border-color: var(--line-soft); box-shadow: 0 8px 24px rgba(66, 107, 187, .055); }
.mcard:hover { border-color: #a9beee; }
.mcard__id { color: #8b98af; }
.pickcard, .voicecard, .histrow { background: #f9fbff; border-color: var(--line); }
.pickcard:hover { background: #f0f5ff; border-color: #a9beee; }
.pickcard.is-active, .voicecard.is-active { box-shadow: inset 0 0 0 1px #638cf5; border-color: #638cf5; }
.pickcard__price { color: #4864ba; }
.modal__backdrop { background: rgba(27, 44, 85, .35); }
.tab.is-active { background: #eef3ff; }
.code { background: #101d38; color: #d8e2ff; }
.toast { background: #fff; }
.gate { background: radial-gradient(800px 480px at 20% 0%, #e8f0ff, transparent 70%), radial-gradient(800px 480px at 90% 100%, #fbeaff, transparent 70%), var(--bg); }
.gate__glow { opacity: .08; }
.gate__card { background: #fff; border-color: #e2eafa; }
.gate__logo { max-width: 260px; }
.gate__card::before { opacity: .22; }
.gate__error { color: #c64168; }

@media (max-width: 1180px) {
  .app { grid-template-columns: 190px minmax(0,1fr); }
  .view--studio { grid-template-columns: minmax(0,1fr) 292px; }
  .brand__logo { width: 195px; height: 146px; }
  .topbar__brand { height: 104px; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 76px minmax(0,1fr); }
  .topbar { padding: 0 7px 12px; }
  .topbar__brand { height: 72px; }
  .brand__logo { width: 74px; height: 75px; object-fit: cover; object-position: 41% 47%; }
  .topbar__nav { margin-top: 8px; }
  .navbtn { padding: 11px 4px; font-size: 10px; text-align: center; }
  .topbar__tagline { display: none; }
  .view--studio { grid-template-columns: minmax(0,1fr) 275px; }
}
@media (max-width: 760px) {
  .app { display: flex; flex-direction: column; min-height: 100dvh; height: auto; }
  .topbar { display: flex; flex-direction: row; align-items: center; flex: 0 0 auto; padding: 6px 12px; border-radius: 0; border-left: 0; border-right: 0; }
  .topbar__brand { width: 92px; height: 54px; }
  .brand__logo { width: 95px; height: 71px; object-position: center; }
  .topbar__nav { flex: 1; flex-direction: row; justify-content: flex-end; gap: 2px; margin: 0; }
  .navbtn { width: auto; padding: 8px 10px; font-size: 11px; }
  .navbtn::before { display: none; }
  .utilitybar { flex: 0 0 auto; padding: 8px 12px; gap: 8px; }
  .utilitybar__search { flex: 1; width: auto; }
  .utilitybar__create { padding: 0 11px; font-size: 11px; }
  .credits { display: none; }
  .utilitybar #btn-logout { display: none; }
  .view { flex: 1; min-height: 0; }
  .view--studio { display: flex; flex-direction: column; padding: 0 12px 20px; overflow: visible; }
  .studio__main { display: contents; }
  .studio__composer { order: 0; }
  .panel { order: 1; overflow: visible; }
  .panel__foot { position: static; margin: 0; padding: 0; background: none; }
  .canvas { order: 2; min-height: 300px; flex: 0 0 auto; }
  .canvas__head { flex-direction: column; align-items: stretch; gap: 10px; }
  .canvas__tools .btn { width: 100%; }
  .results { overflow: visible; }
  .page { padding: 16px 12px 30px; }
  .models__grid, .modal__list { grid-template-columns: minmax(0, 1fr); }
}
