body.mobile-vpe-shell {
  --mobile-bg: #03101a;
  --mobile-surface: rgba(8, 19, 31, 0.84);
  --mobile-surface-strong: rgba(10, 25, 39, 0.96);
  --mobile-border: rgba(126, 209, 255, 0.18);
  --mobile-border-strong: rgba(255, 255, 255, 0.1);
  --mobile-text: #f5fbff;
  --mobile-muted: #98b7ca;
  --mobile-accent: #79f0ff;
  --mobile-accent-2: #ffb36b;
  --mobile-accent-3: #7ef3c6;
  background:
    radial-gradient(circle at top left, rgba(121, 240, 255, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 179, 107, 0.18), transparent 28%),
    linear-gradient(180deg, #04111b 0%, #03101a 45%, #071723 100%);
  color: var(--mobile-text);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body.mobile-vpe-shell::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.32;
}

body.mobile-vpe-shell .orb1 {
  width: 320px;
  height: 320px;
  top: -120px;
  right: -80px;
  background: rgba(121, 240, 255, 0.12);
}

body.mobile-vpe-shell .orb2 {
  width: 280px;
  height: 280px;
  bottom: 12%;
  left: -120px;
  background: rgba(255, 179, 107, 0.1);
}

body.mobile-vpe-shell .wrap {
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  padding:
    calc(12px + env(safe-area-inset-top))
    14px
    calc(16px + env(safe-area-inset-bottom));
  height: auto;
}

body.mobile-vpe-shell .app {
  gap: 16px;
  overflow: visible;
}

body.mobile-vpe-shell .header {
  position: sticky;
  top: calc(6px + env(safe-area-inset-top));
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--mobile-border);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(7, 20, 33, 0.95), rgba(10, 28, 43, 0.84));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(22px);
}

body.mobile-vpe-shell .header-constructor-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

body.mobile-vpe-shell .header-constructor-title {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--mobile-muted);
}

body.mobile-vpe-shell .header-constructor-toggle,
body.mobile-vpe-shell .constructor-toggle {
  min-height: 44px;
  min-width: 44px;
  border-radius: 14px;
  background: rgba(121, 240, 255, 0.08);
  border: 1px solid var(--mobile-border);
}

body.mobile-vpe-shell .header-left {
  align-items: flex-start;
  gap: 14px;
}

body.mobile-vpe-shell .logo-stack {
  flex-shrink: 0;
}

body.mobile-vpe-shell .logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(121, 240, 255, 0.34), rgba(255, 179, 107, 0.22));
  color: #fdfefe;
}

body.mobile-vpe-shell .header h1 {
  font-family: "Raleway", "Manrope", sans-serif;
  font-size: clamp(1.32rem, 6vw, 1.85rem);
  line-height: 1.08;
}

body.mobile-vpe-shell .suite-badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.68rem;
  line-height: 1.25;
}

body.mobile-vpe-shell .suite-models,
body.mobile-vpe-shell .build-note {
  color: var(--mobile-muted);
  font-size: 0.82rem;
}

body.mobile-vpe-shell #hosting-info {
  flex-wrap: wrap;
}

body.mobile-vpe-shell .header-right {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.mobile-vpe-shell .option-btn,
body.mobile-vpe-shell .btn,
body.mobile-vpe-shell .format-tab,
body.mobile-vpe-shell .mobile-chip,
body.mobile-vpe-shell .mobile-bar-btn,
body.mobile-vpe-shell .version-link {
  min-height: 46px;
  border-radius: 16px;
  padding: 11px 14px;
  font-weight: 700;
  border: 1px solid var(--mobile-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mobile-text);
  backdrop-filter: blur(14px);
}

body.mobile-vpe-shell .version-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

body.mobile-vpe-shell .mobile-intro {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: 20px 18px;
  border: 1px solid var(--mobile-border);
  border-radius: 28px;
  background:
    linear-gradient(140deg, rgba(8, 24, 38, 0.95), rgba(8, 17, 29, 0.88));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

body.mobile-vpe-shell .mobile-intro::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -54px;
  right: -48px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(121, 240, 255, 0.26), transparent 70%);
  pointer-events: none;
}

body.mobile-vpe-shell .mobile-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--mobile-accent);
}

body.mobile-vpe-shell .mobile-intro h2 {
  font-family: "Raleway", "Manrope", sans-serif;
  font-size: clamp(1.45rem, 6.3vw, 2rem);
  line-height: 1.06;
  margin-bottom: 10px;
}

body.mobile-vpe-shell .mobile-intro p {
  color: var(--mobile-muted);
  max-width: 32rem;
}

body.mobile-vpe-shell .mobile-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.mobile-vpe-shell .mobile-chip {
  text-decoration: none;
  font-size: 0.92rem;
}

body.mobile-vpe-shell .main-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 0;
  min-height: auto;
}

body.mobile-vpe-shell .prompt-output-panel {
  order: 1;
}

body.mobile-vpe-shell .constructor-panel {
  order: 2;
  width: 100%;
}

body.mobile-vpe-shell .main-menu-panel {
  order: 3;
}

body.mobile-vpe-shell .left-panel,
body.mobile-vpe-shell .right-panel {
  height: auto !important;
  max-height: none !important;
  overflow: visible;
  padding: 0;
  border: none;
  background: transparent;
  gap: 14px;
}

body.mobile-vpe-shell .constructor-card,
body.mobile-vpe-shell .section,
body.mobile-vpe-shell .stat-card {
  border-radius: 24px;
  border: 1px solid var(--mobile-border);
  background:
    linear-gradient(150deg, rgba(10, 25, 39, 0.96), rgba(7, 17, 28, 0.92));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(20px);
}

body.mobile-vpe-shell .constructor-card {
  padding: 16px;
}

body.mobile-vpe-shell .section {
  padding: 18px;
  transform: none;
  animation: mobile-card-in 0.45s ease both;
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

body.mobile-vpe-shell .section:hover {
  transform: none;
  border-color: rgba(121, 240, 255, 0.22);
}

body.mobile-vpe-shell .section-header {
  gap: 12px;
  align-items: flex-start;
}

body.mobile-vpe-shell .section-header h2 {
  font-size: 0.97rem;
  line-height: 1.3;
}

body.mobile-vpe-shell .section-content {
  margin-top: 12px;
}

body.mobile-vpe-shell .attributes-heading {
  margin-bottom: 4px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--mobile-muted);
}

body.mobile-vpe-shell .stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.mobile-vpe-shell .stat-card {
  min-height: 92px;
  padding: 14px 12px;
}

body.mobile-vpe-shell .stat-value {
  font-size: 1.45rem;
}

body.mobile-vpe-shell .option-group,
body.mobile-vpe-shell .format-tabs,
body.mobile-vpe-shell .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.mobile-vpe-shell textarea,
body.mobile-vpe-shell input[type="text"],
body.mobile-vpe-shell input[type="number"],
body.mobile-vpe-shell input[type="url"],
body.mobile-vpe-shell select,
body.mobile-vpe-shell .input-field,
body.mobile-vpe-shell .output-box,
body.mobile-vpe-shell .json-box {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--mobile-border-strong);
  background: rgba(0, 0, 0, 0.24);
  color: var(--mobile-text);
  font-size: 0.98rem;
}

body.mobile-vpe-shell textarea,
body.mobile-vpe-shell .input-field {
  min-height: 150px;
  padding: 16px;
}

body.mobile-vpe-shell .output-box,
body.mobile-vpe-shell .json-box {
  min-height: 180px;
  padding: 16px;
}

body.mobile-vpe-shell .json-box {
  max-height: 340px;
}

body.mobile-vpe-shell .toggle-label,
body.mobile-vpe-shell .constructor-item {
  min-height: 44px;
}

body.mobile-vpe-shell .mobile-safe-spacer {
  height: calc(86px + env(safe-area-inset-bottom));
}

body.mobile-vpe-shell .mobile-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(4, 12, 20, 0), rgba(4, 12, 20, 0.92) 34%, rgba(4, 12, 20, 0.98) 100%);
  backdrop-filter: blur(20px);
}

body.mobile-vpe-shell .mobile-bar-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--mobile-text);
}

body.mobile-vpe-shell .mobile-bar-btn-accent {
  background: linear-gradient(135deg, var(--mobile-accent), var(--mobile-accent-2));
  color: #05131d;
  border-color: transparent;
}

body.mobile-vpe-shell .notification {
  bottom: calc(90px + env(safe-area-inset-bottom));
}

body.mobile-vpe-shell .vpe-version-entry {
  bottom: calc(90px + env(safe-area-inset-bottom));
}

body.mobile-vpe-shell .prompt-output-panel .right-panel {
  position: static;
}

body.mobile-vpe-shell .right-panel::-webkit-scrollbar,
body.mobile-vpe-shell .left-panel::-webkit-scrollbar {
  width: 0;
}

@keyframes mobile-card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 821px) {
  body.mobile-vpe-shell .wrap {
    max-width: 780px;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body.mobile-vpe-shell .section {
    animation: none;
  }
}


/* === CONSOLIDATED MOBILE STYLES FROM index.html === */
    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      /* Apple iOS True Black Theme */
      --bg: #000000;
      /* Solid Dark Cards for Deep Dark Mode */
      --surface: #141415;
      --surface2: #1C1C1E;
      /* Thin elegant iOS borders */
      --border: rgba(255, 255, 255, 0.08);
      --border2: rgba(255, 255, 255, 0.12);

      --text: #ffffff;
      --muted: #8E8E93;

      /* Apple System Colors - slightly more vibrant for neon glow */
      --accent-k: #1A91FF;
      /* iOS Dark Blue */
      --accent-v: #BF5AF2;
      /* iOS Dark Purple */
      --accent-s: #FF9F0A;
      /* iOS Dark Orange */
      --active: #1A91FF;
      --glow: rgba(26, 145, 255, 0.25);

      --bg-deep: var(--bg);
      --bg-card: var(--surface);
      --bg-card-hover: var(--surface2);
      --bg-section: var(--surface);

      --accent: var(--accent-v);
      --accent-light: #BF5AF2;
      --accent-glow: rgba(191, 90, 242, 0.35);

      --green: #32D74B;
      --green-glow: rgba(50, 215, 75, 0.25);
      --orange: var(--accent-s);
      --orange-glow: rgba(255, 159, 10, 0.25);
      --red: #FF453A;

      --text-primary: var(--text);
      --text-secondary: var(--muted);
      --text-muted: #636366;
      /* System Gray 3 */

      /* Deep Dark Corners */
      --radius: 12px;
      --radius-lg: 16px;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      line-height: 1.56;
      position: relative;
      overflow-x: hidden;
    }

    /* Background grid */
    body::before {
      content: '';
      position: fixed;
      inset: 0;

      background-size: 40px 40px;
      pointer-events: none;
      z-index: -1;
    }

    /* Ambient orbs */
    .orb {
      position: fixed;
      border-radius: 50%;
      filter: blur(100px);
      pointer-events: none;
      z-index: -1;
    }

    .orb1 {
      width: 500px;
      height: 500px;
      background: rgba(0, 122, 255, 0.04);
      top: -100px;
      right: -100px;
    }

    .orb2 {
      width: 400px;
      height: 400px;
      background: rgba(88, 86, 214, 0.04);
      bottom: 100px;
      left: -100px;
    }

    .wrap {
      position: relative;
      z-index: 1;
      max-width: 1600px;
      /* Increased for 2-panel layout */
      margin: 0 auto;
      padding: 20px;
      height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* Old layout classes removal / override */
    .app {
      display: flex;
      flex-direction: column;
      flex: 1;
      overflow: hidden;
    }

    .header {
      background: #000000;
      border-bottom: 1px solid var(--border);
      padding: 12px 24px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 0;
    }

    .header-right {
      display: flex;
      gap: 10px;
    }

    .logo {
      width: 40px;
      height: 40px;
      margin: 0;
      box-shadow: 0 0 15px var(--accent-glow);
    }

    .header h1 {
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
      font-size: 1.5em;
      font-weight: 700;
      letter-spacing: -0.02em;
      text-align: left;
      margin-bottom: 0;
      line-height: 1.2;
    }

    .main-grid {
      display: grid;
      grid-template-columns: 1fr 420px;
      gap: 24px;
      flex: 1;
      overflow: hidden;
      padding-top: 20px;
    }

    .left-panel {
      padding: 0 10px 40px 0;
      height: 100%;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .right-panel {
      border-left: 1px solid var(--border);
      padding: 0 0 40px 20px;
      height: 100%;
      overflow-y: auto;
      background: transparent;
      margin-top: 0;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    /* Scrollbar for panels */
    .left-panel::-webkit-scrollbar,
    .right-panel::-webkit-scrollbar {
      width: 6px;
    }

    .left-panel::-webkit-scrollbar-track,
    .right-panel::-webkit-scrollbar-track {
      background: transparent;
    }

    .left-panel::-webkit-scrollbar-thumb,
    .right-panel::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 3px;
    }

    /* === SECTIONS === */
    .section {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      transition: all .2s cubic-bezier(0.25, 1, 0.5, 1);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

    .section:hover {
      border-color: rgba(255, 255, 255, 0.15);
      transform: translateY(-2px);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    }

    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
    }

    .section-header h2 {
      font-size: 1.02em;
      font-weight: 800;
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--text-primary);
    }

    .section-header h2 .icon {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      flex-shrink: 0;
    }

    .icon-purple {
      background: rgba(108, 92, 231, .15);
      color: var(--accent-light)
    }

    .icon-blue {
      background: rgba(100, 180, 246, .15);
      color: #64b5f6;
    }

    .icon-green {
      background: var(--green-glow);
      color: var(--green)
    }

    .icon-orange {
      background: var(--orange-glow);
      color: var(--orange)
    }

    .icon-red {
      background: rgba(255, 118, 117, .15);
      color: var(--red)
    }

    .mode-badge {
      font-size: .7em;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 6px;
      background: rgba(108, 92, 231, .12);
      color: var(--accent-light);
      border: 1px solid rgba(108, 92, 231, .2);
      letter-spacing: .03em;
      text-transform: uppercase;
    }

    .mode-badge.multi {
      background: var(--green-glow);
      color: var(--green);
      border-color: rgba(0, 206, 201, .25)
    }

    .mode-badge.pa {
      background: var(--orange-glow);
      color: var(--orange);
      border-color: rgba(253, 203, 110, .25)
    }

    .sub-label {
      display: block;
      font-size: .9em;
      font-weight: 700;
      color: var(--text);
      margin: 12px 0 8px;
    }

    /* === BUTTONS === */
    .option-group {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: 8px;
    }

    .option-btn {
      padding: 12px 14px;
      border: 1px solid var(--border);
      background: var(--bg-card);
      border-radius: var(--radius);
      cursor: pointer;
      transition: all .25s cubic-bezier(0.2, 0.8, 0.2, 1);
      font-size: .9em;
      font-weight: 500;
      text-align: left;
      position: relative;
      color: var(--text-primary);
      font-family: inherit;
      line-height: 1.4;
    }

    .option-btn:hover {
      background: var(--bg-card-hover);
      border-color: rgba(255, 255, 255, 0.2);
    }

    .option-btn:active {
      transform: scale(0.97);
    }

    .option-btn.active {
      background: var(--accent);
      color: #fff;
      font-weight: 600;
      border-color: var(--accent);
      box-shadow: 0 0 16px var(--accent-glow);
    }

    #presetGrid .option-btn.preset-selected {
      border-color: var(--green) !important;
      background: linear-gradient(145deg, rgba(0, 206, 201, 0.3), rgba(0, 160, 155, 0.24)) !important;
      color: #eaffff !important;
      box-shadow: 0 0 0 1px rgba(115, 255, 231, 0.36), 0 0 18px rgba(0, 206, 201, 0.28) !important;
    }

    .option-btn:disabled {
      opacity: .4;
      cursor: not-allowed;
      transform: none !important
    }

    /* Section-level disable when Quick Style preset is active */
    .disabled-section {
      position: relative;
      opacity: .35;
      pointer-events: none;
      user-select: none;
    }

    .disabled-section::after {
      content: '🔒 Снимите пресет для ручной настройки';
      position: absolute;
      top: 8px;
      right: 12px;
      font-size: .72em;
      color: var(--orange);
      background: rgba(15, 15, 20, .85);
      padding: 3px 10px;
      border-radius: 6px;
      pointer-events: none;
      z-index: 5;
    }

    .slot-tag {
      position: absolute;
      top: 6px;
      right: 6px;
      padding: 1px 6px;
      border-radius: 6px;
      font-size: .65em;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .slot-tag.primary {
      background: var(--green);
      color: #000
    }

    .slot-tag.accent {
      background: var(--orange);
      color: #000
    }

    /* === INPUTS & TEXTAREA === */
    .input-field {
      width: 100%;
      padding: 14px 16px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      font-size: 15px;
      /* iOS standard readability */
      transition: all .2s;
      background: #1C1C1E;
      /* Solid Dark Input */
      color: var(--text-primary);
      font-family: inherit;
    }

    .input-field:focus {
      outline: none;
      border-color: var(--accent);
      background: #2C2C2E;
      box-shadow: 0 0 0 1px var(--accent), 0 0 12px var(--accent-glow);
    }

    .input-field::placeholder {
      color: var(--text-muted)
    }

    textarea.input-field {
      resize: vertical;
      min-height: 80px
    }

    /* Tooltip ? */
    .help-tip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.1);
      color: var(--text-secondary);
      font-size: .7em;
      font-weight: 700;
      cursor: help;
      position: relative;
      flex-shrink: 0;
      border: 1px solid var(--border);
      margin-left: 6px;
      line-height: 1;
      transition: all .2s;
    }

    .help-tip:hover {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    .help-tip .tip-text {
      visibility: hidden;
      opacity: 0;
      position: absolute;
      left: 50%;
      transform: translateX(-50%) translateY(-8px);
      top: calc(100% + 10px);
      bottom: auto;
      width: 300px;
      background: rgba(30, 30, 30, 0.95);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      color: #fff;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px 16px;
      font-size: 13px;
      font-weight: 500;
      line-height: 1.5;
      z-index: 1800;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
      pointer-events: none;
      transition: all .2s cubic-bezier(0.2, 0.8, 0.2, 1);
      text-align: left;
    }

    .help-tip.tip-up .tip-text {
      top: auto;
      bottom: calc(100% + 10px);
      transform: translateX(-50%) translateY(8px);
    }

    .help-tip .tip-text::after {
      content: '';
      position: absolute;
      top: auto;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-top-color: transparent;
      border-bottom-color: rgba(30, 30, 30, 0.95);
    }

    .help-tip.tip-up .tip-text::after {
      top: 100%;
      bottom: auto;
      border-bottom-color: transparent;
      border-top-color: rgba(30, 30, 30, 0.95);
    }

    .help-tip:hover .tip-text {
      visibility: visible;
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    /* Ref extract */
    .ref-extract-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 6px
    }

    .ref-extract-label {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: .78em;
      color: var(--text-secondary);
      background: var(--bg-deep);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 4px 8px;
      cursor: pointer;
      transition: all .2s;
      user-select: none
    }

    .ref-extract-label:has(input:checked),
    .ref-extract-label.ext-checked {
      border-color: var(--accent);
      color: var(--accent-light);
      background: rgba(108, 92, 231, .08)
    }

    .ref-extract-label input {
      width: 13px;
      height: 13px;
      accent-color: var(--accent)
    }

    .warn-box {
      background: rgba(253, 203, 110, .08);
      border-left: 3px solid var(--orange);
      padding: 10px 14px;
      border-radius: 0 var(--radius) var(--radius) 0;
      font-size: .82em;
      color: var(--orange);
      margin-top: 8px;
      display: none
    }

    .hint {
      color: var(--text-secondary);
      font-size: .86em;
      margin-top: 6px;
      line-height: 1.4
    }

    /* === SCROLLBAR (Safari/Chrome) === */
    .output-box::-webkit-scrollbar,
    .json-box::-webkit-scrollbar,
    .left-panel::-webkit-scrollbar,
    .right-panel::-webkit-scrollbar {
      width: 8px;
    }

    .output-box::-webkit-scrollbar-track,
    .json-box::-webkit-scrollbar-track,
    .left-panel::-webkit-scrollbar-track,
    .right-panel::-webkit-scrollbar-track {
      background: transparent;
    }

    .output-box::-webkit-scrollbar-thumb,
    .json-box::-webkit-scrollbar-thumb,
    .left-panel::-webkit-scrollbar-thumb,
    .right-panel::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
    }

    .output-box::-webkit-scrollbar-thumb:hover,
    .json-box::-webkit-scrollbar-thumb:hover,
    .left-panel::-webkit-scrollbar-thumb:hover,
    .right-panel::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.4);
    }

    /* === TOUCH (iOS) === */
    .left-panel,
    .right-panel {
      -webkit-overflow-scrolling: touch;
    }

    textarea,
    input[type="text"],
    input[type="number"] {
      font-size: 16px !important;
    }

    /* Prevent iOS zoom on focus */

    /* === RANGE INPUT (iOS) === */
    input[type="range"] {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 6px;
      background: var(--border);
      border-radius: 3px;
      outline: none;
    }

    input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--accent);
      cursor: pointer;
    }

    input[type="range"]::-moz-range-thumb {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--accent);
      cursor: pointer;
      border: none;
    }

    /* === TOGGLES === */
    .toggle-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap
    }

    .toggle-label {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      user-select: none;
      background: var(--bg-deep);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 9px 12px;
      font-size: .9em;
      color: var(--text-primary);
      transition: all .2s;
    }

    .toggle-label:has(input:checked),
    .toggle-label.checked {
      border-color: var(--accent);
      color: var(--text-primary);
      background: rgba(108, 92, 231, .08);
    }

    .toggle-label input {
      -webkit-appearance: none;
      appearance: none;
      width: 42px;
      height: 24px;
      border-radius: 999px;
      border: 2px solid transparent;
      background: rgba(120, 120, 128, 0.32);
      /* iOS Dark Theme Switch off */
      position: relative;
      cursor: pointer;
      flex: 0 0 auto;
      transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
    }

    .toggle-label input::before {
      content: "";
      position: absolute;
      top: 1px;
      left: 1px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06);
      transition: transform .25s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .toggle-label input:checked {
      background: var(--green);
      /* iOS Green */
    }

    .toggle-label input:checked::before {
      transform: translateX(18px);
    }

    /* === REFERENCE IMAGES === */
    .ref-upload {
      width: 100%;
      padding: 24px;
      border: 2px dashed var(--border);
      border-radius: var(--radius-lg);
      cursor: pointer;
      background: var(--bg-deep);
      text-align: center;
      color: var(--text-muted);
      font-size: .9em;
      transition: all .2s;
    }

    .ref-upload:hover {
      border-color: var(--accent);
      color: var(--text-secondary)
    }

    .image-preview-card {
      position: relative;
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      background: var(--bg-deep);
      display: grid;
      grid-template-columns: 140px 1fr;
      gap: 12px;
      padding: 12px;
      margin-top: 10px;
    }

    .image-preview-card img {
      width: 140px;
      height: 100px;
      object-fit: cover;
      border-radius: 8px;
    }

    .image-preview-details {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .image-preview-info {
      font-size: .8em;
      color: var(--text-muted)
    }

    .image-remove-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      background: var(--red);
      color: #fff;
      border: none;
      border-radius: 50%;
      width: 26px;
      height: 26px;
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all .2s;
    }

    .image-remove-btn:hover {
      transform: scale(1.1);
      filter: brightness(1.1)
    }

    .image-description-input {
      width: 100%;
      padding: 8px 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: .82em;
      font-family: inherit;
      resize: vertical;
      min-height: 50px;
      background: var(--bg-card);
      color: var(--text-primary);
      transition: border .2s;
    }

    .image-description-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 2px var(--accent-glow)
    }

    /* Slider */
    input[type=range] {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 6px;
      border-radius: 4px;
      background: var(--border);
      outline: none;
      margin: 8px 0;
    }

    input[type=range]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--accent);
      cursor: pointer;
      box-shadow: 0 0 8px var(--accent-glow);
    }

    /* === RIGHT PANEL === */
    .stats-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }

    .stat-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px;
      text-align: center;
    }

    .stat-value {
      font-size: 1.8em;
      font-weight: 800;
      background: linear-gradient(135deg, var(--accent-light), var(--green));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .stat-label {
      font-size: .75em;
      color: var(--text-muted);
      margin-top: 2px;
      text-transform: uppercase;
      letter-spacing: .05em
    }

    /* Active tags */
    .tag-area {
      min-height: 60px;
      background: var(--bg-deep);
      border: 1px dashed var(--border);
      border-radius: var(--radius);
      padding: 10px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-content: flex-start;
    }

    .tag-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: .75em;
      font-weight: 600;
      background: rgba(108, 92, 231, .12);
      color: var(--accent-light);
      border: 1px solid rgba(108, 92, 231, .2);
    }

    .tag-item.primary {
      background: var(--green-glow);
      color: var(--green);
      border-color: rgba(0, 206, 201, .25)
    }

    .tag-item.accent {
      background: var(--orange-glow);
      color: var(--orange);
      border-color: rgba(253, 203, 110, .25)
    }

    .tag-item .remove {
      cursor: pointer;
      font-weight: 900;
      color: var(--red);
      line-height: 1;
      user-select: none;
      font-size: 1.1em;
    }

    .tag-item .remove:hover {
      filter: brightness(1.2)
    }

    /* Output box */
    .output-box {
      background: var(--bg-deep);
      color: var(--green);
      padding: 16px;
      border-radius: var(--radius);
      font-family: 'JetBrains Mono', ui-monospace, monospace;
      font-size: .82em;
      line-height: 1.7;
      overflow: auto;
      white-space: pre-wrap;
      word-wrap: break-word;
      border: 1px solid var(--border);
      min-height: 200px;
      max-height: 400px;
      flex: 1;
    }

    .output-box.empty {
      color: var(--text-muted);
      font-style: italic
    }

    .json-box {
      background: var(--bg-deep);
      color: var(--accent-light);
      padding: 16px;
      border-radius: var(--radius);
      font-family: 'JetBrains Mono', ui-monospace, monospace;
      font-size: .78em;
      line-height: 1.6;
      overflow: auto;
      white-space: pre;
      border: 1px solid var(--border);
      max-height: 300px;
    }

    /* Format tabs */
    .format-tabs {
      display: flex;
      gap: 4px;
      background: var(--bg-deep);
      border-radius: 8px;
      padding: 3px;
      border: 1px solid var(--border);
      margin-bottom: 12px;
    }

    .format-tab {
      flex: 1;
      padding: 8px 12px;
      border: none;
      border-radius: 6px;
      font-size: .82em;
      font-weight: 700;
      cursor: pointer;
      background: transparent;
      color: var(--text-muted);
      font-family: inherit;
      transition: all .2s;
    }

    .format-tab.active {
      background: var(--accent);
      color: #fff
    }

    .format-tab:hover:not(.active) {
      color: var(--text-primary)
    }

    /* Action buttons */
    .action-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap
    }

    .btn {
      flex: 1;
      padding: 12px 16px;
      border: none;
      border-radius: var(--radius);
      font-size: .88em;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      transition: all .2s;
      min-width: 120px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .btn:hover {
      transform: translateY(-1px)
    }

    .btn:active {
      transform: translateY(0)
    }

    .btn-accent {
      background: var(--accent);
      color: #fff
    }

    .btn-accent:hover {
      box-shadow: 0 4px 20px var(--accent-glow);
      filter: brightness(1.1)
    }

    .btn-green {
      background: var(--green);
      color: #000
    }

    .btn-green:hover {
      filter: brightness(1.1)
    }

    .btn-ghost {
      background: var(--bg-card);
      color: var(--text-primary);
      border: 1px solid var(--border)
    }

    .btn-ghost:hover {
      border-color: var(--text-muted)
    }

    .btn-red {
      background: rgba(255, 118, 117, .12);
      color: var(--red);
      border: 1px solid rgba(255, 118, 117, .2)
    }

    .btn-red:hover {
      background: rgba(255, 118, 117, .2)
    }

    /* Notification */
    .notification {
      position: fixed;
      bottom: 24px;
      right: 24px;
      padding: 12px 20px;
      border-radius: var(--radius);
      font-size: .88em;
      font-weight: 700;
      box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
      opacity: 0;
      transform: translateY(20px);
      transition: all .3s;
      z-index: 1000;
      font-family: inherit;
    }

    .notification.show {
      opacity: 1;
      transform: translateY(0)
    }

    .notification.success {
      background: var(--green);
      color: #000
    }

    .notification.warn {
      background: var(--orange);
      color: #000
    }

    .notification.err {
      background: var(--red);
      color: #fff
    }

    /* Warning/info boxes */
    .info-box {
      background: rgba(108, 92, 231, .08);
      border-left: 3px solid var(--accent);
      padding: 10px 14px;
      border-radius: 0 var(--radius) var(--radius) 0;
      font-size: .85em;
      color: var(--accent-light);
      margin-top: 8px;
    }

    /* Prompt format indicator */
    .format-indicator {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: .75em;
      color: var(--text-muted);
      padding: 4px 10px;
      border-radius: 6px;
      background: var(--bg-deep);
      border: 1px solid var(--border);
      white-space: nowrap;
      min-width: 0;
      max-width: 100%;
    }

    .format-indicator .dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--green);
    }

    .prompt-header-tools {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex: 0 1 auto;
      min-width: 0;
    }

    #promptFormatLabel {
      display: inline-block;
      max-width: 210px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      vertical-align: bottom;
    }

    .section-header[data-bound="prompt-box"] {
      cursor: default;
      gap: 8px;
    }

    .section-header[data-bound="prompt-box"]::after {
      display: none;
    }

    .section-header[data-bound="prompt-box"] h2 {
      flex: 0 0 auto;
      min-width: 0;
      margin-right: auto;
      white-space: nowrap;
    }

    .collapse-btn {
      border: 1px solid var(--border2);
      background: var(--bg-card);
      color: var(--text-secondary);
      width: 28px;
      height: 24px;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 700;
      line-height: 1;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: all .2s ease;
      flex: 0 0 auto;
    }

    .collapse-btn:hover {
      border-color: var(--accent);
      color: var(--text-primary);
    }

    .collapse-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    /* Responsive */
    @media (max-width: 1100px) {
      .main-grid {
        grid-template-columns: 1fr
      }

      .right-panel {
        border-left: none;
        border-top: 1px solid var(--border);
        height: auto;
        max-height: none
      }

      .left-panel {
        height: auto;
        max-height: none
      }

      .image-preview-card {
        grid-template-columns: 1fr
      }

      .image-preview-card img {
        width: 100%;
        height: 180px
      }
    }

    @media (max-width: 600px) {
      .header {
        padding: 14px 16px;
        flex-direction: column;
        gap: 10px
      }

      .left-panel,
      .right-panel {
        padding: 14px
      }

      .option-group {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr))
      }

      .stats-row {
        grid-template-columns: 1fr 1fr 1fr
      }
    }

    /* Disabled section style — generation mode */
    .disabled-section {
      opacity: 0.4;
      pointer-events: none;
      filter: grayscale(100%);
      position: relative;
    }

    .disabled-section::after {
      content: "🔒 Снимите пресет для ручной настройки";
      position: absolute;
      top: 8px;
      right: 12px;
      font-size: .72em;
      color: var(--orange);
      background: rgba(15, 15, 20, .85);
      padding: 3px 10px;
      border-radius: 6px;
      pointer-events: none;
      z-index: 5;
    }

    /* Conflict-disabled buttons */
    .option-btn.conflict-disabled {
      opacity: 0.25;
      cursor: not-allowed;
      transform: none !important;
      pointer-events: none;
      position: relative;
    }

    .option-btn.conflict-disabled::after {
      content: "⚠";
      position: absolute;
      top: 2px;
      right: 4px;
      font-size: 0.65em;
      opacity: 0.7;
    }

    /* === UX FIXES (visibility + stability) === */
    *,
    *::before,
    *::after {
      box-sizing: border-box;
    }

    .option-btn:focus-visible,
    .format-tab:focus-visible,
    .btn:focus-visible,
    .toggle-label:focus-within {
      outline: 2px solid var(--accent-light);
      outline-offset: 2px;
    }

    /* Make selected buttons more obvious (extra ring) */
    .option-btn.active {
      box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 0 20px var(--accent-glow);
    }

    /* Prevent horizontal drift while dragging sliders / trackpads */
    html,
    body {
      width: 100%;
      overflow-x: hidden;
    }

    .main-grid {
      width: 100%;
      max-width: 100vw;
    }

    .left-panel,
    .right-panel {
      overflow-x: hidden;
      min-width: 0;
    }

    input[type="range"] {
      touch-action: pan-y;
    }
    /* === 2026 REDESIGN LAYER (VideoPrompt based, logic-safe) === */
    .wrap {
      max-width: 1500px;
      padding: 28px 20px 24px;
      height: 100vh;
    }

    .app {
      gap: 16px;
    }

    .header {
      background: rgba(255, 255, 255, 0.75);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
      border: 1px solid var(--border2);
      border-radius: 16px;
      padding: 16px 18px;
      backdrop-filter: blur(10px);
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .logo {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-family: 'Space Mono', monospace;
      font-weight: 700;
      color: var(--accent-k);
      background: #007AFF;
      color: #fff;
      border: none;
      box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    }

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

    .header h1 {
      font-size: clamp(20px, 3vw, 28px);
      line-height: 1.05;
      letter-spacing: -0.4px;
    }

    .build-note {
      color: var(--muted);
      font-family: 'Space Mono', monospace;
      font-size: 11px;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      margin-top: 4px;
    }

    .main-grid {
      grid-template-columns: minmax(760px, 1fr) 420px;
      gap: 18px;
      padding-top: 0;
    }

    .left-panel,
    .right-panel {
      border: 1px solid var(--border);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.6);
      backdrop-filter: blur(30px);
      -webkit-backdrop-filter: blur(30px);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
      border: 0.5px solid rgba(0, 0, 0, 0.1);
      padding: 16px;
    }

    .left-panel {
      padding-right: 16px;
      gap: 14px;
    }

    .right-panel {
      border-left: 1px solid var(--border);
      padding-left: 16px;
      gap: 14px;
      position: sticky;
      top: 0;
      align-self: start;
      max-height: calc(100vh - 130px);
    }

    .section {
      border-radius: 12px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.5);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
      padding: 14px;
      margin-bottom: 0;
    }

    .section-header {
      border-radius: 10px;
      padding: 8px 30px 8px 8px;
    }

    .section-header h2 {
      font-size: 0.98rem;
      letter-spacing: 0.15px;
    }

    .section-header h2 .icon {
      width: 24px;
      height: 24px;
      border-radius: 7px;
      font-size: 12px;
    }

    .section-content {
      margin-top: 12px;
    }

    .option-group {
      gap: 8px;
    }

    .option-btn,
    .preset-btn,
    .quick-preset-btn,
    .format-tab {
      border-radius: 9px;
      border: 1px solid var(--border2);
      background: var(--surface);
      color: var(--muted);
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      font-size: 13px;
      font-weight: 600;
      line-height: 1.35;
      transition: all .2s ease;
    }

    .option-btn:hover,
    .preset-btn:hover,
    .quick-preset-btn:hover,
    .format-tab:hover {
      background: var(--surface2);
      color: var(--text);
      border-color: rgba(0, 212, 255, 0.32);
      transform: translateY(-1px);
    }

    .option-btn.active,
    .format-tab.active,
    .preset-btn.active,
    .quick-preset-btn.active {
      background: #007AFF;
      color: #FFFFFF;
      border-color: #007AFF;
      box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    }

    .input-field,
    textarea.input-field,
    select,
    input[type="text"],
    input[type="number"] {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 10px;
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      font-size: 14px;
    }

    .input-field:focus,
    textarea.input-field:focus,
    select:focus,
    input[type="text"]:focus,
    input[type="number"]:focus {
      outline: none;
      border-color: rgba(0, 212, 255, 0.38);
      box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.12);
    }

    .stats-row {
      gap: 8px;
    }

    .stat-card {
      border: 1px solid var(--border2);
      background: rgba(255, 255, 255, 0.6);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-radius: 10px;
    }

    .output-box,
    .json-box {
      background: rgba(255, 255, 255, 0.5);
      box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
      border: 1px solid rgba(0, 0, 0, 0.1);
      border: 1px solid var(--border2);
      border-radius: 10px;
      font-family: 'Space Mono', monospace;
      line-height: 1.5;
    }

    .action-row .btn {
      border-radius: 10px;
      border: 1px solid var(--border2);
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      font-size: 13px;
      font-weight: 600;
    }

    .mode-badge {
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      font-size: 11px;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      border: 1px solid var(--border2);
      background: rgba(19, 25, 41, 0.8);
      color: var(--muted);
      padding: 2px 7px;
      border-radius: 999px;
    }

    .main-grid {
      grid-template-columns: 1fr;
      display: block;
      /* Ensure it stacks */
      height: auto;
      overflow: visible;
    }

    .left-panel,
    .right-panel {
      height: auto;
      max-height: none;
      overflow: visible;
      margin-bottom: 20px;
    }

    .right-panel {
      position: static;
      border-left: 1px solid var(--border);
      /* Maintain border */
    }

    .wrap {
      height: auto;
      /* Allow wrap to grow */
      min-height: 100vh;
      overflow-y: auto;
    }

    body {
      overflow-y: auto;
      /* Force scroll on body */
    }
    /* === COLLAPSIBLE SECTIONS === */
    .section-header {
      cursor: pointer;
      position: relative;
      transition: background 0.2s;
    }

    .section-header:hover {
      background: rgba(255, 255, 255, 0.03);
    }

    /* Chevron Icon (Arrow) */
    .section-header::after {
      content: '';
      position: absolute;
      right: 20px;
      top: 50%;
      width: 8px;
      height: 8px;
      border-right: 2px solid var(--text-muted);
      border-bottom: 2px solid var(--text-muted);
      transform: translateY(-60%) rotate(45deg);
      /* Points Down (Open) */
      transition: transform 0.3s ease;
    }

    /* Collapsed State: Arrow Points Right */
    .section.collapsed .section-header::after {
      transform: translateY(-60%) rotate(-45deg);
    }

    /* Content Transition */
    .section-content {
      overflow: hidden;
      transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
      max-height: 5000px;
      /* Large enough for any content */
      opacity: 1;
      visibility: visible;
    }

    .section.collapsed .section-content {
      max-height: 0 !important;
      opacity: 0;
      visibility: hidden;
      margin-top: 0;
      margin-bottom: 0;
      pointer-events: none;
    }

    /* Fixed generation panel: non-collapsible, title + toggles in one row */
    .section.no-collapse .section-header {
      cursor: default;
    }

    .section.no-collapse .section-header:hover {
      background: transparent;
    }

    .section.no-collapse .section-header::after {
      display: none;
    }

    #generationModeSection.generation-inline {
      display: block;
    }

    #generationModeSection.generation-inline .section-header {
      margin-bottom: 0;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    #generationModeSection.generation-inline .section-header h2 {
      flex: 1 1 auto;
      min-width: 0;
    }

    #generationModeSection.generation-inline .generation-inline-header-tools {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex: 0 0 auto;
    }

    #generationModeSection.generation-inline .generation-inline-switch {
      margin: 0;
      padding: 8px 10px;
      min-width: auto;
      justify-content: center;
    }

    #generationModeSection.generation-inline .generation-inline-header-tools .help-tip {
      margin-left: 0;
    }

    @media (max-width: 1200px) {
      #generationModeSection.generation-inline .section-header {
        flex-wrap: wrap;
        align-items: stretch;
      }

      #generationModeSection.generation-inline .generation-inline-header-tools {
        width: 100%;
        justify-content: space-between;
      }
    }

    /* === MOBILE LAYOUT FIX === */
    html,
    body {
      overflow-x: hidden;
      width: 100%;
      position: relative;
    }

    /* Universal fix for button wrapping */
    .option-btn,
    .preset-btn,
    .quick-preset-btn {
      min-width: 0;
      white-space: normal;
      word-break: break-word;
      height: auto;
      /* allow growth */
    }

    @media (max-width: 900px) {
      .main-grid {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
      }

      .left-panel,
      .right-panel {
        width: 100%;
        height: auto;
        overflow-y: visible;
        padding: 12px;
      }

      .right-panel {
        border-left: none;
        border-top: 1px solid var(--border);
      }

      .header {
        padding: 12px 14px;
      }

      .header h1 {
        font-size: 1.1em;
      }

      /* Force single column for option groups on very small screens */
      .option-group {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        /* ensure fluid */
      }

      /* Fix 3-column specific grids if any */
      .stats-row {
        grid-template-columns: 1fr;
      }

      /* Ensure presets wrap */
      #presetGrid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (max-width: 480px) {

      /* Tighter mobile layout */
      .option-group {
        grid-template-columns: repeat(2, 1fr);
        /* Force 2 cols */
      }

      /* Lens & Quick Style specific override for readability */
      #quickStyleSection .option-group,
      #lensSectionV2 .option-group {
        grid-template-columns: 1fr;
        /* 1 col for long text items? or 2? Let's try 2 for presets, 1 for long lenses if needed */
        grid-template-columns: repeat(2, 1fr);
      }

      /* Fix font sizes */
      .option-btn {
        font-size: 0.88em;
        padding: 8px;
        word-wrap: break-word;
      }

      /* STRICT MOBILE OVERFLOW FIX */
      body,
      html {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative;
      }

      .app {
        width: 100%;
        overflow-x: hidden;
      }

      .json-box {
        white-space: pre-wrap !important;
        /* Force wrap on mobile */
        word-break: break-all !important;
        max-width: 100%;
      }

      .output-box {
        word-break: break-word;
      }

      /* Ensure no element exceeds viewport */
      img,
      video,
      iframe,
      input,
      textarea,
      select,
      button {
        max-width: 100%;
      }
    }
    /* === 3-ZONE LAYOUT OVERRIDE === */
    :root {
      --bg: #F2F2F7;
      --surface: rgba(255, 255, 255, 0.75);
      --surface2: rgba(255, 255, 255, 0.9);
      --border: rgba(0, 0, 0, 0.1);
      --border2: rgba(0, 0, 0, 0.15);
      --text: #1C1C1E;
      --muted: #8E8E93;
      --accent-k: #007AFF;
      --accent-v: #5856D6;
      --accent-s: #FF9500;
      --active: #007AFF;
      --glow: rgba(0, 122, 255, 0.15);

      --bg-deep: #F2F2F7;
      --bg-card: var(--surface);
      --bg-card-hover: var(--surface2);
      --bg-section: var(--surface);
      --accent: var(--accent-k);
      --accent-light: #5856D6;
      --accent-glow: rgba(0, 122, 255, 0.2);
      --green: #34C759;
      --green-glow: rgba(52, 199, 89, 0.15);
      --orange: var(--accent-s);
      --orange-glow: rgba(255, 149, 0, 0.15);
      --red: #FF3B30;
      --text-primary: var(--text);
      --text-secondary: var(--muted);
      --text-muted: #8E8E93;
      --radius: 14px;
      --radius-lg: 20px;
    }

    body {
      margin: 0;
      padding: 0;
    }

    .wrap {
      width: 100%;
      max-width: none;
      margin: 0;
      padding: 0;
      height: auto;
      min-height: 100vh;
    }

    .app {
      width: 100%;
      min-height: 100vh;
      padding: 0 16px 16px;
      gap: 0;
    }

    .app-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      width: 100%;
      z-index: 1100;
      border-radius: 0;
      border-left: 0;
      border-right: 0;
      margin: 0;
      padding: 12px 20px;
    }

    .main-layout {
      display: grid;
      grid-template-columns: 260px minmax(0, 1fr) 420px;
      gap: 16px;
      padding-top: var(--app-header-offset);
      align-items: start;
      min-height: 100vh;
    }

    .constructor-panel,
    .main-menu-panel,
    .prompt-output-panel {
      min-width: 0;
    }

    .constructor-card {
      border: 1px solid var(--border);
      border-radius: 16px;
      background: linear-gradient(180deg, rgba(13, 17, 26, 0.9), rgba(13, 17, 26, 0.62));
      padding: 14px;
      position: sticky;
      top: calc(var(--app-header-offset) + 4px);
      max-height: calc(100vh - var(--app-header-offset) - 12px);
      overflow: auto;
    }

    .constructor-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 10px;
    }

    .constructor-title {
      font-size: 1rem;
      font-weight: 800;
      color: var(--text-primary);
      margin: 0;
    }

    .constructor-toggle {
      display: none;
      border: 1px solid var(--border2);
      background: var(--surface);
      color: var(--text-primary);
      border-radius: 8px;
      padding: 6px 10px;
      font-size: .78rem;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
    }

    .constructor-controls {
      display: block;
    }

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

    .constructor-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 6px 8px;
      border-radius: 8px;
      border: 1px solid transparent;
      color: var(--text-secondary);
      font-size: .88em;
      line-height: 1.35;
      cursor: pointer;
      transition: border-color .2s, background .2s, color .2s;
      user-select: none;
    }

    .constructor-item span {
      flex: 1 1 auto;
      min-width: 0;
    }

    .constructor-item:hover {
      border-color: var(--border2);
      background: rgba(19, 25, 41, 0.55);
      color: var(--text-primary);
    }

    .constructor-item input[type="checkbox"] {
      -webkit-appearance: none;
      appearance: none;
      width: 36px;
      height: 20px;
      border-radius: 999px;
      border: 1px solid var(--border2);
      background: rgba(120, 120, 128, 0.3);
      position: relative;
      cursor: pointer;
      flex: 0 0 auto;
      transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    }

    .constructor-item input[type="checkbox"]::before {
      content: "";
      position: absolute;
      top: 1px;
      left: 1px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
      transition: transform .2s ease;
    }

    .constructor-item input[type="checkbox"]:checked {
      background: var(--accent-k);
      border-color: var(--accent-k);
    }

    .constructor-item input[type="checkbox"]:checked::before {
      transform: translateX(16px);
    }

    .constructor-item input[type="checkbox"]:focus-visible {
      outline: 2px solid var(--accent-k);
      outline-offset: 2px;
    }

    .constructor-item.master {
      margin-bottom: 8px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border);
      border-radius: 0;
      color: var(--text-primary);
      font-weight: 700;
    }

    .menu-section-hidden {
      display: none !important;
    }

    .main-menu-panel .left-panel,
    .prompt-output-panel .right-panel {
      margin: 0;
      height: calc(100vh - var(--app-header-offset) - 12px);
      max-height: calc(100vh - var(--app-header-offset) - 12px);
      overflow-y: auto;
    }

    .prompt-output-panel .right-panel {
      position: sticky;
      top: calc(var(--app-header-offset) + 4px);
    }

    @media (max-width: 1320px) {
      .main-layout {
        grid-template-columns: 240px minmax(0, 1fr) 360px;
      }
    }

    @media (max-width: 1200px) {
      .main-layout {
        grid-template-columns: 1fr;
      }

      .constructor-panel {
        order: 1;
      }

      .main-menu-panel {
        order: 2;
      }

      .prompt-output-panel {
        order: 3;
      }

      .constructor-card,
      .main-menu-panel .left-panel,
      .prompt-output-panel .right-panel {
        position: static;
        height: auto;
        max-height: none;
      }
    }

    @media (max-width: 768px) {
      .app {
        padding: 0 10px 12px;
      }

      .app-header {
        padding: 10px 12px;
      }

      .main-layout {
        gap: 12px;
      }

      .main-menu-panel {
        order: 1;
      }

      .prompt-output-panel {
        order: 2;
      }

      .constructor-panel {
        order: 3;
      }

      .constructor-toggle {
        display: inline-flex;
      }

      .constructor-panel .constructor-controls {
        display: none;
      }

      .constructor-panel.is-expanded .constructor-controls {
        display: block;
      }
    }
    /* === MIDNIGHT PRO REDESIGN OVERRIDE === */
    :root {
      --bg: #0c0a09;
      --surface: #161310;
      --surface2: #211c17;
      --border: rgba(202, 138, 4, 0.24);
      --border2: rgba(202, 138, 4, 0.4);
      --text: #f5f0e6;
      --muted: #b8ab95;
      --accent-k: #ca8a04;
      --accent-v: #d4a017;
      --accent-s: #f59e0b;
      --active: #ca8a04;
      --glow: rgba(202, 138, 4, 0.32);
      --bg-deep: #0f0b08;
      --bg-card: #1a1511;
      --bg-card-hover: #251d15;
      --bg-section: #17120e;
      --accent: #ca8a04;
      --accent-light: #facc15;
      --accent-glow: rgba(250, 204, 21, 0.3);
      --green: #2ddd76;
      --green-glow: rgba(45, 221, 118, 0.25);
      --orange: #f59e0b;
      --orange-glow: rgba(255, 176, 32, 0.22);
      --red: #ef4444;
      --text-primary: #f5f0e6;
      --text-secondary: #c9bca8;
      --text-muted: #8f816b;
      --radius: 12px;
      --radius-lg: 18px;
    }

    body {
      font-family: "Raleway", "Avenir Next", "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif !important;
      background:
        radial-gradient(1400px 680px at -12% -24%, rgba(190, 116, 26, 0.24), transparent 58%),
        radial-gradient(980px 540px at 110% -12%, rgba(159, 96, 20, 0.22), transparent 56%),
        radial-gradient(1200px 700px at 50% 126%, rgba(108, 69, 20, 0.24), transparent 64%),
        var(--bg) !important;
      color: var(--text-primary) !important;
    }

    .brand-line h1,
    .section-header h2,
    .constructor-title {
      font-family: "Manrope", "Segoe UI", "SF Pro Text", sans-serif !important;
      letter-spacing: 0.01em;
    }

    body::before {
      background-image:
        linear-gradient(rgba(130, 154, 214, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(130, 154, 214, 0.08) 1px, transparent 1px);
      background-size: 34px 34px;
      opacity: 0.22;
    }

    .orb1 {
      width: 640px;
      height: 640px;
      background: rgba(71, 106, 184, 0.2);
      filter: blur(132px);
      top: -220px;
      right: -180px;
    }

    .orb2 {
      width: 560px;
      height: 560px;
      background: rgba(55, 97, 186, 0.16);
      filter: blur(128px);
      bottom: -180px;
      left: -130px;
    }

    .app-header {
      background: linear-gradient(180deg, rgba(9, 14, 24, 0.96), rgba(9, 14, 24, 0.84)) !important;
      border-bottom: 1px solid var(--border2) !important;
      box-shadow: 0 20px 46px rgba(4, 8, 16, 0.68);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
    }

    .header h1 {
      color: #f2f6ff;
      letter-spacing: -0.03em;
      font-weight: 760;
    }

    .header-left {
      gap: 12px !important;
    }

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

    .midnight-window-controls {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 10px;
      border-radius: 999px;
      border: 1px solid rgba(141, 167, 230, 0.26);
      background: rgba(12, 19, 31, 0.72);
      box-shadow: inset 0 1px 0 rgba(193, 211, 250, 0.08);
    }

    .mw-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      box-shadow: 0 0 0 1px rgba(10, 16, 27, 0.35);
    }

    .mw-dot.red {
      background: #ff5f57;
    }

    .mw-dot.yellow {
      background: #febc2e;
    }

    .mw-dot.green {
      background: #28c840;
    }

    .logo {
      display: grid;
      place-items: center;
      border-radius: 11px;
      border: 1px solid rgba(154, 181, 244, 0.5);
      background: linear-gradient(145deg, rgba(103, 136, 223, 0.33), rgba(50, 84, 172, 0.2));
      color: #dbe8ff;
      font-weight: 820;
      letter-spacing: 0.08em;
      text-shadow: 0 0 12px rgba(146, 175, 245, 0.35);
      box-shadow: 0 10px 24px rgba(22, 40, 78, 0.42);
    }

    #hosting-info,
    .build-note {
      color: var(--muted) !important;
    }

    #render-link {
      color: #8eb1ff !important;
    }

    .main-layout {
      gap: 18px !important;
    }

    .constructor-card,
    .main-menu-panel .left-panel,
    .prompt-output-panel .right-panel,
    .section,
    .stat-card {
      border-color: var(--border) !important;
      background: linear-gradient(160deg, rgba(18, 27, 43, 0.92), rgba(11, 16, 27, 0.96)) !important;
      box-shadow:
        inset 0 1px 0 rgba(170, 190, 240, 0.12),
        0 20px 38px rgba(4, 8, 16, 0.54);
    }

    .main-menu-panel .left-panel,
    .prompt-output-panel .right-panel {
      border-radius: 18px;
      padding: 14px !important;
      border: 1px solid var(--border) !important;
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }

    .header-right .option-btn {
      min-width: 112px;
      text-align: center;
      justify-content: center;
      border-radius: 10px !important;
      font-weight: 700;
      letter-spacing: 0.01em;
    }

    .option-btn.action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      text-align: center;
      line-height: 1.1;
      white-space: nowrap;
    }

    .option-btn.action-btn .vpe-btn-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      flex: 0 0 16px;
    }

    .option-btn.action-btn .vpe-svg-icon,
    .option-btn.action-btn .button-icon-svg {
      width: 16px;
      height: 16px;
      display: block;
    }

    .option-btn.action-btn .vpe-btn-label {
      display: inline-block;
      font-size: inherit;
      line-height: 1.05;
      letter-spacing: 0.01em;
    }

    .section {
      border-radius: 14px !important;
      padding: 16px !important;
    }

    .left-panel .section,
    .right-panel .section {
      position: relative;
      z-index: 1;
      opacity: 0;
      animation: mp-section-enter .42s ease forwards;
    }

    .left-panel .section:hover,
    .right-panel .section:hover,
    .left-panel .section:focus-within,
    .right-panel .section:focus-within {
      z-index: 80;
    }

    .left-panel .section .help-tip,
    .right-panel .section .help-tip {
      z-index: 90;
    }

    .left-panel .section:nth-of-type(2),
    .right-panel .section:nth-of-type(2) {
      animation-delay: .03s;
    }

    .left-panel .section:nth-of-type(3),
    .right-panel .section:nth-of-type(3) {
      animation-delay: .06s;
    }

    .left-panel .section:nth-of-type(4),
    .right-panel .section:nth-of-type(4) {
      animation-delay: .09s;
    }

    .left-panel .section:nth-of-type(5),
    .right-panel .section:nth-of-type(5) {
      animation-delay: .12s;
    }

    .section:hover {
      transform: translateY(-1px);
      border-color: var(--border2) !important;
      box-shadow:
        inset 0 1px 0 rgba(170, 190, 240, 0.15),
        0 24px 42px rgba(4, 8, 16, 0.6);
    }

    .section-header {
      border-radius: 10px;
      border: 1px solid transparent;
      transition: border-color .2s ease, background .2s ease;
    }

    .section-header:hover {
      background: rgba(202, 138, 4, 0.1) !important;
      border-color: rgba(244, 196, 48, 0.28);
    }

    .section-header::after {
      border-color: var(--text-muted) !important;
    }

    .section-header h2 {
      color: var(--text-primary) !important;
      letter-spacing: 0.01em;
    }

    .section-header h2 .icon {
      background: rgba(202, 138, 4, 0.15) !important;
      border: 1px solid rgba(239, 183, 34, 0.34);
      color: #ffedbf !important;
      box-shadow: inset 0 0 14px rgba(202, 138, 4, 0.24);
    }

    .mode-badge {
      background: rgba(202, 138, 4, 0.18) !important;
      border-color: rgba(239, 183, 34, 0.35) !important;
      color: #ffe7ad !important;
      letter-spacing: 0.05em;
    }

    .mode-badge.multi {
      background: rgba(45, 221, 118, 0.16) !important;
      border-color: rgba(95, 226, 146, 0.35) !important;
      color: #7bf0ad !important;
    }

    .mode-badge.pa {
      background: rgba(255, 176, 32, 0.18) !important;
      border-color: rgba(255, 194, 90, 0.35) !important;
      color: #ffd68e !important;
    }

    .option-btn,
    .preset-btn,
    .quick-preset-btn,
    .format-tab,
    .constructor-toggle {
      background: linear-gradient(180deg, rgba(35, 28, 20, 0.95), rgba(24, 19, 14, 0.98)) !important;
      border: 1px solid rgba(202, 138, 4, 0.34) !important;
      color: #f3e6cd !important;
      box-shadow: inset 0 1px 0 rgba(250, 214, 137, 0.14);
      min-width: 0;
      min-height: 40px;
      line-height: 1.25;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .option-btn:hover,
    .preset-btn:hover,
    .quick-preset-btn:hover,
    .format-tab:hover {
      background: linear-gradient(180deg, rgba(49, 37, 25, 0.96), rgba(34, 25, 18, 0.99)) !important;
      border-color: rgba(246, 204, 100, 0.46) !important;
      color: #fff4d9 !important;
    }

    .option-btn.active,
    .preset-btn.active,
    .quick-preset-btn.active,
    .format-tab.active {
      background: linear-gradient(135deg, #ca8a04, #f59e0b) !important;
      color: #1c150a !important;
      border-color: rgba(254, 240, 138, 0.92) !important;
      box-shadow: 0 0 24px rgba(250, 204, 21, 0.36);
    }

    .option-btn.conflict-disabled {
      border-color: rgba(255, 95, 113, 0.42) !important;
      background: linear-gradient(180deg, rgba(56, 27, 35, 0.9), rgba(46, 19, 27, 0.92)) !important;
      color: rgba(255, 208, 214, 0.92) !important;
    }

    .option-btn.conflict-disabled::after {
      content: "⚠ конфликт" !important;
      top: 4px;
      right: 6px;
      font-size: 0.58em;
      letter-spacing: 0.02em;
      opacity: 0.88;
    }

    .input-field,
    textarea.input-field,
    select,
    input[type="text"],
    input[type="number"],
    .image-description-input {
      background: rgba(8, 13, 24, 0.82) !important;
      border: 1px solid rgba(136, 158, 210, 0.32) !important;
      color: var(--text-primary) !important;
      box-shadow: inset 0 1px 0 rgba(188, 205, 245, 0.08);
    }

    .input-field::placeholder,
    .image-description-input::placeholder {
      color: var(--text-muted) !important;
    }

    .input-field:focus,
    textarea.input-field:focus,
    select:focus,
    input[type="text"]:focus,
    input[type="number"]:focus,
    .image-description-input:focus {
      border-color: rgba(157, 183, 255, 0.65) !important;
      box-shadow: 0 0 0 1px rgba(109, 145, 245, 0.58), 0 0 20px rgba(67, 101, 189, 0.4) !important;
    }

    .help-tip {
      background: rgba(95, 139, 255, 0.18) !important;
      color: #d9e4ff !important;
      border-color: rgba(141, 167, 230, 0.38) !important;
    }

    .help-tip .tip-text {
      background: rgba(8, 13, 22, 0.95) !important;
      border: 1px solid rgba(138, 162, 223, 0.32) !important;
      color: #e7efff !important;
      box-shadow: 0 14px 34px rgba(2, 5, 12, 0.68) !important;
      max-width: min(420px, calc(100vw - 32px));
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .help-tip .tip-text::after {
      border-bottom-color: rgba(8, 13, 22, 0.95) !important;
    }

    .help-tip.tip-up .tip-text::after {
      border-top-color: rgba(8, 13, 22, 0.95) !important;
    }

    .vpe-btn-label,
    .section-header h2,
    .hint,
    .sub-label,
    .output-box,
    .json-box {
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .hint {
      color: var(--text-secondary) !important;
    }

    .warn-box {
      background: rgba(255, 176, 32, 0.12) !important;
      border-left-color: #ffb020 !important;
      color: #ffdba1 !important;
    }

    #generationModeSection {
      border-color: rgba(129, 158, 228, 0.62) !important;
      background: rgba(95, 139, 255, 0.1) !important;
    }

    .toggle-label {
      background: rgba(14, 19, 31, 0.84) !important;
      border-color: var(--border) !important;
      color: var(--text-secondary) !important;
    }

    .toggle-label.checked,
    .toggle-label:has(input:checked) {
      border-color: rgba(95, 226, 146, 0.6) !important;
      background: rgba(45, 221, 118, 0.12) !important;
      color: #bff8d7 !important;
    }

    .toggle-label input {
      background: rgba(142, 152, 178, 0.45) !important;
    }

    .toggle-label input:checked {
      background: #2ddd76 !important;
      box-shadow: 0 0 0 2px rgba(45, 221, 118, 0.3);
    }

    .constructor-title {
      color: #dbe6ff !important;
    }

    .constructor-item {
      color: #9fb1d2 !important;
      border-color: transparent !important;
    }

    .constructor-item:hover {
      background: rgba(95, 139, 255, 0.11) !important;
      border-color: rgba(141, 167, 230, 0.36) !important;
      color: #e4edff !important;
    }

    .constructor-item.master {
      border-bottom-color: var(--border) !important;
      color: #d7e4ff !important;
    }

    .tag-area,
    .output-box,
    .json-box {
      border: 1px solid rgba(136, 158, 210, 0.34) !important;
      background: rgba(8, 12, 22, 0.88) !important;
      box-shadow: inset 0 1px 0 rgba(188, 205, 245, 0.08);
    }

    .tag-item {
      background: rgba(95, 139, 255, 0.15) !important;
      border-color: rgba(141, 167, 230, 0.32) !important;
      color: #bdd0ff !important;
    }

    .tag-item.primary {
      background: rgba(45, 221, 118, 0.17) !important;
      border-color: rgba(95, 226, 146, 0.38) !important;
      color: #96f3bb !important;
    }

    .tag-item.accent {
      background: rgba(255, 176, 32, 0.17) !important;
      border-color: rgba(255, 194, 90, 0.38) !important;
      color: #ffd48f !important;
    }

    .output-box {
      color: #9ff8c7 !important;
    }

    .output-box.empty {
      color: var(--text-muted) !important;
    }

    .json-box {
      color: #a9c2ff !important;
    }

    .format-tabs {
      border-color: rgba(136, 158, 210, 0.3) !important;
      background: rgba(10, 15, 26, 0.82) !important;
    }

    .btn {
      border: 1px solid transparent;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .btn-accent {
      background: linear-gradient(135deg, #5f8bff, #7d75ff) !important;
      color: #ffffff !important;
    }

    .btn-green {
      background: linear-gradient(135deg, #2ddd76, #26ba66) !important;
      color: #041108 !important;
    }

    .btn-ghost {
      background: linear-gradient(180deg, rgba(28, 38, 58, 0.95), rgba(20, 28, 44, 0.97)) !important;
      color: #dbe7ff !important;
      border-color: rgba(136, 158, 210, 0.34) !important;
    }

    .btn-red {
      background: linear-gradient(135deg, rgba(255, 95, 113, 0.22), rgba(239, 83, 102, 0.18)) !important;
      color: #ffb8c2 !important;
      border-color: rgba(255, 95, 113, 0.4) !important;
    }

    .stat-label {
      color: #9ba8c4 !important;
    }

    .stat-value {
      background: linear-gradient(130deg, #8bacff, #6cf0ac);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .notification.success {
      background: #2ddd76 !important;
      color: #07160c !important;
    }

    .notification.warn {
      background: #ffb020 !important;
      color: #171107 !important;
    }

    .notification.err {
      background: #ff5f71 !important;
      color: #1b090c !important;
    }

    .output-box::-webkit-scrollbar-thumb,
    .json-box::-webkit-scrollbar-thumb,
    .left-panel::-webkit-scrollbar-thumb,
    .right-panel::-webkit-scrollbar-thumb {
      background: rgba(136, 158, 210, 0.5) !important;
    }

    .output-box::-webkit-scrollbar-thumb:hover,
    .json-box::-webkit-scrollbar-thumb:hover,
    .left-panel::-webkit-scrollbar-thumb:hover,
    .right-panel::-webkit-scrollbar-thumb:hover {
      background: rgba(167, 188, 238, 0.68) !important;
    }

    .option-btn:focus-visible,
    .btn:focus-visible,
    .format-tab:focus-visible,
    .constructor-toggle:focus-visible,
    .input-field:focus-visible,
    textarea.input-field:focus-visible,
    select:focus-visible,
    input[type="text"]:focus-visible,
    input[type="number"]:focus-visible {
      outline: 2px solid rgba(157, 183, 255, 0.86) !important;
      outline-offset: 1px;
    }

    @media (max-width: 900px) {
      .app-header {
        display: block !important;
        padding: 10px 12px !important;
      }

      .header-left {
        width: 100%;
        align-items: flex-start !important;
        gap: 10px !important;
      }

      .brand-line h1 {
        font-size: 1.02rem;
        line-height: 1.18;
      }

      #hosting-info {
        font-size: 0.69rem !important;
        line-height: 1.35;
        flex-wrap: wrap;
      }

      .build-note {
        font-size: 0.66rem;
        line-height: 1.3;
      }

      .header-right {
        width: 100%;
        margin-top: 10px;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .header-right .option-btn {
        width: 100%;
        min-width: 0 !important;
        min-height: 44px;
        padding: 10px 8px;
        font-size: 0.75rem;
      }

      .option-btn,
      .btn,
      .constructor-toggle {
        min-height: 44px;
      }
    }

    @media (max-width: 560px) {
      .logo-stack {
        gap: 7px;
      }

      .midnight-window-controls {
        padding: 6px 8px;
      }

      .mw-dot {
        width: 8px;
        height: 8px;
      }

      .brand-line h1 {
        font-size: 0.94rem;
      }

      .build-note {
        display: none;
      }
    }

    @keyframes mp-section-enter {
      from {
        opacity: 0;
        transform: translateY(9px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @media (prefers-reduced-motion: reduce) {

      .left-panel .section,
      .right-panel .section {
        opacity: 1;
        animation: none;
      }
    }
    body.developer-suite {
      --ds-bg: #0a1320;
      --ds-bg-soft: #0f1a2b;
      --ds-panel: #111f33;
      --ds-panel-2: #142741;
      --ds-border: #26456a;
      --ds-border-soft: #1f3755;
      --ds-text: #e5efff;
      --ds-muted: #8ba4c8;
      --ds-accent: #2e8fff;
      --ds-accent-2: #66b5ff;
      --ds-success: #40cf8e;
      font-family: "Manrope", "Segoe UI", "SF Pro Text", sans-serif !important;
      background:
        radial-gradient(1200px 700px at -10% -20%, rgba(56, 126, 219, 0.2), transparent 60%),
        radial-gradient(1000px 600px at 110% -10%, rgba(50, 106, 190, 0.2), transparent 54%),
        linear-gradient(180deg, #08111c, #0a1320 60%, #0a1320) !important;
      color: var(--ds-text) !important;
    }

    body.developer-suite .orb1,
    body.developer-suite .orb2 {
      filter: blur(140px);
      opacity: 0.45;
      z-index: 0;
    }

    body.developer-suite .orb1 {
      background: rgba(76, 148, 255, 0.24);
    }

    body.developer-suite .orb2 {
      background: rgba(49, 109, 197, 0.2);
    }

    body.developer-suite .wrap {
      width: 100%;
      max-width: none !important;
      margin: 0;
      min-height: 100vh;
      padding: 0 !important;
      height: auto !important;
      position: relative;
      z-index: 1;
    }

    body.developer-suite .app {
      min-height: 100vh;
      padding: 0 !important;
      gap: 0;
      width: 100%;
    }

    body.developer-suite .app-header {
      --ds-nav-col-width: 228px;
      position: sticky;
      top: 0;
      z-index: 1200;
      display: grid !important;
      grid-template-columns: var(--ds-nav-col-width) minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      border-radius: 0 !important;
      border: 0 !important;
      border-bottom: 1px solid var(--ds-border) !important;
      padding: 10px 14px !important;
      margin: 0 !important;
      background: linear-gradient(180deg, rgba(8, 16, 28, 0.97), rgba(10, 19, 32, 0.92)) !important;
      box-shadow: 0 14px 30px rgba(1, 6, 14, 0.45);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    body.developer-suite .header-constructor-block {
      min-width: 0;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 0 2px 0 10px;
      border: 1px solid #2b4f78;
      border-radius: 8px;
      background: linear-gradient(180deg, #13263f, #11233a);
      box-shadow: inset 0 1px 0 rgba(149, 198, 255, 0.12);
    }

    body.developer-suite .header-constructor-title {
      margin: 0;
      font-size: 0.74rem;
      font-weight: 760;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #87a2c7;
      font-family: "Manrope", "Segoe UI", sans-serif;
      line-height: 1;
      white-space: nowrap;
    }

    body.developer-suite .header-constructor-toggle {
      width: 28px;
      height: 28px;
      flex: 0 0 28px;
      border-radius: 8px;
      border: 1px solid rgba(136, 186, 255, 0.7);
      background: linear-gradient(160deg, #2c8cff, #2a63be);
      color: #f0f7ff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      padding: 0;
      box-shadow: 0 6px 14px rgba(40, 116, 215, 0.45);
      transition: transform .16s ease, filter .16s ease;
    }

    body.developer-suite .header-constructor-toggle:hover {
      filter: brightness(1.07);
      transform: translateY(-1px);
    }

    body.developer-suite .header-constructor-toggle:focus-visible {
      outline: 2px solid #8cc4ff;
      outline-offset: 1px;
    }

    body.developer-suite .header-constructor-arrow {
      font-size: 0.75rem;
      font-weight: 900;
      line-height: 1;
    }

    body.developer-suite .header-left {
      display: flex;
      align-items: center;
      gap: 12px !important;
      min-width: 0;
    }

    body.developer-suite .logo-stack {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 0 0 auto;
    }

    body.developer-suite .logo {
      width: 28px !important;
      height: 28px !important;
      border-radius: 8px !important;
      font-size: 0.64rem;
      line-height: 1;
      letter-spacing: 0.02em;
      color: #f0f7ff !important;
      border: 1px solid rgba(136, 186, 255, 0.7) !important;
      background: linear-gradient(160deg, #2c8cff, #2a63be) !important;
      box-shadow: 0 6px 14px rgba(40, 116, 215, 0.45) !important;
    }

    body.developer-suite .midnight-window-controls {
      display: none !important;
    }

    body.developer-suite .brand-line {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    body.developer-suite .brand-line h1 {
      font-family: "Manrope", "Segoe UI", sans-serif !important;
      font-size: 1.06rem !important;
      font-weight: 780 !important;
      letter-spacing: -0.01em;
      color: #f1f6ff !important;
      line-height: 1.1;
      margin: 0;
    }

    body.developer-suite .suite-badge {
      padding: 3px 8px;
      border-radius: 999px;
      border: 1px solid rgba(121, 183, 255, 0.4);
      background: rgba(45, 102, 189, 0.3);
      color: #b9dbff;
      font-size: 0.69rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    body.developer-suite .suite-badge .suite-badge-accent {
      color: #ff2a36;
      text-shadow: 0 0 12px rgba(255, 42, 54, 0.28);
    }

    body.developer-suite .suite-models {
      margin-top: 6px;
      color: #8ba4c8;
      font-family: "Silkscreen", "Space Mono", "Courier New", monospace;
      font-size: 0.56rem;
      line-height: 1.45;
      letter-spacing: 0.09em;
      text-transform: uppercase;
      text-shadow: 0 0 8px rgba(82, 140, 224, 0.18);
      max-width: 100%;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    body.developer-suite #hosting-info,
    body.developer-suite .build-note {
      display: none !important;
    }

    body.developer-suite .header-right {
      display: flex !important;
      align-items: center;
      gap: 6px;
      margin-top: 0 !important;
      width: auto !important;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    body.developer-suite .header-right .option-btn {
      width: auto;
      min-width: 90px !important;
      height: auto;
      min-height: 46px !important;
      padding: 10px 11px;
      justify-content: center;
      text-align: center;
      border-radius: 12px !important;
      border: 1px solid var(--ds-border) !important;
      background: linear-gradient(180deg, #142640, #132235) !important;
      color: #c0daf9 !important;
      font-size: 0.88rem !important;
      font-weight: 700;
      box-shadow: none !important;
    }

    body.developer-suite .header-right .option-btn:hover {
      border-color: #3f7bbb !important;
      background: linear-gradient(180deg, #183156, #152a47) !important;
      color: #e8f1ff !important;
    }

    body.developer-suite .header-right .action-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }

    body.developer-suite #headerUndoBtn {
      min-width: 46px !important;
      width: 46px !important;
      min-height: 46px !important;
      padding: 10px !important;
      border-color: rgba(123, 183, 255, 0.68) !important;
      background: linear-gradient(160deg, #204a7d, #1a355a) !important;
      color: #e0efff !important;
      box-shadow: inset 0 1px 0 rgba(172, 209, 255, 0.35), 0 0 14px rgba(66, 133, 219, 0.24);
    }

    body.developer-suite .header-right .action-btn .vpe-btn-icon {
      margin: 0 !important;
      width: 14px !important;
      height: 14px !important;
      flex: 0 0 14px !important;
    }

    body.developer-suite .header-right .action-btn .vpe-svg-icon,
    body.developer-suite .header-right .action-btn .button-icon-svg {
      width: 14px !important;
      height: 14px !important;
    }

    body.developer-suite #headerUndoBtn:disabled {
      opacity: 0.45;
      border-color: rgba(79, 116, 162, 0.6) !important;
      background: linear-gradient(160deg, #16263a, #132133) !important;
      color: #8ca5c8 !important;
      box-shadow: none !important;
      cursor: not-allowed;
    }

    body.developer-suite .main-layout {
      grid-template-columns: minmax(0, 1fr) 325px !important;
      gap: 12px !important;
      padding: 12px 12px 14px !important;
      min-height: calc(100vh - 72px);
      align-items: start;
    }

    body.developer-suite .constructor-panel {
      position: fixed;
      top: calc(var(--app-header-offset) + 4px);
      left: 12px;
      width: var(--ds-nav-col-width);
      z-index: 1150;
      transform: translateX(calc(-100% - 16px));
      opacity: 0;
      pointer-events: none;
      transition: transform .24s ease, opacity .24s ease;
    }

    body.developer-suite.constructor-overlay-open .constructor-panel {
      transform: translateX(0);
      opacity: 1;
      pointer-events: auto;
    }

    body.developer-suite .constructor-card,
    body.developer-suite .main-menu-panel .left-panel,
    body.developer-suite .prompt-output-panel .right-panel {
      border: 1px solid var(--ds-border) !important;
      border-radius: 12px !important;
      background: linear-gradient(180deg, #101f31, #0f1c2d) !important;
      box-shadow: 0 18px 30px rgba(3, 8, 17, 0.42) !important;
    }

    body.developer-suite .constructor-card {
      position: static !important;
      padding: 12px !important;
      max-height: calc(100vh - var(--app-header-offset) - 12px);
      overflow: auto;
    }

    body.developer-suite .constructor-title-row {
      margin-bottom: 0;
      justify-content: flex-end;
    }

    body.developer-suite .constructor-title {
      margin: 0;
      font-size: 0.74rem !important;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #87a2c7 !important;
      font-family: "Manrope", "Segoe UI", sans-serif !important;
    }

    body.developer-suite .navigator-subtitle {
      color: #e4efff;
      font-size: 1.05rem;
      font-weight: 760;
      margin: 2px 0 10px;
    }

    body.developer-suite .constructor-item {
      background: transparent !important;
      border: 1px solid transparent !important;
      color: #9ab2d3 !important;
      border-radius: 8px !important;
      padding: 8px 9px !important;
      font-size: 0.88rem;
      line-height: 1.3;
    }

    body.developer-suite .constructor-item:hover {
      background: #162c47 !important;
      border-color: #2c5078 !important;
      color: #e2eeff !important;
    }

    body.developer-suite .constructor-item.master {
      border: 0 !important;
      background: #152843 !important;
      color: #dbe9ff !important;
      margin-bottom: 8px !important;
      border-radius: 8px !important;
      font-weight: 700;
      padding: 8px 10px !important;
    }

    body.developer-suite .constructor-item input[type="checkbox"] {
      background: #193251 !important;
      border-color: #355a84 !important;
    }

    body.developer-suite .constructor-item input[type="checkbox"]::before {
      background: #e6f0ff !important;
    }

    body.developer-suite .constructor-item input[type="checkbox"]:checked {
      background: #2e8fff !important;
      border-color: #79c2ff !important;
      box-shadow: 0 0 0 2px rgba(46, 143, 255, 0.2);
    }

    body.developer-suite .constructor-item input[type="checkbox"]:focus-visible {
      outline: 2px solid #7ec5ff !important;
    }

    body.developer-suite .main-menu-panel .left-panel,
    body.developer-suite .prompt-output-panel .right-panel {
      height: calc(100vh - 120px) !important;
      max-height: calc(100vh - 120px) !important;
      padding: 12px !important;
      overflow-y: auto;
    }

    body.developer-suite .prompt-output-panel .right-panel {
      position: sticky;
      top: 108px !important;
    }

    body.developer-suite #promptOutputPanel {
      display: flex;
      flex-direction: column;
      gap: 12px;
      align-items: stretch;
    }

    body.developer-suite #promptOutputPanel>.section:not(.prompt-box) {
      flex: 0 0 auto;
    }

    body.developer-suite #promptOutputPanel>.section.prompt-box {
      flex: 1 1 0 !important;
      min-height: 0 !important;
      display: flex;
      flex-direction: column;
    }

    body.developer-suite #promptOutputPanel>.section.prompt-box.collapsed {
      flex: 0 0 auto !important;
      min-height: auto !important;
    }

    body.developer-suite #promptOutputPanel>.section.prompt-box>.section-content {
      flex: 1 1 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }

    body.developer-suite #promptOutputPanel>#promptSection .output-box,
    body.developer-suite #promptOutputPanel>#jsonSection .json-box {
      flex: 1 1 auto;
      min-height: 0 !important;
      max-height: none !important;
      height: 100%;
    }

    body.developer-suite .section {
      border: 1px solid #243d5f !important;
      border-radius: 12px !important;
      background: linear-gradient(180deg, #14253c, #122137) !important;
      box-shadow: none !important;
      padding: 12px !important;
    }

    body.developer-suite .section:hover {
      transform: none !important;
      border-color: #2d537f !important;
      box-shadow: 0 0 0 1px rgba(85, 149, 223, 0.14) !important;
    }

    body.developer-suite .section-header {
      padding: 0 !important;
      border: 0 !important;
      background: transparent !important;
    }

    body.developer-suite .section-header::after {
      display: none !important;
    }

    body.developer-suite .section-header h2 {
      color: #e2edff !important;
      font-size: 0.92rem !important;
      letter-spacing: 0.005em;
      font-weight: 740 !important;
    }

    body.developer-suite .section-header h2 .icon {
      width: 24px !important;
      height: 24px !important;
      border-radius: 7px !important;
      border: 1px solid #2e567f !important;
      background: #173254 !important;
      color: #85c5ff !important;
      font-size: 12px !important;
    }

    body.developer-suite .mode-badge {
      border: 1px solid #2f5a84 !important;
      background: #163153 !important;
      color: #8ec7ff !important;
      font-size: 0.64rem !important;
      padding: 3px 8px !important;
      letter-spacing: 0.06em !important;
    }

    body.developer-suite .mode-badge.multi {
      border-color: rgba(64, 207, 142, 0.44) !important;
      background: rgba(64, 207, 142, 0.2) !important;
      color: #8ff1c0 !important;
    }

    body.developer-suite .mode-badge.pa {
      border-color: rgba(249, 173, 45, 0.44) !important;
      background: rgba(249, 173, 45, 0.2) !important;
      color: #ffd59b !important;
    }

    body.developer-suite .section-content {
      margin-top: 10px !important;
    }

    body.developer-suite .sub-label {
      color: #b8cae5;
      font-size: 0.84rem;
    }

    body.developer-suite .option-btn,
    body.developer-suite .preset-btn,
    body.developer-suite .quick-preset-btn,
    body.developer-suite .format-tab {
      background: linear-gradient(180deg, #162b46, #152640) !important;
      border: 1px solid #2a4d77 !important;
      color: #d0def5 !important;
      border-radius: 10px !important;
      min-height: 46px !important;
      box-shadow: none !important;
    }

    body.developer-suite .option-btn:hover,
    body.developer-suite .preset-btn:hover,
    body.developer-suite .quick-preset-btn:hover,
    body.developer-suite .format-tab:hover {
      background: linear-gradient(180deg, #1a3456, #18304f) !important;
      border-color: #3a6a9f !important;
      color: #f1f7ff !important;
      transform: none !important;
    }

    body.developer-suite .option-btn.active,
    body.developer-suite .preset-btn.active,
    body.developer-suite .quick-preset-btn.active,
    body.developer-suite .format-tab.active {
      border-color: #70bcff !important;
      background: linear-gradient(145deg, #2e8fff, #2b71ce) !important;
      color: #031324 !important;
      box-shadow: 0 0 0 1px rgba(146, 206, 255, 0.36), 0 0 18px rgba(60, 143, 241, 0.36) !important;
    }

    body.developer-suite #presetGrid .option-btn.preset-selected {
      border-color: #8af4ca !important;
      background: linear-gradient(145deg, #4cd49a, #34ad7b) !important;
      color: #041a10 !important;
      box-shadow: 0 0 0 1px rgba(138, 244, 202, 0.52), 0 0 18px rgba(76, 212, 154, 0.34) !important;
    }

    body.developer-suite #presetGrid .option-btn.preset-selected:hover {
      border-color: #a8ffd9 !important;
      background: linear-gradient(145deg, #57dca4, #3ab784) !important;
      color: #022015 !important;
    }

    body.developer-suite .option-btn.conflict-disabled {
      background: linear-gradient(180deg, #3b2330, #341a26) !important;
      border-color: #7f3b55 !important;
      color: #f0c8d3 !important;
    }

    body.developer-suite .input-field,
    body.developer-suite textarea.input-field,
    body.developer-suite select,
    body.developer-suite input[type="text"],
    body.developer-suite input[type="number"],
    body.developer-suite .image-description-input {
      background: #0f1d30 !important;
      border: 1px solid #2a496e !important;
      color: #e0edff !important;
      border-radius: 10px !important;
      box-shadow: inset 0 1px 0 rgba(152, 201, 255, 0.08) !important;
    }

    body.developer-suite .input-field::placeholder,
    body.developer-suite .image-description-input::placeholder {
      color: #7391b6 !important;
    }

    body.developer-suite .input-field:focus,
    body.developer-suite textarea.input-field:focus,
    body.developer-suite select:focus,
    body.developer-suite input[type="text"]:focus,
    body.developer-suite input[type="number"]:focus,
    body.developer-suite .image-description-input:focus {
      border-color: #4da2ff !important;
      box-shadow: 0 0 0 2px rgba(77, 162, 255, 0.2) !important;
    }

    body.developer-suite .help-tip {
      background: #1d3859 !important;
      border-color: #2e567f !important;
      color: #9ccdfd !important;
    }

    body.developer-suite .help-tip .tip-text {
      background: #0e1c2f !important;
      border-color: #2d4f75 !important;
      color: #dae9ff !important;
    }

    body.developer-suite .help-tip .tip-text::after {
      border-bottom-color: #0e1c2f !important;
    }

    body.developer-suite .help-tip.tip-up .tip-text::after {
      border-top-color: #0e1c2f !important;
    }

    body.developer-suite .stats-row {
      gap: 8px;
    }

    body.developer-suite .stat-card {
      border: 1px solid #2a4b74 !important;
      border-radius: 10px !important;
      background: linear-gradient(180deg, #162b45, #14233a) !important;
      box-shadow: none !important;
    }

    body.developer-suite .stat-value {
      color: #9bc8ff !important;
      background: none !important;
      -webkit-text-fill-color: currentColor !important;
      text-shadow: 0 0 14px rgba(93, 161, 245, 0.25);
    }

    body.developer-suite .stat-label {
      color: #8da8cb !important;
    }

    body.developer-suite .hint {
      color: #a8c3e6 !important;
    }

    body.developer-suite .attributes-heading {
      font-size: 0.74rem;
      letter-spacing: 0.12em;
      color: #88a5ca;
      font-weight: 700;
      margin-bottom: 8px;
      text-transform: uppercase;
    }

    body.developer-suite .prompt-header-tools {
      gap: 6px;
    }

    body.developer-suite .collapse-btn {
      background: linear-gradient(180deg, #172d49, #14263f) !important;
      border-color: #2b5079 !important;
      color: #c5dcfb !important;
      width: 44px;
      min-width: 44px;
      height: 44px;
      min-height: 44px;
      border-radius: 10px;
      font-size: 14px;
      box-shadow: inset 0 1px 0 rgba(154, 201, 255, 0.2);
    }

    body.developer-suite .collapse-btn:hover {
      border-color: #4f82b7 !important;
      color: #f1f7ff !important;
      background: linear-gradient(180deg, #1b3659, #17304f) !important;
    }

    body.developer-suite .section.collapsed .collapse-btn {
      color: #9fc6f4 !important;
      border-color: #4675a9 !important;
    }

    body.developer-suite .tag-area,
    body.developer-suite .output-box,
    body.developer-suite .json-box {
      border: 1px solid #284869 !important;
      border-radius: 10px !important;
      background: #0d1a2b !important;
      box-shadow: inset 0 1px 0 rgba(130, 179, 241, 0.08) !important;
    }

    body.developer-suite .output-box {
      color: #9af2c0 !important;
    }

    body.developer-suite .json-box {
      color: #aac6f5 !important;
    }

    body.developer-suite .format-tabs {
      background: #112238 !important;
      border: 1px solid #27466b !important;
      border-radius: 9px !important;
      padding: 4px !important;
    }

    body.developer-suite .btn {
      border-radius: 9px !important;
      border: 1px solid transparent !important;
      font-weight: 700 !important;
      box-shadow: none !important;
      min-height: 46px !important;
    }

    body.developer-suite .btn-accent {
      background: linear-gradient(145deg, #2e8fff, #2a71ce) !important;
      color: #021123 !important;
      border-color: rgba(138, 197, 255, 0.78) !important;
    }

    body.developer-suite .btn-green {
      background: linear-gradient(145deg, #4cd49a, #37be83) !important;
      color: #03140b !important;
      border-color: rgba(126, 244, 188, 0.42) !important;
    }

    body.developer-suite .btn-ghost {
      background: linear-gradient(180deg, #182b45, #162740) !important;
      color: #cee0fa !important;
      border-color: #2c4d76 !important;
    }

    body.developer-suite .btn-red {
      background: linear-gradient(145deg, #df6178, #c84b65) !important;
      color: #2a0a14 !important;
      border-color: rgba(255, 183, 197, 0.45) !important;
    }

    body.developer-suite .notification.success {
      background: #40cf8e !important;
      color: #082013 !important;
    }

    body.developer-suite .notification.warn {
      background: #f2ac3f !important;
      color: #261705 !important;
    }

    body.developer-suite .notification.err {
      background: #e15d76 !important;
      color: #2a0b13 !important;
    }

    body.developer-suite .constructor-card,
    body.developer-suite .main-menu-panel .left-panel,
    body.developer-suite .prompt-output-panel .right-panel,
    body.developer-suite .output-box,
    body.developer-suite .json-box {
      scrollbar-width: thin;
      scrollbar-color: rgba(118, 165, 222, 0.72) rgba(11, 23, 38, 0.88);
    }

    body.developer-suite .constructor-card::-webkit-scrollbar,
    body.developer-suite .main-menu-panel .left-panel::-webkit-scrollbar,
    body.developer-suite .prompt-output-panel .right-panel::-webkit-scrollbar,
    body.developer-suite .output-box::-webkit-scrollbar,
    body.developer-suite .json-box::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }

    body.developer-suite .constructor-card::-webkit-scrollbar-track,
    body.developer-suite .main-menu-panel .left-panel::-webkit-scrollbar-track,
    body.developer-suite .prompt-output-panel .right-panel::-webkit-scrollbar-track,
    body.developer-suite .output-box::-webkit-scrollbar-track,
    body.developer-suite .json-box::-webkit-scrollbar-track {
      background: linear-gradient(180deg, rgba(10, 20, 34, 0.96), rgba(11, 24, 39, 0.96));
      border: 1px solid rgba(42, 74, 112, 0.58);
      border-radius: 999px;
    }

    body.developer-suite .constructor-card::-webkit-scrollbar-thumb,
    body.developer-suite .main-menu-panel .left-panel::-webkit-scrollbar-thumb,
    body.developer-suite .prompt-output-panel .right-panel::-webkit-scrollbar-thumb,
    body.developer-suite .output-box::-webkit-scrollbar-thumb,
    body.developer-suite .json-box::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, rgba(126, 173, 230, 0.84), rgba(76, 120, 178, 0.88));
      border: 2px solid rgba(11, 23, 38, 0.92);
      border-radius: 999px;
      box-shadow: inset 0 0 0 1px rgba(174, 209, 255, 0.22);
    }

    body.developer-suite .constructor-card::-webkit-scrollbar-thumb:hover,
    body.developer-suite .main-menu-panel .left-panel::-webkit-scrollbar-thumb:hover,
    body.developer-suite .prompt-output-panel .right-panel::-webkit-scrollbar-thumb:hover,
    body.developer-suite .output-box::-webkit-scrollbar-thumb:hover,
    body.developer-suite .json-box::-webkit-scrollbar-thumb:hover {
      background: linear-gradient(180deg, rgba(154, 199, 255, 0.92), rgba(96, 146, 207, 0.94));
    }

    body.developer-suite .vpe-sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      margin: -1px;
      padding: 0;
      border: 0;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
    }

    @media (max-width: 1300px) {
      body.developer-suite .app-header {
        --ds-nav-col-width: 200px;
      }

      body.developer-suite .main-layout {
        grid-template-columns: minmax(0, 1fr) 300px !important;
      }
    }

    @media (max-width: 1100px) {
      body.developer-suite .app-header {
        grid-template-columns: 1fr;
      }

      body.developer-suite .header-constructor-block {
        display: none;
      }

      body.developer-suite .header-right {
        order: 2;
      }

      body.developer-suite .constructor-panel {
        position: static;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        width: auto;
      }

      body.developer-suite .main-layout {
        grid-template-columns: 1fr !important;
        min-height: auto;
      }

      body.developer-suite .prompt-output-panel .right-panel {
        position: static;
      }

      body.developer-suite .main-menu-panel .left-panel,
      body.developer-suite .prompt-output-panel .right-panel,
      body.developer-suite .constructor-card {
        height: auto !important;
        max-height: none !important;
      }
    }

    @media (max-width: 760px) {
      body.developer-suite .main-layout {
        padding: 10px !important;
      }

      body.developer-suite .header-right {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        justify-content: stretch;
      }

      body.developer-suite .header-right .option-btn {
        width: 100% !important;
        min-width: 0 !important;
        height: auto;
        min-height: 46px !important;
        padding: 10px 10px !important;
        border-radius: 12px !important;
        font-size: 0.82rem !important;
      }

      body.developer-suite #headerUndoBtn {
        width: 100% !important;
        min-width: 0 !important;
        padding: 10px !important;
      }
    }
    html {
      margin: 0 !important;
      padding: 0 !important;
      min-height: 100% !important;
      background:
        radial-gradient(1200px 680px at -12% -24%, rgba(110, 220, 255, 0.18), transparent 58%),
        radial-gradient(900px 520px at 108% -8%, rgba(255, 187, 116, 0.18), transparent 54%),
        linear-gradient(180deg, #06111b 0%, #07131f 46%, #091824 100%) !important;
      background-color: #07111f !important;
      color-scheme: dark !important;
    }

    body.mobile-vpe-shell {
      margin: 0 !important;
      padding: 0 !important;
      width: 100% !important;
      min-width: 100% !important;
      min-height: 100svh !important;
      background:
        radial-gradient(1200px 680px at -12% -24%, rgba(110, 220, 255, 0.16), transparent 58%),
        radial-gradient(900px 520px at 108% -8%, rgba(255, 187, 116, 0.16), transparent 54%),
        linear-gradient(180deg, #06111b 0%, #07131f 46%, #091824 100%) !important;
      background-color: #07111f !important;
      overscroll-behavior-x: none;
    }

    body.mobile-vpe-shell::before {
      position: fixed !important;
      inset: 0 !important;
      pointer-events: none !important;
    }

    body.mobile-vpe-shell .wrap,
    body.mobile-vpe-shell .app,
    body.mobile-vpe-shell .main-layout {
      width: 100% !important;
      max-width: none !important;
    }

    body.mobile-vpe-shell .app-header {
      position: relative !important;
      top: auto !important;
      left: auto !important;
      right: auto !important;
      width: 100% !important;
      padding: 0 !important;
      border: 0 !important;
      background: transparent !important;
      box-shadow: none !important;
      border-radius: 0 !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      gap: 10px !important;
      min-height: auto !important;
    }

    body.mobile-vpe-shell .header-left {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 10px !important;
      padding: 76px 4px 0 !important;
      width: 100% !important;
      min-width: 0 !important;
    }

    body.mobile-vpe-shell .logo-stack {
      display: flex !important;
      align-items: center !important;
      gap: 10px !important;
      min-width: 0 !important;
      width: auto !important;
      flex: 0 0 auto !important;
    }

    body.mobile-vpe-shell .logo {
      width: 26px !important;
      height: 26px !important;
      min-width: 26px !important;
      min-height: 26px !important;
      border-radius: 8px !important;
      font-size: 0.58rem !important;
      line-height: 1 !important;
      letter-spacing: 0.02em !important;
      flex: 0 0 26px !important;
    }

    body.mobile-vpe-shell .mobile-brand-copy {
      min-width: 0;
      flex: 1 1 auto;
      width: auto;
      flex: 0 1 auto;
    }

    body.mobile-vpe-shell .midnight-window-controls,
    body.mobile-vpe-shell .suite-badge,
    body.mobile-vpe-shell .suite-models,
    body.mobile-vpe-shell .build-note,
    body.mobile-vpe-shell #hosting-info,
    body.mobile-vpe-shell .mobile-intro,
    body.mobile-vpe-shell .attributes-heading,
    body.mobile-vpe-shell .header-constructor-block {
      display: none !important;
    }

    body.mobile-vpe-shell .brand-line {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      width: auto !important;
    }

    body.mobile-vpe-shell .header h1 {
      margin: 0 !important;
      white-space: nowrap !important;
      overflow: hidden;
      text-overflow: ellipsis;
      width: auto !important;
      font-size: clamp(0.98rem, 4.9vw, 1.14rem) !important;
      font-weight: 820 !important;
      line-height: 1 !important;
      letter-spacing: 0.04em !important;
      text-transform: uppercase !important;
      color: #dbe8ff !important;
      text-align: center !important;
      text-shadow: 0 0 12px rgba(146, 175, 245, 0.26) !important;
    }

    body.mobile-vpe-shell .header h1 .title-initial {
      color: #ff5f6d !important;
      text-shadow: 0 0 14px rgba(255, 95, 109, 0.24) !important;
    }

    body.mobile-vpe-shell .header-right {
      position: fixed !important;
      left: 12px !important;
      right: 12px !important;
      width: calc(100vw - 24px) !important;
      max-width: calc(100vw - 24px) !important;
      top: calc(6px + env(safe-area-inset-top)) !important;
      z-index: 1400 !important;
      display: grid !important;
      grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      gap: 6px !important;
      padding: 6px !important;
      box-sizing: border-box !important;
      align-items: stretch !important;
      border: 1px solid rgba(115, 210, 255, 0.22) !important;
      border-radius: 18px !important;
      background: linear-gradient(180deg, rgba(8, 20, 31, 0.96), rgba(7, 18, 28, 0.92)) !important;
      box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28) !important;
      backdrop-filter: blur(18px) !important;
      -webkit-backdrop-filter: blur(18px) !important;
    }

    body.mobile-vpe-shell .header-right .option-btn {
      min-width: 0 !important;
      width: 100% !important;
      max-width: 100% !important;
      min-height: 30px !important;
      height: 30px !important;
      padding: 3px 8px !important;
      border-radius: 10px !important;
      font-size: 0.74rem !important;
      box-sizing: border-box !important;
      overflow: hidden !important;
      justify-content: center !important;
      text-align: center !important;
      line-height: 1 !important;
    }

    body.mobile-vpe-shell #headerUndoBtn {
      width: 100% !important;
      min-width: 0 !important;
      max-width: 100% !important;
      min-height: 30px !important;
      height: 30px !important;
      padding: 3px 8px !important;
    }

    body.mobile-vpe-shell .header-right .option-btn .vpe-btn-label {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    body.mobile-vpe-shell .main-layout {
      gap: 14px !important;
    }

    body.mobile-vpe-shell .main-menu-panel {
      order: 1 !important;
    }

    body.mobile-vpe-shell .prompt-output-panel {
      order: 2 !important;
      width: 100% !important;
      max-width: 100% !important;
      justify-self: stretch !important;
      align-self: stretch !important;
    }

    body.mobile-vpe-shell .prompt-output-panel .right-panel {
      position: static !important;
      top: auto !important;
      width: 100% !important;
      max-width: 100% !important;
      margin: 0 !important;
      height: auto !important;
      max-height: none !important;
      overflow: visible !important;
      box-sizing: border-box !important;
    }

    body.mobile-vpe-shell #promptOutputPanel {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    body.mobile-vpe-shell #promptOutputPanel > .section.prompt-box {
      display: flex !important;
      flex-direction: column;
      min-height: auto !important;
      flex: 0 0 auto !important;
    }

    body.mobile-vpe-shell #promptOutputPanel > .section.prompt-box > .section-content {
      display: flex !important;
      flex-direction: column;
      gap: 12px;
      min-height: auto !important;
      overflow: visible !important;
    }

    body.mobile-vpe-shell #promptSection .output-box,
    body.mobile-vpe-shell #jsonSection .json-box {
      min-height: 220px !important;
      height: auto !important;
      max-height: min(46svh, 420px) !important;
      overflow: auto !important;
    }

    body.mobile-vpe-shell .stats-row {
      display: grid !important;
      grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      width: 100% !important;
      gap: 10px !important;
    }

    body.mobile-vpe-shell .stat-card {
      width: 100% !important;
      min-height: 46px !important;
      padding: 4px 8px !important;
      border-radius: 14px !important;
    }

    body.mobile-vpe-shell .stat-value {
      font-size: 0.92rem !important;
      line-height: 1 !important;
      margin-bottom: 1px !important;
    }

    body.mobile-vpe-shell .stat-label {
      font-size: 0.62rem !important;
      line-height: 0.95 !important;
      letter-spacing: 0.04em;
    }

    body.mobile-vpe-shell .action-row {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px !important;
    }

    body.mobile-vpe-shell .action-row > * {
      width: 100%;
    }

    body.mobile-vpe-shell #generationModeSection.generation-inline {
      display: block !important;
    }

    body.mobile-vpe-shell #generationModeSection.generation-inline .section-header {
      align-items: center !important;
      flex-wrap: nowrap !important;
      gap: 10px !important;
    }

    body.mobile-vpe-shell #generationModeSection .generation-inline-header-tools {
      width: auto !important;
      justify-content: flex-end !important;
      gap: 10px !important;
    }

    body.mobile-vpe-shell #generationModeSection.inline-normalized .generation-inline-header-tools {
      display: none !important;
    }

    body.mobile-vpe-shell #generationModeSection .generation-inline-switch {
      min-height: 42px !important;
      padding: 8px 12px !important;
      border-radius: 12px !important;
      line-height: 1.25 !important;
      font-size: 0.86rem !important;
    }

    body.mobile-vpe-shell .constructor-scrim {
      position: fixed;
      inset: 0;
      z-index: 1180;
      background: rgba(2, 8, 14, 0.58);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.22s ease;
    }

    body.mobile-vpe-shell.constructor-overlay-open .constructor-scrim {
      opacity: 1;
      pointer-events: auto;
    }

    body.mobile-vpe-shell .constructor-panel {
      position: fixed !important;
      top: calc(var(--app-header-offset) + 2px) !important;
      left: 10px !important;
      bottom: calc(90px + env(safe-area-inset-bottom)) !important;
      width: min(84vw, 320px) !important;
      transform: translateX(calc(-100% - 24px)) !important;
      opacity: 0 !important;
      pointer-events: none !important;
      z-index: 1190 !important;
      margin: 0 !important;
      overflow-y: auto !important;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
    }

    body.mobile-vpe-shell.constructor-overlay-open .constructor-panel {
      transform: translateX(0) !important;
      opacity: 1 !important;
      pointer-events: auto !important;
    }

    body.mobile-vpe-shell .constructor-card {
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-height: 100%;
      height: auto;
      max-height: none;
      overflow: visible;
      position: relative;
    }

    body.mobile-vpe-shell .constructor-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 0 !important;
      position: sticky;
      top: 0;
      z-index: 3;
      padding: 2px 0 10px;
      background: linear-gradient(180deg, rgba(16, 27, 46, 0.98), rgba(16, 27, 46, 0.94) 82%, rgba(16, 27, 46, 0));
      border-bottom: 1px solid rgba(116, 150, 224, 0.18);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }

    body.mobile-vpe-shell .constructor-title {
      margin: 0;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      font-size: 0.74rem !important;
      line-height: 1;
    }

    body.mobile-vpe-shell .navigator-subtitle {
      display: none !important;
      margin-top: 4px;
      color: #e4efff;
      font-size: 0.96rem;
      font-weight: 700;
      line-height: 1.25;
    }

    body.mobile-vpe-shell .constructor-controls {
      display: block !important;
      flex: none;
      min-height: auto;
      overflow: visible !important;
      padding-right: 0;
      padding-top: 2px;
    }

    body.mobile-vpe-shell .constructor-toggle {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      align-self: center;
      min-width: auto !important;
      min-height: 28px !important;
      padding: 0 10px !important;
      border-radius: 999px !important;
      border: 1px solid rgba(121, 240, 255, 0.2) !important;
      background: rgba(17, 36, 58, 0.92) !important;
      color: #dbeeff !important;
      font-size: 0.74rem !important;
      font-weight: 700 !important;
      letter-spacing: 0.02em;
      line-height: 1 !important;
      text-align: center !important;
      box-shadow: inset 0 1px 0 rgba(185, 228, 255, 0.1) !important;
      white-space: nowrap;
      appearance: none;
      -webkit-appearance: none;
    }

    body.mobile-vpe-shell .constructor-toggle:hover,
    body.mobile-vpe-shell .constructor-toggle:active {
      border-color: rgba(126, 243, 198, 0.34) !important;
      background: rgba(20, 43, 69, 0.96) !important;
      color: #ffffff !important;
    }

    body.mobile-vpe-shell .constructor-toggle:focus-visible {
      outline: 2px solid rgba(126, 243, 198, 0.72) !important;
      outline-offset: 2px !important;
    }

    body.mobile-vpe-shell .constructor-items {
      flex: none;
      min-height: auto;
      padding-bottom: 16px;
    }

    body.mobile-vpe-shell .help-tip {
      position: relative !important;
      width: 32px !important;
      height: 32px !important;
      min-width: 32px !important;
      min-height: 32px !important;
      margin-left: 8px !important;
      font-size: 0.86rem !important;
      z-index: 2600 !important;
    }

    body.mobile-vpe-shell .left-panel .section,
    body.mobile-vpe-shell .right-panel .section,
    body.mobile-vpe-shell .section-header {
      overflow: visible !important;
    }

    body.mobile-vpe-shell .left-panel .section,
    body.mobile-vpe-shell .right-panel .section {
      animation: none !important;
      opacity: 1 !important;
      transform: none !important;
    }

    body.mobile-vpe-shell .help-tip .tip-text {
      display: none !important;
    }

    body.mobile-vpe-shell .mobile-help-popover {
      position: fixed;
      left: 8px;
      top: 72px;
      z-index: 3200;
      display: block;
      width: min(248px, calc(100vw - 16px));
      max-width: min(248px, calc(100vw - 16px));
      padding: 12px 14px;
      border-radius: 14px;
      border: 1px solid rgba(138, 162, 223, 0.34);
      background: rgba(8, 13, 22, 0.98);
      color: #e7efff;
      box-shadow: 0 14px 34px rgba(2, 5, 12, 0.68);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateY(6px) scale(0.98);
      transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
      overflow: auto;
      max-height: min(44svh, calc(100vh - 16px));
    }

    body.mobile-vpe-shell .mobile-help-popover.is-visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateY(0) scale(1);
    }

    body.mobile-vpe-shell .mobile-help-popover::after {
      content: "";
      position: absolute;
      left: var(--popover-arrow-left, 24px);
      width: 12px;
      height: 12px;
      background: rgba(8, 13, 22, 0.98);
      border-left: 1px solid rgba(138, 162, 223, 0.34);
      border-top: 1px solid rgba(138, 162, 223, 0.34);
      transform: rotate(45deg);
    }

    body.mobile-vpe-shell .mobile-help-popover.popover-down::after {
      top: -7px;
    }

    body.mobile-vpe-shell .mobile-help-popover.popover-up::after {
      bottom: -7px;
      transform: rotate(225deg);
    }

    body.mobile-vpe-shell .mobile-help-popover__content {
      font-size: 0.82rem;
      line-height: 1.45;
      color: inherit;
    }

    body.mobile-vpe-shell .mobile-bottom-bar {
      grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      z-index: 1260 !important;
    }

    body.mobile-vpe-shell #bottomConstructorPanelBtn {
      border-color: rgba(120, 235, 255, 0.56) !important;
      background:
        linear-gradient(135deg, rgba(123, 239, 255, 0.96), rgba(255, 193, 122, 0.94)) !important;
      color: #082033 !important;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        0 10px 22px rgba(96, 208, 255, 0.24),
        0 0 0 1px rgba(255, 236, 188, 0.18) !important;
      text-shadow: none !important;
    }

    body.mobile-vpe-shell #bottomConstructorPanelBtn:hover,
    body.mobile-vpe-shell #bottomConstructorPanelBtn:active,
    body.mobile-vpe-shell #bottomConstructorPanelBtn.is-open {
      background:
        linear-gradient(135deg, rgba(142, 244, 255, 1), rgba(255, 204, 140, 0.98)) !important;
      border-color: rgba(157, 245, 255, 0.82) !important;
      color: #051824 !important;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        0 12px 28px rgba(105, 214, 255, 0.28),
        0 0 0 1px rgba(255, 240, 197, 0.24) !important;
    }

    /* Max consistency row: compact one-line layout for mobile */
    body.mobile-vpe-shell #generationModeSection.generation-inline {
      padding: 7px 10px !important;
      border-radius: 14px !important;
    }

    body.mobile-vpe-shell #generationModeSection.generation-inline .section-header {
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      flex-wrap: nowrap !important;
      gap: 8px !important;
      margin: 0 !important;
      min-height: 32px !important;
    }

    body.mobile-vpe-shell #generationModeSection.generation-inline .generation-inline-title {
      display: inline-flex !important;
      align-items: center !important;
      gap: 8px !important;
      flex: 1 1 auto !important;
      min-width: 0 !important;
      width: 100% !important;
      margin: 0 !important;
      white-space: nowrap !important;
      font-size: 0.9rem !important;
      line-height: 1.15 !important;
    }

    body.mobile-vpe-shell #generationModeSection.generation-inline .generation-inline-title .generation-inline-switch {
      margin-left: auto !important;
    }

    body.mobile-vpe-shell #generationModeSection.generation-inline .generation-inline-title .help-tip {
      margin-left: 0 !important;
    }

    body.mobile-vpe-shell #generationModeSection .generation-inline-header-tools {
      width: auto !important;
      flex: 0 0 auto !important;
      justify-content: flex-end !important;
      gap: 6px !important;
    }

    body.mobile-vpe-shell #generationModeSection .generation-inline-switch {
      margin: 0 !important;
      min-height: 30px !important;
      min-width: 54px !important;
      padding: 3px 6px !important;
      border-radius: 999px !important;
      border: 1px solid rgba(122, 220, 255, 0.42) !important;
      background: linear-gradient(145deg, rgba(20, 45, 70, 0.92), rgba(9, 24, 40, 0.92)) !important;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(122, 220, 255, 0.1) !important;
    }

    body.mobile-vpe-shell #generationModeSection .generation-inline-switch:has(input:checked),
    body.mobile-vpe-shell #generationModeSection .generation-inline-switch.checked {
      border-color: rgba(130, 246, 210, 0.58) !important;
      background: linear-gradient(145deg, rgba(27, 69, 85, 0.94), rgba(18, 49, 62, 0.94)) !important;
    }

    body.mobile-vpe-shell #generationModeSection .generation-inline-switch input {
      width: 40px !important;
      height: 22px !important;
      border: 1px solid rgba(132, 205, 241, 0.5) !important;
      background: linear-gradient(140deg, rgba(74, 118, 152, 0.78), rgba(44, 73, 100, 0.78)) !important;
      box-shadow: inset 0 1px 3px rgba(2, 6, 14, 0.45) !important;
    }

    body.mobile-vpe-shell #generationModeSection .generation-inline-switch input::before {
      top: 1px !important;
      left: 1px !important;
      width: 18px !important;
      height: 18px !important;
      background: linear-gradient(145deg, #f0f8ff, #cde5ff) !important;
      box-shadow: 0 2px 6px rgba(6, 16, 30, 0.42) !important;
    }

    body.mobile-vpe-shell #generationModeSection .generation-inline-switch input:checked {
      border-color: rgba(124, 247, 217, 0.72) !important;
      background: linear-gradient(145deg, rgba(80, 227, 194, 0.95), rgba(64, 166, 255, 0.92)) !important;
      box-shadow: 0 0 0 2px rgba(88, 216, 255, 0.24) !important;
    }

    body.mobile-vpe-shell #generationModeSection .generation-inline-switch input:checked::before {
      transform: translateX(18px) !important;
      background: linear-gradient(145deg, #ffffff, #e9fbff) !important;
    }

    /* Scene: "Кто?" should stay compact as a single-line field */
    body.mobile-vpe-shell #subjectWho.input-field {
      min-height: 46px !important;
      height: 46px !important;
      padding: 10px 14px !important;
      line-height: 1.2 !important;
    }

    /* Special modes: one horizontal row per option (no 2x2 grid) */
    body.mobile-vpe-shell #specialModesSection .toggle-row.special-modes-list {
      display: flex !important;
      flex-direction: column !important;
      gap: 8px !important;
      flex-wrap: nowrap !important;
    }

    body.mobile-vpe-shell #specialModesSection .toggle-row.special-modes-list .toggle-label {
      width: 100% !important;
      min-height: 46px !important;
      padding: 10px 12px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 10px !important;
      flex-wrap: nowrap !important;
      border-radius: 16px !important;
      border: 1px solid rgba(72, 126, 206, 0.36) !important;
      background: linear-gradient(180deg, rgba(19, 41, 67, 0.96), rgba(13, 31, 52, 0.98)) !important;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 18px rgba(3, 10, 22, 0.22) !important;
      color: #dcecff !important;
    }

    body.mobile-vpe-shell #specialModesSection .toggle-row.special-modes-list .toggle-label > span:first-child {
      flex: 1 1 auto !important;
      min-width: 0 !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      line-height: 1.2 !important;
      color: inherit !important;
    }

    body.mobile-vpe-shell #specialModesSection .toggle-row.special-modes-list .toggle-label:hover {
      border-color: rgba(111, 165, 243, 0.52) !important;
      background: linear-gradient(180deg, rgba(24, 49, 78, 0.98), rgba(16, 37, 61, 0.98)) !important;
    }

    body.mobile-vpe-shell #specialModesSection .toggle-row.special-modes-list .toggle-label.checked,
    body.mobile-vpe-shell #specialModesSection .toggle-row.special-modes-list .toggle-label:has(input:checked) {
      border-color: rgba(249, 173, 45, 0.76) !important;
      background: linear-gradient(180deg, rgba(28, 53, 84, 0.99), rgba(18, 39, 64, 0.99)) !important;
      box-shadow:
        inset 0 0 0 1px rgba(249, 173, 45, 0.18),
        0 12px 22px rgba(3, 10, 22, 0.28) !important;
    }

    body.mobile-vpe-shell #specialModesSection .toggle-row.special-modes-list .toggle-label.checked > span:first-child,
    body.mobile-vpe-shell #specialModesSection .toggle-row.special-modes-list .toggle-label:has(input:checked) > span:first-child {
      color: #f7fbff !important;
    }

    /* Seed controls in one compact row */
    body.mobile-vpe-shell #specialModesSection #seedInput.input-field {
      min-height: 44px !important;
      height: 44px !important;
      padding: 10px 12px !important;
      max-width: none !important;
    }

    body.mobile-vpe-shell #specialModesSection .seed-row {
      display: flex !important;
      flex-wrap: nowrap !important;
      align-items: center !important;
      gap: 8px !important;
    }

    body.mobile-vpe-shell #specialModesSection .seed-row #seedInput {
      flex: 1 1 auto !important;
      min-width: 0 !important;
    }

    body.mobile-vpe-shell #specialModesSection .seed-row #randomSeedBtn,
    body.mobile-vpe-shell #specialModesSection .seed-row #clearSeedBtn {
      min-height: 44px !important;
      height: 44px !important;
      padding: 0 12px !important;
      white-space: nowrap !important;
      line-height: 1 !important;
    }

    body.mobile-vpe-shell #specialModesSection .seed-row #randomSeedBtn .vpe-btn-label,
    body.mobile-vpe-shell #specialModesSection .seed-row #clearSeedBtn .vpe-btn-label {
      white-space: nowrap !important;
      overflow: visible !important;
      text-overflow: clip !important;
    }

    /* Lite fallback for Opera Mini / low-capability engines */
    body.mobile-vpe-shell.vpe-lite {
      background: #051425 !important;
    }

    body.mobile-vpe-shell.vpe-lite::before,
    body.mobile-vpe-shell.vpe-lite .orb {
      display: none !important;
    }

    body.mobile-vpe-shell.vpe-lite .header,
    body.mobile-vpe-shell.vpe-lite .section,
    body.mobile-vpe-shell.vpe-lite .constructor-card,
    body.mobile-vpe-shell.vpe-lite .mobile-bottom-bar,
    body.mobile-vpe-shell.vpe-lite .option-btn,
    body.mobile-vpe-shell.vpe-lite .btn,
    body.mobile-vpe-shell.vpe-lite .toggle-label {
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      box-shadow: none !important;
      text-shadow: none !important;
      filter: none !important;
    }

    body.mobile-vpe-shell.vpe-lite .header {
      position: static !important;
      top: auto !important;
      padding: 50px 8px 4px !important;
      border-radius: 10px !important;
      background: transparent !important;
      border: none !important;
      gap: 4px !important;
    }

    body.mobile-vpe-shell.vpe-lite .header-left {
      display: none !important;
    }

    body.mobile-vpe-shell.vpe-lite .logo {
      width: 38px !important;
      height: 38px !important;
      border-radius: 12px !important;
    }

    body.mobile-vpe-shell.vpe-lite .brand-line h1,
    body.mobile-vpe-shell.vpe-lite .header h1 {
      font-size: 1.05rem !important;
      line-height: 1.12 !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      max-width: 100% !important;
    }

    body.mobile-vpe-shell.vpe-lite .header-right {
      position: fixed !important;
      top: calc(6px + env(safe-area-inset-top)) !important;
      left: 10px !important;
      right: 10px !important;
      z-index: 1400 !important;
      width: 100% !important;
      display: grid !important;
      grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      gap: 8px !important;
      margin: 0 !important;
      padding: 0 !important;
    }

    body.mobile-vpe-shell.vpe-lite .main-layout {
      margin-top: 2px !important;
    }

    body.mobile-vpe-shell.vpe-lite .header-right .option-btn,
    body.mobile-vpe-shell.vpe-lite #headerUndoBtn {
      min-height: 36px !important;
      height: 36px !important;
      padding: 6px 8px !important;
      border-radius: 10px !important;
      font-size: 0.86rem !important;
      line-height: 1.05 !important;
      overflow: visible !important;
      background: #17375a !important;
      border-color: rgba(136, 189, 255, 0.45) !important;
      color: #d9ecff !important;
    }

    body.mobile-vpe-shell.vpe-lite #generationModeSection.generation-inline {
      padding: 8px 10px !important;
      border-radius: 12px !important;
      background: #173152 !important;
    }

    body.mobile-vpe-shell.vpe-lite #generationModeSection.generation-inline .section-header {
      min-height: 34px !important;
      gap: 8px !important;
    }

    body.mobile-vpe-shell.vpe-lite #generationModeSection .generation-inline-title {
      font-size: 0.98rem !important;
      line-height: 1.2 !important;
    }

    body.mobile-vpe-shell.vpe-lite #generationModeSection .generation-inline-switch {
      background: #102235 !important;
      border-color: rgba(132, 185, 255, 0.5) !important;
    }

    body.mobile-vpe-shell.vpe-lite .help-tip {
      background: #204469 !important;
      border-color: rgba(141, 193, 255, 0.55) !important;
      color: #d4eaff !important;
    }

    body.mobile-vpe-shell.vpe-lite .mobile-bottom-bar {
      position: fixed !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      z-index: 1500 !important;
      width: 100% !important;
      margin: 0 !important;
      padding: 10px 12px calc(12px + env(safe-area-inset-bottom)) !important;
      background: #081a2c !important;
      border-top: 1px solid rgba(139, 186, 255, 0.28) !important;
      transform: translateZ(0);
    }

    body.mobile-vpe-shell.vpe-lite .mobile-safe-spacer {
      height: calc(88px + env(safe-area-inset-bottom)) !important;
    }

    /* Hard override: keep max consistency controls in one line for both old/new DOM */
    html body.mobile-vpe-shell #generationModeSection.generation-inline > .section-header {
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      flex-wrap: nowrap !important;
      gap: 8px !important;
      width: 100% !important;
    }

    html body.mobile-vpe-shell #generationModeSection.generation-inline > .section-header > h2,
    html body.mobile-vpe-shell #generationModeSection.generation-inline > .section-header > .generation-inline-title {
      display: inline-flex !important;
      align-items: center !important;
      flex-wrap: nowrap !important;
      gap: 8px !important;
      flex: 1 1 auto !important;
      min-width: 0 !important;
      width: 100% !important;
      margin: 0 !important;
      white-space: nowrap !important;
    }

    html body.mobile-vpe-shell #generationModeSection.generation-inline .generation-inline-header-tools {
      display: inline-flex !important;
      align-items: center !important;
      width: auto !important;
      flex: 0 0 auto !important;
      justify-content: flex-end !important;
      gap: 8px !important;
      margin: 0 !important;
      padding: 0 !important;
    }

    html body.mobile-vpe-shell #generationModeSection.generation-inline .generation-inline-switch {
      margin: 0 !important;
      min-height: 30px !important;
      height: 30px !important;
      padding: 3px 6px !important;
      border-radius: 999px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      white-space: nowrap !important;
      line-height: 1 !important;
    }

    html body.mobile-vpe-shell #generationModeSection.generation-inline .generation-inline-title .generation-inline-switch {
      margin-left: auto !important;
    }
