/* redesign-1023: style B «Журнал» layout + A «Аврора» colours (default). Styles A/C via html[data-style]. */
:root {
  --bg: #f6f4ef; --fg: #141824; --muted: #4f5668; --faint: #5d6475;
  --surface: #fbfaf7; --elevated: #ffffff; --input: #ffffff;
  --accent: #6246ea; --accent-fg: #ffffff; --accent-2: #0891b2; --gold: #b07a2c;
  --border: rgba(20, 24, 36, 0.12);
  --shadow: 0 0 0 1px rgba(20, 24, 36, .07), 0 1px 2px rgba(20, 24, 36, .05), 0 14px 34px rgba(98, 70, 234, .07);
  --nav-bg: rgba(246, 244, 239, 0.9);
  --glow-1: #c9b8ff55; --glow-2: #ffe2b855;
  --c-image: #6246ea; --c-video: #0884a3; --c-music: #b0249f; --c-text: #a8661a;
  --c-edit: #c81e45; --c-task: #04805c; --c-templates: #2563eb; --c-pricing: #9a6a04;
  --r: 14px; --r-lg: 18px; --r-xl: 22px; --rb: 12px;
  /* themes27: aliases used by older blocks + primary button per style (same on phone and PC) */
  --card: var(--surface); --line: var(--border);
  --btn-grad: linear-gradient(110deg, #7b4dff 0%, #9a4ef0 30%, #ec4899 75%, #d94fae 100%);
  --btn-glow: 0 6px 20px rgba(123, 77, 255, .35), 0 2px 8px rgba(236, 72, 153, .28);
  --btn-ring: #ec4899;
}
html[data-theme="dark"] {
  --bg: #07090f; --fg: #eef1f7; --muted: #b4bccb; --faint: #a3acbd;
  --surface: #0e1220; --elevated: #141a2c; --input: #0d1222;
  --accent: #9b84ff; --accent-fg: #0a0820; --accent-2: #22d3ee; --gold: #f0b86e;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px rgba(0, 0, 0, .5);
  --nav-bg: rgba(7, 9, 15, 0.86);
  --glow-1: #7c5cff40; --glow-2: #22d3ee26;
  --c-image: #9b84ff; --c-video: #22d3ee; --c-music: #e879f9; --c-text: #f0b86e;
  --c-edit: #fb7185; --c-task: #34d399; --c-templates: #60a5fa; --c-pricing: #facc15;
}
body {
  background:
    radial-gradient(60vw 40vw at 85% -10%, var(--glow-1), transparent 70%),
    radial-gradient(50vw 36vw at -10% 10%, var(--glow-2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
/* «Журнал»: serif headlines, thin rules, calm cards */
h1 { font-weight: 400; letter-spacing: -0.025em; }
h2 { font-weight: 400; }
h1 em, .display em { font-style: italic; color: var(--accent); }
.card { border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }
.btn { border-radius: var(--rb); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2))); color: var(--accent-fg); border-color: transparent; }
.btn.secondary { background: transparent; color: var(--fg); border: 1px solid var(--border); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.chip.bal-chip { border-color: color-mix(in srgb, var(--gold) 55%, transparent); color: var(--gold); }
.top { border-bottom: 1px solid var(--border); }
.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle; background: var(--sec, var(--accent)); opacity: .9;
}
.nav a[href$="/ideas"] { --sec: var(--c-image); }
.nav a[href$="/trends"] { --sec: var(--c-video); }
.nav a[href$="/templates"] { --sec: var(--c-templates); }
.nav a[href$="/gallery"] { --sec: var(--c-image); }
.nav a[href$="/challenge"] { --sec: var(--c-edit); }
.nav a[href$="/payment"], .nav a[href$="/pricing"] { --sec: var(--c-pricing); }
.nav a[href$="/models"] { --sec: var(--c-task); }
.nav a[href$="/help"] { --sec: var(--c-text); }
.nav a[href$="/app"] { --sec: var(--c-image); }
.nav a[href$="/app/history"] { --sec: var(--c-video); }
.nav a[href$="/app/account"] { --sec: var(--c-templates); }
/* Section colour helpers (photo/video/music/text) */
.sec-image, [data-kind="image"] { --sec: var(--c-image); }
.sec-video, [data-kind="video"] { --sec: var(--c-video); }
.sec-music, [data-kind="music"], [data-kind="audio"] { --sec: var(--c-music); }
.sec-text, [data-kind="text"] { --sec: var(--c-text); }
[data-kind] .icon, [data-kind] svg { color: var(--sec); }
/* Music as in C: big round play + waveform rows */
audio { width: 100%; border-radius: 99px; accent-color: var(--c-music); }
a:not(.btn) { color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* Style A «Аврора»: soft glass, pill buttons */
html[data-style="a"] { --r: 22px; --rb: 99px;
  --btn-grad: linear-gradient(110deg, #6a4cf0 0%, #5a5ae6 45%, #0b8ea6 100%);
  --btn-glow: 0 6px 20px rgba(106, 76, 240, .35), 0 2px 8px rgba(11, 142, 166, .25); --btn-ring: #22d3ee; }
html[data-style="a"] h1, html[data-style="a"] h2 { font-weight: 500; }
html[data-style="a"] .card { backdrop-filter: blur(10px); background: color-mix(in srgb, var(--surface) 80%, transparent); }
/* Style C «Неон»: bold sans, big radius, green/blue */
html[data-style="c"] { --display: Figtree, "Noto Sans Armenian", system-ui, sans-serif; --r: 26px; --rb: 18px;
  --btn-grad: linear-gradient(110deg, #08875d 0%, #0a7f86 50%, #3b5fe0 100%);
  --btn-glow: 0 6px 20px rgba(10, 143, 99, .32), 0 2px 8px rgba(59, 108, 240, .28); --btn-ring: #2ee6a6;
  --accent: #0a8f63; --accent-2: #3b6cf0; --glow-1: #a7f3d055; --glow-2: #c7d2fe66; --bg: #eef3f6; --nav-bg: rgba(238,243,246,.9); }
html[data-style="c"][data-theme="dark"] { --accent: #2ee6a6; --accent-fg: #04140d; --accent-2: #5b8cff;
  --bg: #060b10; --surface: #0b141b; --elevated: #101c25; --glow-1: #2ee6a630; --glow-2: #5b8cff2a; --nav-bg: rgba(6,11,16,.86); }
html[data-style="c"] h1, html[data-style="c"] h2, html[data-style="c"] h3 { font-weight: 800; letter-spacing: -0.03em; }
/* Own background: blur / dim from settings */
.user-bg { --ub-blur: 0px; --ub-dim: .7; }
.user-bg:not(.own) { filter: blur(var(--ub-blur)); transform: scale(1.04); }
.user-bg.own .ub-img { filter: blur(var(--ub-blur)); }
.user-bg::after { opacity: var(--ub-dim); background: linear-gradient(180deg, rgba(5, 8, 16, .85), rgba(5, 8, 16, 1)); }
html:not([data-theme="dark"]) .user-bg::after { background: linear-gradient(180deg, rgba(246, 244, 239, .85), rgba(246, 244, 239, 1)); }
.bg-sliders { display: grid; gap: 10px; margin-top: 12px; }
.bg-sliders label { display: grid; grid-template-columns: 9em 1fr 3em; align-items: center; gap: 10px; }
.bg-sliders input[type=range] { accent-color: var(--accent); width: 100%; }
.style-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.style-pick label { border: 1px solid var(--border); border-radius: var(--r); padding: 10px; cursor: pointer; display: grid; gap: 6px; }
.style-pick label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.style-pick .sw { height: 38px; border-radius: 8px; }
.style-pick .sw-a { background: linear-gradient(135deg, #7c5cff, #22d3ee 60%, #f0b86e); border-radius: 18px; }
.style-pick .sw-b { background: linear-gradient(90deg, #6246ea 0 30%, #f6f4ef 30% 70%, #f0b86e 70%); }
.style-pick .sw-c { background: linear-gradient(135deg, #2ee6a6, #5b8cff); border-radius: 18px; }
/* Studio tabs: one colour per section, coloured dot icon */
a[href*="/app?tab=image"] { --sec: var(--c-image); }
a[href*="/app?tab=video"] { --sec: var(--c-video); }
a[href*="/app?tab=music"] { --sec: var(--c-music); }
a[href*="/app?tab=text"], a[href*="/app?tab=chat"] { --sec: var(--c-text); }
a[href*="/app?tab=tools"] { --sec: var(--c-edit); }
a[href*="/app?tab=task"] { --sec: var(--c-task); }
a[href*="/app?tab="] { color: var(--sec, var(--accent)) !important; border-color: color-mix(in srgb, var(--sec, var(--accent)) 35%, transparent) !important; }
a[href*="/app?tab="].active { background: color-mix(in srgb, var(--sec, var(--accent)) 16%, transparent) !important; border-color: var(--sec, var(--accent)) !important; }
.rail a.on { box-shadow: inset 3px 0 0 var(--accent); }
/* Phase 1b: home hero */
.rd-ask { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; margin: 18px 0 14px;
  padding: 10px; border: 1px solid var(--border); border-radius: calc(var(--r) + 4px); background: var(--surface); box-shadow: var(--shadow); }
.rd-ask textarea { border: 0; background: transparent; resize: none; font-size: 18px; padding: 8px 10px; min-height: 56px; outline: none; }
.rd-ask .btn { align-self: end; }
.rd-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.rd-big { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: var(--r); text-decoration: none !important;
  border: 1px solid color-mix(in srgb, var(--sec) 40%, transparent); background: color-mix(in srgb, var(--sec) 12%, transparent); color: var(--sec) !important; font-weight: 600; }
.rd-big:hover { background: color-mix(in srgb, var(--sec) 22%, transparent); }
.rd-big .sicon { width: 34px; height: 34px; }
.rd-strip { display: flex; gap: 8px; margin-bottom: 14px; overflow: hidden; }
.rd-strip img { flex: 1 1 0; min-width: 0; width: auto; aspect-ratio: 4/5; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
@media (max-width: 600px) { .rd-ask { grid-template-columns: 1fr; } .rd-ask .btn { width: 100%; } }
.sicon { color: var(--sec, currentColor); vertical-align: middle; }
/* Phase 1b: music as in C — cover, gradient wave, big round play */
.track-card { border-radius: calc(var(--r) + 2px); border: 1px solid color-mix(in srgb, var(--c-music) 30%, var(--border));
  background: linear-gradient(110deg, color-mix(in srgb, var(--c-music) 14%, var(--surface)), var(--surface) 60%); }
.track-art { border-radius: 14px; overflow: hidden; box-shadow: 0 6px 18px color-mix(in srgb, var(--c-music) 30%, transparent); }
.track-wave { background: repeating-linear-gradient(90deg, var(--c-music) 0 3px, transparent 3px 6px) !important;
  -webkit-mask: linear-gradient(0deg, transparent 15%, #000 15% 85%, transparent 85%); opacity: .8; }
.track-play { width: 48px !important; height: 48px !important; border-radius: 50% !important; border: 0 !important;
  background: linear-gradient(135deg, var(--c-music), var(--accent)) !important; color: #fff !important; box-shadow: 0 6px 16px color-mix(in srgb, var(--c-music) 40%, transparent); }
.track-card.playing { border-color: var(--c-music); }
.track-card.playing .track-wave { animation: rd-wave 1.2s linear infinite; }
@keyframes rd-wave { to { background-position: 12px 0; } }
.rd-audio { accent-color: var(--c-music); filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--c-music) 25%, transparent)); }
@media (prefers-reduced-motion: reduce) { .track-card.playing .track-wave { animation: none; } }
/* Phase 1b: studio tabs as big coloured cards */
.studio .tabs a { display: flex; align-items: center; gap: 8px; border-radius: var(--rb); border: 1px solid transparent; }
.studio .tabs a .sicon { flex: none; padding: 5px; width: 30px; height: 30px; border-radius: 9px; background: color-mix(in srgb, var(--sec) 16%, transparent); }
/* Phase 1b: pricing & cabinet cards */
.price-cards > *, .plans .card, .price-card { position: relative; overflow: hidden; }
.price-cards > *::before, .plans .card::before, .price-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--gold)); }
.card h2 { font-family: var(--display); }
.price, .plan-price, .pack-price, .pkg-price { color: var(--gold); font-family: var(--display); }
/* Primary buttons: violet → turquoise, white bold text, soft glow (both themes) */
.btn:not(.secondary), button.btn:not(.secondary), a.btn:not(.secondary) {
  background: var(--btn-grad) !important;
  color: #fff !important; font-weight: 700; border: 0 !important; text-shadow: 0 1px 1px rgba(0,0,0,.25);
  box-shadow: 0 6px 20px rgba(106, 76, 240, .35), 0 2px 8px rgba(11, 142, 166, .25);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:not(.secondary):hover { filter: brightness(1.08); box-shadow: 0 8px 26px rgba(106, 76, 240, .5), 0 2px 10px rgba(11, 142, 166, .35); text-decoration: none; }
.btn:not(.secondary):active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--btn-ring); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"], .btn.disabled { filter: grayscale(.6) brightness(.9); opacity: .55; box-shadow: none; cursor: not-allowed; }
/* Hotfix: no floating buttons over content on phones — launch/continue buttons stay in the page flow */
@media (max-width: 759px) {
  .thumb-bar, button.sheet-launch { position: static !important; left: auto; right: auto; bottom: auto !important; width: 100%; margin: 10px 0; }
  .works-page, section:has(> .sheet-launch) { padding-bottom: 0; }
  .btn:not(.secondary) { transform: none; }
}
/* Phase 1b: cabinet in style B with Aurora colours */
.cab-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin-bottom: 16px;
  padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--border); position: relative; overflow: hidden;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), color-mix(in srgb, var(--accent-2) 10%, var(--surface)) 60%, color-mix(in srgb, var(--gold) 12%, var(--surface))); }
.cab-head h1 { margin: 0; font-size: clamp(24px, 5vw, 34px); }
.cab-head p { margin: 2px 0 0; overflow-wrap: anywhere; }
.cab-ava { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 700 24px var(--display, inherit); color: #fff;
  background: var(--btn-grad); box-shadow: var(--btn-glow); }
.cab-bal { font-weight: 700; font-size: 16px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; }
.cab-bal .sicon { --sec: var(--gold); }
.cab-page .card h2 { display: flex; align-items: center; gap: 10px; }
.cab-page .card h2 .sicon { flex: none; padding: 6px; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--sec, var(--accent)) 16%, transparent); }
.cab-page .card h2:not([style]) { --sec: var(--gold); }
.cab-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.cab-tile { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; text-align: center; border-radius: var(--r); font-weight: 600; font-size: 14px;
  text-decoration: none !important; color: var(--sec) !important; border: 1px solid color-mix(in srgb, var(--sec) 40%, transparent);
  background: color-mix(in srgb, var(--sec) 11%, transparent); }
.cab-tile:hover { background: color-mix(in srgb, var(--sec) 22%, transparent); }
.cab-tile span { color: var(--fg); overflow-wrap: anywhere; }
@media (max-width: 759px) {
  .cab-head { grid-template-columns: auto 1fr; } .cab-bal { grid-column: 1 / -1; justify-self: start; }
  .cab-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cab-tiles .cab-tile:last-child { grid-column: 1 / -1; }
}
/* Phase 1b: studio price bar on phones stays in the page flow (no overlay on text/buttons, no keyboard jumps) */
@media (max-width: 759px) {
  .price-dock { position: static !important; left: auto; right: auto; bottom: auto !important; margin: 14px 0 6px; z-index: auto; }
  .studio { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  body:has(.price-dock) .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
/* Мгер 23.10 22:54: primary buttons with slow flowing shimmer; colours follow the chosen style (themes27) */
.btn:not(.secondary):not(.danger), button.btn:not(.secondary):not(.danger), a.btn:not(.secondary):not(.danger) {
  background: var(--btn-grad) !important;
  background-size: 140% 100% !important; color: #fff !important; font-weight: 700;
  box-shadow: var(--btn-glow);
  animation: rd-flow 7s ease-in-out infinite alternate;
}
.btn:not(.secondary):not(.danger):hover { filter: brightness(1.08); }
.btn:focus-visible { outline-color: var(--btn-ring); }
@keyframes rd-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .btn:not(.secondary) { animation: none !important; } }
/* Phase 2a: gallery sort/filters, «Хочу так же» */
.gal-sort, .gal-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.gal-sort .chip.on, .gal-kinds .chip.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.gal-uses { color: var(--gold); font-weight: 600; }
.gal-wish textarea { width: 100%; }
.gal-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.gal-note { border-left: 3px solid var(--gold); padding-left: 10px; }
/* themes27: phone menu, sheets and tables use the same theme surfaces as the PC rail/cards */
@media (max-width: 759px) {
  .bottom-nav { background: color-mix(in srgb, var(--surface) 92%, transparent) !important; }
  .ps-price-table tr { background: var(--surface); border-color: var(--border); }
}
dialog.sheet::backdrop, dialog.model-sheet::backdrop { background: color-mix(in srgb, var(--bg) 55%, rgba(0,0,0,.45)); }

/* ===== theme45-1027: style D «Барс» (turquoise, glass, from the future) and E «Лайм» (GPT palette) ===== */
.rail-bal, .t45-side { display: none; }
html[data-style="d"] {
  --display: Figtree, Inter, "Noto Sans Armenian", system-ui, sans-serif; --r: 18px; --r-lg: 22px; --r-xl: 26px; --rb: 15px;
  --bg: #eef6f8; --fg: #0b1a26; --muted: #3f5566; --faint: #4f6575;
  --surface: #ffffff; --elevated: #ffffff; --input: #ffffff;
  --accent: #087f86; --accent-fg: #ffffff; --accent-2: #1479b8; --gold: #8a6100;
  --border: rgba(8, 127, 134, .18); --nav-bg: rgba(238, 246, 248, .88);
  --glow-1: #3ee6d033; --glow-2: #22b8e826;
  --glass: rgba(255, 255, 255, .72); --glow: 0 0 0 1px rgba(8,127,134,.10), 0 10px 30px rgba(8, 127, 134, .10);
  --grid-line: #087f8610;
  --btn-grad: linear-gradient(90deg, #3ee6d0 0%, #22b8e8 100%);
  --btn-glow: 0 8px 24px rgba(34, 184, 232, .30), inset 0 1px 0 rgba(255,255,255,.45);
  --btn-ring: #22b8e8; --btn-fg: #04121a;
  --c-image: #087f86; --c-video: #1479b8; --c-music: #7a3fd1; --c-text: #8a6100;
  --c-edit: #c0264a; --c-task: #0a7d55; --c-templates: #2459c9; --c-pricing: #8a6100;
}
html[data-style="d"][data-theme="dark"] {
  --bg: #060b16; --fg: #eaf4f8; --muted: #9fb4c8; --faint: #93a9c0;
  --surface: #0e1a2e; --elevated: #13233f; --input: #0b1526;
  --accent: #3ee6d0; --accent-fg: #04121a; --accent-2: #22b8e8; --gold: #f2c46d;
  --border: rgba(110, 231, 214, .16); --nav-bg: rgba(6, 11, 22, .80);
  --glow-1: #3ee6d026; --glow-2: #22b8e81f;
  --glass: rgba(20, 34, 60, .62); --glow: inset 0 1px 0 rgba(255,255,255,.04), 0 0 0 1px rgba(62,230,208,.05), 0 12px 36px rgba(0,0,0,.35);
  --grid-line: #3ee6d009;
  --btn-glow: 0 8px 28px rgba(62, 230, 208, .33), inset 0 1px 0 rgba(255,255,255,.4);
  --c-image: #3ee6d0; --c-video: #22b8e8; --c-music: #b69cff; --c-text: #f2c46d;
  --c-edit: #ff7d95; --c-task: #4ee69a; --c-templates: #6fa8ff; --c-pricing: #f2c46d;
}
html[data-style="e"] {
  --display: Figtree, Inter, "Noto Sans Armenian", system-ui, sans-serif; --r: 18px; --r-lg: 22px; --r-xl: 26px; --rb: 15px;
  --bg: #f3f4ef; --fg: #111318; --muted: #4a4f5a; --faint: #565b66;
  --surface: #ffffff; --elevated: #ffffff; --input: #ffffff;
  --accent: #4a7300; --accent-fg: #ffffff; --accent-2: #2f6fb0; --gold: #8a6100;
  --border: rgba(17, 19, 24, .12); --nav-bg: rgba(243, 244, 239, .9);
  --glow-1: #c8f16940; --glow-2: #c8f1691a;
  --glass: rgba(255, 255, 255, .78); --glow: 0 0 0 1px rgba(17,19,24,.05), 0 10px 30px rgba(17, 19, 24, .07);
  --grid-line: #11131808;
  --btn-grad: linear-gradient(90deg, #c8f169 0%, #b6e851 100%);
  --btn-glow: 0 8px 24px rgba(150, 200, 60, .30), inset 0 1px 0 rgba(255,255,255,.5);
  --btn-ring: #4a7300; --btn-fg: #111318;
  --c-image: #4a7300; --c-video: #2f6fb0; --c-music: #8a3fc0; --c-text: #8a6100;
  --c-edit: #c0264a; --c-task: #0a7d55; --c-templates: #2459c9; --c-pricing: #8a6100;
}
html[data-style="e"][data-theme="dark"] {
  --bg: #111318; --fg: #f2f4f0; --muted: #b0b5bf; --faint: #9ea4ae;
  --surface: #1a1d24; --elevated: #22262f; --input: #16191f;
  --accent: #c8f169; --accent-fg: #111318; --accent-2: #8fd0ff; --gold: #f2c46d;
  --border: rgba(255, 255, 255, .10); --nav-bg: rgba(17, 19, 24, .86);
  --glow-1: #c8f16914; --glow-2: #8fd0ff0d;
  --glass: rgba(30, 34, 42, .72); --glow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 36px rgba(0,0,0,.35);
  --grid-line: #c8f16906;
  --btn-glow: 0 8px 26px rgba(200, 241, 105, .22), inset 0 1px 0 rgba(255,255,255,.5);
  --c-image: #c8f169; --c-video: #8fd0ff; --c-music: #d3a8ff; --c-text: #f2c46d;
  --c-edit: #ff8fa3; --c-task: #7ee8a8; --c-templates: #8fb6ff; --c-pricing: #f2c46d;
}
html:is([data-style="d"], [data-style="e"]) body { font-family: var(--display); }
html:is([data-style="d"], [data-style="e"]) body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
html[data-style="d"][data-theme="dark"] body { background: radial-gradient(120% 60% at 85% -5%, #3ee6d026, transparent 55%), radial-gradient(90% 50% at -10% 105%, #22b8e81f, transparent 60%), linear-gradient(180deg, #060b16, #0b1730); background-attachment: fixed; }
html:is([data-style="d"], [data-style="e"]) :is(h1, h2, h3) { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }
html:is([data-style="d"], [data-style="e"]) h1 em { font-style: normal; }
/* glass cards with a soft accent edge */
html:is([data-style="d"], [data-style="e"]) :is(.card, .rd-ask, .cab-head, .track-card, .sec-ex, dialog.sheet, dialog.model-sheet, .price-dock) {
  background: var(--glass); border: 1px solid var(--border); box-shadow: var(--glow);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-radius: var(--r-lg); }
html:is([data-style="d"], [data-style="e"]) dialog:is(.sheet, .model-sheet) { background: var(--elevated); }
html:is([data-style="d"], [data-style="e"]) :is(.card, .sec-ex):hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
/* primary button: accent gradient, dark readable text, price pill inside */
html:is([data-style="d"], [data-style="e"]) :is(.btn, button.btn, a.btn):not(.secondary):not(.danger) {
  background: var(--btn-grad) !important; color: var(--btn-fg) !important; font-weight: 800; animation: none; box-shadow: var(--btn-glow); }
html:is([data-style="d"], [data-style="e"]) .btn:not(.secondary):not(.danger) :is(.pr, .price-pill, b, small) { color: var(--btn-fg) !important; }
html:is([data-style="d"], [data-style="e"]) .btn.secondary { background: color-mix(in srgb, var(--fg) 4%, transparent); border: 1px solid var(--border); color: var(--fg); }
html:is([data-style="d"], [data-style="e"]) .btn.secondary:hover { border-color: var(--accent); color: var(--fg); }
html:is([data-style="d"], [data-style="e"]) :is(.chip, .tabs a, .seg label) { border-radius: 999px; }
html:is([data-style="d"], [data-style="e"]) .chip.bal-chip { color: var(--fg); border-color: var(--border); background: var(--glass); }
html:is([data-style="d"], [data-style="e"]) .chip.bal-chip::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--accent); box-shadow: 0 0 8px var(--accent); vertical-align: middle; }
html:is([data-style="d"], [data-style="e"]) :is(input, textarea, select) { border-radius: 14px; border-color: var(--border); background: var(--input); color: var(--fg); }
html:is([data-style="d"], [data-style="e"]) :is(input, textarea, select):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
/* studio tabs: one accent, segmented control */
html:is([data-style="d"], [data-style="e"]) a[href*="/app?tab="] { color: var(--muted) !important; border-color: transparent !important; }
html:is([data-style="d"], [data-style="e"]) a[href*="/app?tab="].active { color: var(--fg) !important; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent) 7%, transparent)) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); border-color: transparent !important; }
html:is([data-style="d"], [data-style="e"]) a[href*="/app?tab="] .sicon { color: currentColor; }
html:is([data-style="d"], [data-style="e"]) .studio-side .tabs { background: var(--glass); border: 1px solid var(--border); border-radius: 18px; padding: 4px; gap: 4px; }
/* rail: glass, accent active row, balance card at the bottom */
html:is([data-style="d"], [data-style="e"]) .rail { background: color-mix(in srgb, var(--bg) 70%, transparent); border-right: 1px solid var(--border); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
html:is([data-style="d"], [data-style="e"]) .rail a.on, html:is([data-style="d"], [data-style="e"]) .rail summary.on { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 12px; color: var(--fg); }
html:is([data-style="d"], [data-style="e"]) .rail-bal { display: grid; gap: 4px; margin: auto 10px 12px; padding: 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--border); }
html:is([data-style="d"], [data-style="e"]) .rail-bal b { font-size: 17px; font-weight: 800; color: var(--fg); }
html:is([data-style="d"], [data-style="e"]) .rail-bal .btn { margin-top: 6px; justify-content: center; }
html:is([data-style="d"], [data-style="e"]) .rail-foot { display: none; }
/* phone bottom menu: floating glass bar */
@media (max-width: 759px) {
  html:is([data-style="d"], [data-style="e"]) .bottom-nav { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 22px; border: 1px solid var(--border);
    background: var(--glass) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  html:is([data-style="d"], [data-style="e"]) .bottom-nav :is(.on, [aria-current]) { color: var(--accent) !important; }
}
/* desktop «Создать»: tabs on top, form in the middle, settings/recent/ideas column on the right */
@media (min-width: 1100px) {
  html:is([data-style="d"], [data-style="e"]) .studio { grid-template-columns: minmax(0, 1fr) 340px; column-gap: 28px; }
  html:is([data-style="d"], [data-style="e"]) .studio > .studio-side { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  html:is([data-style="d"], [data-style="e"]) .studio-side .tabs { display: flex; flex-direction: row; flex-wrap: wrap; width: auto; }
  html:is([data-style="d"], [data-style="e"]) .studio-side .tabs a { padding: 9px 16px; }
  html:is([data-style="d"], [data-style="e"]) .studio-side .face { display: none; }
  html:is([data-style="d"], [data-style="e"]) .studio > section { grid-column: 1; min-width: 0; }
  html:is([data-style="d"], [data-style="e"]) .t45-side { display: grid; gap: 16px; grid-column: 2; grid-row: 2; position: sticky; top: 84px; align-self: start; }
  html:is([data-style="d"], [data-style="e"]) .studio-title { font-size: 40px; }
}
.t45-side .card { padding: 18px; }
.t45-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.t45-head a { font-size: 14px; }
.t45-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.t45-th { aspect-ratio: 4/5; border-radius: 14px; overflow: hidden; background: var(--elevated); display: grid; place-items: center; border: 1px solid var(--border); }
.t45-th img { width: 100%; height: 100%; object-fit: cover; }
.t45-ideas { display: grid; gap: 10px; }
.t45-idea { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--border); text-decoration: none !important; color: var(--fg) !important; }
.t45-idea:hover { border-color: var(--accent); }
.t45-idea img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.t45-idea span { display: grid; min-width: 0; } .t45-idea b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-pick .sw-d { background: radial-gradient(circle at 70% 30%, #3ee6d0aa, transparent 50%), linear-gradient(135deg, #060b16, #13233f); box-shadow: inset 0 0 0 1px #3ee6d066; border-radius: 14px; }
.style-pick .sw-e { background: linear-gradient(90deg, #111318 0 62%, #c8f169 62%); border-radius: 14px; }
.style-pick { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
html:is([data-style="d"], [data-style="e"]) { background-color: var(--bg); }
html[data-style="d"][data-theme="dark"] { background: linear-gradient(180deg, #060b16, #0b1730) fixed; }
@media (min-width: 1100px) {
  html:is([data-style="d"], [data-style="e"]) .studio-side .tabs { flex-wrap: nowrap; }
  html:is([data-style="d"], [data-style="e"]) .studio-side .studio-help { margin-left: auto; }
}
html[data-style="d"][data-theme="dark"] { background: #08101f; }
html[data-style="d"][data-theme="dark"] body { background: radial-gradient(1400px 700px at 85% -5%, #3ee6d024, transparent 60%), radial-gradient(1100px 600px at -10% 40%, #22b8e81a, transparent 60%), transparent; background-attachment: scroll; }
/* theme45: replace hard-coded violet/pink in older blocks with the theme accent */
html:is([data-style="d"], [data-style="e"]) :is(.pp-drop, .field-photo, .quick-chips .chip-photo) { border-color: color-mix(in srgb, var(--accent) 55%, transparent) !important; background: color-mix(in srgb, var(--accent) 6%, transparent) !important; color: var(--fg) !important; }
html:is([data-style="d"], [data-style="e"]) .pp.is-over .pp-drop { border-color: var(--accent) !important; background: color-mix(in srgb, var(--accent) 14%, transparent) !important; }
html:is([data-style="d"], [data-style="e"]) .pp-plus { color: var(--accent) !important; background: color-mix(in srgb, var(--accent) 14%, transparent) !important; }
html:is([data-style="d"], [data-style="e"]) :is(.card:hover, .bw-tile:hover, .afy-card:hover, .grow-card:hover, .grp-card:hover, .grp-card.on, .h2-kind:hover, .ws-card, .help-band-card) { border-color: color-mix(in srgb, var(--accent) 45%, transparent) !important; }
html:is([data-style="d"], [data-style="e"]) :is(.how-ic, .ws-step span) { color: var(--btn-fg) !important; }
html:is([data-style="d"], [data-style="e"]) .soc-tabs .chip.on { border-color: var(--accent) !important; color: var(--fg) !important; background: color-mix(in srgb, var(--accent) 14%, transparent) !important; }
html:is([data-style="d"], [data-style="e"]) .cab-ava { color: var(--btn-fg); }
/* theme45 spec 27.10 (GPT Design Spec v1.0/v1.1): radii 12–16 cards, 10–12 buttons/fields, tabular credits */
html:is([data-style="d"], [data-style="e"]) { --r: 14px; --r-lg: 16px; --r-xl: 16px; --rb: 12px; }
html:is([data-style="d"], [data-style="e"]) :is(.btn, input, textarea, select) { border-radius: 12px; }
html:is([data-style="d"], [data-style="e"]) :is(.bal-chip, .rail-bal b, .cab-bal, .price-dock, [class*="price"]) { font-variant-numeric: tabular-nums; }
html:is([data-style="d"], [data-style="e"]) .btn:disabled { opacity: .4; }
/* Theme 5 «Лайм»: flat surfaces, 1px borders, no glass, no glow, no gradients; lime only on the main button and selected items */
html[data-style="e"][data-theme="dark"] {
  --bg: #111318; --surface: #1a1d24; --elevated: #242832; --input: #1a1d24;
  --fg: #f7f8fa; --muted: #aeb5c2; --faint: #aeb5c2; --border: #343945;
  --accent: #c8f169; --accent-fg: #111318; --accent-2: #9dc8ff; --gold: #f3be5e;
  --glass: #1a1d24; --glow: none; --glow-1: transparent; --glow-2: transparent; --grid-line: transparent;
  --c-image: #c8f169; --c-video: #9dc8ff; --c-music: #c7b4ff; --c-text: #f3be5e; --c-edit: #ff7777; --c-task: #49c78a; --c-templates: #9dc8ff; --c-pricing: #f3be5e;
}
html[data-style="e"] { --glass: #ffffff; --glow: none; --glow-1: transparent; --glow-2: transparent; --grid-line: transparent;
  --btn-grad: #c8f169; --btn-glow: none; --border: #d9dce2; }
html[data-style="e"] body { background: var(--bg) !important; }
html[data-style="e"] body::before { display: none; }
html[data-style="e"] :is(.card, .rd-ask, .cab-head, .track-card, .sec-ex, dialog.sheet, dialog.model-sheet, .price-dock, .rail, .rail-bal, .studio-side .tabs, .bottom-nav, .chip.bal-chip) {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none !important; }
html[data-style="e"] :is(.btn, button.btn, a.btn):not(.secondary):not(.danger) { background: #c8f169 !important; box-shadow: none !important; }
html[data-style="e"] :is(.btn, button.btn, a.btn):not(.secondary):not(.danger):hover { filter: none; background: #d4f585 !important; }
html[data-style="e"] :is(.btn, button.btn, a.btn):not(.secondary):not(.danger):active { background: #b5dc5c !important; }
html[data-style="e"] .chip.bal-chip::before { box-shadow: none; }
html[data-style="e"] a[href*="/app?tab="].active { background: color-mix(in srgb, var(--accent) 12%, transparent) !important; box-shadow: inset 0 0 0 1px var(--accent); }
html[data-style="e"] .cab-head { background: var(--surface); }
@media (max-width: 759px) { html[data-style="e"] .bottom-nav { background: var(--surface) !important; } }
/* create-rebuild-1027: rebuilt desktop «Создать» (styles D/E, ≥1100px, see t45-create.js) */
@media (min-width: 1100px) {
  html:is([data-style="d"], [data-style="e"]) .studio.t45-studio-rebuilt { grid-template-columns: minmax(0, 1fr); }
  form.t45-rebuilt select.aspect-native { display: none !important; }
  form.t45-rebuilt .t45-fmt > button { flex: 0 0 auto; width: auto; }
  .t45-side.t45-emptied { display: none !important; }
  form.t45-rebuilt { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  form.t45-rebuilt .t45-main { min-width: 0; display: grid; gap: 12px; align-content: start; }
  form.t45-rebuilt .t45-col { display: grid; gap: 16px; position: sticky; top: 84px; }
  form.t45-rebuilt .t45-set, form.t45-rebuilt .t45-recent { padding: 18px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--border); box-shadow: var(--glow); }
  form.t45-rebuilt .t45-set { display: grid; gap: 8px; }
  form.t45-rebuilt .t45-set-title { font-size: 16px; }
  form.t45-rebuilt .t45-set :is(.model-native, select) { width: 100%; }
  form.t45-rebuilt .t45-set .opt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  form.t45-rebuilt .t45-pbox { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--glow); padding: 16px; }
  form.t45-rebuilt .t45-pbox:focus-within { border-color: var(--accent); }
  form.t45-rebuilt .t45-pbox textarea { border: 0 !important; background: transparent !important; box-shadow: none !important; min-height: 200px; font-size: 17px; padding: 4px; width: 100%; resize: vertical; }
  form.t45-rebuilt .t45-pchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
  form.t45-rebuilt .t45-pchips > .btn, form.t45-rebuilt .t45-pp .pp-drop { height: 34px; min-height: 0; padding: 0 14px !important; border-radius: 999px !important; font-size: 14px; font-weight: 600; width: auto; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--border) !important; background: color-mix(in srgb, var(--fg) 3%, transparent) !important; color: var(--muted) !important; }
  form.t45-rebuilt .t45-pchips > .btn { color: var(--accent) !important; }
  form.t45-rebuilt .t45-pp { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  form.t45-rebuilt .t45-pp .pp-plus { background: none !important; width: auto; height: auto; color: var(--muted) !important; }
  form.t45-rebuilt .t45-pp .pp-count::before { content: "· "; }
  form.t45-rebuilt .t45-pp .pp-count { font-weight: 600; }
  form.t45-rebuilt .t45-pp .pp-thumbs:empty { display: none; }
  form.t45-rebuilt .t45-ratios { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  form.t45-rebuilt .t45-fmt { display: contents; }
  form.t45-rebuilt .t45-fmt > button { display: inline-flex; height: 34px; min-height: 0; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 14px; }
  form.t45-rebuilt .t45-fmt > button > :not(.fmt-ratio) { display: none; }
  form.t45-rebuilt .t45-fmt > button .fmt-ratio { font-size: 14px; color: inherit; }
  form.t45-rebuilt .t45-fmt > button.on { border-color: var(--accent); color: var(--fg); background: color-mix(in srgb, var(--accent) 12%, transparent); }
  form.t45-rebuilt .t45-fmt:not(.t45-open) > button.t45-more { display: none; }
  form.t45-rebuilt .t45-fmt.t45-open > button > span:not(.fmt-ico) { display: inline; margin-right: 6px; }
  form.t45-rebuilt .t45-more-btn { height: 34px; background: transparent; color: var(--muted); cursor: pointer; }
  form.t45-rebuilt .t45-hide { display: none !important; }
  form.t45-rebuilt #price-box .btn:not(.secondary) { max-width: 460px; height: 58px; font-size: 18px; }
  .t45-ideas.t45-ideas-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; padding: 0; background: none; border: 0; box-shadow: none; }
  .t45-ideas.t45-ideas-row > b { grid-column: 1 / -1; font-size: 18px; }
  .t45-ideas.t45-ideas-row .t45-idea { background: var(--glass); padding: 12px; }
}

/* icons-1027: единая система иконок. sicon = линейный значок (меню, кнопки); itile = плитка раздела. */
.sicon { flex: none; vertical-align: -0.2em; }
.btn > .sicon, .chip > .sicon, .sheet-list .sicon, .rd-profile-link .sicon { margin-inline-end: 6px; }
.btn.small > .sicon { width: 16px; height: 16px; margin-inline-end: 5px; }
.itile { --it: 48px; --itc: var(--sec, var(--accent)); --itd: color-mix(in srgb, var(--itc) 22%, #0b1020); position: relative; flex: none; display: inline-grid; place-items: center;
  width: var(--it); height: var(--it); border-radius: calc(var(--it) * .28); color: var(--itc);
  background: color-mix(in srgb, var(--itc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--itc) 40%, transparent); }
.gl .gf, .gl .gc, .gl .gp, .gl .gw, .gl .gok, .gl .gerr { fill: currentColor; }
.gl .gc, .gl .gp, .gl .gw { opacity: .75; }
.gl .gd { fill: var(--itd); }
.gl .gs { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.gl .gds { fill: none; stroke: var(--itd); stroke-linecap: round; stroke-linejoin: round; }
.gl .gfaint { opacity: .25; }
html:not([data-theme="dark"]) .itile { --itd: #fff; background: color-mix(in srgb, var(--itc) 12%, #fff); }
/* во всех стилях (Мгер 04.11 23:22), как «Барс»: как на постере GPT — тёмная глянцевая плитка, светящаяся рамка, глиф с градиентом бирюза→фиолет и белыми бликами */
html .itile { --itd: #141942; color: #7fb8ff; isolation: isolate;
  background: radial-gradient(110% 70% at 50% 0%, rgba(160,175,255,.34), transparent 60%), radial-gradient(90% 60% at 50% 100%, rgba(80,120,255,.28), transparent 70%), linear-gradient(170deg, #343a80 0%, #1c2156 50%, #121640 100%);
  border: 1.5px solid rgba(175,170,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(120,140,255,.12), inset 0 -10px 18px rgba(70,110,255,.22),
    0 0 calc(var(--it) * .34) rgba(105,110,255,.42), 0 calc(var(--it) * .1) calc(var(--it) * .24) rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.4); }
html .itile::after { content: ""; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 42%); }
html .gl { position: relative; z-index: 1; overflow: visible; filter: drop-shadow(0 0 calc(var(--it) * .09) rgba(100,160,255,.55)); }
html[data-theme="dark"] .gl .glg { filter: url(#bi-3d); }
html .itile::before { content: ""; position: absolute; left: 7%; right: 7%; top: 3%; height: 46%; border-radius: calc(var(--it) * .24) calc(var(--it) * .24) 50% 50% / calc(var(--it) * .24) calc(var(--it) * .24) 22% 22%;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.03) 70%, transparent); pointer-events: none; }
html .gl .gf { fill: url(#bi-g); }
html .gl .gs { stroke: url(#bi-g); }
html .gl .gc { fill: url(#bi-c); opacity: 1; }
html .gl .gp { fill: url(#bi-p); opacity: 1; }
html .gl .gw { fill: url(#bi-w); opacity: 1; }
html .gl .gok { stroke: url(#bi-ok); }
html .gl .gerr { fill: url(#bi-err); }
html:not([data-theme="dark"]) .itile { --itd: #ffffff; background: linear-gradient(165deg, #ffffff, #e8ecff); border-color: rgba(125,123,255,.45);
  box-shadow: inset 0 1px 0 #fff, 0 4px 14px rgba(105,110,255,.25); }
html:not([data-theme="dark"]) .gl { filter: none; }
/* «Лайм»: спокойно, без свечения */
/* 04.11 23:22 Мгер: глянцевые плитки «Барс» во всех стилях — у «Лайма» тень плитки больше не убираем */
.h2-kind .itile, .cab-tile .itile, .sheet-tile .itile { margin-bottom: 2px; }
.how-step > .itile { margin-bottom: 8px; }
.sheet-big { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet-big small { flex-basis: 100%; }
@media (prefers-reduced-motion: no-preference) { .sicon-loading, .itile-loading .gl { animation: ic-spin 1.2s linear infinite; } }
@keyframes ic-spin { to { transform: rotate(360deg); } }

/* icons-mix-1028 (Мгер 28.10): смешанный стиль для «Барс» (d) и «Лайм» (e).
   Крупные плитки разделов/форматов — глянцевые (itile). Мелкие значки — тонкая линия по гайду GPT:
   viewBox 24, линия 1.9, круглые концы; меню 22 px, действия 18 px; основной #21C7B7, AI #59DDF2, вторичный #8B7CFF. */
.fmt-tile { display: none; }
html:is([data-style="d"], [data-style="e"]) .studio .tabs a .fmt-line { display: none; }
html:is([data-style="d"], [data-style="e"]) .studio .tabs a .fmt-tile { display: inline-flex; }
html:is([data-style="d"], [data-style="e"]) .studio .tabs a .fmt-tile .itile { --it: 32px; border-width: 1px; }
html[data-style="d"] { --ln: #21C7B7; --ln-ai: #59DDF2; --ln-2: #8B7CFF; }
html[data-style="d"]:not([data-theme="dark"]) { --ln: #0FA394; --ln-ai: #1BA9C4; --ln-2: #6B5CE6; }
html[data-style="e"] { --ln: var(--accent); --ln-ai: var(--accent); --ln-2: color-mix(in srgb, var(--accent) 60%, var(--fg)); }
html:is([data-style="d"], [data-style="e"]) .sicon { color: var(--ln); stroke-width: 1.9; transition: color .15s, opacity .15s; }
html:is([data-style="d"], [data-style="e"]) :is(.sicon-spark, .sicon-generating, .sicon-tools, .sicon-style, .ic-ai) { color: var(--ln-ai); }
html:is([data-style="d"], [data-style="e"]) :is(.sicon-community, .sicon-star, .sicon-heart, .sicon-bell, .sicon-clock, .sicon-expires) { color: var(--ln-2); }
html:is([data-style="d"], [data-style="e"]) :is(.btn, a, button):hover > .sicon,
html:is([data-style="d"], [data-style="e"]) :is(.btn, a, button):hover > span > .sicon { color: var(--ln-ai); }
html:is([data-style="d"], [data-style="e"]) :is(.btn, button)[disabled] .sicon,
html:is([data-style="d"], [data-style="e"]) [aria-disabled="true"] .sicon { color: var(--muted, #7a8599); opacity: .5; }
html:is([data-style="d"], [data-style="e"]) .btn > .sicon, html:is([data-style="d"], [data-style="e"]) .btn > span > .sicon { width: 18px; height: 18px; }
/* нижнее меню: 22 px, неактивные — приглушённая линия, активный — заливка (filled-вариант) */
html:is([data-style="d"], [data-style="e"]) .bn-ic { width: 22px; height: 22px; color: color-mix(in srgb, var(--ln) 70%, var(--muted, #8892a6)); }
html:is([data-style="d"], [data-style="e"]) :is(a, button).on .bn-ic,
html:is([data-style="d"], [data-style="e"]) [aria-current="page"] .bn-ic { color: var(--ln); fill: color-mix(in srgb, var(--ln) 26%, transparent); stroke-width: 2; }
html:is([data-style="d"], [data-style="e"]) :is(a, button):hover .bn-ic { color: var(--ln-ai); }
html:is([data-style="d"], [data-style="e"]) :focus-visible > .sicon { color: var(--ln-ai); }
html:is([data-style="d"], [data-style="e"]) .rail-sub .sicon { width: 20px; height: 20px; }
/* audit-1029 navcookie: phone bottom menu sits flush at the very bottom (safe area respected);
   the cookie card always sits fully above it, never under it */
@media (max-width: 759px) {
  :root { --tabbar-h: 62px; }
  html .bottom-nav, html:is([data-style="d"], [data-style="e"]) .bottom-nav {
    left: 0; right: 0; bottom: 0; border-radius: 20px 20px 0 0; border-bottom: 0;
    padding-bottom: calc(5px + env(safe-area-inset-bottom));
  }
  html .cookie, html body:has(.thumb-bar) .cookie {
    bottom: calc(var(--nav-real, calc(var(--tabbar-h) + env(safe-area-inset-bottom))) + 10px) !important; z-index: 41;
  }
}
/* audit-1029: hidden photo input in «Создать» was 1440px wide and gave the desktop page a sideways scroll */
.pp-input { width: 1px !important; height: 1px !important; left: 0; top: 0; overflow: hidden; clip-path: inset(50%); }
/* audit-1029 profile2col: phone footer/profile link lists in 2 compact columns per section, headers kept, taps >= 40px */
@media (max-width: 759px) {
  .footer-cols .fcol { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; row-gap: 0; }
  .footer-cols .fcol-h { grid-column: 1 / -1; margin: 0 0 2px; }
  .footer-cols .fcol a { display: flex; align-items: center; min-height: 40px; min-width: 0; padding: 4px 0; line-height: 1.25;
    overflow-wrap: anywhere; hyphens: auto; }
  html[lang="hy"] .footer-cols .fcol a { font-size: 13.5px; }
}
/* audit-1029 fix456 (4): tablet 760–1000px — logo only in the left rail, header tools never run past the edge, balance shrinks */
@media (min-width: 760px) and (max-width: 1000px) {
  body:has(.rail) header.top .brand { display: none !important; }
  header.top .top-inner { min-width: 0; gap: 8px; }
  header.top .top-tools { min-width: 0; flex: 1 1 auto; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
  header.top .top-tools .bal-chip { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  header.top .top-tools .bal-chip .bal-left { display: none; }
  header.top .langs { gap: 2px; flex: none; }
  header.top .langs a { padding-left: 6px !important; padding-right: 6px !important; min-width: 0 !important; }
  header.top .logout-top .btn { padding-left: 10px; padding-right: 10px; }
}
/* (5) «Мои работы» on narrow phones: one card per row, status and model on their own lines, buttons fit */
@media (max-width: 360px) {
  .works-grid { grid-template-columns: 1fr !important; }
  .work-card .work-row { display: grid !important; grid-template-columns: 1fr auto; align-items: center; row-gap: 4px; }
  .work-card .work-row > :first-child { justify-self: start; }
  .work-card .work-row > .idea-kicker { grid-column: 1; grid-row: 2; margin: 0; min-width: 0; overflow-wrap: anywhere; }
  .work-card .work-row > :last-child { grid-column: 2; grid-row: 1 / span 2; }
  .work-card .work-repeat, .work-card .work-meta .btn { max-width: 100%; white-space: normal; text-align: center; }
}
/* (6) Armenian tab labels at 320–360: full words, no «…» */
@media (max-width: 360px) {
  html[lang="hy"] .bottom-nav { padding-left: 2px !important; padding-right: 2px !important; }
  html[lang="hy"] .bottom-nav .bn-label { font-size: 9.5px !important; letter-spacing: -0.35px !important; overflow: visible !important; text-overflow: clip !important; max-width: none !important; }
}
/* (7) login/signup cards at 320: fields stay inside the card */
.auth-layout > *, .auth-layout form.card > *, .auth-layout form.card input, .auth-layout form.card .pw-wrap { min-width: 0; max-width: 100%; box-sizing: border-box; }
/* (8) «+ Папка» form on 320: name field + button wrap inside the screen */
@media (max-width: 400px) {
  .folder-new[open] { flex-basis: 100%; max-width: 100%; }
  .folder-new form { display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100vw - 32px); }
  .folder-new form input[name="name"] { flex: 1 1 160px; min-width: 0; max-width: 100%; box-sizing: border-box; }
}

/* avatar-entry-1029: «Создать аватара» tile on home takes its own full row (no lonely 5th tile) */
.h2-kinds .h2-avatar { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 12px; min-height: 0; padding-top: 12px; padding-bottom: 12px; text-decoration: none; }

/* showcase-1029 (v18): Bars clips, trend cards 4:5, avatar sheet example, product before/after. */
.bars-clip { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 0; background: transparent; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse 62% 56% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 62% 56% at 50% 50%, #000 62%, transparent 100%); }
.guide-copy { position: relative; }
.bars-clip.clip-hero { float: right; width: 132px; margin: 0 0 8px 16px; shape-outside: inset(0 round 18px); }
.bars-clip.clip-sm { width: 96px; flex: 0 0 96px; }
.gift-hero .bars-clip { width: min(100%, 300px); filter: drop-shadow(0 18px 40px #7b4dff66); }
.gift-mini .gift-hero .bars-clip { width: 150px; }
.trend-grid .trend-card .blur-fill, .trend-grid .trend-card > img { aspect-ratio: 4 / 5; width: 100%; }
.trend-grid .trend-card .trend-fill { position: relative; aspect-ratio: 4 / 5; width: 100%; overflow: hidden; border-radius: 14px; background: var(--elevated); isolation: isolate; }
.trend-grid .trend-card .trend-fill::before { content: ""; position: absolute; inset: -12%; background: var(--fill) center / cover no-repeat; filter: blur(22px) brightness(.6) saturate(1.15); z-index: -1; }
.trend-grid .trend-card .trend-fill > img, .trend-grid .trend-card img { position: relative; width: 100%; height: 100%; max-height: none; aspect-ratio: 4 / 5; object-fit: contain !important; object-position: 50% 50% !important; border-radius: 0; }
.avatar-example { margin: 0; }
.avatar-example img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 16px; }
.avatar-example figcaption { margin-top: 6px; font-size: 13px; }
.oc-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.oc-ba > span { position: relative; display: block; }
.oc-ba img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
.oneclick-detail .oc-ba { max-width: 520px; }
@media (max-width: 759px) {
  .bars-clip.clip-hero { width: 92px; margin-left: 10px; }
  .bars-clip.clip-sm { width: 80px; flex-basis: 80px; }
  .gift-hero .bars-clip { width: min(60vw, 230px); }
  .gift-mini .gift-hero .bars-clip { width: 96px; }
}
@media (prefers-reduced-motion: reduce) { .bars-clip { animation: none; } }

/* share-bonus-1029 */
.share-hint{margin:.6rem 0;padding:.6rem .8rem;border-radius:12px;background:rgba(45,212,191,.08);border:1px solid rgba(45,212,191,.25);font-size:.92rem;line-height:1.4}
.share-hint.ok{background:rgba(45,212,191,.12)}
.share-left{font-weight:600;color:var(--accent,#2dd4bf)}
.btn.share-gallery{background:linear-gradient(135deg,#14b8a6,#0ea5e9);color:#fff}
.share-sheet{max-width:520px}
.share-sheet .share-rules{padding-left:1.1rem;margin:.6rem 0}
.share-sheet .sheet-actions{display:flex;gap:.6rem;flex-wrap:wrap}
.share-banner{display:flex;gap:.6rem;align-items:center;border:1px solid rgba(250,204,21,.35);background:rgba(250,204,21,.07)}
.star-pick{border:0;padding:0;margin:0 0 .6rem;display:inline-flex;flex-direction:row-reverse;gap:.2rem}
.star-pick legend{width:100%;margin-bottom:.3rem}
.star-pick input{position:absolute;opacity:0;width:1px;height:1px}
.star-pick label{font-size:2rem;cursor:pointer;color:#475569;line-height:1}
.star-pick input:checked~label,.star-pick label:hover,.star-pick label:hover~label{color:#facc15}
.star-pick input:focus-visible+label{outline:2px solid #2dd4bf;border-radius:4px}
.review-form textarea{width:100%;margin:.4rem 0 .6rem}
.share-review .stars{font-size:1.4rem;color:#facc15}

/* share-bonus-1029 v2: author fee, author stats, mobile fixes */
.btn.share-gallery .sicon{--sec:#fff;color:#fff}
.fee-box{margin:.4rem 0 .8rem;padding:.6rem .8rem;border-radius:12px;border:1px solid rgba(45,212,191,.3);background:rgba(45,212,191,.07)}
.fee-box p{margin:.15rem 0}
.fee-incl{font-weight:700;color:var(--accent,#2dd4bf)}
.author-stats .as-sum{display:grid;grid-template-columns:1fr 1fr;gap:.6rem;margin:.6rem 0}
.author-stats .as-sum div{padding:.6rem .8rem;border-radius:12px;background:rgba(45,212,191,.08)}
.author-stats .as-sum span{display:block;font-size:.85rem;color:var(--muted)}
.author-stats .as-sum b{font-size:1.25rem}
.author-stats .as-row{margin:.8rem 0}
.author-stats .as-head{display:flex;justify-content:space-between;margin:0 0 .3rem}
.as-bar{height:10px;border-radius:999px;background:rgba(148,163,184,.2);overflow:hidden}
.as-bar i{display:block;height:100%;min-width:4px;border-radius:inherit;background:linear-gradient(90deg,#14b8a6,#0ea5e9)}
.share-sheet,.share-sheet *{box-sizing:border-box}
.share-sheet .sheet-actions .btn{flex:1 1 180px;min-width:0;margin:0}
@media (max-width:759px){
  .share-sheet .sheet-actions{flex-direction:column;align-items:stretch;gap:8px;position:sticky;bottom:calc(-16px - env(safe-area-inset-bottom));margin:0 -16px;padding:10px 16px calc(16px + env(safe-area-inset-bottom));background:var(--bg);box-shadow:0 -10px 18px -12px rgba(0,0,0,.6)}
  dialog.sheet.share-sheet{max-height:min(92dvh,760px)}
  .share-sheet .share-rules{margin:.4rem 0}
  .share-sheet .sheet-actions .btn{flex:none;width:100%}
  dialog.sheet.share-sheet{padding-left:16px;padding-right:16px;overflow-x:hidden}
  .work-primary .btn{scroll-margin-bottom:calc(84px + env(safe-area-inset-bottom))}
  body:has(.bottom-nav) .work-viewer, body:has(.bottom-nav) .gal-repeat, body:has(.bottom-nav) .gen-page{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
}


/* teaser-v4-1109: homepage brand teaser (vertical 9:16, muted loop)
   Mobile: centered video-only card. Desktop ≥900: two columns fill content width. */
.home-teaser{padding:4px 0 28px}
.home-teaser-card{margin:0 auto;padding:14px;width:min(100%,300px);border-radius:var(--r-xl,24px);border:1px solid color-mix(in srgb,var(--accent,#2dd4bf) 30%,transparent);background:color-mix(in srgb,var(--surface,#0f1a2c) 80%,transparent);box-sizing:border-box}
.home-teaser-media{position:relative;aspect-ratio:9/16;border-radius:var(--r-lg,18px);overflow:hidden;background:#070d18}
.home-teaser-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;background:#070d18}
.home-teaser-poster{position:absolute;inset:0;z-index:1;display:none;margin:0}
.home-teaser-poster.is-shown{display:block}
.home-teaser-poster img{width:100%;height:100%;object-fit:cover;display:block;aspect-ratio:9/16}
.home-teaser-video{z-index:0}
.home-teaser-copy{display:none}
.home-teaser-title{font-family:var(--sans);font-weight:700;font-size:clamp(24px,2.6vw,34px);margin:0 0 12px;line-height:1.2}
.home-teaser-p{margin:0 0 10px;color:var(--muted);font-size:15px;line-height:1.45;max-width:38em}
.home-teaser-p:last-of-type{margin-bottom:16px}
.home-teaser-note{margin:10px 0 0;font-size:13px}
.home-teaser-copy .btn{margin-top:2px}
@media (min-width:760px) and (max-width:899px){
  .home-teaser-card{width:min(100%,340px);padding:12px}
}
@media (min-width:900px){
  .home-teaser{padding:8px 0 36px}
  .home-teaser-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:28px 40px;align-items:center;width:100%;max-width:none;padding:22px 28px}
  .home-teaser-media{width:auto;height:min(520px,70vh);max-height:520px;aspect-ratio:9/16;justify-self:start}
  .home-teaser-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-width:0}
}
@media (max-width:759px){
  .home-teaser{padding:0 0 20px}
  .home-teaser-card{width:min(100%,300px);padding:10px}
}
@media (prefers-reduced-motion:reduce){
  .home-teaser-video{display:none!important}
  .home-teaser-poster,.home-teaser-poster.is-shown{display:block}
}
