/* ==========================================================================
   Theme v2 (29.09.2026): light theme + one brand accent (violet → pink).
   Loaded after base.css / app.css, so it only overrides and adds.
   Sections: 1 accent & buttons · 2 header/footer · 3 home · 4 catalog & cards
             5 model page (steps, presets, dropdown, result) · 6 login · 7 cabinet · 8 mobile
   ========================================================================== */

/* ---------- 1. Accent, buttons, focus ---------- */
:root {
  --ink: #17151f;
  --accent-shadow: 0 10px 26px rgba(108, 71, 255, .28);
  --card-shadow: 0 1px 2px rgba(23, 21, 31, .04), 0 8px 24px rgba(23, 21, 31, .05);
}
.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
a.grad-text:hover { filter: brightness(.9); }

.btn { min-height: 44px; }
.btn-primary, .btn-primary:hover { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: var(--accent-shadow); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 14px 32px rgba(108, 71, 255, .36); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-primary[disabled], .btn-primary:disabled { filter: grayscale(.5) opacity(.7); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-mint, .btn-mint:hover { background: linear-gradient(135deg, #1a9d5f, #12b886); color: #fff; box-shadow: 0 8px 22px rgba(26, 157, 95, .25); }
.btn-ghost { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); box-shadow: none; }
.btn-danger { background: #fff; border: 1px solid #f0c4c0; color: #b42318; }
.btn-danger:hover { background: #fdecea; }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid rgba(108, 71, 255, .45); outline-offset: 2px; }
.btn-sm { min-height: 38px; }
.btn-xs { min-height: 32px; }

input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(108, 71, 255, .14); }
.spinner { background: conic-gradient(from 0deg, rgba(108, 71, 255, .08), #6c47ff 60%, #ff4d9d); }
.spinner-sm { border-top-color: var(--accent); }
.bar i { background: var(--accent-grad); }
.state.generating, .state.waiting, .state.queuing { color: var(--accent-ink); }
.state.generating::before, .state.waiting::before, .state.queuing::before { background: var(--accent); }
.flash.info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.tag.hot, .mc-badge { background: var(--accent-grad); color: #fff; }
.mc-badge { box-shadow: 0 6px 16px rgba(108, 71, 255, .3); }
.fchip.active { color: #fff; background: var(--accent-grad); border-color: transparent; box-shadow: var(--accent-shadow); }
.fchip:hover { border-color: var(--accent-line); color: var(--accent-ink); }
.fchip.active:hover { color: #fff; }
.lang-switch a.active, .gseg-inline a.on, .side a.active, .subtab.active, .mode-switch a.active { background: var(--accent-grad); color: #fff; }
.balance-pill { background: var(--accent-soft); border: 1px solid var(--accent-line); }
.balance-pill b { background: none; -webkit-text-fill-color: currentColor; color: var(--accent-ink); }
.stat .v.grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gs-num { background: var(--accent-grad); box-shadow: 0 6px 18px rgba(108, 71, 255, .3); }
.amt-tile.active, .pay-tile.active > span, .pay-tile input:checked + span, .amount-pill.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.amt-tile:hover, .pay-tile:hover > span { border-color: var(--accent-line); }
.pay-tile .ico, .empty-state > .ico { color: var(--accent); }
.checklist li.done .ck { background: var(--mint); }
.quick-item:hover { border-color: var(--accent-line); box-shadow: var(--card-shadow); }
.tip:hover, .tip:focus, .tip.open { border-color: var(--accent); color: var(--accent-ink); }
.copy-btn:hover { color: var(--accent-ink); border-color: var(--accent-line); }
.faq summary { min-height: 40px; align-items: center; }
.faq summary::after { color: var(--accent); font-size: 1.3em; }
.gen-price { background: rgba(255, 255, 255, .22); }
.brand-mark { background: var(--accent-grad) !important; }
.brand-name .brand-api { color: transparent; -webkit-text-fill-color: transparent; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; }
.clip { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.works-table, .keys-table { table-layout: fixed; width: 100%; }
.works-table th, .keys-table th { white-space: normal; letter-spacing: 0; font-size: .72em; line-height: 1.25; }
.works-table td, .keys-table td, .works-table th, .keys-table th { padding: 8px 8px; vertical-align: middle; }
.works-table .cell-json, .works-table .cell-act, .keys-table .cell-act { width: 72px; }
.works-table td:first-child, .keys-table td:nth-child(3) { width: 92px; }
.json-reveal[hidden] { display: none !important; }
.json-btn.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.works-table td, .keys-table td { overflow: hidden; }
.works-table .cell-act, .works-table .cell-json, .keys-table .cell-act, .json-reveal td { overflow: visible; }
.json-reveal td { background: var(--surface-2); }
.keys-table td:first-child { width: 22%; }
.keys-table .cell-act { width: 132px; }
.json-reveal pre { margin: 0 0 8px; max-height: 320px; overflow: auto; padding: 12px; border-radius: 10px; background: #0f0f10; color: #e4e4e7; font-size: .78em; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.keys-table .key-actions { gap: 4px; justify-content: flex-end; }
.keys-table .key-actions .btn { padding: 4px 7px; }
.keys-table .rename { position: relative; }
.keys-table .rename[open] form { position: absolute; right: 0; z-index: 4; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px; box-shadow: var(--card-shadow); min-width: 220px; }
@media (max-width: 760px) {
  table.t.stack td.cell-json { display: block; }
  .json-reveal { display: block; }
  .json-reveal td { display: block; width: 100%; }
}
.pmenu summary.who { align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid var(--border); background: #fff; }
.who-name { font-weight: 800; font-size: .88em; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-wrap { position: relative; width: 32px; height: 32px; flex: none; }
img.avatar { object-fit: cover; display: block; width: 32px; height: 32px; }
.av-tg { background: #229ED9; color: #fff; }
.av-gh { background: #24292f; color: #fff; }
.avatar .brand-logo, .prov .brand-logo { width: 20px; height: 20px; }
.prov { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px #fff; }
.prov .brand-logo { width: 14px; height: 14px; }
.prov.tg .brand-logo { width: 16px; height: 16px; }
.nav .admin-nav { margin-left: 4px; color: #9a3412; background: #fff1f2; border: 1px solid #fecdd3; }
.nav .admin-nav:hover, .nav .admin-nav.active { color: #9f1239; background: #ffe4e6; }
@media (max-width: 440px) {
  .topbar .right .avatar { display: inline-flex; }
  .who-name { display: none; }
  .pmenu summary.who { padding: 0; border: 0; background: none; }
}

/* ---------- 2. Header / footer ---------- */
.topbar .nav a.link { border-radius: 10px; font-weight: 700; }
.topbar .nav a.link:hover { background: var(--accent-soft); color: var(--accent-ink); }
.topbar .nav a.link.active { background: var(--accent-soft); color: var(--accent-ink); }
.pmenu-list a:hover, .pmenu-list button:hover { background: var(--accent-soft); }
.foot { margin-top: 40px; padding: 26px 0 8px; border-top: 1px solid var(--border); }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px 30px; flex-wrap: wrap; }
.foot-brand { display: flex; flex-direction: column; gap: 4px; max-width: 360px; }
.foot-brand b { font-size: 1.1em; }
.foot-brand span { color: var(--text-dim); font-size: .9em; }
.foot .footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot .footer-links a { color: var(--text-dim); font-weight: 700; font-size: .92em; padding: 6px 0; }
.foot .footer-links a:hover { color: var(--accent-ink); }
.foot-note { margin-top: 18px; max-width: 760px; }

/* ---------- 3. Home ---------- */
.hero2 { position: relative; text-align: center; padding: 64px 0 40px; }
.hero2::before { content: ''; position: absolute; left: 50%; top: 0; width: min(900px, 100%); height: 100%; transform: translateX(-50%); background: radial-gradient(60% 55% at 50% 30%, rgba(108, 71, 255, .13), transparent 70%), radial-gradient(40% 40% at 78% 20%, rgba(255, 77, 157, .11), transparent 70%); z-index: -1; pointer-events: none; }
.hero2 .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 30px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink); font-weight: 800; font-size: .85em; letter-spacing: 0; text-transform: none; margin-bottom: 22px; }
.hero2 .eyebrow .ico { width: 16px; height: 16px; }
.hero2 h1 { font-size: clamp(2em, 6.2vw, 3.7em); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px; }
.hero2 .subtitle { max-width: 640px; margin: 0 auto 30px; font-size: clamp(1.02em, 2.4vw, 1.2em); color: var(--text-dim); }
.hero2 .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.hero2 .chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero2 .chip { background: #fff; border: 1px solid var(--border); border-radius: 30px; padding: 8px 15px; font-size: .9em; color: var(--text-dim); display: inline-flex; align-items: center; gap: 7px; }
.hero2 .chip b { color: var(--text); }
.hero2 .chip > .ico { color: var(--accent); width: 17px; height: 17px; }
.soon-pill { display: inline-block; font-size: .68em; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; background: rgba(255, 77, 157, .12); color: #c2255f; vertical-align: 2px; margin-left: 2px; }
.hsec { margin-top: 56px; }
.hsec .section-head { margin-bottom: 20px; text-align: left; }
.hsec .section-head h2 { font-size: clamp(1.4em, 3.6vw, 1.95em); font-weight: 800; letter-spacing: -.01em; }
.hsec .section-head p { margin-top: 6px; max-width: 640px; }

.scn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.scn { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--border); box-shadow: var(--card-shadow); transition: transform .2s, border-color .2s, box-shadow .2s; }
.scn:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 18px 40px rgba(108, 71, 255, .14); }
.scn-ic { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.scn-ic .ico { width: 24px; height: 24px; }
.scn b { font-size: 1.1em; line-height: 1.25; }
.scn-d { color: var(--text-dim); font-size: .94em; line-height: 1.5; flex: 1; }
.scn-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .9em; color: var(--accent-ink); margin-top: 6px; }
.scn-go .ico { width: 16px; height: 16px; transition: transform .2s; }
.scn:hover .scn-go .ico { transform: translateX(4px); }
.scn-soon { background: repeating-linear-gradient(135deg, rgba(108, 71, 255, .035) 0 12px, transparent 12px 24px), #fff; border-style: dashed; }

.steps3 { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps3 li { position: relative; padding: 22px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); }
.st-n { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: var(--accent-grad); box-shadow: 0 8px 20px rgba(108, 71, 255, .3); margin-bottom: 12px; }
.steps3 b { display: block; font-size: 1.1em; margin-bottom: 4px; }
.steps3 p { color: var(--text-dim); font-size: .95em; }

.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ex-tile { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--border); box-shadow: var(--card-shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.ex-tile:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 18px 40px rgba(108, 71, 255, .14); }
.ex-img { display: block; aspect-ratio: 16 / 10; background: var(--surface-3); overflow: hidden; }
.ex-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.ex-tile:hover .ex-img img { transform: scale(1.05); }
.ex-cap { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.ex-cap small { color: var(--text-dim); font-size: .86em; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.price-wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.price-list { border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: #fff; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--border); transition: background .15s; }
.price-row:last-child { border-bottom: 0; }
.price-row:hover { background: var(--accent-soft); }
.pr-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.pr-val { white-space: nowrap; }
.price-side { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 20px; background: linear-gradient(160deg, rgba(108, 71, 255, .09), rgba(255, 77, 157, .09)); border: 1px solid var(--accent-line); }
.ps-gift { display: flex; flex-direction: column; gap: 4px; }
.ps-gift .ico { width: 30px; height: 30px; color: var(--accent); }
.ps-gift b { font-size: 2em; line-height: 1.1; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ps-gift span { color: var(--text-dim); font-size: .95em; }
.price-side .small .ico { width: 15px; height: 15px; vertical-align: -3px; }

.cta-band { margin-top: 56px; padding: 44px 24px; border-radius: 26px; text-align: center; color: #fff; background: var(--accent-grad); box-shadow: 0 24px 60px rgba(108, 71, 255, .3); }
.cta-band h2 { font-size: clamp(1.5em, 4vw, 2.1em); font-weight: 800; margin-bottom: 6px; }
.cta-band p { opacity: .92; margin-bottom: 20px; }
.cta-btn, .cta-btn:hover { background: #fff; color: var(--accent-ink); box-shadow: 0 10px 28px rgba(0, 0, 0, .16); }

/* ---------- 4. Catalog & cards ---------- */
.model-card { background: #fff; box-shadow: var(--card-shadow); border-radius: 20px; }
.model-card:hover { border-color: var(--accent-line); box-shadow: 0 20px 44px rgba(108, 71, 255, .16); }
.model-card::before { background: var(--accent-grad); }
.mc-vendor { color: var(--text); }
.model-card h3 { font-size: 1.22em; letter-spacing: -.01em; }
.model-card .tag { text-transform: none; letter-spacing: 0; font-size: .78em; font-weight: 700; }
.tag.task-t2i, .tag.task-i2i, .tag.task-t2v, .tag.task-i2v, .tag.task-v2v, .tag.task-chat { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.tag-soft { background: #fff !important; }
.mc-good { font-weight: 800; color: var(--text); }
.model-card p { font-size: .93em; line-height: 1.5; }
.price { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); }
.price small { color: var(--text-dim); }
.cat-head h1 { letter-spacing: -.02em; }
.fchip.soon { border-style: dashed; color: var(--text-dim); cursor: pointer; }
.fchip.soon em { font-style: normal; font-size: .75em; font-weight: 800; text-transform: uppercase; color: #c2255f; }
.fchip.soon .ico { width: 16px; height: 16px; }
.more-filters { flex: 1 1 100%; }
.more-filters summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88em; color: var(--text-dim); padding: 6px 0; list-style: none; }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary::before { content: '+'; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.more-filters[open] summary::before { content: '−'; }
.more-filters .chip-row { margin: 8px 0 0; }
.soon-box { margin-top: 44px; padding: 26px; border-radius: 22px; border: 1px dashed var(--accent-line); background: repeating-linear-gradient(135deg, rgba(108, 71, 255, .03) 0 14px, transparent 14px 28px); }
.soon-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.4em; }
.soon-head h2 .ico { color: var(--accent); }
.soon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.soon-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--border); }

/* ---------- 5. Model page ---------- */
.mp-card { border-radius: 20px; box-shadow: var(--card-shadow); }
.mp-intro h1 { font-weight: 800; letter-spacing: -.02em; }
.mp-cat { border-radius: 20px; text-transform: none; letter-spacing: 0; font-weight: 700; font-size: .78em; }
.mp-cat-hot { background: var(--accent-grad); color: #fff; border-color: transparent; }
.mp-good { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-weight: 700; color: var(--text); }
.mp-good .ico { color: var(--mint); width: 18px; height: 18px; flex: none; margin-top: 3px; }
.mp-tags span { border-radius: 20px; background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); font-weight: 700; }
.mp-actions .mp-price { padding-left: 4px; }
.mp-devlink { margin-left: auto; font-size: .86em; font-weight: 700; color: var(--text-dim); text-decoration: underline; text-decoration-color: #d4d4d8; text-underline-offset: 3px; }
.mp-devlink:hover { color: var(--accent-ink); }
.mp .mp-back { text-transform: none; letter-spacing: 0; font-size: .9em; font-weight: 700; }
.switcher .sw { border-radius: 20px; }

/* mode cards (was underlined tabs) */
.mp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 22px 0 16px; }
.mode-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1.5px solid var(--border); color: var(--text-dim); transition: border-color .15s, background .15s, box-shadow .15s; }
.mode-card:hover { border-color: var(--accent-line); color: var(--text); }
.mode-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-dim); }
.mode-tx b { display: block; color: var(--text); font-size: 1.02em; }
.mode-tx small { display: block; font-size: .82em; line-height: 1.35; margin-top: 2px; }
.mode-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(108, 71, 255, .12); color: var(--text); }
.mode-card.active .mode-ic { background: var(--accent-grad); color: #fff; }

/* form as steps */
.gen.mp-play { grid-template-columns: minmax(340px, 1fr) minmax(0, 1.5fr); align-items: start; }
.mp-panel { padding: 22px; }
.mp-ph h2 { text-transform: none; letter-spacing: 0; font-size: 1.15em; font-weight: 800; }
.mp-step { padding: 16px 0 18px; border-bottom: 1px dashed var(--border); }
.mp-step:first-of-type { padding-top: 0; }
.mp-sh { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.mp-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9em; color: #fff; background: var(--accent-grad); box-shadow: 0 5px 14px rgba(108, 71, 255, .3); }
.mp-sh b { font-size: 1.05em; line-height: 28px; }
.mp-sh .opt { font-style: normal; font-size: .72em; font-weight: 700; color: var(--text-dim); background: var(--surface-3); border-radius: 20px; padding: 2px 9px; margin-left: 8px; vertical-align: 2px; }
.mp-sh p { color: var(--text-dim); font-size: .86em; line-height: 1.4; margin-top: 2px; }
.mp .gprompt textarea { border-radius: 14px; min-height: 130px; font-size: 1.02em; line-height: 1.45; padding: 14px 14px 28px; }
.gpred { position: absolute; top: 14px; left: 14px; right: 14px; max-height: calc(100% - 46px); overflow: hidden; font-size: 1.02em; line-height: 1.45; color: #9b9ba6; white-space: pre-wrap; word-break: break-word; pointer-events: none; }
.gpred[hidden] { display: none; }
.gideas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.gideas-l { font-size: .82em; font-weight: 800; color: var(--text-dim); }
.ex-chip { max-width: 100%; font: inherit; font-size: .82em; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 6px 12px; cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 34px; }
.ex-chip:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.mp .mp-drop { border-radius: 16px; border-color: #cfc8f5; background: var(--accent-soft); min-height: 150px; padding: 20px 14px; }
.mp .mp-drop:hover, .mp .mp-drop.drag, .mp .mp-drop:focus-visible { border-color: var(--accent); background: rgba(108, 71, 255, .12); }
.mp .mp-drop .gdrop-ico { width: 46px; height: 46px; background: #fff; color: var(--accent); box-shadow: var(--card-shadow); }
.mp .mp-drop.has { min-height: 72px; }

/* presets */
.gset-presets { margin-bottom: 12px; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.preset { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 84px; padding: 10px 6px; font: inherit; color: var(--text); background: #fff; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; text-align: center; transition: border-color .15s, background .15s, box-shadow .15s, transform .1s; }
.preset:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.preset:active { transform: scale(.97); }
.preset[hidden] { display: none; }
.preset-shape { height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.preset-shape .ico { width: 24px; height: 24px; color: var(--text-dim); }
.preset .rbox { display: block; border: 1.5px solid #6b6b78; border-radius: 3px; background: none; }
.preset .rauto { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; border-style: dashed; }
.preset b { font-size: .88em; line-height: 1.2; }
.preset small { font-size: .72em; color: var(--text-dim); line-height: 1.1; }
.preset.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(108, 71, 255, .12); }
.preset.on .rbox { border-color: var(--accent); background: rgba(108, 71, 255, .14); }
.preset.on .preset-shape .ico { color: var(--accent); }

/* settings stay open — no collapse */
.mp-adv { margin-top: 16px; display: grid; gap: 14px; }
.mp .gset { margin-bottom: 0; }
.gset-title { font-size: .88em; }

/* one dropdown component for every setting */
.rdd-btn { min-height: 48px; border-radius: 12px; padding: 8px 14px; border-color: var(--border); background: #fff; transition: border-color .15s, box-shadow .15s; }
.rdd-btn:hover { border-color: var(--accent-line); }
.rdd-btn:focus-visible, .rdd.open .rdd-btn { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(108, 71, 255, .14); }
.rdd-cur b, .rdd-list li b { font-size: .95em; min-width: 0; }
.rdd-plain .rdd-cur, .rdd-plain .rdd-list li { gap: 8px; }
.rdd-cur small, .rdd-list li small { font-size: .82em; }
.rdd-list { border-radius: 14px; padding: 6px; box-shadow: 0 18px 44px rgba(23, 21, 31, .16); max-height: 320px; overflow-y: auto; }
.rdd-list li { padding: 9px 10px; min-height: 44px; border-radius: 10px; }
.rdd-list li:hover, .rdd-list li:focus { background: var(--accent-soft); }
.rdd-list li[aria-selected=true] { background: var(--accent-soft); }
.rdd-list li .ck { background: var(--accent); }
.rdd-caret { border-color: var(--accent); }
.rdd-shape .rbox { border-color: #6b6b78; }
.rdd.open { z-index: 40; }

/* submit */
.mp .gsubmit { border-top: 0; padding-top: 16px; }
.mp .gen-btn { border-radius: 16px; min-height: 58px; font-size: 1.12em; }
.gsub-note { line-height: 1.6; }
.gsub-note .ico { width: 14px; height: 14px; vertical-align: -2px; }
.gsub-note b { color: var(--text); }

/* result */
.mp .gout-body { min-height: 460px; border-radius: 16px; background: linear-gradient(160deg, rgba(108, 71, 255, .04), rgba(255, 77, 157, .04)), var(--surface-2); }
.gempty-shape { position: relative; width: min(240px, 64%); max-height: 300px; margin: 0 auto 16px; border-radius: 18px; border: 2px dashed #cfc8f5; background: rgba(255, 255, 255, .7); display: flex; align-items: center; justify-content: center; transition: aspect-ratio .25s; }
.gempty-icon .ico.big { width: 44px; height: 44px; color: #b7abf3; }
.gempty-shape .gempty-icon { display: flex; }
.progress-box { max-width: 420px; }
.progress-box .stage { font-size: 1.12em; margin-bottom: 14px; }
.stages { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; text-align: left; }
.stages li { display: flex; align-items: center; gap: 10px; font-size: .9em; color: var(--text-dim); opacity: .6; transition: opacity .3s, color .3s; }
.stages li::before { content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); background: #fff; transition: all .3s; }
.stages li.now { opacity: 1; color: var(--text); font-weight: 700; }
.stages li.now::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 40%, #fff 45%); animation: stagepulse 1.2s ease-in-out infinite; }
.stages li.done { opacity: 1; color: var(--text-dim); }
.stages li.done::before { border-color: var(--mint); background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat; }
@keyframes stagepulse { 50% { box-shadow: 0 0 0 5px rgba(108, 71, 255, .16); } }
.gen-out .result-actions { gap: 8px; }
.gen-out .result-actions .btn { min-height: 48px; flex: 1 1 calc(50% - 8px); }
.gen-out .result-actions .btn-primary { flex-basis: 100%; }
.gen-out .result-actions .btn-link { flex: 1 1 100%; min-height: 40px; background: none; border: 0; color: var(--text-dim); font-size: .9em; }
.gout-body video, .results-grid video { max-width: 100%; max-height: 68vh; border-radius: 12px; background: #000; display: block; margin: 0 auto; }
.grecent-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.grecent-item:hover { border-color: var(--accent); }
.thumb-ok { background: var(--mint); }

/* tips, about, developers */
.gtips { margin-top: 30px; padding: 24px; border-radius: 20px; background: linear-gradient(160deg, rgba(108, 71, 255, .06), rgba(255, 77, 157, .06)); border: 1px solid var(--accent-line); }
.gtips h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2em; margin-bottom: 14px; }
.gtips h2 .ico { color: var(--accent); }
.tips3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tips3 > div { background: #fff; border-radius: 14px; padding: 14px 16px; border: 1px solid var(--border); }
.tips3 b { display: block; margin-bottom: 4px; }
.tips3 p { color: var(--text-dim); font-size: .92em; line-height: 1.5; }
.mp .gabout { margin-top: 22px; }
.gabout-main, .gabout-ex { border-radius: 20px; }
.gtry:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.gtry .ico { color: var(--accent); }
.mp-dev { margin-top: 26px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.mp-dev > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 800; min-height: 52px; }
.mp-dev > summary::-webkit-details-marker { display: none; }
.mp-dev > summary::after { content: '+'; margin-left: auto; color: var(--accent); font-size: 1.3em; }
.mp-dev[open] > summary::after { content: '−'; }
.mp-dev-body { padding: 0 18px 18px; }
.mp-dev-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mp-json { border-radius: 12px; }
.mp-similar h2 { font-weight: 800; }

/* ---------- 6. Login ---------- */
.login-card h3 { font-size: 1.5em; letter-spacing: -.01em; margin-bottom: 8px; }
.login-lead { margin-bottom: 18px; color: var(--text-dim); }
.login-lead b { color: var(--accent-ink); }
.login-steps { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; text-align: left; }
.login-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: .94em; }
.login-steps li span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: var(--accent-grad); }
.btn-login.tg { min-height: 64px; font-size: 1.15em; border-radius: 16px; box-shadow: 0 12px 30px rgba(34, 158, 217, .35); }
.login-note { margin-top: 16px; display: flex; gap: 8px; align-items: flex-start; text-align: left; }
.login-note .ico { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--mint); }
.tg-wait { border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.logo-ring::before { background: var(--accent-grad); }

/* ---------- 7. Cabinet ---------- */
.side a { border-radius: 12px; min-height: 42px; }
.side a:hover { background: var(--accent-soft); }
.side a.active:hover { background: var(--accent-grad); }
.stat, .box { border-radius: 20px; box-shadow: var(--card-shadow); }
.page-head h1 { letter-spacing: -.02em; }
.empty-state .btn { margin-top: 6px; }
.quick-item { border-radius: 18px; }
.quick-item .ico.big { color: var(--accent); }

/* ---------- 8. Mobile ---------- */
@media (max-width: 980px) {
  .gen.mp-play { grid-template-columns: minmax(0, 1fr); }
  .scn-grid, .steps3, .tips3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .price-wrap { grid-template-columns: minmax(0, 1fr); }
  /* the Create button stays on screen while the long form scrolls */
  .mp-panel .gsubmit { position: sticky; bottom: 0; z-index: 20; margin: 0 -22px -22px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 22%); border-radius: 0 0 20px 20px; }
}
@media (max-width: 760px) {
  .hero2 { padding: 40px 0 26px; }
  .hero2 .hero-actions .btn { width: 100%; max-width: 360px; }
  .hsec { margin-top: 40px; }
  .scn-grid, .steps3, .tips3 { grid-template-columns: minmax(0, 1fr); }
  .scn { padding: 18px; }
  .mp-panel { padding: 16px; }
  .mp-panel .gsubmit { margin: 0 -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .mp-modes { grid-template-columns: minmax(0, 1fr); }
  .mode-card { padding: 12px 14px; }
  .presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mp-devlink { margin-left: 0; flex-basis: 100%; }
  .mp .gout-body { min-height: 300px; }
  .gen-out .result-actions .btn { flex-basis: 100%; }
  .foot-top { flex-direction: column; }
  .cta-band { padding: 32px 18px; border-radius: 22px; }
  .gtips { padding: 18px; }
  .soon-box { padding: 18px; }
  .btn-login.tg { min-height: 60px; }
}
/* dropdown becomes a bottom sheet on phones: big tap targets, no cut-off lists */
@media (max-width: 640px) {
  .rdd.open::before { content: ''; position: fixed; inset: 0; background: rgba(23, 21, 31, .45); z-index: 998; }
  .rdd.open .rdd-list { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 999; max-height: 70vh; border-radius: 22px 22px 0 0; padding: 8px 12px calc(14px + env(safe-area-inset-bottom)); border: 0; box-shadow: 0 -12px 40px rgba(23, 21, 31, .25); animation: sheetup .2s ease-out; }
  .rdd.open .rdd-list::before { content: attr(data-title); display: block; padding: 12px 6px 10px; font-weight: 800; font-size: 1.05em; border-bottom: 1px solid var(--border); margin-bottom: 6px; position: sticky; top: 0; background: #fff; }
  .rdd-list li { min-height: 52px; font-size: 1.02em; }
}
@keyframes sheetup { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .stages li.now::before { animation: none; } }
