:root {
  --bg: #0e0f13;
  --bg-soft: #15171f;
  --card: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f5f8;
  --muted: #9aa1b1;
  --accent: #8b5cf6;
  --accent-2: #c4a7ff;
  --amber: #ffb45c;
  --green: #3ddc97;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(700px 420px at -10% 15%, rgba(255, 180, 92, 0.10), transparent 55%),
    var(--bg);
}

button, input, select { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px 16px calc(96px + var(--safe-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), #5b2bd9 60%, var(--amber));
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.35);
}

.brand-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.beta-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  border: 1px solid rgba(196, 167, 255, 0.35);
  background: rgba(139, 92, 246, 0.12);
  padding: 6px 9px;
  border-radius: 999px;
}

.screen { display: none; animation: rise 220ms ease both; }
.screen.is-active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 20px 20px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.20), rgba(255, 180, 92, 0.05) 55%, rgba(255, 255, 255, 0.03)),
    var(--bg-soft);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 167, 255, 0.32), transparent 68%);
  pointer-events: none;
}

.hero-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero p {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 40ch;
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-chips { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

.hero-chips span {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.03);
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #6d35e8); color: white; box-shadow: 0 10px 24px rgba(109, 53, 232, 0.34); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.btn-full { width: 100%; margin-top: 8px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 26px 2px 12px;
}

.section-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.muted { color: var(--muted); font-size: 12px; }

.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tool-card {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 150px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
  overflow: hidden;
}

.tool-card:active { transform: scale(0.985); }
.tool-card-wide { grid-column: 1 / -1; min-height: 132px; }
.tool-card-accent { background: linear-gradient(145deg, rgba(255, 180, 92, 0.12), rgba(139, 92, 246, 0.12)); }

.tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 12px;
}

.tool-title { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.tool-text { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 6px; max-width: 34ch; }
.tool-arrow { position: absolute; right: 14px; bottom: 12px; color: var(--muted); font-size: 18px; }

.note-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.note-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 6px; box-shadow: 0 0 12px rgba(61, 220, 151, 0.7); }
.note-card strong { font-size: 13px; }
.note-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.screen-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.screen-head h1 { margin: 0; font-size: 26px; letter-spacing: -0.035em; }
.screen-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.back-btn {
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 13px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 18px;
}

.upload-zone {
  display: block;
  border: 1px dashed rgba(196, 167, 255, 0.35);
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.10), rgba(255, 255, 255, 0.025));
  border-radius: 24px;
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.upload-zone:active { border-color: var(--accent-2); background: rgba(139, 92, 246, 0.16); }
.upload-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); font-size: 22px; }
.upload-title { font-weight: 700; font-size: 16px; }
.upload-sub { color: var(--muted); font-size: 12px; margin-top: 6px; }

.editor-card {
  margin-top: 16px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.preview-wrap { border-radius: 18px; overflow: hidden; background: #07080b; display: grid; place-items: center; min-height: 220px; }
#photoCanvas { max-width: 100%; max-height: 420px; display: block; }

.control-group { margin-top: 16px; }
.control-label { font-size: 12px; color: var(--muted); margin-bottom: 9px; text-transform: uppercase; letter-spacing: 0.1em; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.chip.is-active { background: rgba(139, 92, 246, 0.24); border-color: rgba(196, 167, 255, 0.5); color: white; }

.video-preview { border-radius: 18px; overflow: hidden; background: #07080b; }
.video-preview video { width: 100%; display: block; max-height: 360px; }

.meta-row { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; margin-top: 10px; }

.status-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 180, 92, 0.28);
  background: rgba(255, 180, 92, 0.08);
  color: #ffd9ab;
  font-size: 12px;
  line-height: 1.5;
}

.file-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.file-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(139, 92, 246, 0.2); }
.file-name { font-weight: 650; font-size: 13px; word-break: break-all; }
.file-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }

.select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
  outline: none;
}

.sample-card { margin-top: 16px; padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); }
.sample-title { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sample-card pre { margin: 0; white-space: pre-wrap; color: #cfd3dd; font-size: 12px; line-height: 1.55; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: rgba(14, 15, 19, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 10px;
}
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { color: var(--accent-2); background: rgba(139, 92, 246, 0.12); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  transform: translateX(-50%) translateY(14px);
  background: #1d202a;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 20;
  max-width: min(88vw, 420px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 360px) {
  .bento { grid-template-columns: 1fr; }
  .tool-card-wide { grid-column: auto; }
  .hero h1 { font-size: 30px; }
}
/* Свободное кадрирование */
.preview-wrap,
.video-preview {
  position: relative;
}

.crop-overlay {
  position: absolute;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  touch-action: none;
  border-radius: 18px;
}

.crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 9999px rgba(3, 4, 8, 0.62);
  cursor: move;
  pointer-events: auto;
  touch-action: none;
}

.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, transparent 33.1%, rgba(255, 255, 255, 0.38) 33.3%, transparent 33.5%, transparent 66.1%, rgba(255, 255, 255, 0.38) 66.3%, transparent 66.5%),
    linear-gradient(0deg, transparent 33.1%, rgba(255, 255, 255, 0.38) 33.3%, transparent 33.5%, transparent 66.1%, rgba(255, 255, 255, 0.38) 66.3%, transparent 66.5%);
}

.crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.45);
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}

.crop-handle[data-handle="nw"] { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-handle[data-handle="n"]  { left: 50%; top: -8px; transform: translateX(-50%); cursor: ns-resize; }
.crop-handle[data-handle="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-handle[data-handle="e"]  { right: -8px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.crop-handle[data-handle="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.crop-handle[data-handle="s"]  { left: 50%; bottom: -8px; transform: translateX(-50%); cursor: ns-resize; }
.crop-handle[data-handle="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-handle[data-handle="w"]  { left: -8px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }

.crop-hint {
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 2;
  transform: translateX(-50%);
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(4, 5, 9, 0.72);
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.crop-readout {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.progress { margin-top: 12px; }

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.35s ease;
}

.progress-text { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.result-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.text-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 12px;
  outline: none;
}

.text-input:focus { border-color: rgba(196, 167, 255, 0.5); }

.result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.result-actions .btn { flex: 1 1 140px; }

.btn[disabled] { opacity: 0.55; }


/* --- независимые режимы, рамки, музыка --- */
.frame-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
}

.frame-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
}

.frame-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.frame-item.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
  color: var(--text);
}

.file-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  word-break: break-all;
}

.file-pick:hover {
  border-color: var(--accent);
  color: var(--text);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.tag-stub {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 180, 92, 0.16);
  color: var(--amber);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.02em;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.slider-row strong {
  min-width: 44px;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.hint {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.divider {
  height: 1px;
  margin: 22px 0 18px;
  background: var(--line);
}

/* Панели инструментов */
.toolbar { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.toolbar::-webkit-scrollbar { display: none; }
.tool { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 58px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.tool.is-active { background: rgba(139, 92, 246, 0.24); border-color: rgba(196, 167, 255, 0.5); color: #fff; }
.tool-ico { font-size: 15px; line-height: 1; }
.panel { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.panel[hidden] { display: none; }
.panel .control-group { margin-top: 10px; }
.field-row { display: flex; gap: 10px; }
.field-row label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.field-row .text-input { margin-top: 0; padding: 10px; }

.frame-group-title {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.preset-row { margin: 10px 0 4px; }
.color-input {
  width: 64px;
  height: 34px;
  padding: 2px;
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  background: #12151c;
}
.subs-edit { margin-top: 12px; }
.subs-text {
  min-height: 180px;
  width: 100%;
  margin: 8px 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.slide-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.slide-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.slide-row.drag-over {
  border-color: rgba(120, 170, 255, 0.7);
}

.slide-handle {
  cursor: grab;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  touch-action: none;
}

.slide-num {
  min-width: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.slide-thumb {
  width: 42px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
}

.slide-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.slide-dur {
  width: 64px;
  flex: 0 0 auto;
  text-align: center;
}

.slide-remove {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.slide-apply {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 8px;
}

.slide-apply label {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}.home-hero { padding: 8px 2px 18px; }
.home-hero h1 { margin: 0; font-size: 30px; letter-spacing: -0.04em; }
.home-hero p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.upload-grid { display: grid; gap: 14px; }
.upload-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 18px;
  border-radius: 24px;
  border: 1px solid rgba(196, 167, 255, 0.28);
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.16), rgba(255, 255, 255, 0.03));
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}
.upload-card:active { transform: scale(0.99); border-color: var(--accent-2); }
.upload-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}
.upload-card-title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.upload-card-sub { color: var(--muted); font-size: 12px; line-height: 1.4; }

.logo-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.logo-preview {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
}
.logo-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.logo-block .control-label:not(:first-child) { margin-top: 14px; }
.btn-mini {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.home-title { margin: 0; letter-spacing: -0.04em; line-height: 1.08; text-align: center; }
.home-title > span { display: block; }
.home-title > span:first-child { font-size: 34px; font-weight: 800; }
.home-title-sub { font-size: 23px; font-weight: 600; margin-top: 4px; }

.dev-card { width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; align-items: center; }
.dev-arrow { margin-left: auto; color: var(--muted); font-size: 20px; align-self: center; }
.dev-link { color: var(--accent-2); border-color: rgba(196, 167, 255, 0.45); }

body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 10, 0.72); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.modal-card h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.modal-sub { margin: 6px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
}
.dev-list { margin: 0 0 16px; padding-left: 18px; font-size: 14px; line-height: 1.7; }
.modal-card .btn { margin-top: 8px; }
.dev-links { display: flex; gap: 10px; margin-top: 12px; }
.dev-links a {
  flex: 1; text-align: center; padding: 10px; border-radius: 12px;
  border: 1px solid var(--line); color: var(--accent-2); text-decoration: none; font-size: 13px;
}
.dev-card, .dev-card:hover, .dev-card:focus { text-decoration: none; }
.review-card .note-dot { background: var(--amber); box-shadow: 0 0 12px rgba(255, 180, 92, 0.7); }
.modal-card .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.modal-card .btn-primary { color: #fff; }
.dev-phone {
  display: block;
  margin-top: 10px;
  padding: 10px 8px;
  text-align: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.dev-note { margin: 0 0 4px; text-align: center; }

/* --- доработки интерфейса --- */
.sub-block { margin-top: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.03); }
.sub-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.quota-line { margin: 10px 0 4px; font-size: 12px; color: var(--muted); text-align: center; }
.carry-hint { margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(196, 167, 255, 0.3); font-size: 12px; color: #d9c9ff; }
.editor-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.result-preview { display: block; width: 100%; border-radius: 12px; background: #000; margin-bottom: 8px; }
.result-preview[hidden] { display: none; }
.slide-move { flex: 0 0 auto; width: 26px; height: 28px; padding: 0; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.05); color: var(--text); font-size: 13px; line-height: 1; }
.slide-move[disabled] { opacity: 0.35; }
.restore-card { width: 100%; text-align: left; }
.restore-card .restore-text { flex: 1 1 auto; min-width: 0; }
.restore-card .btn { padding: 8px 12px; font-size: 12px; border-radius: 12px; }
.panel .logo-block { margin-top: 0; padding-top: 0; border-top: 0; }


.banner {
  margin: 12px 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 120, 120, 0.35);
  background: rgba(255, 90, 90, 0.12);
  color: #ffd0d0;
  font-size: 12.5px;
  line-height: 1.45;
}

.logo-details > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}
.logo-details > summary::-webkit-details-marker { display: none; }
.logo-details > summary::after { content: '\25BE'; color: var(--muted); }
.logo-details[open] > summary::after { content: '\25B4'; }

.btn-cancel {
  margin-top: 10px;
  font-size: 12px;
  padding: 8px 14px;
}

.steps { display: grid; gap: 8px; margin: 12px 0 4px; padding: 14px; border: 1px dashed var(--line); border-radius: 16px; }
.steps[hidden] { display: none; }
.step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.step-num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: rgba(139, 92, 246, 0.35); }
.btn-retry { margin-top: 6px; font-size: 13px; }
