/* Верстак — кабинет: общие элементы (кнопки, поля, окна, листы, меню), вход, «Мои сайты», «Новый сайт».
   Цвета — только из /shared/tokens.css. Редактор — в editor.css. */

html, body { height: 100%; }
body { overflow-x: hidden; overscroll-behavior: none; }
#app { min-height: 100%; }
/* длительности и кривые — из Brain Motion (/shared/brain-motion.css): движение как во всей экосистеме */
:root { --ctl: 36px; --viz-1: #2B50D8; --viz-2: #D9480F; --t-fast: var(--bm-fast, 160ms); --t: var(--bm-base, 260ms); --t-slow: var(--bm-slow, 420ms); --ease: var(--bm-ease-out, cubic-bezier(.16, 1, .3, 1)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --viz-1: #6685F5; --viz-2: #DB6B38; } }
:root[data-theme="dark"] { --viz-1: #6685F5; --viz-2: #DB6B38; }
@media (pointer: coarse) { :root { --ctl: 44px; } }

/* ── мелочи ── */
.row { display: flex; align-items: center; } .col { display: flex; flex-direction: column; }
.gap { gap: 10px; } .gap-s { gap: 8px; } .end { justify-content: flex-end; } .row.wrap { flex-wrap: wrap; } .center { text-align: center; align-items: center; }
.grow { flex: 1 1 0; min-width: 0; }
.muted { color: var(--muted); } .small { font-size: var(--fs-sm); } .pad { padding: 14px; }
.mono { font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.linkish:hover { text-decoration: underline; } .linkish.quiet { color: var(--muted); font-weight: 500; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-full); background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.sub-h { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin: 4px 0 0; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }

.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; flex: none; opacity: .8; }
.spin.sm { width: 13px; height: 13px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--muted); }
.boot { min-height: 100dvh; display: grid; place-items: center; place-content: center; text-align: center; padding: 24px; }
.boot-mark { animation: boot 1.1s var(--ease) infinite alternate; display: block; }
.boot-mark img { border-radius: 23%; }
@keyframes boot { from { transform: translateY(0); } to { transform: translateY(-7px); } }

.vs-mark { flex: none; display: block; }
.vs-mark .m-bg { fill: #16181D; } .vs-mark .m-fg { fill: #C6F135; } .vs-mark .m-pc { fill: #F4F5F7; }
:root[data-theme="dark"] .vs-mark .m-bg { fill: #23262E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vs-mark .m-bg { fill: #23262E; } }
.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar-l { display: inline-grid; place-items: center; background: var(--ink); color: var(--surface); font-weight: 700; }

.note { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: var(--r); font-size: var(--fs-sm); line-height: 1.4; background: var(--surface-2); color: var(--ink-2); }
.note > .ic { margin-top: 1px; } .note.col { flex-direction: column; gap: 5px; }
.note.err { background: var(--danger-soft); color: var(--danger); } .note.warn { background: var(--warn-soft); color: var(--warn); } .note.info { background: var(--info-soft); color: var(--ink); }
.note.info > .ic { color: var(--info); }

/* ── кнопки ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--ctl); padding: 0 14px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 600; font-size: var(--fs); line-height: 1; white-space: nowrap; text-decoration: none !important; cursor: pointer; flex: none; user-select: none; -webkit-user-select: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn .btn-t { overflow: hidden; text-overflow: ellipsis; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled), .btn-ghost.on { background: var(--surface-3); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .btn-danger { color: #16181D; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover:not(:disabled) { filter: brightness(.97); }
.btn-done { background: var(--surface-3); color: var(--ink); }
.btn-done .ic { color: var(--ok); }
.btn-sm { height: calc(var(--ctl) - 6px); padding: 0 10px; font-size: var(--fs-sm); border-radius: 7px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: var(--fs-md); border-radius: 10px; }
.btn-block { width: 100%; }
.btn.is-loading { pointer-events: none; }
.ibtn { display: inline-grid; place-items: center; width: var(--ctl); height: var(--ctl); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); flex: none; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.ibtn:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.ibtn.on { background: var(--surface-3); color: var(--ink); }
.ibtn:disabled { opacity: .35; cursor: default; }

/* ── поля ── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-l { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field-h { display: block; font-size: 12px; line-height: 1.35; color: var(--muted); font-weight: 400; }
.field-err { font-size: 12px; color: var(--danger); }
.inp { width: 100%; min-height: var(--ctl); padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); outline: 0;
  transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.inp::placeholder { color: var(--faint); }
.inp:hover { border-color: var(--faint); }
.inp:focus, .inp:focus-visible { border-color: var(--sel); box-shadow: 0 0 0 3px rgba(61, 107, 255, .2); border-radius: var(--r-sm); }
textarea.inp { resize: none; line-height: 1.4; display: block; }
@media (pointer: coarse) { .inp { font-size: 16px; } }
.inp-wrap { position: relative; display: flex; }
.inp-wrap .inp { padding-right: 40px; } .inp-suf { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: var(--fs-sm); pointer-events: none; }
.inp.num { font-variant-numeric: tabular-nums; }
.sel-wrap { position: relative; } .sel { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; }
.sel-ic { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.search { position: relative; } .search > .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .inp { padding-left: 34px; }
.range { width: 100%; accent-color: var(--sel); height: 24px; margin: 0; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-3); max-width: 100%; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: calc(var(--ctl) - 6px); padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; min-width: 0; }
.seg button span { overflow: hidden; text-overflow: ellipsis; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.seg-sm button { padding: 0 9px; }
.seg-fill { display: flex; } .seg-fill button { flex: 1 1 0; padding: 0 4px; }
.seg-wrap { display: flex; flex-wrap: wrap; }

.switch-row { display: flex; align-items: center; gap: 12px; min-height: var(--ctl); cursor: pointer; }
.sw-l { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.switch { appearance: none; -webkit-appearance: none; position: relative; width: 40px; height: 24px; border-radius: 99px; background: var(--line-strong); margin: 0; flex: none; cursor: pointer; transition: background var(--t); }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform var(--t) var(--ease); }
.switch:checked { background: var(--ink); } .switch:checked::after { transform: translateX(16px); }
:root[data-theme="dark"] .switch:checked { background: var(--lime); } :root[data-theme="dark"] .switch:checked::after { background: #16181D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .switch:checked { background: var(--lime); } :root:not([data-theme="light"]) .switch:checked::after { background: #16181D; } }

/* ── окна ── */
.modal-back { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(12, 13, 16, .5); animation: fade var(--t) both; overflow-y: auto; }
.modal { width: 100%; max-width: 460px; max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3); animation: pop var(--t-slow) var(--ease) both; outline: 0; }
.modal-wide { max-width: 720px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 12px 12px 4px 18px; }
.modal-h h2 { font-size: var(--fs-lg); flex: 1; }
.modal-b { padding: 12px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.modal-ask .modal-b { padding-top: 20px; } .modal-ask form { display: flex; flex-direction: column; gap: 10px; }
.ask-t { font-size: var(--fs-md); line-height: 1.3; } .ask-s { font-size: var(--fs-sm); } .ask-f { margin-top: 8px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {
  .modal-back { place-items: end center; padding: 0; }
  .modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); animation-name: rise; }
  @keyframes rise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
}

.menu { position: fixed; z-index: 260; min-width: 200px; max-width: min(320px, calc(100vw - 16px)); max-height: min(70dvh, 460px); overflow-y: auto; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); animation: pop var(--t) var(--ease) both; transform-origin: top right; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu-i { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--ctl); padding: 6px 10px; border: 0; border-radius: 7px; background: none; color: var(--ink); text-align: left; text-decoration: none !important; font-weight: 500; cursor: pointer; }
.menu-i > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-i .ic { color: var(--muted); } .menu-i small { color: var(--on-primary); background: var(--primary); border-radius: 99px; padding: 1px 7px; font-weight: 700; font-size: 11.5px; }
.menu-i:hover, .menu-i:focus-visible { background: var(--surface-3); box-shadow: none; }
.menu-i.on { font-weight: 700; } .menu-i.on .ic { color: var(--ink); }
.menu-i.danger, .menu-i.danger .ic { color: var(--danger); }
.menu-i:disabled { opacity: .45; }

.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 24px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #16181D; color: #F1F2F4; box-shadow: var(--sh-3); font-size: var(--fs-sm); font-weight: 500; pointer-events: auto; animation: pop var(--t-slow) var(--ease) both; max-width: 100%; border: 1px solid rgba(255, 255, 255, .1); }
.toast.ok .ic { color: #C6F135; } .toast.err .ic { color: #FF8F8F; }
.toast-act { background: none; border: 0; color: #C6F135; font-weight: 700; padding: 4px 2px; cursor: pointer; white-space: nowrap; }
@media (max-width: 767px) { .toasts { bottom: calc(126px + env(safe-area-inset-bottom)); } }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 16px; }
.empty-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.empty p { max-width: 34ch; font-size: var(--fs-sm); }

/* ── окна выбора ── */
.drop { position: relative; display: grid; place-items: center; min-height: 190px; padding: 18px; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface-2); overflow: hidden; transition: border-color var(--t-fast), background var(--t-fast); }
.drop.over { border-color: var(--sel); background: var(--sel-soft); }
.drop-cur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .16; }
.drop-t { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.drop-t .muted { font-size: var(--fs-sm); margin-bottom: 4px; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 200px; overflow-y: auto; padding: 2px; }
.img-cell { aspect-ratio: 1; border: 0; padding: 0; border-radius: 9px; overflow: hidden; background: var(--surface-3); cursor: pointer; outline: 2px solid transparent; outline-offset: 1px; }
.img-cell img { width: 100%; height: 100%; object-fit: cover; }
.img-cell:hover, .img-cell.on { outline-color: var(--sel); }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 44dvh; overflow-y: auto; margin: 0 -6px; }
.pick-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.pick-row small { color: var(--muted); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .ic { color: var(--muted); } .pick-row:hover { background: var(--surface-2); }
.pick-row.on { background: var(--primary-soft); color: var(--primary-soft-ink); font-weight: 600; }
.dlg-foot { border-top: 1px solid var(--line); margin: 2px -18px -8px; padding: 8px 12px 0; }
.dlg-icon { max-width: 520px; } .ico-scroll { overflow-y: auto; max-height: 50dvh; min-height: 160px; display: flex; flex-direction: column; gap: 10px; margin: 0 -4px; padding: 2px 4px; }
.ico-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.ico-cell { aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--ink-2); cursor: pointer; }
.ico-cell svg { width: 22px; height: 22px; } .ico-cell:hover { background: var(--surface-3); color: var(--ink); }
.ico-cell.on { background: var(--pick); color: var(--on-pick); }
.sic { display: inline-grid; place-items: center; flex: none; line-height: 0; } .sic svg { width: 18px; height: 18px; }

/* ── вход ── */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-art { position: relative; overflow: hidden; padding: 40px clamp(28px, 5vw, 72px); display: flex; flex-direction: column; background-color: #16181D; color: #F1F2F4;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px; background-position: -1px -1px; }
.login-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; font-size: 21px; letter-spacing: -.01em; text-decoration: none !important; align-self: flex-start; }
.login-brand .vs-mark .m-bg { fill: #2A2E37; }
.login-art h1 { margin-top: clamp(28px, 7vh, 72px); font-size: clamp(30px, 3.5vw, 46px); line-height: 1.06; letter-spacing: -.03em; max-width: 13em; text-wrap: balance; }
.login-lead { margin-top: 16px; max-width: 40ch; color: #B4B9C4; font-size: var(--fs-md); line-height: 1.5; }
.login-main { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.login-h { font-size: var(--fs-xl); text-align: center; margin-bottom: 4px; }
.login-wait { display: grid; place-items: center; gap: 10px; padding: 40px 0; color: var(--muted); }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line-strong); }
.demo-box { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.demo-box b { display: block; margin-bottom: 2px; }
.login-foot { margin-top: 4px; text-wrap: balance; }
.omsg-signin .signin-logo { box-shadow: 0 10px 28px -8px rgba(22, 24, 29, .3), inset 0 0 0 1px rgba(0, 0, 0, .05); }

/* сценка: блоки встают на место */
.bench { position: relative; margin: auto 0 0; padding-top: 36px; width: min(100%, 520px); }
.bench-page { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: #F6F7F9; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06); }
.bp { position: relative; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px #E4E6EB; animation: bp-in .9s cubic-bezier(.2, .9, .25, 1.1) both; }
.bp i, .bp b, .bp s, .bp u, .bp em { display: block; border-radius: 4px; text-decoration: none; }
.bp b { height: 9px; background: #16181D; width: 62%; } .bp b.short { width: 40%; }
.bp s { height: 6px; background: #D5D8DF; width: 78%; } .bp u { height: 20px; width: 84px; border-radius: 7px; background: #C6F135; }
.bp-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; animation-delay: .1s; --from: translate(-26px, -34px) rotate(-5deg); }
.bp-head i { width: 18px; height: 18px; border-radius: 6px; background: #16181D; } .bp-head s { width: 34px; } .bp-head s:nth-of-type(1) { margin-left: auto; } .bp-head u { height: 16px; width: 54px; }
.bp-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; animation-delay: .32s; --from: translate(60px, -46px) rotate(7deg); }
.bp-hero s { width: 54%; margin-bottom: 4px; }
.bp-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bp-card { display: flex; flex-direction: column; gap: 6px; padding: 11px; --from: translate(-40px, 50px) rotate(-8deg); }
.bp-card i { width: 20px; height: 20px; border-radius: 7px; background: #E9F7B4; box-shadow: inset 0 0 0 1.5px #C6F135; margin-bottom: 2px; }
.bp-row .bp-card:nth-child(1) { animation-delay: .52s; } .bp-row .bp-card:nth-child(2) { animation-delay: .64s; --from: translate(0, 62px) rotate(4deg); } .bp-row .bp-card:nth-child(3) { animation-delay: .76s; --from: translate(46px, 44px) rotate(9deg); }
.bp-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; padding: 12px; animation-delay: .96s; --from: translate(30px, 60px) rotate(-4deg); }
.bp-form b { grid-column: 1 / -1; width: 36%; } .bp-form em { height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px #D5D8DF; } .bp-form u { width: 64px; }
@keyframes bp-in { from { opacity: 0; transform: var(--from, translateY(30px)); } to { opacity: 1; transform: none; } }
.bench-tag { position: absolute; left: 24px; top: 86px; padding: 5px 8px; border-radius: 0 0 6px 0; background: #3D6BFF; color: #fff; font-size: 11.5px; font-weight: 500; animation: tag-in .4s 1.5s both; }
.bench-page::after { content: ''; position: absolute; left: 12px; right: 12px; top: 58px; height: 100px; border-radius: 9px; box-shadow: 0 0 0 2px #3D6BFF; animation: tag-in .4s 1.5s both; pointer-events: none; }
.bench-cur { position: absolute; left: 58%; top: 150px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); animation: cur 1.6s .5s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes tag-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cur { from { opacity: 0; transform: translate(150px, 130px); } 30% { opacity: 1; } to { opacity: 1; transform: none; } }
@media (max-width: 899px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-art { padding: 20px 20px 22px; }
  .login-art h1 { margin-top: 18px; font-size: 26px; max-width: none; } .login-lead { font-size: var(--fs); margin-top: 8px; }
  .bench { display: none; }
  .login-main { place-items: start center; padding: 24px 16px 32px; }
}

/* ── шапка кабинета и «Мои сайты» ── */
.page { min-height: 100dvh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 12px 0 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; letter-spacing: -.01em; text-decoration: none !important; }
.top-t { font-size: var(--fs-md); margin-left: 6px; }
.top-user { padding: 0 8px 0 4px; gap: 8px; max-width: 220px; } .top-name { max-width: 150px; }
.page-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px 20px 48px; }
.page-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; } .page-h h1 { font-size: var(--fs-xl); letter-spacing: -.02em; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.scard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow var(--t), transform var(--t) var(--ease), border-color var(--t); }
.scard:hover { box-shadow: var(--sh-2); border-color: var(--line-strong); transform: translateY(-2px); }
.scard.busy { opacity: .55; pointer-events: none; }
.scard-pic { position: relative; display: block; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.thumb { position: relative; overflow: hidden; width: 100%; background: var(--surface-2); }
.thumb iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
.state { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #16181D; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #9399A5; }
.state-pub::before { background: #C6F135; } .state-dirty::before { background: #FFB02E; }
.scard-new { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: var(--accent-2); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.scard-b { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 6px; padding: 10px 8px 12px 14px; }
.scard-t { color: var(--ink); min-width: 0; text-decoration: none !important; } .scard-t b { display: block; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard-m { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--muted); padding-right: 6px; min-height: 22px; }
.scard-m a, .scard-m > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.scard-m a:hover { color: var(--link); }
.scard-v { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.scard-new-site { align-items: center; justify-content: center; gap: 8px; min-height: 250px; padding: 20px; text-align: center; color: var(--ink); text-decoration: none !important; border-style: dashed; border-color: var(--line-strong); background: transparent; }
.scard-new-site .plus { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); margin-bottom: 4px; transition: transform var(--t) var(--ease); }
.scard-new-site:hover .plus { transform: rotate(90deg) scale(1.06); }
.scard-new-site b { font-size: var(--fs-md); } .scard-new-site small { color: var(--muted); max-width: 26ch; font-size: var(--fs-sm); }
@media (max-width: 599px) { .page-wrap { padding: 16px 14px 40px; } .sgrid { grid-template-columns: 1fr; gap: 14px; } .scard-new-site { min-height: 0; flex-direction: row; text-align: left; justify-content: flex-start; padding: 14px; } .scard-new-site small { display: none; } .scard-new-site .plus { margin: 0; width: 44px; height: 44px; border-radius: 13px; } .top-name { display: none; } .top-user { padding: 0 4px; } }

/* ── новый сайт ── */
.new-grid { flex: 1; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0; min-height: 0; }
.new-tpls { padding: 18px 14px 24px 20px; border-right: 1px solid var(--line); overflow-y: auto; max-height: calc(100dvh - 52px); }
.new-tpls h2 { font-size: var(--fs-md); margin: 0 6px 12px; }
.tpls { display: flex; flex-direction: column; gap: 6px; }
.tpl { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.tpl:hover { background: var(--surface-3); }
.tpl.on { background: var(--surface); border-color: var(--pick); box-shadow: 0 0 0 1px var(--pick); }
.tpl-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.tpl.on .tpl-ic { background: var(--primary); color: var(--on-primary); }
.tpl-t { min-width: 0; } .tpl-t b { display: block; } .tpl-t small { display: block; color: var(--muted); font-size: var(--fs-sm); line-height: 1.3; }
.new-view { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; max-height: calc(100dvh - 52px); background-color: var(--mat);
  background-image: linear-gradient(var(--mat-line) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line) 1px, transparent 1px), linear-gradient(var(--mat-line-2) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line-2) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px; }
.new-frame { position: relative; min-height: 0; padding: 20px 24px 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; overflow: hidden; }
.new-dev { flex: none; box-shadow: var(--sh-1); }
.new-shot { position: relative; width: 100%; max-width: 980px; min-height: 0; flex: 1; border-radius: 12px 12px 0 0; overflow: hidden; box-shadow: var(--sh-3); background: #fff; animation: pop var(--t-slow) var(--ease) both; }
.new-shot iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; }
.new-frame.phone .new-shot { max-width: 300px; border-radius: 26px 26px 0 0; border: 6px solid #16181D; border-bottom: 0; }
.new-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 16px; align-items: end; padding: 14px 24px 18px; background: var(--surface); border-top: 1px solid var(--line); }
.new-form .note { grid-column: 1 / -1; }
.pdots { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: var(--ctl); }
.pdot { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: linear-gradient(135deg, var(--b) 50%, var(--a) 50%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); display: grid; place-items: center; color: var(--muted); }
.pdot-auto { background: var(--surface-3); }
.pdot.on { outline: 2px solid var(--pick); outline-offset: 2px; }
@media (pointer: coarse) { .pdot { width: 40px; height: 40px; } }
@media (max-width: 899px) {
  .new-grid { grid-template-columns: 1fr; display: flex; flex-direction: column; }
  .new-tpls { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 0 12px; max-height: none; overflow: visible; }
  .new-tpls h2 { margin: 0 16px 8px; }
  .tpls { flex-direction: row; overflow-x: auto; padding: 2px 16px 6px; gap: 8px; scrollbar-width: none; } .tpls::-webkit-scrollbar { display: none; }
  .tpl { flex: none; width: 236px; background: var(--surface); border-color: var(--line); }
  .new-view { max-height: none; display: flex; flex-direction: column; flex: 1; }
  .new-frame { padding: 14px 16px 0; min-height: 46dvh; flex: 1 1 auto; }
  .new-form { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
  .new-go { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { .bp, .bench-cur, .bench-tag, .bench-page::after, .boot-mark { animation: none !important; } }
