    .model-card {
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      align-items: center;
      gap: 12px;
      width: 100%;
      padding: 12px 14px 34px;
      margin-bottom: 6px;
      border-radius: 12px;
      border: 1px solid rgba(168,85,247,0.16);
      background: rgba(168,85,247,0.05);
      color: var(--tg-theme-text);
      font-family: inherit;
      cursor: pointer;
      text-align: left;
      transition: border-color 0.2s, background 0.2s, transform 0.08s;
      box-sizing: border-box;
      position: relative;
      padding-right: 68px;
    }
    .model-card:active { transform: scale(0.99); }
    .model-card:hover { background: rgba(168,85,247,0.06); }
    .model-card.active { border-color: rgba(168,85,247,0.26); background: rgba(168,85,247,0.08); box-shadow: 0 0 0 1px rgba(168,85,247,0.12) inset; }
    .model-card .model-icon {
      width: 44px; height: 44px; min-width: 44px; border-radius: 12px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
      background: rgba(168,85,247,0.12);
    }
    .model-card .model-icon img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 10px;
      display: block;
    }
    /* Векторная иконка «Изысканные генерации» — не обрезать как фото */
    .model-card .model-icon.model-icon-refined img {
      object-fit: contain;
      padding: 5px;
      box-sizing: border-box;
      border-radius: 8px;
    }
    .model-card-nsfw .model-icon.model-icon-refined {
      background: linear-gradient(145deg, rgba(244,114,182,0.12), rgba(168,85,247,0.08));
    }
    .model-card-nsfw .model-name-row {
      align-items: flex-start;
    }
    .model-card-nsfw .model-name-row .model-badge-18 {
      margin-top: 0.28em;
    }
    .model-card.active .model-icon { background: rgba(168,85,247,0.16); }
    .model-card .model-body {
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 6px;
      overflow: hidden;
      flex: 1;
      text-align: left;
      justify-content: center;
    }
    .model-card .model-name-row {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-wrap: wrap;
    }
    .model-card .model-name {
      font-weight: 700;
      font-size: 0.94rem;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .model-badge-18 {
      font-size: 0.6rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      padding: 2px 6px;
      border-radius: 5px;
      background: rgba(239,68,68,0.15);
      color: #ef4444;
      border: 1px solid rgba(239,68,68,0.28);
      white-space: nowrap;
      flex-shrink: 0;
    }
    .model-tag-nsfw {
      background: rgba(239,68,68,0.1) !important;
      color: #ef4444 !important;
    }
    .model-card .model-desc { font-size: 0.72rem; color: var(--tg-theme-hint); line-height: 1.35; }
    .model-card .model-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .model-card .model-tag {
      font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em;
      padding: 3px 6px; border-radius: 999px; background: rgba(168,85,247,0.12);
      color: var(--tg-theme-hint); font-weight: 600;
    }
    .model-card .model-price {
      position: absolute;
      bottom: 10px;
      right: 10px;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--green);
      padding: 4px 8px;
      border-radius: 8px;
      background: var(--green-soft);
      white-space: nowrap;
    }
    .model-card.active .model-price { color: var(--accent); background: var(--accent-soft); }
    .model-card .model-check {
      position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%;
      background: rgba(168,85,247,0.12); color: var(--accent); display: none;
      align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700;
    }
    .model-card.active .model-check { display: flex; }
    .gen-popup-styles { max-height: 70vh; overflow-y: auto; }
    .gen-aspect-wrap { position: relative; display: inline-block; }
    .gen-option-wrap { position: relative; display: inline-block; }
    .gen-aspect-dropdown {
      position: absolute; left: 0; top: auto; bottom: 100%; margin-bottom: 6px;
      min-width: 72px; z-index: 300;
      padding: 4px; border-radius: 6px;
      background: var(--bg-card); border: 1px solid var(--border);
      box-shadow: 0 6px 16px rgba(0,0,0,0.35);
      max-height: 70vh; overflow-y: auto;
      /* анимация */
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
      transform: translateY(6px);
      transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34,1.3,0.64,1), visibility 0s linear 0.18s;
    }
    .gen-aspect-dropdown.open {
      visibility: visible;
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
      transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34,1.3,0.64,1), visibility 0s linear 0s;
    }
    .gen-aspect-dropdown .popup-title { font-size: 0.65rem; color: var(--tg-theme-hint); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; padding: 0 2px; }
    .gen-aspect-dropdown .popup-opt {
      display: block; width: 100%; padding: 5px 8px; margin-bottom: 2px; text-align: left;
      border-radius: 4px; border: 1px solid rgba(168,85,247,0.12);
      background: rgba(168,85,247,0.04); color: var(--tg-theme-text); font-size: 0.8rem; cursor: pointer; font-family: inherit;
    }
    .gen-aspect-dropdown .popup-opt:hover { background: rgba(168,85,247,0.08); }
    .gen-aspect-dropdown .popup-opt.active { border-color: rgba(168,85,247,0.28); background: rgba(168,85,247,0.1); }
    .gen-aspect-dropdown .popup-opt:last-child { margin-bottom: 0; }
    .gen-chat select.chat-trigger { min-width: 72px; }
    .gen-popup { pointer-events: auto; }
    .gen-overlay > * { pointer-events: auto; }
    .video-model-opt {
      min-height: 86px;
      padding: 14px 14px 38px;
    }
    .video-model-opt img {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      object-fit: cover;
      display: block;
      flex-shrink: 0;
    }
    .gen-photo-row { display: flex; align-items: center; justify-content: flex-start; gap: 8px; margin-bottom: 6px; margin-left: -5px; flex-wrap: wrap; }
    .gen-photo-thumbs { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
    @keyframes thumbAppear {
      from { opacity: 0; transform: scale(0.55); }
      to   { opacity: 1; transform: scale(1); }
    }
    @keyframes thumbRemove {
      from { opacity: 1; transform: scale(1); }
      to   { opacity: 0; transform: scale(0.55); }
    }
    .gen-photo-thumb {
      position: relative; width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
      flex-shrink: 0; border: 1px solid var(--border);
      animation: thumbAppear 0.2s cubic-bezier(0.34, 1.3, 0.64, 1) both;
    }
    .gen-photo-thumb.removing {
      animation: thumbRemove 0.18s ease forwards;
      pointer-events: none;
    }
    .gen-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .gen-photo-thumb .gen-photo-remove {
      position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
      background: rgba(0,0,0,0.65); color: #fff; border: none; cursor: pointer; font-size: 13px;
      line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center;
    }
    .gen-photo-thumb .gen-photo-remove:hover { background: #c44; }

    /* ── Стрип фотографий в параметрах ──────────────────────── */
    .gen-photo-strip-scroll {
      flex: 0 0 auto; max-width: calc(100% - 80px); overflow-x: auto; overflow-y: visible;
      scrollbar-width: none;
    }
    .gen-photo-strip-scroll::-webkit-scrollbar { display: none; }
    .gen-photo-strip-scroll .gen-photo-thumbs { gap: 6px; }
    .gen-photo-strip-scroll .gen-photo-thumbs:empty { display: none; min-height: 0; }
    .gen-photo-strip-scroll .gen-photo-thumb { width: 44px; height: 44px; }

    .gen-photo-add-btn {
      width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; cursor: pointer;
      border: 1.5px dashed rgba(168,85,247,0.35); background: rgba(168,85,247,0.04);
      color: var(--tg-theme-hint); font-family: inherit;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
      transition: width 0.15s, height 0.15s, background 0.15s, border-color 0.15s;
    }
    .gen-photo-add-btn .arr { font-size: 0.5rem; opacity: 0.5; line-height: 1; }
    .gen-photo-add-btn:active { background: rgba(168,85,247,0.12); }
    .gen-photo-add-btn.has { border-style: solid; border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.08); }

    .gen-photo-counter {
      font-size: 0.78rem; font-weight: 600; color: var(--tg-theme-hint);
      white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums;
    }

    .gen-photo-add-wrap { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
    .gen-photo-add-wrap .gen-photo-count { font-size: 0.75rem; color: var(--tg-theme-hint); }
    .gen-photo-add-wrap-rel { position: relative; }
    .gen-add-photo-dropdown {
      position: absolute; left: 0; bottom: 100%; margin-bottom: 6px;
      min-width: 200px; z-index: 300; padding: 6px; border-radius: 12px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      box-shadow: 0 8px 24px rgba(0,0,0,0.4);
      /* анимация */
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
      transform: translateY(6px);
      transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34,1.3,0.64,1), visibility 0s linear 0.18s;
    }
    .gen-add-photo-dropdown.open {
      visibility: visible;
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
      transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34,1.3,0.64,1), visibility 0s linear 0s;
    }
    .gen-add-photo-opt {
      display: flex; align-items: center; gap: 10px; width: 100%;
      padding: 10px 12px; margin-bottom: 2px; text-align: left;
      border: none; border-radius: 8px; background: transparent;
      color: var(--tg-theme-text); font-size: 0.9rem; cursor: pointer; font-family: inherit;
    }
    .gen-add-photo-opt:last-child { margin-bottom: 0; }
    .gen-add-photo-opt:hover { background: rgba(168,85,247,0.1); }
    .gen-add-photo-opt-icon {
      width: 20px; height: 20px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      color: var(--tg-theme-hint);
    }
    .gen-add-photo-opt:hover .gen-add-photo-opt-icon { color: var(--accent); }
    .gen-add-photo-opt-icon svg { width: 100%; height: 100%; }
    .gen-gallery-overlay { background: var(--bg); align-items: stretch; justify-content: stretch; padding: 0; }
    .gen-gallery-fullscreen {
      width: 100%; height: 100%; min-height: 100vh; display: flex; flex-direction: column;
      background: var(--bg); overflow: hidden;
    }
    .gen-gallery-header {
      flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
      background: var(--bg-card); border-bottom: 1px solid var(--border);
    }
    .gen-gallery-title { margin: 0; flex: 1; font-size: 1.1rem; font-weight: 700; color: var(--tg-theme-text); text-align: center; }
    .gen-gallery-done {
      padding: 10px 18px; border-radius: 12px; border: none; font-weight: 600; font-size: 0.95rem;
      background: var(--accent); color: var(--tg-theme-button-text); cursor: pointer; font-family: inherit;
    }
    .gen-gallery-done:disabled { opacity: 0.4; cursor: not-allowed; }
    .gen-gallery-selected-msg {
      flex-shrink: 0; text-align: center; margin: 0; padding: 8px; font-size: 0.9rem; color: var(--tg-theme-hint);
    }
    .gen-gallery-grid {
      flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 8px; row-gap: 16px;
      padding: 12px 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); align-content: start;
    }
    .gen-gallery-grid.has-error { display: flex; align-items: center; justify-content: center; }
    .gen-gallery-grid.has-error .msg { text-align: center; padding: 24px; margin: 0; }
    .gen-gallery-item {
      position: relative; padding-top: 100%; border-radius: 12px; overflow: hidden;
      border: 3px solid transparent; cursor: pointer; background: var(--bg-card);
    }
    .gen-gallery-item.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
    .gen-gallery-item img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
    .gen-gallery-item .gen-gallery-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--tg-theme-button-text); font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: bold; }
    .gen-gallery-grid.at-limit .gen-gallery-item:not(.selected) { opacity: 0.5; }
    .gen-gallery-grid.at-limit .gen-gallery-item:not(.selected) img { filter: grayscale(0.7) brightness(0.85); }

    /* ── Попап верификации возраста ─────────────────────────────── */
    .age-verify-popup {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 10px;
      padding: 28px 24px 24px;
      max-width: 360px;
      width: calc(100vw - 40px);
    }
    .age-verify-icon { font-size: 2.8rem; line-height: 1; }
    .age-verify-title {
      font-size: 1.1rem;
      font-weight: 800;
      margin: 0;
      color: var(--tg-theme-text);
    }
    .age-verify-desc {
      font-size: 0.82rem;
      color: var(--tg-theme-hint);
      margin: 0;
      line-height: 1.5;
    }
    .age-verify-question {
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--tg-theme-text);
      margin: 4px 0 0;
    }
    .age-verify-note {
      font-size: 0.7rem;
      color: var(--tg-theme-hint);
      opacity: 0.7;
    }
    .age-verify-buttons {
      display: flex;
      gap: 10px;
      width: 100%;
      margin-top: 4px;
    }
    .age-verify-btn {
      flex: 1;
      padding: 11px 14px;
      border-radius: 12px;
      border: none;
      font-size: 0.85rem;
      font-weight: 700;
      font-family: inherit;
      cursor: pointer;
      transition: opacity 0.15s, transform 0.1s;
    }
    .age-verify-btn:active { transform: scale(0.97); }
    .age-verify-no {
      background: rgba(168,85,247,0.08);
      color: var(--tg-theme-text);
      border: 1px solid rgba(168,85,247,0.2);
    }
    .age-verify-no:hover { background: rgba(168,85,247,0.12); }
    .age-verify-yes {
      background: linear-gradient(135deg, #a855f7, #7c3aed);
      color: #fff;
      box-shadow: 0 4px 14px rgba(168,85,247,0.35);
    }
    .age-verify-yes:hover { opacity: 0.9; }

    /* ── PC: редизайн попапа модели (см. desktop/layout.css) ─────── */
    .gen-popup-models-sub { display: none; }

    @media (min-width: 1200px) {
      /* ─── Обёртка попапа ─── */
      .gen-popup-models {
        max-width: 920px;
        width: calc(100vw - 80px);
        border-radius: 28px;
        overflow: hidden;
        padding: 0;
      }

      /* ─── Шапка ─── */
      .gen-popup-models-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 28px 32px 24px;
        background: linear-gradient(135deg, rgba(168,85,247,0.1) 0%, rgba(124,58,237,0.04) 100%);
        border-bottom: 1px solid rgba(168,85,247,0.12);
        position: relative;
        flex-shrink: 0;
      }
      .gen-popup-models-header::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, #a855f7 30%, #7c3aed 70%, transparent);
      }
      .gen-popup-models-title-wrap {
        display: flex;
        flex-direction: column;
        gap: 4px;
      }
      .gen-popup-models-header .popup-title {
        font-size: 1.35rem;
        font-weight: 900;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        background: linear-gradient(135deg, #e9d5ff 0%, #a855f7 60%, #7c3aed 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
      }
      .gen-popup-models-sub {
        display: block;
        font-size: 0.78rem;
        color: rgba(200,180,255,0.5);
        font-weight: 500;
        letter-spacing: 0.01em;
      }
      .gen-models-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(168,85,247,0.08);
        border: 1px solid rgba(168,85,247,0.18);
        color: rgba(200,180,255,0.7);
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
        transition: background 0.15s, color 0.15s;
      }
      .gen-models-close:hover {
        background: rgba(168,85,247,0.16);
        color: #e9d5ff;
      }

      /* ─── Сетка карточек ─── */
      .model-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        padding: 24px 28px 28px;
        background: rgba(0,0,0,0.18);
      }

      /* ─── Карточка — вертикальный лейаут ─── */
      .model-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 20px 20px 52px;
        margin-bottom: 0;
        border-radius: 20px;
        min-height: 168px;
        border: 1px solid rgba(168,85,247,0.13);
        background: rgba(255,255,255,0.025);
        transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
        padding-right: 20px;
      }
      .model-card:active { transform: scale(0.99); }
      .model-card:hover {
        background: rgba(168,85,247,0.07);
        border-color: rgba(168,85,247,0.3);
        box-shadow: 0 6px 28px rgba(168,85,247,0.15);
        transform: translateY(-3px);
      }
      .model-card.active {
        border-color: rgba(168,85,247,0.5);
        background: rgba(168,85,247,0.1);
        box-shadow: 0 0 0 1px rgba(168,85,247,0.2) inset, 0 8px 32px rgba(168,85,247,0.2);
        transform: translateY(-1px);
      }

      /* ─── Иконка сверху ─── */
      .model-card .model-icon {
        width: 56px;
        height: 56px;
        min-width: 56px;
        border-radius: 16px;
        margin-bottom: 14px;
        background: rgba(168,85,247,0.14);
        border: 1px solid rgba(168,85,247,0.15);
      }
      .model-card.active .model-icon {
        background: rgba(168,85,247,0.2);
        border-color: rgba(168,85,247,0.28);
      }

      /* ─── Тело ─── */
      .model-card .model-body {
        flex: 1;
        width: 100%;
        gap: 6px;
      }
      .model-card .model-name-row {
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
      }
      .model-card .model-name {
        font-size: 1rem;
        font-weight: 800;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
      }
      .model-card .model-desc {
        font-size: 0.74rem;
        line-height: 1.45;
        margin-top: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }
      .model-card .model-tags {
        margin-top: 8px;
        gap: 5px;
      }
      .model-card .model-tag {
        font-size: 0.6rem;
        padding: 3px 7px;
      }

      /* ─── Цена и чекбокс ─── */
      .model-card .model-price {
        position: absolute;
        bottom: 14px;
        right: 14px;
        font-size: 0.82rem;
        font-weight: 700;
        padding: 5px 10px;
        border-radius: 10px;
      }
      .model-card .model-check {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: rgba(168,85,247,0.18);
        border: 1.5px solid rgba(168,85,247,0.4);
      }
      .model-card .model-check svg { width: 11px; height: 11px; }

      /* ─── NSFW карточки ─── */
      .model-card-nsfw {
        border-color: rgba(239,68,68,0.12);
        background: rgba(239,68,68,0.025);
      }
      .model-card-nsfw:hover {
        border-color: rgba(239,68,68,0.35);
        background: rgba(239,68,68,0.07);
        box-shadow: 0 6px 28px rgba(239,68,68,0.13);
      }
      .model-card-nsfw.active {
        border-color: rgba(239,68,68,0.5);
        background: rgba(239,68,68,0.09);
        box-shadow: 0 0 0 1px rgba(239,68,68,0.2) inset, 0 8px 32px rgba(239,68,68,0.16);
      }
      .model-card-nsfw .model-icon {
        border-color: rgba(239,68,68,0.15);
        background: rgba(239,68,68,0.1);
      }
      .model-card-nsfw .model-icon.model-icon-refined {
        background: linear-gradient(145deg, rgba(244,114,182,0.14), rgba(168,85,247,0.1));
      }
      .model-card-nsfw .model-name-row {
        align-items: flex-start;
      }
      .model-card-nsfw .model-name-row .model-badge-18 {
        margin-top: 0.28em;
      }
      .model-badge-18 {
        font-size: 0.62rem;
        padding: 2px 7px;
      }

      .gen-popup-styles { max-height: 85vh; }
    }

