/* Sparkade (до 5.5 — GameForge) — тёмная игровая витрина (с версии 5.4).
   Почти чёрный тёплый фон, один яркий цвет — раскалённый металл горна (только главные действия и мелкие метки),
   узкий крупный Oswald заглавными для заголовков, Golos Text для текста. Без градиентного текста, эмодзи и «таблеток». */
:root {
  --paper: #0c0b0a;       /* фон страницы */
  --tint: #161411;        /* карточки, поля */
  --tint2: #1e1b17;       /* наведение, вложенные блоки */
  --hair: #2b2824;        /* линии */
  --hair2: #3d3832;       /* рамки кнопок */
  --ink: #efe9df;         /* текст */
  --grey: #a59c8f;        /* второстепенный текст */
  --faint: #8a8276;       /* подписи */
  --accent: #ff6b1a;      /* огонь горна: главные действия */
  --accent-hot: #ff8f4d;
  --accent-ink: #140a04;
  --ok: #4cc38a;
  --bad: #ff6a64;
  --warn: #f0a63a;
  --screen: #000000;      /* окно игры */
  --radius: 6px;
  --r-sm: 4px;
  --display: Oswald, "Bahnschrift Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --body: "Golos Text", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  /* совместимость со старыми именами переменных (страница моделей, консоль, старые вставки) */
  --bg: var(--paper); --bg2: var(--tint); --panel: var(--tint); --line: var(--hair);
  --text: var(--ink); --muted: var(--grey); --accent2: var(--accent);
  --ultra: var(--accent); --acid: var(--accent-hot); --hot: var(--accent); --pink: #f29bbd; --mint: var(--ok);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: clip; }   /* 6.4: робот на главной и широкие блоки не дают прокрутку вбок (ноутбуки 1280–1366, телефон) */
body { background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--grey); }
.small { font-size: 14px; }
.err { color: var(--bad); }
button, textarea, input, select { font: inherit; color: inherit; }
a { color: inherit; }
a:hover { color: var(--accent-hot); }
::selection { background: rgba(255, 107, 26, .35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { accent-color: var(--accent); }
::placeholder { color: var(--faint); opacity: 1; }
code { font-family: var(--mono); font-size: .9em; background: var(--tint2); padding: 1px 5px; border-radius: 3px; }
h1, h2, h3, h4 { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- шапка */
.top { position: sticky; top: 0; z-index: 40; background: rgba(12, 11, 10, .9); backdrop-filter: blur(10px); border-bottom: 1px solid #221f1b; }
.top-in { max-width: var(--page, 1360px); margin: 0 auto; padding: 0 40px; height: 68px; display: flex; align-items: center; gap: 40px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font: 600 21px/1 var(--display); letter-spacing: .08em; }
.logo:hover { color: var(--ink); }
.logo-mark { color: var(--ink); flex: none; }
.top-nav { display: flex; align-items: center; gap: 28px; }
.top-link { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--grey); padding: 6px 0; border-bottom: 2px solid transparent; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
.top-link:hover { color: var(--ink); }
.top-link.active { color: var(--ink); border-bottom-color: var(--accent); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.top-cta { text-decoration: none; font-size: 15px; color: var(--ink); border: 1px solid var(--hair2); padding: 9px 16px; border-radius: var(--r-sm); white-space: nowrap; }
.top-cta:hover, .top-cta.active { border-color: var(--ink); color: var(--ink); }
.install-btn { white-space: nowrap; }
.owner-menu { position: relative; }
.owner-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--grey); padding: 6px 0; }
.owner-menu summary::-webkit-details-marker { display: none; }
.owner-menu summary:hover, .owner-menu[open] summary { color: var(--ink); }
.owner-menu[open] summary .om-chev { transform: rotate(180deg); }
.om-burger, .om-only { display: none !important; }
.top-link { white-space: nowrap; }
.owner-pop { position: absolute; right: 0; top: calc(100% + 12px); min-width: 280px; background: var(--tint); border: 1px solid var(--hair); border-radius: var(--radius);
  padding: 10px; display: grid; gap: 2px; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.owner-pop .top-link { display: block; padding: 9px 10px; border: 0; border-radius: var(--r-sm); color: var(--ink); }
.owner-pop .top-link:hover { background: var(--tint2); }
.owner-pop .top-link.active { background: var(--tint2); color: var(--accent-hot); }
.chips { display: grid; gap: 8px; padding: 10px 10px 4px; margin-top: 6px; border-top: 1px solid var(--hair); }
.chip { font-size: 13px; color: var(--grey); display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; text-align: left; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--grey); flex: none; }
.chip.on i { background: var(--ok); }
.chip.warn { cursor: help; }
.chip.warn i { background: var(--warn); }
.dbg-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px;
  background: var(--bad); color: #1a0505; font: 700 11px/1 var(--body); vertical-align: 1px; }

/* ---------- раскладка */
.layout { min-height: calc(100vh - 68px); }
.main { max-width: var(--page, 1360px); margin: 0 auto; padding: 0 40px 96px; }

/* ---------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--hair2);
  background: transparent; border-radius: var(--r-sm); padding: 10px 18px; font-weight: 500; font-size: 15px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hot); border-color: var(--accent-hot); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--grey); }
.btn-ghost:hover { color: var(--ink); border-color: var(--hair2); }
.btn-big { padding: 15px 28px; font-size: 17px; }
.btn-small { padding: 5px 10px; font-size: 12px; }
.wide { width: 100%; }
.link-btn { all: unset; cursor: pointer; color: var(--accent-hot); font-size: 14px; justify-self: start; }
.link-btn:hover { text-decoration: underline; }

/* ---------- главная: Форж в свете горна и одно поле */
.composer { padding-top: 0; }
.hero { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 72px 0 88px; border-bottom: 1px solid #221f1b; }   /* 7.2: без обрезки — робот может выходить за край колонки (обрезает только край окна: html { overflow-x: clip }) */
.hero-main { flex: 1 1 560px; min-width: 0; position: relative; z-index: 2; }
.eyebrow { margin: 0 0 22px; font: 500 15px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.hero-title { margin: 0; font: 700 clamp(52px, 6.4vw, 96px)/1.05 var(--display);   /* 1.05: кратка «Й» не налезает на строку выше */ letter-spacing: .005em; text-transform: uppercase; }
.hero-lead { margin: 28px 0 36px; max-width: 540px; font-size: 19px; line-height: 1.55; color: var(--grey); }
.composer-box { max-width: 660px; background: var(--tint); border: 1px solid var(--hair); border-radius: var(--radius); transition: border-color .15s; }
.composer-box:focus-within { border-color: #5a5249; }
.composer-top { display: flex; align-items: baseline; gap: 12px; padding: 16px 16px 0 20px; }
.composer-label { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); margin-right: auto; }
#prompt { display: block; width: 100%; resize: none; border: 0; outline: none; background: transparent; color: var(--ink);
  font: 400 18px/1.5 var(--body); padding: 10px 20px 16px; min-height: 96px; caret-color: var(--accent); overflow: hidden; }
#prompt.long { font-size: 16px; min-height: 120px; max-height: 360px; overflow-y: auto; }
.composer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 12px 12px 14px; border-top: 1px solid var(--hair); }
.seg { display: inline-flex; gap: 3px; background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 3px; }
.seg-opt { border: 0; background: transparent; color: var(--grey); border-radius: 3px; padding: 7px 12px; font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; }
.seg-opt:hover { color: var(--ink); }
.seg-opt.on { background: var(--ink); color: var(--paper); }
.tool-btn { border: 0; background: none; color: var(--grey); padding: 2px 4px; font-size: 14px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--hair2); text-underline-offset: 4px; }
.tool-btn:hover:not(:disabled) { color: var(--ink); text-decoration-color: var(--ink); }
.tool-btn:disabled { opacity: .7; cursor: progress; }
.btn-create { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border: 0; border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-ink); font: 600 18px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  transition: background .15s, transform .15s; }
.btn-create:hover { background: var(--accent-hot); }
.btn-create:hover svg { transform: translateX(3px); }
.btn-create svg { transition: transform .15s; }
.btn-create:disabled { opacity: .55; cursor: default; }
.hero-try { margin: 18px 0 0; font-size: 15px; color: var(--faint); max-width: 660px; line-height: 1.9; }
.examples { display: inline; }
.example { border: 0; background: none; padding: 0; cursor: pointer; color: var(--grey); text-decoration: underline; text-decoration-color: var(--hair2); text-underline-offset: 4px; font-size: 15px; }
.example:hover { color: var(--ink); text-decoration-color: var(--accent); }
.ex-dot { color: var(--faint); }
.hero-note { margin: 10px 0 0; font-size: 14px; color: var(--faint); max-width: 620px; }
/* Форж: портрет-рендер детальной модели, огонь снизу, искры; чуть поворачивается за мышью */
.hero-art { flex: 1 1 420px; min-width: 0; position: relative; display: flex; justify-content: center; align-items: center; min-height: 520px; --mx: 0; --my: 0; }
.hero-figure { position: relative; z-index: 1; width: 112%; max-width: 680px; margin-right: -12%;
  transform: translate(calc(var(--mx) * -14px), calc(var(--my) * -10px)) rotate(calc(var(--mx) * 1.2deg)); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.hero-figure img { display: block; width: 100%; height: auto; }
@media (max-width: 1420px) { .hero-figure { width: 100%; margin-right: 0; } }   /* 7.2: на ноутбуке и при увеличении робот целиком помещается в окно */
.hero-glow { position: absolute; left: 4%; right: -10%; bottom: -14%; height: 72%; z-index: 0;
  background: radial-gradient(closest-side, rgba(255,107,26,.24), rgba(255,107,26,.07) 55%, rgba(12,11,10,0) 100%); animation: forge-breath 5s ease-in-out infinite; }
.hero-eyes { position: absolute; z-index: 2; pointer-events: none; left: 53%; top: 41%; width: 40%; height: 18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,150,60,.32), rgba(255,120,30,0)); mix-blend-mode: screen; animation: forge-eyes 6s ease-in-out infinite; }
.ember { position: absolute; z-index: 2; width: 3px; height: 3px; border-radius: 50%; background: #ffc27a; box-shadow: 0 0 6px 1px rgba(255,120,30,.9);
  bottom: 18%; left: 50%; opacity: 0; animation: ember-up 4.5s linear infinite; pointer-events: none; }
.ember.e1 { left: 38%; animation-delay: .2s; } .ember.e2 { left: 55%; animation-delay: 1.4s; animation-duration: 5.2s; }
.ember.e3 { left: 68%; animation-delay: 2.3s; } .ember.e4 { left: 47%; animation-delay: 3.1s; animation-duration: 3.8s; }
.ember.e5 { left: 77%; animation-delay: 3.9s; animation-duration: 5.6s; }
@keyframes ember-up { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 10% { opacity: 1; } 70% { opacity: .8; } 100% { opacity: 0; transform: translate(-30px, -300px) scale(.4); } }
@keyframes forge-breath { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes forge-eyes { 0%, 100% { opacity: .9; } 46% { opacity: 1; } 48% { opacity: .2; } 50% { opacity: 1; } }

/* ---------- заголовки разделов */
.sec-head, .gallery-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; margin: 72px 0 24px; }
.sec-head h2, .gallery-head h2 { margin: 0; font: 600 34px/1.05 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.sec-head p { margin: 0; font-size: 15px; color: var(--faint); }
.sec-link { margin-left: auto; font-size: 15px; color: var(--grey); text-underline-offset: 4px; }
.gallery-count:not(:empty) { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 13px;
  background: var(--tint2); color: var(--grey); font: 600 14px/1 var(--body); align-self: center; }

/* ---------- витрина «Сыграйте сейчас» */
.featured { display: flex; flex-wrap: wrap; background: var(--tint); border: 1px solid #221f1b; border-radius: var(--radius); overflow: hidden; }
.featured-media { all: unset; box-sizing: border-box; cursor: pointer; flex: 999 1 640px; min-width: 0; aspect-ratio: 16 / 9; position: relative; overflow: hidden; background: #000; }
.featured-media img, .featured-media .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.featured-media:hover img { transform: scale(1.03); }
.featured-media:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.featured-body { flex: 1 1 360px; min-width: 0; padding: 36px 36px 32px; display: flex; flex-direction: column; gap: 16px; }
.kicker { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.featured-body h3 { margin: 0; font: 700 44px/1 var(--display); text-transform: uppercase; }
.featured-desc { margin: 0; font-size: 17px; line-height: 1.55; color: #c9c1b4; }
.featured-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 12px; }
.btn-play { height: 48px; padding: 0 22px; font: 600 17px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; gap: 10px; }
.play-badge { position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(12,11,10,.72); color: var(--ink); border: 1px solid rgba(239,233,223,.35); padding-left: 2px; backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s, background .2s, color .2s; }
.featured-media .play-badge { width: 64px; height: 64px; right: 20px; bottom: 20px; opacity: 1; transform: none; }
.featured-media:hover .play-badge, .sample-play:hover .play-badge, .friend-card:hover .play-badge, .sample-play:focus-visible .play-badge { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); opacity: 1; transform: none; }

/* ---------- сетка образцов */
.samples-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px 24px; }
.sample-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sample-play { all: unset; box-sizing: border-box; cursor: pointer; display: block; border-radius: var(--r-sm); margin-bottom: 10px; }
.sample-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sample-card > b { font-weight: 600; font-size: 17px; line-height: 1.25; }
.sample-kind { font-size: 14px; color: var(--grey); }
.sample-warn { font-size: 13px; color: var(--warn); }
.sample-actions { display: flex; gap: 2px 16px; flex-wrap: wrap; margin-top: 6px; }
.sample-btn { border: 0; background: none; padding: 4px 0; cursor: pointer; font-size: 14px; color: var(--grey); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.sample-btn:hover { color: var(--ink); text-decoration-color: var(--accent); }
.sample-btn:first-child { color: var(--ink); }
.more-btn { display: flex; margin: 32px auto 0; }

/* ---------- обложки игр */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 36px 24px; }
.gallery-empty { grid-column: 1 / -1; display: grid; gap: 6px; padding: 32px; border: 1px dashed var(--hair2); border-radius: var(--radius); color: var(--grey); font-size: 16px; }
.gallery-empty b { font: 600 22px/1.2 var(--display); text-transform: uppercase; color: var(--ink); }
.game-card { display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
.game-card:hover { color: var(--ink); }
.game-card b { font-weight: 600; font-size: 17px; line-height: 1.25; margin-top: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-card > span { color: var(--grey); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-sm); overflow: hidden; background: var(--tint); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .3s; }
.game-card:hover .cover img, .sample-play:hover .cover img, .game-card:focus-visible .cover img { transform: scale(1.04); }
.cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(239,233,223,.06); pointer-events: none; }
.cover-tag { position: absolute; left: 10px; top: 10px; z-index: 2; background: rgba(12,11,10,.78); color: var(--ink); font: 500 12px/1 var(--body);
  padding: 6px 8px; border-radius: 3px; letter-spacing: .02em; backdrop-filter: blur(4px); }
.poster { position: absolute; inset: 0; background: var(--bg); color: var(--fg); padding: 18px; display: flex; align-items: flex-end; overflow: hidden; }
.poster::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 10px); }
.poster span { position: relative; z-index: 1; font: 700 clamp(22px, 2.4vw, 34px)/.98 var(--display); text-transform: uppercase; letter-spacing: .01em; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover-state { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 3px; background: rgba(12,11,10,.85); color: var(--ink); font-size: 13px; font-weight: 500; backdrop-filter: blur(4px); }
.cover-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; animation: beat .7s ease-in-out infinite alternate; }
.cover-state.bad { color: var(--bad); }
@keyframes beat { from { transform: scale(.6); opacity: .5; } to { transform: scale(1.2); opacity: 1; } }
.cover.is-working img { filter: saturate(.3) brightness(.7); }
.cover.is-working::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(110deg, transparent 30%, rgba(255,140,60,.14) 50%, transparent 70%);
  background-size: 250% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.rate { font-size: 13px; font-weight: 500; color: var(--ink); }
.rate i { font-style: normal; color: var(--accent-hot); }
.rate.none { color: var(--faint); font-weight: 400; }
.game-card .rate { margin-top: -2px; }

/* ---------- игры друзей */
.community-sub { flex-basis: 100%; margin: 0; color: var(--faint); font-size: 15px; }
.friend-card { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 4px; width: 100%; color: var(--ink); }
.friend-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
.friend-card b { font-weight: 600; font-size: 17px; margin-top: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-card .by { color: var(--grey); font-size: 14px; }

/* ---------- как это работает и «игра — ваша» */
.how { margin-top: 96px; }
.how h2 { margin: 0 0 32px; font: 600 34px/1.05 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--hair); }
.how-steps li { padding: 28px 32px 8px; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--hair); }
.how-steps li:first-child { padding-left: 0; border-left: 0; }
.how-n { font: 500 15px/1 var(--display); letter-spacing: .12em; color: var(--accent); }
.how-steps b { font: 600 24px/1.1 var(--display); text-transform: uppercase; }
.how-steps li > span:last-child { font-size: 16px; line-height: 1.55; color: var(--grey); }
.band { margin-top: 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; padding: 40px; border: 1px solid var(--hair); border-radius: var(--radius); background: var(--tint); }
.band > div { flex: 1 1 520px; min-width: 0; }
.band h2 { margin: 0 0 10px; font: 600 30px/1.1 var(--display); text-transform: uppercase; }
.band p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--grey); }
@media (max-width: 860px) {
  .how-steps li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--hair); }
  .how-steps li:last-child { border-bottom: 0; }
}

/* ---------- окно игры-образца */
.sample-modal { position: fixed; inset: 0; z-index: 500; background: rgba(5, 4, 3, .82); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(6px); }
.sample-modal.hidden { display: none; }
.sample-box { width: min(1180px, 100%); background: var(--tint); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.6);
  overflow: hidden; overflow-y: auto; display: flex; flex-direction: column; max-height: 100%; }
.sample-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--hair); }
.sample-top b { font: 600 24px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.sample-genre { font-size: 13px; color: var(--grey); }
.sample-sp { flex: 1; }
.sample-close, .sample-full { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--hair2); background: transparent; color: var(--ink); cursor: pointer; }
.sample-close:hover, .sample-full:hover { border-color: var(--ink); }
.sample-view { position: relative; aspect-ratio: 16 / 9; background: #000; max-height: calc(100vh - 170px); }
.sample-view iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sample-view:fullscreen { max-height: none; aspect-ratio: auto; }
.sample-note { margin: 0; padding: 12px 20px 16px; font-size: 14px; color: var(--grey); }
.sample-box.is-friend .sample-note { display: none; }
body.modal-open { overflow: hidden; }
@media (max-width: 760px), (max-height: 560px) {
  .sample-modal { padding: 0; place-items: stretch; }
  .sample-box { width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .sample-top { padding: 8px 10px; gap: 6px; flex-wrap: nowrap; }
  .sample-top b { font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .sample-genre, .sample-sp, .sample-note { display: none; }
  .sample-top .btn { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
  #sample-similar { display: none; }
  .sample-view { flex: 1 1 auto; aspect-ratio: auto; max-height: none; min-height: 0; }
  .sample-box.is-friend .sample-view { flex: 0 0 auto; height: 62dvh; }
  .sample-full, .sample-close { width: 36px; height: 36px; flex: 0 0 auto; }
}

/* ---------- отзывы */
.reviews { display: flex; flex-direction: column; gap: 12px; }
#sample-reviews { padding: 4px 20px 20px; border-top: 1px solid var(--hair); }
#sample-reviews:not(.hidden) { padding-top: 16px; }
.rv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--grey); }
.rv-head b { color: var(--ink); }
.rv-score { font: 600 28px/1 var(--display); color: var(--ink); }
.rv-score i, .rv-st { font-style: normal; color: var(--accent-hot); }
.rv-share { font-size: 14px; }
.rv-form { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--hair); border-radius: var(--radius); background: var(--paper); }
.rv-form textarea, .rv-name { width: 100%; box-sizing: border-box; border: 1px solid var(--hair2); background: var(--tint); border-radius: var(--r-sm); padding: 9px 11px; font: 15px/1.4 var(--body); resize: vertical; }
.rv-form textarea:focus, .rv-name:focus { outline: none; border-color: var(--grey); }
.rv-stars { display: flex; gap: 2px; }
.rv-stars button { all: unset; cursor: pointer; font-size: 28px; line-height: 1; color: #4a443d; padding: 0 2px; transition: transform .1s, color .1s; }
.rv-stars button.on { color: var(--accent-hot); }
.rv-stars button:hover { transform: scale(1.12); }
.rv-stars button:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.rv-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rv-err:empty { display: none; }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rv-item { padding: 12px 14px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--hair); }
.rv-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-st { letter-spacing: 1px; }
.rv-item p { margin: 6px 0 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rv-del { all: unset; cursor: pointer; margin-left: auto; color: var(--grey); padding: 0 4px; }
.rv-del:hover { color: var(--bad); }
#reviews-card .rv-form { background: transparent; }
.rv-me { display: flex; align-items: flex-end; gap: 8px; }
.rv-me label { flex: 1; display: grid; gap: 4px; color: var(--grey); }

/* ---------- страница игры */
.project { padding-top: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--grey); text-decoration: none; font-size: 15px; }
.back-link:hover { color: var(--ink); }
.project-head { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 16px 0 24px; flex-wrap: wrap;
  padding: 0 0 22px; border-bottom: 1px solid var(--hair); }
.project-head h2 { font: 700 clamp(34px, 4.4vw, 60px)/1 var(--display); margin: 0; letter-spacing: .01em; text-transform: uppercase; }
.project-head p { margin: 10px 0 0; font-size: 17px; color: var(--grey); max-width: 70ch; }
.versions { display: flex; gap: 6px; flex-wrap: wrap; }
.versions button { font-size: 13px; font-weight: 500; padding: 6px 11px; border-radius: var(--r-sm); border: 1px solid var(--hair2); background: transparent; cursor: pointer; color: var(--grey); }
.versions button:hover { color: var(--ink); border-color: var(--ink); }
.versions button.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.versions button.rejected { text-decoration: line-through; opacity: .7; }

.stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.viewport { position: relative; aspect-ratio: 16 / 9; background: var(--screen); border-radius: var(--radius); overflow: hidden; color: #fff; border: 1px solid var(--hair); }
.viewport iframe, .viewport canvas { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.viewport.is-full { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; border: 0; }
.viewport-badge { position: absolute; left: 12px; top: 12px; z-index: 3; pointer-events: none; font-size: 13px; padding: 6px 10px; border-radius: 3px;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px); max-width: 70%; color: #fff; }
.vp-tools { position: absolute; right: 12px; bottom: 12px; z-index: 6; display: flex; gap: 6px; }
.vp-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-sm); border: 0; background: rgba(0,0,0,.6);
  color: #fff; cursor: pointer; backdrop-filter: blur(6px); transition: background .15s, opacity .25s; }
.vp-btn:hover { background: var(--accent); color: var(--accent-ink); }
.vp-btn .i-close, .viewport.is-full .vp-btn .i-open { display: none; }
.viewport.is-full .vp-btn .i-close { display: block; }
.viewport.is-full .vp-tools { opacity: .45; }
.viewport.is-full.tools-on .vp-tools, .viewport.is-full .vp-tools:hover, .viewport.is-full .vp-tools:focus-within { opacity: 1; }
.vp-btn.vp-edit { width: auto; padding: 0 12px 0 10px; gap: 6px; display: inline-flex; align-items: center; font: 500 13px var(--body); color: #fff; }
.vp-btn.vp-edit.hidden { display: none; }
.vp-btn.vp-edit.on { background: var(--accent); color: var(--accent-ink); }
.viewport.editing .vp-tools, .viewport.editing .viewport-badge { display: none; }
.progress { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; color: #fff;
  background: radial-gradient(ellipse at 50% 70%, #24170f 0%, #0a0908 70%); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--accent); animation: spin 1s linear infinite; }
.spinner.small { width: 18px; height: 18px; border-width: 2px; flex: none; border-color: var(--hair2); border-top-color: var(--accent); }
.spinner.inline { display: inline-block; vertical-align: -3px; width: 14px; height: 14px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
#progress-text { font: 600 22px/1.2 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: rgba(255,255,255,.5); font-size: 15px; text-align: left; }
.steps li::before { content: "○"; margin-right: 8px; }
.steps li.now { color: #fff; } .steps li.now::before { content: "●"; color: var(--accent); }
.steps li.ok { color: #fff; } .steps li.ok::before { content: "✓"; color: var(--ok); }
/* Окно «Не удалось создать игру» — ТОЛЬКО #error-box (общий класс .error когда-то совпадал со строками консоли — «красный экран») */
#error-box { position: absolute; inset: 0; padding: 32px; overflow: auto; color: #fff; font-size: 15px; white-space: pre-wrap; background: #170a09; }
#error-box .btn { margin-top: 10px; }

.panel { display: grid; gap: 14px; align-content: start; min-width: 0; }
.panel > * { min-width: 0; }
.card { background: var(--tint); border: 1px solid var(--hair); border-radius: var(--radius); padding: 18px; overflow-wrap: anywhere; }
.card h4 { margin: 0 0 12px; font: 600 17px/1.2 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.card textarea { width: 100%; resize: vertical; background: var(--paper); border-radius: var(--r-sm); border: 1px solid var(--hair2); margin-bottom: 10px; font-size: 15px; padding: 12px; outline: none; }
.card textarea:focus { border-color: var(--grey); }
.downloads { display: grid; gap: 6px; }
.dl { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--hair);
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.dl:hover { border-color: var(--grey); color: var(--ink); }
.dl span { color: var(--grey); font-size: 13px; font-weight: 400; }
.dl.off { opacity: .45; pointer-events: none; }
.notes { margin: 0; padding-left: 18px; color: var(--grey); font-size: 15px; display: grid; gap: 6px; }
.g-status { font-size: 15px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--hair); margin-bottom: 10px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 24px; }
.spec-grid .card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.row span:last-child { color: var(--grey); text-align: right; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--hair2); }
.item-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.item-name i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.stats { font-size: 13px; color: var(--grey); }
.prompt-details { margin-top: 24px; color: var(--grey); }
.prompt-details summary { cursor: pointer; color: var(--ink); font-weight: 500; }
.prompt-details .h { padding: 12px 0; border-bottom: 1px solid var(--hair); }
.prompt-details .h b { color: var(--ink); margin-right: 8px; }
.danger-zone { margin-top: 28px; }
#delete:hover { color: var(--bad); border-color: var(--bad); }
.check { border-radius: var(--r-sm); padding: 9px 12px; margin: 0 0 10px; font-size: 14px; line-height: 1.4; border: 1px solid; }
.check ul { margin: 6px 0 4px 18px; padding: 0; }
.check-ok { background: rgba(76,195,138,.08); border-color: rgba(76,195,138,.35); color: #a9e7c8; }
.check-warn { background: rgba(240,166,58,.08); border-color: rgba(240,166,58,.4); color: #f4cd92; }
.check-skip { background: var(--paper); border-color: var(--hair); color: var(--grey); }
.retry-btn, .revert-btn { margin-top: 10px; width: 100%; }
.revert-btn { margin: 0 0 10px; }
.retry-chip { display: flex; gap: 8px; align-items: flex-start; background: rgba(240,166,58,.08); border: 1px solid rgba(240,166,58,.35); color: #f4cd92; border-radius: var(--r-sm);
  padding: 8px 10px; margin-bottom: 8px; font-size: 13px; line-height: 1.35; }
.retry-chip span { flex: 1; }
.retry-chip button { border: 0; background: transparent; cursor: pointer; font-size: 15px; color: inherit; }
#guard-box .check { margin-bottom: 10px; }
.h-cost { display: inline-block; margin-left: 6px; font: 600 12px/1.6 var(--mono); color: var(--grey); background: var(--paper); border: 1px solid var(--hair); border-radius: 3px; padding: 0 6px; white-space: nowrap; }
.h-total { margin-top: 8px; }
.audit-box ul { margin: 6px 0 8px 18px; padding: 0; }
.audit-box .btn { margin-top: 4px; }
.used-models { display: flex; gap: 6px; flex-wrap: wrap; }
.used-models img { width: 56px; height: 56px; object-fit: contain; border-radius: var(--r-sm); background: var(--paper); }
.warn-card { border-color: rgba(240,166,58,.45); }
.warn-card .btn { margin-top: 8px; }
.bug-form { margin-top: 10px; }
.bug-form summary { cursor: pointer; font-size: 14px; color: var(--grey); }
.bug-form textarea { width: 100%; margin: 8px 0; border: 1px solid var(--hair2); border-radius: var(--r-sm); padding: 8px 10px; resize: vertical; background: var(--paper); }

/* ---- скриншоты к доработке ---- */
.shot-drop { position: relative; border-radius: var(--r-sm); margin-bottom: 10px; transition: box-shadow .15s; }
.shot-drop.drag { box-shadow: 0 0 0 2px var(--accent); }
.shot-drop.drag::after { content: "Отпустите — скриншот прикрепится"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(255,107,26,.9); color: var(--accent-ink); font-weight: 600; border-radius: var(--r-sm); pointer-events: none; }
.shot-drop textarea { margin-bottom: 8px !important; }
.shot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.shot-list:not(:empty) { margin-bottom: 8px; }
.shot { position: relative; width: 72px; height: 54px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--hair2); background: var(--paper); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.75);
  color: #fff; font-size: 11px; line-height: 20px; padding: 0; cursor: pointer; }
.shot-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shot-add { border: 1px solid var(--hair2); background: transparent; border-radius: var(--r-sm); padding: 5px 12px; font-weight: 500; font-size: 14px; cursor: pointer; }
.shot-add:hover:not(:disabled) { border-color: var(--ink); }
.shot-add:disabled { opacity: .45; cursor: default; }
.shot-hint { color: var(--faint); font-size: 13px; }
.h-shots { display: flex; gap: 6px; margin-top: 6px; }
.h-shots img { width: 54px; height: 40px; object-fit: cover; border-radius: 3px; border: 1px solid var(--hair); display: block; }

/* ---------- черновик игры (шаблонный шутер) — интерфейс поверх игры */
.play-root { position: absolute; inset: 0; background: #05060a; }
.play-root .g-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.play-fail { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #aaa; padding: 20px; }
.g-hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--body); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.g-flash { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(200,0,0,.9)); opacity: 0; }
.g-top { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; font-weight: 700; font-size: clamp(12px, 1.5vw, 16px); }
.g-cross { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.g-cross i { position: absolute; background: rgba(255,255,255,.9); }
.g-cross i:nth-child(1) { width: 2px; height: 9px; left: -1px; top: -16px; }
.g-cross i:nth-child(2) { width: 2px; height: 9px; left: -1px; top: 7px; }
.g-cross i:nth-child(3) { width: 9px; height: 2px; left: 7px; top: -1px; }
.g-cross i:nth-child(4) { width: 9px; height: 2px; left: -16px; top: -1px; }
.g-hit { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid #fff; transform: rotate(45deg); opacity: 0; }
.g-banner { position: absolute; top: 26%; width: 100%; text-align: center; font-family: var(--display); text-transform: uppercase; font-size: clamp(18px, 3.4vw, 36px); color: #fff; opacity: 0; transition: opacity .3s; }
.g-toast { position: absolute; bottom: 22%; width: 100%; text-align: center; font-weight: 700; opacity: 0; transition: opacity .3s; }
.g-bottom { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; justify-content: space-between; align-items: flex-end; }
.g-hp b { font-size: clamp(20px, 3vw, 34px); display: block; line-height: 1; }
.g-hp-bar { width: clamp(120px, 22vw, 260px); height: 8px; background: rgba(0,0,0,.5); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.g-hp-bar i { display: block; height: 100%; width: 100%; background: #3ddc97; transition: width .15s; }
.g-ammo { text-align: right; }
.g-ammo small { display: block; color: #ffd166; font-weight: 700; font-size: clamp(11px, 1.3vw, 14px); }
.g-ammo b { font-size: clamp(22px, 3.4vw, 40px); line-height: 1.1; }
.g-ammo b span { font-size: .5em; opacity: .7; }
.g-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5,6,10,.55); backdrop-filter: blur(2px); }
.g-card { text-align: center; max-width: 560px; padding: 20px; }
.g-card h3 { font-family: var(--display); text-transform: uppercase; font-size: clamp(20px, 3.4vw, 34px); margin: 0 0 8px; color: #fff; }
.g-card p { color: #fff; margin: 0 0 16px; font-size: 15px; }
.g-card .btn { font-size: 16px; padding: 12px 28px; }
.g-help { display: block; margin-top: 14px; color: #bbb; font-size: 12px; line-height: 1.7; }
.view-switch { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; background: rgba(0,0,0,.6); border-radius: var(--r-sm); padding: 3px; z-index: 3; backdrop-filter: blur(6px); }
.view-switch button { background: none; border: 0; padding: 6px 14px; border-radius: 3px; font-size: 13px; font-weight: 500; color: #bbb; cursor: pointer; }
.view-switch button.active { background: #fff; color: #000; }
.viewport:has(.g-overlay.hidden) .viewport-badge,
.viewport:has(.g-overlay.hidden) .view-switch { display: none; }

/* ---------- экран загрузки игры: Форж в свете горна */
.gfl { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 20px; text-align: center;
  background: radial-gradient(ellipse at 50% 64%, #2a180d 0%, #0b0a09 68%); color: var(--ink); }
.gfl-forge { position: relative; width: 150px; height: 128px; display: grid; place-items: center; }
.gfl-forge img { width: 132px; height: auto; animation: gfl-breath 2.4s ease-in-out infinite; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
.gfl-spark { position: absolute; left: 50%; bottom: 8px; width: 4px; height: 4px; border-radius: 50%; background: #ffc27a; box-shadow: 0 0 8px #ff7a20; opacity: 0; animation: gfl-spark 1.6s ease-out infinite; }
.gfl-spark.s2 { animation-delay: .5s; --dx: -34px } .gfl-spark.s3 { animation-delay: 1s; --dx: 26px } .gfl-spark.s1 { --dx: 40px }
@keyframes gfl-breath { 0%, 100% { transform: translateY(0); filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)) brightness(.95); } 50% { transform: translateY(-4px); filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)) brightness(1.08); } }
@keyframes gfl-spark { 0% { opacity: 0; transform: translate(0, 0) } 15% { opacity: 1 } 100% { opacity: 0; transform: translate(var(--dx, 20px), -70px) } }
.gfl-text { font: 600 17px/1.3 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.gfl-bar { width: min(240px, 60vw); height: 3px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.gfl-bar i { display: block; width: 40%; height: 100%; border-radius: 2px; background: var(--accent); animation: gfl-bar 1.3s ease-in-out infinite; }
@keyframes gfl-bar { 0% { transform: translateX(-110%) } 100% { transform: translateX(260%) } }
.gfl-err { max-width: 560px; font-size: 14px; line-height: 1.4; color: #ffb3a1; background: rgba(0,0,0,.4); border: 1px solid rgba(255,120,90,.35); border-radius: var(--r-sm); padding: 10px 12px; }
.gfl-err button { margin-top: 8px; }

/* ---------- консоль игры */
.console-card { margin-top: 24px; }
.console-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.console-head h4 { margin: 0; }
.console-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.console-tabs button, .dbg-tabs button, .lib-cats button { background: transparent; border: 1px solid var(--hair2); border-radius: var(--r-sm); padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--grey); }
.console-tabs button:hover, .dbg-tabs button:hover, .lib-cats button:hover { color: var(--ink); border-color: var(--grey); }
.console-tabs button.active, .dbg-tabs button.active, .lib-cats button.active { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.console-tabs b { font-weight: 700; }
.console-actions { margin-left: auto; display: flex; gap: 6px; }
.console-actions .btn { padding: 6px 12px; font-size: 14px; }
.console-models { font-size: 14px; margin-bottom: 8px; }
.cm-note { padding: 9px 12px; border-radius: var(--r-sm); background: rgba(240,166,58,.08); border: 1px solid rgba(240,166,58,.3); }
.cm-title { color: var(--grey); margin-bottom: 4px; }
.cm-list { display: flex; flex-wrap: wrap; gap: 4px; }
.cm { font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 3px; background: var(--paper); border: 1px solid var(--hair); }
.cm.ok { color: var(--ok); }
.cm.bad { color: var(--bad); }
.console-log { background: #070706; color: #e6e1d8; border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 6px 0; max-height: 280px; min-height: 80px; overflow: auto; font-family: var(--mono); font-size: 12px; }
.cl { position: static; display: grid; grid-template-columns: 56px 74px 1fr; gap: 8px; padding: 3px 12px; border-bottom: 1px solid rgba(255,255,255,.04); }
.cl-t { color: #6c675f; }
.cl-l { font-weight: 600; }
.cl-m { white-space: pre-wrap; word-break: break-word; }
.cl.error { background: rgba(255,90,90,.1); } .cl.error .cl-l { color: #ff8b8f; }
.cl.warn { background: rgba(240,166,58,.08); } .cl.warn .cl-l { color: #ffc94d; }
.cl.info .cl-l { color: #8fb6ff; } .cl.log .cl-l { color: #8a8a93; }
.console-log .muted { padding: 8px 12px; }

/* ---------- сборка в Unity, поделиться */
.u-buttons, .u-build { display: grid; gap: 8px; }
.u-build-head { display: flex; align-items: center; gap: 10px; }
.u-log { font-family: var(--mono); font-size: 12px; color: var(--grey); background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 8px; min-height: 34px; word-break: break-all; max-height: 70px; overflow: hidden; }
.u-log:empty { display: none; }
.u-err { font-size: 14px; color: var(--ink); background: rgba(255,90,90,.08); border: 1px solid rgba(255,90,90,.35); border-radius: var(--r-sm); padding: 10px; margin-bottom: 10px; }
.u-err a { color: var(--accent-hot); margin-left: 4px; }
.share-sec { padding: 12px 0; border-top: 1px solid var(--hair); }
.share-sec:first-child { border-top: 0; padding-top: 0; }
.share-sec > b { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.share-sec p { color: var(--grey); font-size: 14px; }
.share-link { display: flex; gap: 6px; margin: 6px 0; }
.share-link input { flex: 1; min-width: 0; background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 8px 10px; font-family: var(--mono); font-size: 12px; }
.share-link .btn { padding: 7px 12px; font-size: 14px; white-space: nowrap; }
.share-sec p a { color: var(--accent-hot); word-break: break-all; }
.share-sheet { position: fixed; inset: 0; z-index: 1200; background: rgba(5,4,3,.75); display: grid; place-items: center; padding: 16px; }
.share-sheet.hidden { display: none; }
.share-sheet-box { background: var(--tint); color: var(--ink); border: 1px solid var(--hair); border-radius: var(--radius); padding: 22px; width: min(480px, 100%); display: grid; gap: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.share-nets { display: flex; gap: 8px; flex-wrap: wrap; }
.sample-share.hidden { display: none; }

/* ---------- обновления сайта */
.updates, .library { padding-top: 40px; }
.updates { max-width: 920px; }
.u-title { font: 700 clamp(34px, 4vw, 52px)/1.02 var(--display); margin: 0 0 8px; letter-spacing: .01em; text-transform: uppercase; }
.u-ver { margin: 0 0 18px; color: var(--grey); }
.lead { color: var(--grey); font-size: 17px; max-width: 70ch; margin: 0 0 24px; }
.prompt-box { border: 1px solid var(--hair); border-radius: var(--radius); background: var(--tint); }
.prompt-box:focus-within { border-color: #5a5249; }
.prompt-box.drag { border-color: var(--accent); }
.prompt-box textarea { width: 100%; border: 0; outline: none; background: transparent; resize: vertical; padding: 16px; }
.prompt-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px 14px; flex-wrap: wrap; }
#patch { font-family: var(--mono); font-size: 13px; line-height: 1.5; min-height: 240px; white-space: pre; overflow: auto; }
.btn-row { display: flex; gap: 8px; }
.file-link { color: var(--accent-hot); cursor: pointer; text-decoration: underline; margin-left: 6px; }
.u-result { margin-top: 16px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--hair); background: var(--tint); font-size: 15px; white-space: pre-wrap; }
.u-result.ok { border-color: var(--ok); }
.u-result.bad { border-color: var(--bad); }
.u-result ul { margin: 8px 0 0; padding-left: 18px; white-space: normal; }
.u-result .f { font-family: var(--mono); font-size: 13px; }
.u-history { margin-top: 32px; }
.u-history-head { display: flex; justify-content: space-between; align-items: center; }
.u-history h4 { margin: 0; font: 600 20px/1.2 var(--display); text-transform: uppercase; }
.u-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; }
.u-list li { border-top: 1px solid var(--hair); padding: 12px 0; font-size: 15px; }
.u-list .t { color: var(--grey); margin-right: 8px; }
.u-list .files { color: var(--grey); font-family: var(--mono); font-size: 12px; margin-top: 4px; word-break: break-all; }

/* ---------- библиотека моделей */
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lib-tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--hair); border-radius: var(--r-sm); background: var(--paper); }
.lib-tab { border: 0; background: transparent; padding: 8px 16px; border-radius: 3px; font: 500 15px var(--body); cursor: pointer; color: var(--grey); }
.lib-tab span { opacity: .6; font-weight: 500; margin-left: 4px; }
.lib-tab.active { background: var(--ink); color: var(--paper); }
.lib-tab.active span { opacity: .7; }
.lib-tab:hover:not(.active) { color: var(--ink); }
.lib-drop { border: 1px dashed var(--hair2); border-radius: var(--radius); padding: 28px; display: grid; gap: 8px; justify-items: center; text-align: center; transition: .15s; }
.lib-drop.drag { border-color: var(--accent); background: rgba(255,107,26,.06); }
.lib-drop b { font: 600 22px/1.2 var(--display); text-transform: uppercase; }
.lib-drop span { color: var(--grey); font-size: 15px; }
.lib-progress { font-size: 15px; min-height: 18px; }
.lib-pack, .lib-empty { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--hair); font-size: 15px; line-height: 1.45; }
.lib-empty { margin-top: 14px; }
.lib-gen { margin: 0 0 18px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--hair); background: var(--tint); display: grid; gap: 10px; }
.lib-gen-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.lib-gen-head b { font: 600 18px/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.lib-gen-head .btn { margin-left: auto; padding: 4px 12px; font-size: 13px; }
.lib-gen-row { display: grid; grid-template-columns: 1fr 140px auto; gap: 8px; }
.lib-gen-row input, .lib-tools input { background: var(--paper); border: 1px solid var(--hair2); border-radius: var(--r-sm); padding: 10px 14px; outline: none; min-width: 0; }
.lib-gen-row input:focus, .lib-tools input:focus { border-color: var(--grey); }
@media (max-width: 640px) { .lib-gen-row { grid-template-columns: 1fr 1fr; } .lib-gen-row input#gen-desc { grid-column: 1 / -1; } }
.lib-tools { display: grid; gap: 12px; margin: 24px 0 16px; }
.lib-tools input { max-width: 420px; }
.lib-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 14px; }
.lib-card { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; display: grid; gap: 2px; color: var(--ink); }
.lib-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--tint); border: 1px solid var(--hair); border-radius: var(--r-sm); margin-bottom: 6px; transition: border-color .15s; }
.lib-card:hover img { border-color: var(--grey); }
.lib-card b { font-size: 14px; font-weight: 500; line-height: 1.3; }
.lib-card span { font-size: 13px; color: var(--grey); }
.lib-modal { width: min(1100px, 96vw); max-height: 92vh; padding: 0; border: 1px solid var(--hair); border-radius: var(--radius); background: var(--tint); color: var(--ink); }
.lib-modal::backdrop { background: rgba(5,4,3,.75); }
.lib-m { display: grid; grid-template-columns: 1.4fr 1fr; min-height: 520px; }
.lib-view { position: relative; min-height: 380px; background: #15161a; color: #fff; }
.lib-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lib-anims { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; gap: 4px; flex-wrap: wrap; max-height: 30%; overflow: auto; }
.lib-anims button { font-size: 12px; padding: 3px 9px; border-radius: 3px; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.lib-anims button.on { background: var(--accent); color: var(--accent-ink); }
.lib-hint { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: rgba(255,255,255,.6); }
.lib-form { padding: 22px; display: grid; gap: 12px; align-content: start; overflow: auto; max-height: 92vh; }
.lib-form h3 { margin: 0; font: 600 24px/1.1 var(--display); text-transform: uppercase; }
.lib-form label { display: grid; gap: 4px; font-size: 14px; color: var(--grey); }
.lib-form input, .lib-form select, .lib-form textarea { background: var(--paper); border: 1px solid var(--hair2); border-radius: var(--r-sm); padding: 9px 11px; color: var(--ink); font-size: 15px; outline: none; }
.lib-form input:focus, .lib-form select:focus, .lib-form textarea:focus { border-color: var(--grey); }
.lib-check { display: flex !important; align-items: center; gap: 8px !important; color: var(--ink) !important; }
.lib-check.hidden { display: none !important; }   /* 7.4: пустая галочка в окне «Новая модель» */
.lib-check input { width: auto; }
.lib-size { display: flex; gap: 8px; align-items: end; }
.lib-size label { flex: 1; }
.lib-size .btn { white-space: nowrap; }
.lib-ai { font-size: 14px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--hair); }
.lib-btns { display: flex; gap: 8px; }
.spr-title { margin-top: 44px; }
.spr-card { cursor: default; position: relative; }
.spr-card img { image-rendering: auto; background: repeating-conic-gradient(#1c1a17 0 25%, #24211d 0 50%) 0 0 / 16px 16px; }
.spr-card.px img { image-rendering: pixelated; }
.spr-del { position: absolute; top: 6px; right: 6px; min-width: 26px; height: 26px; padding: 0 7px; border: 1px solid var(--hair2); border-radius: var(--r-sm);
  background: rgba(12,11,10,.82); color: var(--grey); font-size: 13px; cursor: pointer; opacity: 0; transition: opacity .15s, color .15s, border-color .15s; }
.spr-card:hover .spr-del, .spr-del:focus-visible, .spr-del.sure { opacity: 1; }
.spr-del:hover { color: var(--ink); border-color: var(--grey); }
.spr-del.sure { color: var(--bad); border-color: var(--bad); }
@media (hover: none) { .spr-del { opacity: .8; } }
.lib-drop-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
/* 6.0: окно проверки своих 2D-наборов (разбор обычных картинок) */
.si-modal { width: min(1180px, 96vw); }
.si { display: grid; grid-template-rows: auto 1fr auto; max-height: 92vh; }
.si-head { padding: 22px 22px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--hair); }
.si-head h3 { margin: 0; font: 600 24px/1.1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; outline: none; }
.si-head p { margin: 0; }
.si-lic { font-size: 14px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--hair); }
.si-lic.warn { border-color: var(--warn); color: var(--ink); }
.si-lic details { margin-top: 6px; }
.si-lic summary { cursor: pointer; color: var(--grey); }
.si-lic pre { margin: 6px 0 0; max-height: 160px; overflow: auto; white-space: pre-wrap; font: 12px/1.45 var(--mono); color: var(--grey); }
.si-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.si-bar .btn { padding: 4px 12px; font-size: 13px; }
.si-grid { overflow: auto; padding: 16px 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; align-content: start; }
.si-card { display: grid; gap: 5px; align-content: start; padding: 8px; border: 1px solid var(--hair); border-radius: var(--radius); background: var(--paper); opacity: .55; transition: opacity .15s, border-color .15s; }
.si-card.on { opacity: 1; border-color: var(--hair2); }
.si-pick { position: relative; display: block; cursor: pointer; }
.si-pick input { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; margin: 0; }
.si-pick canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); background: repeating-conic-gradient(#1c1a17 0 25%, #24211d 0 50%) 0 0 / 16px 16px; }
.si-card input.si-name, .si-card select { width: 100%; min-width: 0; background: var(--tint); border: 1px solid var(--hair2); border-radius: var(--r-sm); padding: 6px 8px; color: var(--ink); font-size: 14px; outline: none; }
.si-card input.si-name:focus, .si-card select:focus { border-color: var(--grey); }
.si-info { font-size: 12px; color: var(--grey); line-height: 1.35; }
.si-raw { font-size: 12px; color: var(--warn); line-height: 1.35; }
.si-foot { padding: 14px 22px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--hair); }
@media (max-width: 640px) { .si-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px; gap: 10px; } .si-head, .si-foot { padding-left: 16px; padding-right: 16px; } }
.lib-human-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; align-items: end; }
.lib-human-form label { display: grid; gap: 3px; font-size: 13px; color: var(--grey); }
.lib-human-form select, .lib-human-form input[type=number] { padding: 7px 8px; border: 1px solid var(--hair2); border-radius: var(--r-sm); font: inherit; color: var(--ink); background: var(--paper); }
.lib-human-form .lib-check { display: flex; align-items: center; gap: 6px; color: var(--ink); padding-bottom: 8px; }
.hum-steps { margin: 6px 0 4px 20px; padding: 0; display: grid; gap: 2px; }
select { background: var(--paper); color: var(--ink); border: 1px solid var(--hair2); border-radius: var(--r-sm); padding: 7px 10px; }

/* ---------- доступ к сайту, вход, аккаунт */
.access, .login { padding-top: 40px; max-width: 1100px; }
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.access-grid .card { display: grid; gap: 12px; align-content: start; }
.access-grid .card p { margin: 0; }
.access-open, .access-lan { margin-bottom: 16px; display: grid; gap: 12px; border-color: #4a3426; background: linear-gradient(180deg, #1c140e, var(--tint) 60%); }
.access-open h4, .lan-head h4 { font-size: 22px; margin-bottom: 6px; }
.access-open .muted, .access-lan .muted { color: var(--grey); }
.access-open .share-link input { background: var(--paper); }
.site-live { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.site-live i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: beat .7s ease-in-out infinite alternate; }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--grey); }
.field input, #pw-new, .login-form input, .cost-budget input, #guest-limit { background: var(--paper); border: 1px solid var(--hair2); border-radius: var(--r-sm); padding: 10px 12px; font-size: 16px; outline: none; color: var(--ink); }
.field input:focus, #pw-new:focus, .login-form input:focus { border-color: var(--grey); }
#pw-form { display: grid; gap: 8px; }
.login-form { display: flex; gap: 10px; max-width: 460px; }
.login-form input { flex: 1; }
.site-warn { background: rgba(240,166,58,.1); border: 1px solid rgba(240,166,58,.35); border-radius: var(--r-sm); padding: 8px 10px; }
.tunnel-log summary { cursor: pointer; font-size: 14px; }
.tunnel-log pre { max-height: 220px; overflow: auto; background: #070706; color: #ddd; padding: 10px; border-radius: var(--r-sm); font: 11px/1.4 var(--mono); white-space: pre-wrap; word-break: break-all; }
.lan-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.lan-head p { margin: 0; max-width: 60ch; }
.lan-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15px; }
.lan-list { display: grid; gap: 6px; }
.lan-row { align-items: center; flex-wrap: wrap; }
.lan-label { flex: 0 0 100%; font-size: 13px; font-weight: 600; }
.lan-row.best .lan-label::after { content: " — этот адрес отправьте друзьям"; color: var(--accent-hot); }
.tuna-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.tuna-row .field { flex: 1; min-width: 260px; }
@media (max-width: 980px) { .access-grid { grid-template-columns: 1fr; } }
.ai-rules-card textarea, .ads-card textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--hair2); background: var(--paper); border-radius: var(--r-sm); padding: 10px 12px; font: 15px/1.45 var(--body); resize: vertical; }
.ads-card textarea { font: 13px/1.4 var(--mono); }
.ads-card .field { display: block; margin-top: 10px; }
.ai-rules-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.ai-rules-bar > .btn { flex: none; }
.ai-les-title { margin-top: 18px; }
.ai-lessons { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.ai-lessons li { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 8px 10px; font-size: 14px; }
.ai-lessons li span { flex: 1; }
.account { max-width: 560px; margin: 40px auto; }
.acc-card { display: grid; gap: 14px; }
.acc-tabs { display: flex; gap: 3px; background: var(--paper); border: 1px solid var(--hair); padding: 3px; border-radius: var(--r-sm); justify-self: start; }
.acc-tabs button { all: unset; cursor: pointer; padding: 8px 18px; border-radius: 3px; font-weight: 500; color: var(--grey); }
.acc-tabs button.on { background: var(--ink); color: var(--paper); }
.acc-form { display: grid; gap: 12px; }
.acc-form label { display: grid; gap: 6px; font-size: 14px; color: var(--grey); }
.acc-form input { border: 1px solid var(--hair2); background: var(--paper); border-radius: var(--r-sm); padding: 12px 14px; font: 16px var(--body); color: var(--ink); }
.acc-form input:focus { outline: none; border-color: var(--grey); }
.acc-form .btn-primary { justify-self: start; }
.acc-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.acc-card .err:empty { display: none; }
.users-card { margin-top: 20px; }
.users-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.users-head h4 { margin: 0; }
.users-wrap { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.users-table th { text-align: left; font-weight: 600; color: var(--grey); padding: 8px 10px; border-bottom: 1px solid var(--hair2); white-space: nowrap; }
.users-table td { padding: 9px 10px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.users-table tr.is-blocked td { opacity: .55; }
.u-acts { white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 3px; background: var(--tint2); color: var(--grey); }
.tag.ok { background: rgba(76,195,138,.12); color: #8fe0b7; } .tag.warn { background: rgba(240,166,58,.12); color: #f4cd92; } .tag.bad { background: rgba(255,90,90,.12); color: #ff9d98; }

/* ---------- расходы на ИИ */
.cost-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.cost-tile { background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cost-tile span { font-size: 13px; color: var(--grey); }
.cost-tile b { font: 600 24px/1.15 var(--display); overflow-wrap: anywhere; }
.cost-tile small { font-size: 12px; color: var(--grey); }
.cost-bars { display: flex; align-items: flex-end; gap: 4px; height: 64px; padding: 0 2px; border-bottom: 1px solid var(--hair); }
.cost-bars i { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .7; }
.cost-bars i:last-child { opacity: 1; }
.cost-bars-cap { display: flex; justify-content: space-between; margin: 4px 0 10px; }
.cost-by { margin: 6px 0 10px; }
.cost-budget label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cost-budget input { width: 110px; padding: 8px 10px; }
@media (max-width: 720px) { .cost-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cost-tile b { font-size: 19px; } }

/* ---------- реклама */
.ad-slot { position: relative; margin: 18px auto; max-width: 1100px; min-height: 60px; text-align: center; overflow: hidden; }
.ad-slot .ad-label { position: absolute; top: 2px; right: 8px; font-size: 11px; color: var(--faint); z-index: 1; }
.ad-game { margin: 8px 16px 12px; min-height: 50px; }
.ad-loading { margin: 22px auto 0; max-width: 640px; width: 100%; }

/* ---------- облачко Форжа (живая сцена, если её включат) */
.forge-bubble { position: absolute; left: 0; top: 0; z-index: 3; width: max-content; max-width: min(300px, 72%); background: var(--ink); color: var(--paper);
  border-radius: var(--radius); padding: 12px 15px; font: 500 15px/1.38 var(--body); cursor: default; }
.forge-bubble[hidden] { display: none; }
.forge-bubble p { margin: 0; }
.forge-bubble .fb-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.forge-bubble .fb-btns:empty { display: none; }
.forge-bubble button { border: 0; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); font: 600 14px/1 var(--body); padding: 9px 14px; cursor: pointer; }
.forge-float { position: absolute; z-index: 3; pointer-events: none; color: #ffd27a; font: 600 18px/1 var(--display); transform: translate(-50%, -50%); animation: ff-up .95s ease-out forwards; }
@keyframes ff-up { to { opacity: 0; margin-top: -48px; } }

/* ---------- отладчик: ошибки у пользователей (страница владельца) */
.debug { padding-top: 24px; }
.dbg-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 16px; }
.dbg-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-right: auto; }
.dbg-list { display: grid; gap: 12px; }
.dbg-card { display: grid; gap: 8px; border-left-width: 4px; }
.dbg-card.dbg-game { border-left-color: var(--accent); } .dbg-card.dbg-site { border-left-color: var(--bad); }
.dbg-card.dbg-client { border-left-color: var(--warn); } .dbg-card.dbg-user { border-left-color: var(--ok); } .dbg-card.dbg-note { opacity: .7; }
.dbg-card.is-new .dbg-head b::after { content: "новое"; margin-left: 8px; padding: 2px 7px; border-radius: 3px; background: var(--bad); color: #1a0505; font: 700 11px/1.4 var(--body); vertical-align: 2px; }
.dbg-head { display: flex; gap: 12px; align-items: flex-start; }
.dbg-head > div { flex: 1; min-width: 0; }
.dbg-head b { font-size: 17px; }
.dbg-ico { font-size: 22px; line-height: 1; }
.dbg-count { font: 700 15px/1 var(--mono); padding: 6px 9px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--hair); white-space: nowrap; }
.dbg-todo { margin: 0; font-size: 15px; }
.dbg-msg { display: block; padding: 8px 10px; border-radius: var(--r-sm); background: #070706; color: #ff9da0; font: 12px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; }
.dbg-comment { margin: 0; padding: 8px 12px; border-left: 3px solid var(--ok); background: rgba(76,195,138,.07); border-radius: 0 var(--r-sm) var(--r-sm) 0; white-space: pre-wrap; }
.dbg-card details summary { cursor: pointer; color: var(--grey); font-size: 14px; }
.dbg-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: 13px; }
.dbg-card dt { color: var(--grey); } .dbg-card dd { margin: 0; word-break: break-word; }
.dbg-card pre { margin: 0; max-height: 220px; overflow: auto; padding: 8px 10px; border-radius: var(--r-sm); background: #070706; color: #e6e1d8; font: 11px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; }
.dbg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dbg-empty { text-align: center; padding: 32px 18px; color: var(--grey); }
@media (max-width: 640px) { .dbg-card dl { grid-template-columns: 1fr; } .dbg-head b { font-size: 15px; } }

/* ---------- подвал */
.foot { margin-top: 96px; border-top: 1px solid #221f1b; }
.foot-in { max-width: var(--page, 1360px); margin: 0 auto; padding: 28px 40px 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 14px; color: var(--faint); }
.foot-in b { font: 600 17px/1 var(--display); letter-spacing: .08em; color: var(--ink); }
#foot-lang { margin-left: auto; }
#foot-lang:empty { display: none; }
.foot-lang { font: 500 13px/1.2 var(--body); color: var(--ink); background: #15130f; border: 1px solid #2c2823; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.foot-lang:focus-visible { outline: 2px solid #ff6b1a; outline-offset: 2px; }

/* ---------- адаптив */
@media (max-width: 1100px) { .stage { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .top-in { gap: 24px; padding: 0 24px; }
  .main { padding: 0 24px 72px; }
  .hero { padding: 24px 0 56px; }
  .hero-art { order: -1; min-height: 0; flex-basis: 100%; height: 300px; overflow: hidden; }
  .hero-figure { width: auto; height: 118%; max-width: none; margin: 0; align-self: flex-end; margin-bottom: -10%; }
  .hero-figure img { width: auto; height: 100%; }
  .lib-m { grid-template-columns: 1fr; } .lib-view { min-height: 300px; }
}
@media (max-width: 760px) {
  .top-in { height: 58px; gap: 14px; padding: 0 16px; }
  .logo { font-size: 17px; gap: 10px; }
  .top-nav { gap: 16px; overflow-x: auto; scrollbar-width: none; }
  .top-nav::-webkit-scrollbar { display: none; }
  #play-link, #create-link, .top-nav #library-link { display: none; }
  .top-nav { flex: none; overflow: visible; }   /* остаётся одна ссылка «Мои игры» — целиком, без обрезки */
  #login-link { display: none !important; }      /* «Владелец» на телефоне — внизу страницы (не теснит шапку) */
  .owner-pop .om-only { display: block !important; }
  .om-label, .om-chev { display: none; }
  .om-burger { display: block !important; }
  .owner-menu summary { padding: 8px; border: 1px solid var(--hair2); border-radius: var(--r-sm); color: var(--ink); }
  .owner-pop { right: -4px; min-width: min(300px, calc(100vw - 24px)); }
  .composer-top { flex-wrap: wrap; }
  .top-right { gap: 12px; }
  .install-btn { display: none; }
  .main { padding: 0 16px 60px; }
  .hero-title { font-size: clamp(42px, 12vw, 56px); }
  .hero-lead { font-size: 16px; margin: 18px 0 24px; }
  .hero-art { height: 250px; }
  .composer-bar { padding: 12px; }
  .seg { display: flex; width: 100%; }
  .seg-opt { flex: 1; padding: 9px 4px; white-space: normal; line-height: 1.15; }
  .btn-create { margin-left: 0; width: 100%; justify-content: center; }
  .sec-head, .gallery-head { margin-top: 48px; }
  .sec-head h2, .gallery-head h2, .how h2 { font-size: 26px; }
  .featured-body { padding: 22px 18px; }
  .featured-body h3 { font-size: 32px; }
  .featured-actions .btn { flex: 1 1 auto; }
  .samples-grid, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .sample-card > b, .game-card b, .friend-card b { font-size: 15px; }
  .sample-actions { gap: 0 12px; }
  .band { padding: 24px 20px; }
  .foot-in { padding: 24px 16px 32px; }
}
@media (max-width: 400px) {   /* узкие телефоны: всё в шапке помещается в одну строку */
  .top-in { gap: 10px; padding: 0 12px; }
  .logo { font-size: 15px; gap: 8px; letter-spacing: .05em; }
  .logo-mark { width: 18px; height: 18px; }
  .top-right { gap: 8px; }
  .top-link { font-size: 14px; }
  .top-cta { padding: 7px 11px; font-size: 14px; }
}

@media (max-width: 420px) {
  .samples-grid, .gallery { grid-template-columns: 1fr; }
}

/* «Начать с чистого листа» (Доступ) — с 5.5 */
.fresh-card { border-color: var(--hair2); }
.fresh-opts { display: grid; gap: 6px; margin: 12px 0 14px; }
.fresh-opts input:disabled + span { color: var(--grey); }
.fresh-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.fresh-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--ink); }
.fresh-confirm.hidden { display: none; }
.btn-danger { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-danger:hover { background: var(--accent-hot); border-color: var(--accent-hot); }
.fresh-now { color: var(--grey); }

/* База данных, настройки сайта, ключи (Доступ) — с 5.7 */
.db-card, .set-card, .keys-card, .fresh-card { margin-top: 20px; }
.db-card h5, .set-card h5 { margin: 18px 0 6px; font: 600 14px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.db-tables { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 2px; font-size: 14px; color: var(--grey); }
.db-tables b { color: var(--ink); font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.db-step { border-top: 1px solid var(--hair); margin-top: 14px; padding-top: 2px; }
.db-form { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1.6fr 1.4fr; gap: 10px; margin-top: 12px; }
.db-form input { width: 100%; min-width: 0; }
.db-driver { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--hair2); border-radius: var(--r-sm); }
.db-ok { color: var(--ok); }
.set-move { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 12px 0 4px; padding: 10px 12px; border: 1px solid #4a3426; border-radius: var(--r-sm); background: #1c140e; }
.set-group { border-top: 1px solid var(--hair); }
.set-group:first-child { margin-top: 10px; }
.set-group summary { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.set-group summary::-webkit-details-marker { display: none; }
.set-group summary::before { content: "▸"; color: var(--grey); width: 10px; transition: transform .15s; }
.set-group[open] summary::before { transform: rotate(90deg); }
.set-group summary b { font: 600 14px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.set-group summary:hover b { color: var(--accent-hot); }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 0 0 16px 22px; }
.set-grid .field input { padding: 8px 10px; font-size: 15px; }
.set-grid .field small { color: var(--faint); font-size: 12px; }
.set-grid .field input { width: 100%; min-width: 0; }
.set-src { font-size: 12px; color: var(--faint); margin-left: 6px; }
.set-src.saved { color: var(--ok); }
.keys-list { display: grid; gap: 0; margin-top: 8px; }
.key-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) 110px minmax(0, 2fr); gap: 10px 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.key-row:last-child { border-bottom: 0; }
.key-row code { color: var(--faint); font-size: 12px; display: block; background: none; padding: 0; width: max-content; max-width: 100%; }
.key-state { color: var(--grey); }
.key-state.on { color: var(--ok); }
.key-edit { display: flex; gap: 8px; }
.key-edit input { flex: 1; min-width: 0; background: var(--paper); border: 1px solid var(--hair2); border-radius: var(--r-sm); padding: 8px 10px; font-size: 15px; color: var(--ink); outline: none; }
@media (max-width: 860px) {
  .db-form { grid-template-columns: 1fr 1fr; }
  .set-grid { grid-template-columns: 1fr; padding-left: 0; }
  .key-row { grid-template-columns: 1fr auto; }
  .key-edit { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ 6.2: к запуску — документы, cookie, «Перед запуском» */
.foot-legal { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.foot-legal a { color: var(--faint); text-decoration: underline; text-decoration-color: var(--hair2); text-underline-offset: 3px; }
.foot-legal a:hover { color: var(--ink); text-decoration-color: var(--grey); }
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 640px; margin: 0 auto; display: flex; gap: 14px;
  align-items: center; padding: 12px 14px 12px 16px; background: var(--tint); border: 1px solid var(--hair2); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.45); font-size: 14px; color: var(--ink); }
.cookie-bar p { margin: 0; flex: 1; line-height: 1.4; }
.cookie-bar a { color: var(--accent-hot); }
.cookie-bar .btn { padding: 7px 14px; font-size: 14px; flex: none; }
@media (max-width: 520px) {   /* 6.4: на телефоне плашка — одна узкая строка у самого низа, не закрывает «Создать игру» */
  .cookie-bar { left: 8px; right: 8px; bottom: 8px; gap: 8px; padding: 7px 8px 7px 12px; font-size: 12px; }
  .cookie-bar p { line-height: 1.3; }
  .cookie-bar .btn { padding: 6px 10px; font-size: 13px; }
  .users-table td { white-space: nowrap; }
}
.acc-form label.acc-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--grey); }
.acc-consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; padding: 0; }
.acc-consent a { color: var(--ink); }
.launch { display: grid; gap: 16px; }
.launch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.launch-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-sm); background: var(--paper); }
.launch-list i { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 3px; font: 700 13px/1 var(--body); font-style: normal; }
.launch-list .lc-ok i { background: rgba(76,195,138,.14); color: var(--ok); }
.launch-list .lc-warn i { background: rgba(240,166,58,.16); color: var(--warn); }
.launch-list .lc-todo i { background: var(--tint2); color: var(--grey); }
.launch-list b { display: block; font-size: 14px; font-weight: 600; }
.launch-list span { display: block; font-size: 13px; color: var(--grey); line-height: 1.4; }
.launch-form { display: grid; gap: 10px; max-width: 560px; }
.launch-btns { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.launch-btns a { font-size: 14px; color: var(--grey); }
.spr-lic { font-style: normal; font-size: 12px; color: var(--warn); }
.legal-page .top { position: static; }
.legal { max-width: 760px; margin: 0 auto; padding: 32px 20px 80px; line-height: 1.6; }
.legal h1 { margin: 0 0 6px; font: 600 clamp(30px, 5vw, 44px)/1.1 var(--display); text-transform: uppercase; }
.legal h2 { margin: 30px 0 8px; font: 600 20px/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.legal p, .legal li { color: var(--ink); font-size: 16px; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--accent-hot); }
.legal-other { margin-top: 40px; color: var(--grey); }

/* 6.4: «Опишу сам» / «Собрать по шагам», опрос карточками, вопросы ИИ — в стиле сайта: линии, без эмодзи и «таблеток» */
.compose-mode { display: flex; gap: 22px; margin: 0 0 10px; max-width: 660px; }
.cm-tab { border: 0; background: none; padding: 4px 0 6px; color: var(--grey); font: 500 13px/1 var(--body); letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; border-bottom: 2px solid transparent; }
.cm-tab:hover { color: var(--ink); }
.cm-tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.composer-box.is-survey .composer-top, .composer-box.is-survey #prompt, .composer-box.is-survey .composer-bar,
.composer-box.is-survey #clarify, .composer-box.is-survey #tags-note { display: none; }
.survey { padding: 18px 20px 16px; }
.sv-head { margin: 0 0 14px; }
.sv-step { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.sv-title { margin: 4px 0 10px; font: 600 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: .01em; color: var(--ink); }
.sv-progress { height: 2px; background: var(--hair); }
.sv-progress i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.sv-hint { margin: 0 0 10px; color: var(--grey); font-size: 14px; }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.sv-grid.sv-small { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.sv-card { position: relative; display: grid; gap: 3px; align-content: start; text-align: left; padding: 10px 12px; min-height: 58px; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1px solid var(--hair); border-radius: var(--r-sm); font: inherit; }
.sv-card:hover { border-color: var(--grey); }
.sv-card.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.sv-card b { font-weight: 600; font-size: 15px; }
.sv-card small { color: var(--grey); font-size: 12.5px; line-height: 1.3; }
.sv-img { display: block; height: 74px; margin: -10px -12px 6px; background: #111 center/cover no-repeat; border-bottom: 1px solid var(--hair); }
.sv-genres .sv-card:not(:has(.sv-img)) { padding-top: 92px; }
.sv-other { border-style: dashed; }
.sv-custom { display: grid; gap: 4px; max-width: 360px; margin: 0 0 12px; font-size: 13px; color: var(--grey); }
.sv-custom input { font: inherit; font-size: 15px; padding: 9px 10px; background: var(--paper); color: var(--ink); border: 1px solid var(--hair2); border-radius: var(--r-sm); }
.sv-out { width: 100%; font: 15px/1.5 var(--body); padding: 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--hair2); border-radius: var(--r-sm); resize: vertical; }
.sv-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.sv-nav .sv-next, .sv-nav .sv-go { margin-left: auto; }
.sv-nav .sv-go { height: 46px; }
.clarify { margin: 0 16px 14px 20px; padding: 12px 0 0; border-top: 1px solid var(--hair); }
.cl-hint { margin: 0 0 8px; font-size: 13px; color: var(--grey); }
.cl-q { margin: 0 0 10px; }
.cl-q b { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.cl-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-opt { font: inherit; font-size: 13.5px; padding: 6px 10px; cursor: pointer; background: var(--paper); color: var(--ink); border: 1px solid var(--hair2); border-radius: var(--r-sm); }
.cl-opt:hover { border-color: var(--grey); }
.cl-q.done .cl-opt { opacity: .45; cursor: default; }
.cl-q.done .cl-opt.on { opacity: 1; border-color: var(--accent); }
.tags-note { margin: 0 16px 10px 20px; font-size: 13px; color: var(--grey); }
@media (max-width: 640px) {
  .survey { padding: 14px 12px 12px; }
  .sv-title { font-size: 22px; }
  .sv-grid, .sv-grid.sv-small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-nav .sv-next, .sv-nav .sv-go { width: 100%; margin-left: 0; justify-content: center; }
  .clarify { margin: 0 12px 12px; }
}

/* ---------- 6.4: страницы для поиска — каталог /igry, жанры /zhanr/…, игра /igra/…, 404 */
.seo-page .top { position: static; }
.seo { max-width: 1180px; margin: 0 auto; padding: 24px 40px 40px; }
.crumbs { font-size: 14px; color: var(--faint); margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs a { color: var(--grey); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs i { font-style: normal; color: var(--hair2); }
.seo-h1, .gp-head h1 { margin: 0 0 12px; font: 600 clamp(32px, 5vw, 56px)/1.04 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.seo-h1 small { font: 500 16px/1 var(--body); color: var(--grey); text-transform: none; }
.seo-lead { max-width: 780px; font-size: 18px; margin: 0 0 22px; }
.seo h2 { font: 600 24px/1.15 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 48px 0 14px; }
.seo section > p, .seo section li { max-width: 780px; }
.seo-btns { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.seo-btns > a:not(.btn) { color: var(--grey); }
.seo-btns > a:not(.btn):hover { color: var(--ink); }
.seo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-chips a { text-decoration: none; font-size: 14px; padding: 7px 12px; border: 1px solid var(--hair2); border-radius: var(--r-sm); color: var(--grey); }
.seo-chips a:hover, .seo-chips a[aria-current] { color: var(--ink); border-color: var(--ink); }
.seo-grid { margin-top: 18px; }
.card-link { text-decoration: none; }
.seo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.seo-cols ul { padding-left: 20px; margin: 0; }
.seo-cols li { margin: 0 0 6px; }
.seo-quote { margin: 0 0 12px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--tint); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.seo-steps { padding-left: 22px; margin: 0; }
.seo-steps li { margin: 0 0 8px; }
.seo-cta { margin-top: 72px; padding: 28px 32px; background: var(--tint); border: 1px solid var(--hair); border-radius: var(--radius); }
.seo-cta h2 { margin-top: 0; }
.seo-cta p { color: var(--grey); max-width: 680px; margin: 0 0 18px; }
.seo-pager { display: flex; gap: 20px; align-items: center; margin-top: 28px; color: var(--grey); }
.seo-404 { padding: 64px 0 24px; }
.gp-head { margin-bottom: 18px; }
.gp-meta { color: var(--grey); margin: 0; }
.gp-meta a { color: var(--ink); }
.gp-rating { color: var(--warn); }
.gp-lead { font-size: 18px; margin: 10px 0 0; max-width: 780px; }
.gp-media { position: relative; aspect-ratio: 16 / 10; background: var(--screen); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hair); }
.gp-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.gp-media:fullscreen { border: 0; border-radius: 0; }
.gp-start { all: unset; box-sizing: border-box; position: absolute; inset: 0; cursor: pointer; display: block; }
.gp-start img, .gp-start .poster { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.8); transition: filter .2s; }
.gp-start:hover img, .gp-start:focus-visible img { filter: brightness(.95); }
.gp-start-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 12px; padding: 16px 30px;
  background: var(--accent); color: var(--accent-ink); font: 600 22px/1 var(--display); text-transform: uppercase; letter-spacing: .05em; border-radius: var(--r-sm); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.gp-start-btn svg { width: 16px; height: 16px; }
.gp-start:hover .gp-start-btn, .gp-start:focus-visible .gp-start-btn { background: var(--accent-hot); }
.gp-start:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.gp-tools { display: flex; justify-content: flex-end; margin-top: 10px; }
.gp-controls { columns: 2; padding-left: 20px; }
.gp-revs { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; max-width: 780px; }
.gp-rev { padding: 14px 16px; background: var(--tint); border-radius: var(--r-sm); }
.gp-rev time { color: var(--faint); font-size: 13px; margin-left: 8px; }
.gp-rev p { margin: 6px 0 0; }
.gp-stars { color: var(--warn); letter-spacing: 1px; margin-left: 6px; }
.gp-stars i { font-style: normal; color: var(--hair2); }
.seo-ad { margin-top: 16px; }
.foot-nav { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.foot-nav a { color: var(--faint); text-decoration: none; }
.foot-nav a:hover { color: var(--ink); }
.foot-nav b { font-weight: 600; color: var(--grey); }
.community-sub .sec-link { margin-left: 6px; white-space: nowrap; }
.launch-search { display: grid; gap: 8px; margin: 10px 0 4px; padding-top: 12px; border-top: 1px solid var(--hair); }
@media (max-width: 760px) {
  .seo { padding: 16px 16px 32px; }
  .seo-cols { grid-template-columns: 1fr; }
  .gp-controls { columns: 1; }
  .gp-media { aspect-ratio: 4 / 3; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .seo-cta { padding: 20px; margin-top: 48px; }
  .gp-start-btn { font-size: 18px; padding: 12px 22px; }
  .seo h2 { margin-top: 36px; }
  .seo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .seo-grid .poster span { font-size: 18px; }
  .seo-grid .sample-card > b { font-size: 15px; }
  .seo-grid .sample-kind { font-size: 12px; }
  .seo-grid .play-badge { width: 34px; height: 34px; right: 8px; bottom: 8px; }
}
@media (max-width: 440px) { .seo-nav { display: none; } }   /* на узком телефоне каталог — в крошках и подвале */

/* 6.5: оценщик игр */
.quality-box ul { margin: 6px 0 8px 18px; padding: 0; }
.quality-box .btn { margin-top: 4px; }
.quality-sum { margin-top: 10px; }

/* 7.1: «Другое название» */
.title-btn{background:none;border:0;padding:2px 0;color:var(--grey);font-size:13px;cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.title-btn:hover{color:var(--accent)}
.title-pick{margin-top:8px;display:flex;flex-direction:column;gap:8px;max-width:560px}
.title-chips{display:flex;flex-wrap:wrap;gap:6px}
.title-chips .chip{border:1px solid var(--hair2);background:var(--tint);color:inherit;border-radius:999px;padding:6px 12px;cursor:pointer;font:inherit}
.title-chips .chip:hover{border-color:var(--accent)}
.title-own{display:flex;gap:6px;flex-wrap:wrap}
.title-own input{flex:1 1 200px;min-width:0}

/* 7.1: жалобы */
.rv-report{background:none;border:0;color:var(--faint);font-size:12px;cursor:pointer;padding:0 4px;margin-left:auto}
.rv-report:hover{color:var(--accent)}
.rv-report-game{margin:10px 0 0;padding:0;display:block}
.rv-hidden{opacity:.55}
.report-box{display:flex;flex-direction:column;gap:6px;margin:8px 0;padding:10px;border:1px solid var(--hair2);border-radius:8px;background:var(--tint)}
.rep-list{list-style:none;padding:0;display:flex;flex-direction:column;gap:10px}
.rep-item{border:1px solid var(--hair);border-radius:10px;padding:12px;background:var(--tint)}
.rep-item.rep-new{border-color:var(--accent)}
.rep-top{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline}
.rep-st{font-size:12px;padding:1px 8px;border-radius:999px;border:1px solid var(--hair2);color:var(--grey)}
.rep-st.rep-new,.rep-st.rep-hidden{color:var(--accent);border-color:var(--accent)}
.rep-item blockquote{margin:6px 0;padding-left:10px;border-left:2px solid var(--hair2);color:var(--grey)}
.rep-texts{margin:6px 0;padding-left:18px;color:var(--grey)}
.rep-act{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}

/* 7.1: резервные копии */
.bk-list{list-style:none;padding:0;margin:8px 0;display:flex;flex-direction:column;gap:4px}
.bk-list li{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}

/* 7.1: новости в Telegram */
.tg-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:6px 0}
.tg-row input{flex:1 1 200px;min-width:0}
.tg-card textarea{width:100%;box-sizing:border-box;font:inherit}
.tg-steps{margin:6px 0 10px;padding-left:20px;color:var(--grey)}

/* 7.2: на больших экранах и при уменьшении масштаба (Ctrl −) вся страница крупнее пропорционально — не узкая колонка посередине */
@media (min-width: 1800px) { html { zoom: 1.2; } }
@media (min-width: 2100px) { html { zoom: 1.4; } }
@media (min-width: 2500px) { html { zoom: 1.65; } }
@media (min-width: 3000px) { html { zoom: 2; } }
@media (min-width: 3600px) { html { zoom: 2.4; } }

/* ---------- 7.5: телефон и планшет — пальцем удобно, ничего не вылезает */
.lib-check input[type="checkbox"] { flex: none; width: 18px; height: 18px; }   /* галочка «Высокое разрешение» сжималась в точку */
.users-table td.users-empty { white-space: normal; }   /* «Пока никто не зарегистрировался» вылезало за экран */
.sv-genres .sv-card:not(:has(.sv-img))::before { content: "+"; position: absolute; left: 12px; right: 12px; top: 10px; height: 74px; display: grid; place-items: center;
  border: 1px dashed var(--hair2); border-radius: var(--r-sm); color: var(--grey); font: 300 40px/1 var(--body); }   /* «Другое» — не пустая серая плашка */
@media (pointer: coarse) {
  .cm-tab { padding: 12px 0; }
  .tool-btn, .example, .title-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; }
  .example { padding: 0 2px; }
  .chips button, .lib-cats button, .seg-opt, .sample-btn { min-height: 40px; }
  .sample-btn { display: inline-flex; align-items: center; }
  input[type="checkbox"] { width: 22px; height: 22px; }
  .cookie-bar { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; font-size: 13px; }
}
/* Игра в окне на телефоне, повёрнутом боком: шапка окна тонкая — игре больше места */
@media (max-height: 500px) and (orientation: landscape) {
  .sample-top { padding: 3px 6px 3px 12px; min-height: 0; }
  .sample-top b { font-size: 15px; }
  .sample-top .btn { padding: 0 10px; height: 32px; font-size: 12.5px; }
  .sample-full, .sample-close { width: 32px; height: 32px; }
  .cookie-bar { display: none; }   /* не закрывает игру; появится снова в обычном положении */
}


/* === HORIZONX EMBERLINE / AI GLASS THEME === */
:root {
  --paper: #050507;
  --tint: rgba(20, 20, 25, 0.65);
  --tint2: rgba(34, 34, 42, 0.85);
  --hair: rgba(255, 255, 255, 0.08);
  --hair2: rgba(255, 255, 255, 0.16);
  --ink: #f5f5f7;
  --grey: #9496a1;
  --faint: #636570;
  --accent: #ff7a1a;
  --accent-hot: #ff9838;
  --radius: 18px;
  --r-sm: 12px;
}

body {
  background:
    radial-gradient(900px 520px at 72% 14%, rgba(255, 122, 26, 0.09), transparent 65%),
    radial-gradient(700px 440px at 18% 8%, rgba(120, 119, 198, 0.06), transparent 60%),
    var(--paper);
}

/* Плавающая стеклянная шапка */
.top {
  background: rgba(5, 5, 7, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hair);
}
.top-link {
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.top-cta {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--hair2);
  color: var(--ink);
}
.top-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Типографика Hero в духе HorizonX */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 122, 26, 0.1);
  border: 1px solid rgba(255, 122, 26, 0.25);
  font-size: 12px;
  letter-spacing: .12em;
}
.hero {
  border-bottom: 1px solid var(--hair);
}
.hero-title {
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 30%, #a6a8b5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  color: var(--grey);
  font-weight: 400;
}

/* Стеклянный блок генерации (Glass Composer) */
.composer-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.015) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--hair2);
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.composer-box:focus-within {
  border-color: rgba(255, 122, 26, 0.65);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 0 4px rgba(255, 122, 26, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.composer-top {
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Капсулы помощников ИИ */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--grey);
  transition: all .2s ease;
}
.tool-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--hair2);
  color: var(--ink);
}

/* Сегменты и главная кнопка */
.seg {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 4px;
}
.seg-opt {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  transition: all .2s ease;
}
.seg-opt.on {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-create {
  border-radius: 999px;
  height: 46px;
  padding: 0 24px;
  font-size: 15px;
  letter-spacing: .04em;
  background: linear-gradient(135deg, #ff8c2b 0%, #ff5e00 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 106, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-create:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(255, 106, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Bento-карточки игр */
.game-card, .sample-card {
  background: var(--tint);
  border: 1px solid var(--hair);
  border-radius: 18px;
  padding: 12px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease, background .25s ease;
}
.game-card:hover, .sample-card:hover {
  transform: translateY(-4px);
  border-color: var(--hair2);
  background: var(--tint2);
}
.cover {
  border-radius: 12px;
}
.play-badge {
  background: rgba(10, 10, 14, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.how-steps li, .band, .card {
  background: var(--tint);
  border: 1px solid var(--hair);
  border-radius: 20px;
  backdrop-filter: blur(16px);
}
