﻿/* ==========================================================================
   SilverTests — Игровая студия (Studio.aspx), прототип 03.11.2026.
   Префикс классов gst-. Та же «бумага и чернила», что у арены ботов,
   поле игры — тёмная сцена.
   ========================================================================== */
.gst {
    --gst-paper: #F6F7F2;
    --gst-grid: #E7EAE0;
    --gst-ink: #1D2433;
    --gst-muted: #5F6878;
    --gst-line: #D6DACE;
    --gst-card: #FFFFFF;
    --gst-accent: #1F4FB8;
    --gst-accent-dk: #173C8C;
    --gst-go: #15803D;
    --gst-go-dk: #116431;
    --gst-stage: #0B0D14;
    --gst-bad: #B4380C;
    --gst-font: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;
    --gst-mono: 'JetBrains Mono', Consolas, Menlo, 'Courier New', monospace;
    font-family: var(--gst-font);
    color: var(--gst-ink);
    background-color: var(--gst-paper);
    background-image:
        linear-gradient(var(--gst-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--gst-grid) 1px, transparent 1px);
    background-size: 28px 28px;
    padding: 18px clamp(12px, 2.4vw, 32px) 40px;
    font-size: 15px;
    line-height: 1.5;
}
/* main.css: body{min-width:1080px}, section{margin:2em 0} — здесь не нужно */
body { min-width: 0 !important; }
@media (max-width: 1199px) { .container { min-width: 0 !important; } }
.gst section { margin: 0; }
.gst [hidden] { display: none !important; }
.gst *, .gst *::before, .gst *::after { box-sizing: border-box; }
.gst button, .gst select, .gst input { font-family: inherit; }
.gst :focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }
.gst code { font-family: var(--gst-mono); font-size: .88em; background: rgba(29, 36, 51, .06); padding: 1px 4px; border-radius: 4px; border: 0; display: inline; margin: 0; color: inherit; white-space: normal; }
.gst svg.gst-i { width: 16px; height: 16px; flex: 0 0 16px; fill: currentColor; }

/* ---------- шапка ---------- */
.gst-head { max-width: 1400px; margin: 0 auto 14px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.gst-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); font-weight: 800; letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 6px; color: var(--gst-ink); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gst-badge { font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #7A4B00; background: #FDE9B8; border: 1px solid #F2C96B; border-radius: 999px; padding: 2px 10px; }
.gst-lead { margin: 0; max-width: 70ch; color: var(--gst-muted); font-size: 1.02rem; }
.gst-head-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: .95rem; }
.gst-head-links a { color: var(--gst-accent); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(31, 79, 184, .35); }
.gst-head-links a:hover { border-bottom-color: var(--gst-accent); }

/* ---------- шаблоны ---------- */
.gst-tpls { max-width: 1400px; margin: 0 auto 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gst-tpl {
    display: flex; gap: 10px; align-items: center; text-align: left;
    background: var(--gst-card); border: 1px solid var(--gst-line); border-radius: 10px;
    padding: 8px 12px; cursor: pointer; color: var(--gst-ink); min-height: 56px;
}
.gst-tpl:hover { border-color: #AEB6C6; }
.gst-tpl[aria-pressed="true"] { border-color: var(--gst-ink); box-shadow: inset 0 -3px 0 var(--gst-ink); }
.gst-tpl canvas { flex: 0 0 36px; width: 36px; height: 36px; image-rendering: pixelated; }
.gst-tpl b { display: block; font-size: 1rem; font-weight: 800; line-height: 1.2; }
.gst-tpl small { display: block; color: var(--gst-muted); font-size: .82rem; line-height: 1.3; margin-top: 2px; }
@media (max-width: 1099px) { .gst-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .gst-tpl small { display: none; } .gst-tpl { padding: 8px; } }

/* ---------- раскладка ---------- */
.gst-main { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
@media (max-width: 1099px) { .gst-main { grid-template-columns: minmax(0, 1fr); } .gst-play { order: -1; } }

.gst-card { background: var(--gst-card); border: 1px solid var(--gst-line); border-radius: 12px; overflow: hidden; }
.gst-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--gst-line); min-height: 52px; }
.gst-bar > b { font-weight: 800; font-size: .98rem; }
.gst-saved { margin-left: auto; color: var(--gst-muted); font-size: .85rem; }
.gst-code .CodeMirror { height: 470px; font-family: var(--gst-mono); font-size: 14px; line-height: 1.5; border: 0; }
@media (max-width: 1099px) { .gst-code .CodeMirror { height: 380px; } }
.gst-errline { background: rgba(244, 114, 72, .28) !important; }
.gst-code textarea#gstEditor { width: 100%; height: 470px; border: 0; padding: 10px; font-family: var(--gst-mono); font-size: 14px; resize: vertical; }

.gst-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; align-items: center; border-top: 1px solid var(--gst-line); }
.gst-btn {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--gst-line); background: #fff; color: var(--gst-ink); border-radius: 8px;
    padding: 8px 14px; font-weight: 700; font-size: .95rem; cursor: pointer; min-height: 40px; line-height: 1.2;
}
.gst-btn:hover { border-color: #9AA3B5; }
.gst-btn:disabled { opacity: .5; cursor: default; }
.gst-btn-go { background: var(--gst-go); border-color: var(--gst-go); color: #fff; padding: 8px 20px; }
.gst-btn-go:hover { background: var(--gst-go-dk); border-color: var(--gst-go-dk); }
.gst-btn-quiet { border-color: transparent; background: transparent; color: var(--gst-accent); padding: 6px 8px; min-height: 34px; }
.gst-btn-quiet:hover { border-color: transparent; text-decoration: underline; }
.gst-btn[aria-pressed="true"] { background: var(--gst-ink); border-color: var(--gst-ink); color: #fff; }
.gst-kbd { color: var(--gst-muted); font-size: .82rem; }

/* ---------- вывод и ошибки ---------- */
.gst-console { border-top: 1px solid var(--gst-line); }
.gst-console-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: #F3F4EF; font-size: .85rem; color: var(--gst-muted); font-weight: 700; }
.gst-console-head .gst-btn-quiet { margin-left: auto; font-size: .85rem; min-height: 28px; padding: 2px 6px; }
.gst-out { margin: 0; max-height: 220px; min-height: 64px; overflow: auto; padding: 8px 12px 10px; font-family: var(--gst-mono); font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; color: var(--gst-ink); background: #fff; }
.gst-out-empty { color: var(--gst-muted); font-family: var(--gst-font); font-size: .9rem; }
.gst-err { display: block; margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: #FCEBE3; border-left: 4px solid var(--gst-bad); font-family: var(--gst-font); font-size: .92rem; white-space: normal; }
.gst-err b { font-weight: 800; }
.gst-err .gst-err-line { color: var(--gst-bad); text-decoration: underline; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; font-weight: 800; }
.gst-err .gst-err-raw { display: block; margin-top: 4px; font-family: var(--gst-mono); font-size: 12.5px; color: #6B2A12; }
.gst-note { display: block; margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: #EEF2FB; font-family: var(--gst-font); font-size: .9rem; white-space: normal; }

/* ---------- поле игры ---------- */
.gst-play-bar .gst-chip { margin-left: auto; font-size: .82rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; background: #EEF0EA; color: var(--gst-muted); }
.gst-chip[data-s="running"] { background: #DCF2E3; color: var(--gst-go-dk); }
.gst-chip[data-s="warming"], .gst-chip[data-s="loading"] { background: #FDF0CF; color: #7A4B00; }
.gst-chip[data-s="error"] { background: #FCE2D7; color: var(--gst-bad); }
.gst-fps { font-family: var(--gst-mono); font-size: .8rem; color: var(--gst-muted); min-width: 5.5em; text-align: right; }
.gst-fps.gst-slow { color: var(--gst-bad); font-weight: 700; }

.gst-stage-wrap { background: var(--gst-stage); position: relative; }
.gst-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 72vh; margin: 0 auto; background: var(--gst-stage); }
.gst-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--gst-stage); }
.gst-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: rgba(11, 13, 20, .78); color: #E9ECF3; text-align: center; padding: 20px; z-index: 2;
}
.gst-overlay p { margin: 0; max-width: 36ch; font-size: 1rem; color: #C9CFDC; }
.gst-big {
    width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--gst-go); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.gst-big:hover { background: var(--gst-go-dk); }
.gst-big svg { width: 32px; height: 32px; fill: currentColor; margin-left: 4px; }
.gst-spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: gst-spin 0.9s linear infinite; }
@keyframes gst-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gst-spin { animation: none; } }

.gst-pad { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px 14px; user-select: none; -webkit-user-select: none; touch-action: none; }
.gst-pad-dir { display: grid; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(2, 54px); gap: 6px; }
.gst-pad button {
    border: 1px solid #3A4258; background: #1E2433; color: #E9ECF3; border-radius: 12px; font-size: 1.3rem; font-weight: 800;
    touch-action: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.gst-pad button.gst-on { background: #3A4A73; }
.gst-pad-up { grid-column: 2; grid-row: 1; }
.gst-pad-left { grid-column: 1; grid-row: 2; }
.gst-pad-down { grid-column: 2; grid-row: 2; }
.gst-pad-right { grid-column: 3; grid-row: 2; }
.gst-pad-space { width: 120px; height: 72px; font-size: 1rem !important; }

.gst-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; align-items: center; border-top: 1px solid var(--gst-line); }
.gst-tools .gst-hint { color: var(--gst-muted); font-size: .85rem; margin-left: auto; }

/* на весь экран */
.gst-stage-wrap:fullscreen { display: flex; flex-direction: column; justify-content: center; }
.gst-stage-wrap:fullscreen .gst-stage { max-height: none; height: auto; width: min(100vw, calc((100vh - var(--gst-padh, 0px)) * var(--gst-ar, 1.3333))); }

/* ---------- справка ---------- */
.gst-help { max-width: 1400px; margin: 22px auto 0; }
.gst-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.gst-tab { border: 1px solid var(--gst-line); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; color: var(--gst-ink); }
.gst-tab[aria-selected="true"] { background: var(--gst-ink); border-color: var(--gst-ink); color: #fff; }
.gst-panel { background: var(--gst-card); border: 1px solid var(--gst-line); border-radius: 12px; padding: 16px 18px; }
.gst-panel h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 8px; }
.gst-panel h3 { font-size: 1rem; font-weight: 800; margin: 16px 0 6px; }
.gst-panel p, .gst-panel li { max-width: 80ch; }
.gst-cheat { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px 22px; }
@media (max-width: 520px) { .gst-cheat { grid-template-columns: minmax(0, 1fr); } }
.gst-cheat table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.gst-cheat td { padding: 5px 6px; border-bottom: 1px solid var(--gst-line); vertical-align: top; }
.gst-cheat td:first-child { width: 52%; }
.gst-cheat pre { margin: 0; font-family: var(--gst-mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; color: #173C8C; }
.gst-sprites { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gst-sprite { border: 1px solid var(--gst-line); border-radius: 10px; padding: 10px; text-align: center; background: #FAFBF7; }
.gst-sprite canvas { width: 64px; height: 64px; image-rendering: pixelated; display: block; margin: 0 auto 6px; }
.gst-sprite b { display: block; font-size: .9rem; }
.gst .gst-sprite code { display: inline-block; margin: 4px 0; font-size: 12px; }
.gst-sprite .gst-row { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.gst-mini { border: 1px solid var(--gst-line); background: #fff; border-radius: 6px; padding: 2px 8px; font-size: .8rem; font-weight: 700; cursor: pointer; color: var(--gst-accent); text-decoration: none; }
.gst-mini:hover { border-color: #9AA3B5; }
.gst-sounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.gst-sound { display: flex; align-items: center; gap: 10px; border: 1px solid var(--gst-line); border-radius: 10px; padding: 8px 10px; background: #FAFBF7; }
.gst-sound .gst-btn { min-height: 34px; padding: 4px 10px; }
.gst-sound span { font-size: .86rem; color: var(--gst-muted); }
.gst-panel pre.gst-code-sample { background: #F3F4EF; border-radius: 8px; padding: 10px 12px; font-family: var(--gst-mono); font-size: 13px; overflow: auto; }
.gst-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--gst-ink); color: #fff; padding: 8px 16px; border-radius: 8px; font-size: .9rem; z-index: 1000; pointer-events: none; }

/* ---------- режимы: «Игры 2D» и «Физика 3D» ---------- */
.gst[data-mode="game"] [data-only]:not([data-only~="game"]),
.gst[data-mode="phys"] [data-only]:not([data-only~="phys"]),
.gst[data-mode="block"] [data-only]:not([data-only~="block"]) { display: none !important; }
.gst-modes { max-width: 1400px; margin: 0 auto 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.gst-mode {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; cursor: pointer;
    border: 1px solid var(--gst-line); background: #fff; color: var(--gst-ink); border-radius: 10px; padding: 8px 18px 9px; min-height: 44px;
}
.gst-mode b { font-size: 1.02rem; font-weight: 800; line-height: 1.2; }
.gst-mode small { font-size: .8rem; color: var(--gst-muted); line-height: 1.25; }
.gst-mode:hover { border-color: #9AA3B5; }
.gst-mode[aria-selected="true"] { background: var(--gst-ink); border-color: var(--gst-ink); color: #fff; }
.gst-mode[aria-selected="true"] small { color: #C9CFDC; }
.gst-tpls.gst-tpls-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1099px) { .gst-tpls.gst-tpls-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gst-tpls.gst-tpls-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gst-tpls.gst-tpls-10 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1099px) { .gst-tpls.gst-tpls-10 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gst-tpls.gst-tpls-10 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gst-tpl canvas.gst-tpl-vec { image-rendering: auto; }
.gst-blocks .gst-sprite canvas { image-rendering: pixelated; }
.gst-blocks small { display: block; color: var(--gst-muted); font-size: .8rem; }
.gst[data-mode="block"] .gst-stage { aspect-ratio: 16 / 10; }
@media (max-width: 700px) { .gst[data-mode="block"] .gst-stage { aspect-ratio: 4 / 5; max-height: 74vh; } }
.gst .gst-hint-touch { display: none; }
@media (pointer: coarse) { .gst .gst-hint-mouse { display: none; } .gst .gst-hint-touch { display: inline; } }

/* ---------- проекты на сайте: «Поделиться», «Мои проекты» ---------- */
.gst-actions .gst-btn-share { margin-left: auto; border-color: var(--gst-accent); color: var(--gst-accent); }
.gst-actions .gst-btn-share:hover { background: #EEF2FB; border-color: var(--gst-accent-dk); color: var(--gst-accent-dk); }
.gst-bar .gst-saved + .gst-btn-quiet { margin-left: -4px; }
.gst-proj {
    max-width: 1400px; margin: 0 auto 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
    background: #EEF2FB; border: 1px solid #C9D5F0; border-left: 4px solid var(--gst-accent); border-radius: 10px; padding: 10px 14px;
}
.gst-proj-main { flex: 1 1 420px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.gst-proj-main b { font-size: 1.02rem; font-weight: 800; overflow-wrap: anywhere; }
.gst-proj-meta { color: var(--gst-muted); font-size: .88rem; }
.gst-proj-meta a { color: var(--gst-accent); }
.gst-proj-note { flex-basis: 100%; font-size: .9rem; color: var(--gst-ink); }
.gst-proj-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.gst-proj-acts .gst-btn { min-height: 36px; padding: 6px 12px; }

.gst-dlg { border: 0; padding: 0; border-radius: 14px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--gst-ink); background: #fff; box-shadow: 0 18px 50px rgba(15, 20, 35, .35); font-family: var(--gst-font); }
.gst-dlg.gst-dlg-wide { width: min(860px, calc(100vw - 24px)); }
.gst-dlg::backdrop { background: rgba(15, 20, 35, .55); }
/* браузер без <dialog> (Safari до 15.4): окно — обычный блок, показываем сами и затемняем тенью */
.gst-dlg:not([open]) { display: none; }
.gst-dlg.gst-dlg-old[open] { display: block; position: fixed; top: 16px; left: 0; right: 0; margin: 0 auto; z-index: 1001; box-shadow: 0 0 0 100vmax rgba(15, 20, 35, .55); }
.gst-dlg-in { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.gst-dlg-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; border-bottom: 1px solid var(--gst-line); }
.gst-dlg-head h2 { font-size: 1.2rem; font-weight: 800; margin: 0; flex: 1; }
.gst-dlg-x { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; color: var(--gst-muted); }
.gst-dlg-x:hover { background: #F1F2EE; color: var(--gst-ink); }
.gst-dlg-body { padding: 14px 18px 18px; overflow: auto; font-size: .95rem; }
.gst-dlg-body h3 { font-size: 1rem; font-weight: 800; margin: 14px 0 8px; }
.gst-dlg-body h3:first-child { margin-top: 0; }
.gst-dlg-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.gst-field { display: block; margin: 0 0 12px; }
.gst-field span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.gst-field input, .gst-link input {
    width: 100%; border: 1px solid #B9C0CD; border-radius: 8px; padding: 9px 11px; font-size: 1rem; color: var(--gst-ink); background: #fff; min-height: 42px;
}
.gst-field input:focus, .gst-link input:focus { border-color: var(--gst-accent); outline: 2px solid rgba(31, 79, 184, .25); outline-offset: 0; }
.gst-share-shot { aspect-ratio: 8 / 5; background: var(--gst-stage); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
.gst-share-shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gst-share-shot span { color: #C9CFDC; font-size: .9rem; padding: 16px; max-width: 40ch; }
.gst-share-world { margin-top: 12px; padding: 10px 12px; background: #F6F7F2; border-radius: 10px; }
.gst-check { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; margin: 0; }
.gst-check input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--gst-accent); }
.gst-share-world small { display: block; margin: 4px 0 0 28px; color: var(--gst-muted); font-size: .85rem; }
.gst-share-world small:empty { display: none; }
.gst-share-who { margin: 12px 0 0; color: var(--gst-muted); font-size: .88rem; }
.gst-share-who a, .gst-muted a { color: var(--gst-accent); font-weight: 700; }
.gst-share-err { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: #FCEBE3; border-left: 4px solid var(--gst-bad); font-size: .92rem; }
.gst-share-ok { margin: 0 0 10px; font-weight: 700; }
.gst-link { display: flex; gap: 8px; }
.gst-link input { flex: 1; min-width: 0; font-family: var(--gst-mono); font-size: .9rem; }
.gst-muted { color: var(--gst-muted); font-size: .88rem; margin: 10px 0 0; }

.gst-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gst-pcard { border: 1px solid var(--gst-line); border-radius: 10px; overflow: hidden; background: #FAFBF7; display: flex; flex-direction: column; }
.gst-pcard.gst-pcard-cur { border-color: var(--gst-accent); box-shadow: 0 0 0 1px var(--gst-accent); }
.gst-pcard img, .gst-pcard-noimg { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; display: block; background: var(--gst-stage); }
.gst-pcard-noimg { display: flex; align-items: center; justify-content: center; color: #9AA3B5; font-weight: 800; font-size: .9rem; }
.gst-pcard-txt { padding: 8px 10px 2px; min-width: 0; }
.gst-pcard-txt b { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gst-pcard-txt small { display: block; color: var(--gst-muted); font-size: .8rem; }
.gst-pcard-acts { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px 10px; margin-top: auto; }
.gst-pcard-acts .gst-mini { min-height: 30px; display: inline-flex; align-items: center; }
.gst-mini.gst-mini-bad { color: var(--gst-bad); }
.gst-mini:disabled { opacity: .5; cursor: default; }
/* две колонки на ноутбуке: подсказка Ctrl+Enter уступает место «Поделиться» (она есть и во всплывающей подсказке «Запустить») */
@media (min-width: 1100px) and (max-width: 1599px) { .gst.gst-can-save .gst-kbd { display: none; } }
.gst-dlg-in:focus { outline: none; }
@media (max-width: 520px) {
    .gst-actions .gst-btn-share { margin-left: 0; }
    .gst-link { flex-direction: column; }
    .gst-dlg-body { padding: 12px 14px 16px; }
}

/* ---------- ИИ-помощник «Опиши мир» (СильверБлок, 05.11.2026) ---------- */
.gst-ai { border-bottom: 1px solid var(--gst-line); padding: 8px 12px; background: #F3F6FC; }
.gst-ai-row { display: flex; align-items: flex-start; gap: 8px; }
.gst-ai-label { flex: none; font-weight: 800; color: var(--gst-accent-dk); margin: 0; padding-top: 7px; white-space: nowrap; }
.gst-ai textarea { flex: 1; min-width: 0; resize: none; font: inherit; font-size: 14px; line-height: 1.35; color: var(--gst-ink); background: #fff; border: 1px solid var(--gst-line); border-radius: 8px; padding: 6px 9px; min-height: 34px; max-height: 120px; overflow-y: auto; }
.gst-ai textarea:focus { outline: 2px solid var(--gst-accent); outline-offset: 0; border-color: var(--gst-accent); }
.gst-btn-ai { flex: none; background: var(--gst-accent); border-color: var(--gst-accent); color: #fff; }
.gst-btn-ai:hover { background: var(--gst-accent-dk); border-color: var(--gst-accent-dk); }
.gst-ai-note { font-size: 13px; line-height: 1.35; color: var(--gst-muted); margin-top: 4px; min-height: 0; }
.gst-ai-note:empty { display: none; }
.gst-ai-note a, .gst-ai-note .gst-btn-quiet { color: var(--gst-accent); font-size: 13px; min-height: 0; padding: 0 2px; }
.gst-ai-note.gst-ai-bad { color: var(--gst-bad); }
.gst-ai-spin { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border: 2px solid rgba(31, 79, 184, .25); border-top-color: var(--gst-accent); border-radius: 50%; animation: gst-ai-spin .8s linear infinite; }
@keyframes gst-ai-spin { to { transform: rotate(360deg); } }
.gst-ai-review { margin-top: 8px; background: #fff; border: 1px solid var(--gst-line); border-radius: 8px; padding: 8px 10px; }
.gst-ai-msg { margin: 0 0 8px; font-size: 14px; }
.gst-ai-diff { font-family: var(--gst-mono); font-size: 12px; line-height: 1.45; max-height: 260px; overflow: auto; border: 1px solid var(--gst-grid); border-radius: 6px; background: #FBFBF8; }
.gst-d { white-space: pre; padding: 0 8px 0 22px; position: relative; min-height: 1.45em; }
.gst-d::before { position: absolute; left: 7px; color: var(--gst-muted); }
.gst-d-add { background: #E3F6E8; }
.gst-d-add::before { content: '+'; color: var(--gst-go); }
.gst-d-del { background: #FBE6E1; color: #7A2C14; text-decoration: line-through; text-decoration-color: rgba(122, 44, 20, .35); }
.gst-d-del::before { content: '−'; color: var(--gst-bad); }
.gst-d-gap { color: var(--gst-muted); font-family: var(--gst-font); font-style: italic; padding: 2px 8px; background: #F1F2EC; }
.gst-ai-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.gst-ai-count { font-size: 13px; color: var(--gst-muted); }
.gst-err .gst-ai-fix { margin-left: 8px; font-size: 13px; padding: 2px 10px; min-height: 0; vertical-align: baseline; }
@media (max-width: 560px) {
    .gst-ai-row { flex-wrap: wrap; }
    .gst-ai-label { width: 100%; padding-top: 0; }
}
