:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}

/* BrixTree · дизайн-система. Светлая лавандовая мастерская: фиолетовый акцент (ягодки Брикса) и зелень листвы; трек Engineer — тёмный лабораторный стенд. */
:root {
  --bg: #f7f5fe; --surface: #ffffff; --surface-2: #f3effd; --ink: #16133b; --muted: #5f5b7d; --line: #e7e2f7; --line-2: #d9d1f3;
  --accent: #7a3cf0; --accent-2: #9466ff; --accent-ink: #ffffff; --accent-soft: #efe7ff; --cyan: #2fd4f0;
  --leaf: #2e9e52; --leaf-2: #9fd34a; --leaf-soft: #e6f6e9; --bark: #8a5430; /* BrixTree: листва и кора Брикса */
  --ok: #43c26f; --ok-soft: #e3f7e9; --warn: #ff8a1f; --err: #ec4f69; --err-soft: #fdebef;
  --k: #fff2e3; --k-chip: #ffe2c2; --k-ink: #b45a00; --b: #f1ebff; --b-chip: #e3d7ff; --b-ink: #6430d6;
  --c: #e8f2ff; --c-chip: #d5e7ff; --c-ink: #1d6bd2; --e: #e7f7ed; --e-chip: #d0f0db; --e-ink: #22844a;
  --stage-a: #f1edff; --stage-b: #e1d8ff; --stage-c: #d3c7fa;
  --code-bg: #14112b; --code-ink: #e4e0ff; --code-dim: #7f78a8; --code-kw: #ff9f5a; --code-ty: #f58dc0; --code-fn: #6fe3d6; --code-num: #ffd56b; --code-str: #a5e07f;
  --f-display: "Manrope", "Onest", system-ui, sans-serif; --f-body: "Onest", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r-xl: 28px; --r-lg: 20px; --r: 14px; --shadow: 0 10px 30px -12px rgba(60, 30, 140, .22); --shadow-lg: 0 24px 60px -24px rgba(60, 30, 140, .35);
  color-scheme: light;
}
:root[data-track="engineer"] {
  --bg: #0f0d1f; --surface: #181530; --surface-2: #1f1b3d; --ink: #ece8ff; --muted: #a39dc8; --line: #2c2752; --line-2: #3a3468;
  --accent: #9a6bff; --accent-2: #b38dff; --accent-soft: #2a2154; --stage-a: #1d1940; --stage-b: #15122f; --stage-c: #0f0d24;
  --k: #2a2140; --b: #231d45; --c: #182a45; --e: #16302a; --ok-soft: #173326; --err-soft: #3a1a26; --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --leaf: #5fd384; --leaf-soft: #17321f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--f-body); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 50; background: var(--bg); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 10px; }
svg:where(:not([class*="blockly"])) { width: 1.15em; height: 1.15em; flex: none; } /* размеры Blockly задаёт сам атрибутами */
img[data-ref], img[data-my-img] { opacity: 0; transition: opacity .35s; } img.in { opacity: 1; }

/* ── кнопки ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 2px solid transparent; border-radius: 16px; padding: 11px 20px; font-weight: 700; font-size: 15px; line-height: 1.2; background: var(--surface); transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 22px -10px var(--accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.primary:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn.outline { border-color: var(--line-2); background: var(--surface); }
.btn.outline:hover { border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn.xl { padding: 16px 26px; font-size: 17px; border-radius: 18px; }
.btn.big { width: 100%; padding: 17px 22px; font-size: 17px; border-radius: 18px; }
.btn svg { width: 22px; height: 22px; }
.btn.outline.listen { width: 100%; border-color: var(--accent); color: var(--accent); padding: 14px; border-radius: 16px; }
.btn.outline.listen svg { width: 26px; height: 26px; }

/* ── навигация ── */
.nav { display: flex; align-items: center; gap: 24px; max-width: 1280px; margin: 0 auto; padding-block: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font: 800 26px/1 var(--f-display); letter-spacing: -0.02em; } .brand b i { font-style: normal; color: var(--leaf, #2e9e52); }
.brand.sm b { font-size: 21px; }
.logo-mark { width: 42px; height: 42px; position: relative; display: inline-block; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3ClinearGradient id='w' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23efbd7c'/%3E%3Cstop offset='.6' stop-color='%23df9d59'/%3E%3Cstop offset='1' stop-color='%23c98443'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f3c88c'/%3E%3Cstop offset='1' stop-color='%23cf8d4d'/%3E%3C/linearGradient%3E%3ClinearGradient id='i' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='.15' stop-color='%232a140a'/%3E%3Cstop offset='.75' stop-color='%237c3f16'/%3E%3Cstop offset='1' stop-color='%239a5420'/%3E%3C/linearGradient%3E%3CradialGradient id='b'%3E%3Cstop offset='0' stop-color='%23ee673a' stop-opacity='.62'/%3E%3Cstop offset='1' stop-color='%23ee673a' stop-opacity='0'/%3E%3C/radialGradient%3E%3CclipPath id='el'%3E%3Cpath d='M18.76 33.35 19.22 32.76 19.62 32.11 19.95 31.42 20.21 30.68 20.38 29.92 20.48 29.14 20.5 28.35 20.43 27.56 20.28 26.79 20.05 26.04 19.75 25.33 19.38 24.67 18.94 24.06 18.44 23.51 17.88 23.03 17.28 22.63 16.64 22.32 15.98 22.09 15.29 21.95 14.6 21.9 13.91 21.95 13.22 22.09 12.56 22.32 11.92 22.63 11.32 23.03 10.76 23.51 10.26 24.06 9.82 24.67 9.45 25.33 9.15 26.04 8.92 26.79 8.77 27.56 8.7 28.35 8.72 29.14 8.82 29.92 8.99 30.68 9.25 31.42 9.58 32.11 9.98 32.76 10.44 33.35Z'/%3E%3C/clipPath%3E%3CclipPath id='er'%3E%3Cpath d='M37.56 33.35 38.02 32.76 38.42 32.11 38.75 31.42 39.01 30.68 39.18 29.92 39.28 29.14 39.3 28.35 39.23 27.56 39.08 26.79 38.85 26.04 38.55 25.33 38.18 24.67 37.74 24.06 37.24 23.51 36.68 23.03 36.08 22.63 35.44 22.32 34.78 22.09 34.09 21.95 33.4 21.9 32.71 21.95 32.02 22.09 31.36 22.32 30.72 22.63 30.12 23.03 29.56 23.51 29.06 24.06 28.62 24.67 28.25 25.33 27.95 26.04 27.72 26.79 27.57 27.56 27.5 28.35 27.52 29.14 27.62 29.92 27.79 30.68 28.05 31.42 28.38 32.11 28.78 32.76 29.24 33.35Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cpath d='M24 15.2C23.6 11.6 24.3 8.6 25.9 6.2M24.2 11.2C22.9 9.7 21.2 9 19.4 8.9' fill='none' stroke='%234a8022' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M25.6 6.6Q31.98 7.41 36.4 1.4Q30.33 1.22 25.6 6.6Z' fill='%2369a625'/%3E%3Cpath d='M24.1 10.9Q21.25 6.77 15.4 7Q18.46 10.65 24.1 10.9Z' fill='%237db22b'/%3E%3Cpath d='M26.46 6.18Q31.23 4.47 34.89 2.13M23.4 10.59Q19.91 8.59 16.62 7.55' fill='none' stroke='%239dcf55' stroke-width='.55' stroke-linecap='round'/%3E%3Cpath d='M4 26.4Q4.3 22.25 0 20.2Q0.12 24.07 4 26.4Z' fill='%237db22b'/%3E%3Cellipse cx='3.9' cy='30' rx='2.6' ry='4.4' fill='%23cf8d4d'/%3E%3Cpath d='M44 26.4Q43.7 22.25 48 20.2Q47.88 24.07 44 26.4Z' fill='%2369a625'/%3E%3Cellipse cx='44.1' cy='30' rx='2.6' ry='4.4' fill='%23cf8d4d'/%3E%3Crect x='9.2' y='10.4' width='12' height='6.4' rx='2' fill='url(%23c)' stroke='%23b5763a' stroke-width='.5'/%3E%3Crect x='10.2' y='11' width='10' height='1.5' rx='.75' fill='%23f8d9a8' opacity='.8'/%3E%3Crect x='26.8' y='10.4' width='12' height='6.4' rx='2' fill='url(%23c)' stroke='%23b5763a' stroke-width='.5'/%3E%3Crect x='27.8' y='11' width='10' height='1.5' rx='.75' fill='%23f8d9a8' opacity='.8'/%3E%3Cpath d='M44 29.2 43.91 32.96 43.73 34.72 43.47 36.09 43.12 37.24 42.7 38.25 42.19 39.13 41.59 39.92 40.91 40.62 40.15 41.24 39.29 41.79 38.33 42.27 37.25 42.68 36.06 43.02 34.71 43.3 33.17 43.52 31.34 43.68 29 43.77 24 43.8 19 43.77 16.66 43.68 14.83 43.52 13.29 43.3 11.94 43.02 10.75 42.68 9.67 42.27 8.71 41.79 7.85 41.24 7.09 40.62 6.41 39.92 5.81 39.13 5.3 38.25 4.88 37.24 4.53 36.09 4.27 34.72 4.09 32.96 4 29.2 4.03 23.94 4.13 22.1 4.3 20.75 4.53 19.67 4.84 18.75 5.21 17.95 5.66 17.26 6.19 16.66 6.8 16.13 7.5 15.66 8.29 15.26 9.2 14.92 10.25 14.64 11.46 14.41 12.89 14.23 14.66 14.1 17.08 14.03 24 14 30.92 14.03 33.34 14.1 35.11 14.23 36.54 14.41 37.75 14.64 38.8 14.92 39.71 15.26 40.5 15.66 41.2 16.13 41.81 16.66 42.34 17.26 42.79 17.95 43.16 18.75 43.47 19.67 43.7 20.75 43.87 22.1 43.97 23.94Z' fill='url(%23w)' stroke='%23b5763a' stroke-width='.6'/%3E%3Cpath d='M9.5 19.5c-.6 6 .7 12.4-.3 19.6M38.6 19c.6 5.2-.5 10.6.4 16.4' fill='none' stroke='%23c48344' stroke-width='.45' opacity='.55' stroke-linecap='round'/%3E%3Cellipse cx='10' cy='35.6' rx='4.2' ry='2.8' fill='url(%23b)'/%3E%3Cellipse cx='38' cy='35.6' rx='4.2' ry='2.8' fill='url(%23b)'/%3E%3Cpath d='M18.76 33.35 19.22 32.76 19.62 32.11 19.95 31.42 20.21 30.68 20.38 29.92 20.48 29.14 20.5 28.35 20.43 27.56 20.28 26.79 20.05 26.04 19.75 25.33 19.38 24.67 18.94 24.06 18.44 23.51 17.88 23.03 17.28 22.63 16.64 22.32 15.98 22.09 15.29 21.95 14.6 21.9 13.91 21.95 13.22 22.09 12.56 22.32 11.92 22.63 11.32 23.03 10.76 23.51 10.26 24.06 9.82 24.67 9.45 25.33 9.15 26.04 8.92 26.79 8.77 27.56 8.7 28.35 8.72 29.14 8.82 29.92 8.99 30.68 9.25 31.42 9.58 32.11 9.98 32.76 10.44 33.35Z' fill='%235a3518' transform='translate(0 .35)' opacity='.55'/%3E%3Cpath d='M18.76 33.35 19.22 32.76 19.62 32.11 19.95 31.42 20.21 30.68 20.38 29.92 20.48 29.14 20.5 28.35 20.43 27.56 20.28 26.79 20.05 26.04 19.75 25.33 19.38 24.67 18.94 24.06 18.44 23.51 17.88 23.03 17.28 22.63 16.64 22.32 15.98 22.09 15.29 21.95 14.6 21.9 13.91 21.95 13.22 22.09 12.56 22.32 11.92 22.63 11.32 23.03 10.76 23.51 10.26 24.06 9.82 24.67 9.45 25.33 9.15 26.04 8.92 26.79 8.77 27.56 8.7 28.35 8.72 29.14 8.82 29.92 8.99 30.68 9.25 31.42 9.58 32.11 9.98 32.76 10.44 33.35Z' fill='%23fff8eb'/%3E%3Cg clip-path='url(%23el)'%3E%3Cellipse cx='15.45' cy='28.8' rx='4.6' ry='5.6' fill='url(%23i)'/%3E%3Cellipse cx='15.45' cy='28.3' rx='2.6' ry='3' fill='%23140b06'/%3E%3C/g%3E%3Cellipse cx='17.05' cy='26.4' rx='1.55' ry='1.45' fill='%23fff'/%3E%3Ccircle cx='13.55' cy='31.1' r='.6' fill='%23fff8e8'/%3E%3Cpath d='M20.48 29.94 20.6 28.61 20.49 27.28 20.15 26.01 19.59 24.83 18.85 23.8 17.94 22.95 16.9 22.32 15.77 21.93 14.6 21.8 13.43 21.93 12.3 22.32 11.26 22.95 10.35 23.8 9.61 24.83 9.05 26.01 8.71 27.28 8.6 28.61 8.72 29.94' fill='none' stroke='%23321d10' stroke-width='1.05' stroke-linecap='round'/%3E%3Cpath d='M37.56 33.35 38.02 32.76 38.42 32.11 38.75 31.42 39.01 30.68 39.18 29.92 39.28 29.14 39.3 28.35 39.23 27.56 39.08 26.79 38.85 26.04 38.55 25.33 38.18 24.67 37.74 24.06 37.24 23.51 36.68 23.03 36.08 22.63 35.44 22.32 34.78 22.09 34.09 21.95 33.4 21.9 32.71 21.95 32.02 22.09 31.36 22.32 30.72 22.63 30.12 23.03 29.56 23.51 29.06 24.06 28.62 24.67 28.25 25.33 27.95 26.04 27.72 26.79 27.57 27.56 27.5 28.35 27.52 29.14 27.62 29.92 27.79 30.68 28.05 31.42 28.38 32.11 28.78 32.76 29.24 33.35Z' fill='%235a3518' transform='translate(0 .35)' opacity='.55'/%3E%3Cpath d='M37.56 33.35 38.02 32.76 38.42 32.11 38.75 31.42 39.01 30.68 39.18 29.92 39.28 29.14 39.3 28.35 39.23 27.56 39.08 26.79 38.85 26.04 38.55 25.33 38.18 24.67 37.74 24.06 37.24 23.51 36.68 23.03 36.08 22.63 35.44 22.32 34.78 22.09 34.09 21.95 33.4 21.9 32.71 21.95 32.02 22.09 31.36 22.32 30.72 22.63 30.12 23.03 29.56 23.51 29.06 24.06 28.62 24.67 28.25 25.33 27.95 26.04 27.72 26.79 27.57 27.56 27.5 28.35 27.52 29.14 27.62 29.92 27.79 30.68 28.05 31.42 28.38 32.11 28.78 32.76 29.24 33.35Z' fill='%23fff8eb'/%3E%3Cg clip-path='url(%23er)'%3E%3Cellipse cx='32.55' cy='28.8' rx='4.6' ry='5.6' fill='url(%23i)'/%3E%3Cellipse cx='32.55' cy='28.3' rx='2.6' ry='3' fill='%23140b06'/%3E%3C/g%3E%3Cellipse cx='34.15' cy='26.4' rx='1.55' ry='1.45' fill='%23fff'/%3E%3Ccircle cx='30.65' cy='31.1' r='.6' fill='%23fff8e8'/%3E%3Cpath d='M39.28 29.94 39.4 28.61 39.29 27.28 38.95 26.01 38.39 24.83 37.65 23.8 36.74 22.95 35.7 22.32 34.57 21.93 33.4 21.8 32.23 21.93 31.1 22.32 30.06 22.95 29.15 23.8 28.41 24.83 27.85 26.01 27.51 27.28 27.4 28.61 27.52 29.94' fill='none' stroke='%23321d10' stroke-width='1.05' stroke-linecap='round'/%3E%3Cpath d='M20.4 19.65 19.62 18.92 18.85 18.74 18.07 18.61 17.3 18.53 16.52 18.48 15.75 18.47 14.97 18.5 14.2 18.57 13.42 18.68 12.65 18.83 11.88 19.02 11.1 19.25 10.32 19.53 9.55 19.86 8.78 20.24 8 20.76 8 21.04 8.78 20.92 9.55 20.74 10.32 20.58 11.1 20.45 11.88 20.34 12.65 20.27 13.42 20.24 14.2 20.23 14.97 20.26 15.75 20.33 16.52 20.43 17.3 20.57 18.07 20.75 18.85 20.96 19.62 21.19 20.4 20.95Z' fill='%2378401c'/%3E%3Cpath d='M27.6 19.65 28.38 18.92 29.15 18.74 29.93 18.61 30.7 18.53 31.48 18.48 32.25 18.47 33.02 18.5 33.8 18.57 34.58 18.68 35.35 18.83 36.12 19.02 36.9 19.25 37.67 19.53 38.45 19.86 39.23 20.24 40 20.76 40 21.04 39.23 20.92 38.45 20.74 37.67 20.58 36.9 20.45 36.12 20.34 35.35 20.27 34.58 20.24 33.8 20.23 33.02 20.26 32.25 20.33 31.48 20.43 30.7 20.57 29.93 20.75 29.15 20.96 28.38 21.19 27.6 20.95Z' fill='%2378401c'/%3E%3CclipPath id='m'%3E%3Cpath d='M19.9 35.4Q24 34.9 28.1 35.4C28.1 41.25 19.9 41.25 19.9 35.4Z'/%3E%3C/clipPath%3E%3Cpath d='M19.9 35.4Q24 34.9 28.1 35.4C28.1 41.25 19.9 41.25 19.9 35.4Z' fill='%232a0f09' stroke='%23a8682f' stroke-width='.55' stroke-linejoin='round'/%3E%3Cg clip-path='url(%23m)'%3E%3Cellipse cx='22.7' cy='39.3' rx='2.2' ry='1.7' fill='%23d9605a'/%3E%3Cellipse cx='25.3' cy='39.3' rx='2.2' ry='1.7' fill='%23d9605a'/%3E%3Cpath d='M24 38.1v1.4' stroke='%23a23b39' stroke-width='.35' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 4px 6px rgba(40, 120, 70, .25)); } /* Брикс v3: голова-сквиркл, шляпки, росток, глаза с радужкой (src/logo.svg) */
.brand.sm .logo-mark { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 28px; margin: 0 auto; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; cursor: pointer; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-links a.on, .nav-links a:hover { border-color: var(--accent); }
.nav-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--av, var(--accent)); color: #fff; font: 800 17px var(--f-display); flex: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.avatar-btn { display: inline-flex; align-items: center; gap: 10px; border: 0; background: var(--surface); border-radius: 999px; padding: 4px 16px 4px 4px; font-weight: 700; box-shadow: var(--shadow); }
@media (max-width: 860px) { .nav-links { order: 3; width: 100%; margin: 0; gap: 18px; overflow-x: auto; } }

/* ── главная ── */
.landing { max-width: 1280px; margin: 0 auto; padding-bottom: 40px; overflow-x: clip; }
#app { overflow-x: clip; }
.hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 12px; align-items: center; min-height: 560px; position: relative; }
.hero::before { content: ""; position: absolute; inset: -90px -50vw -60px -50vw; z-index: -1; background: radial-gradient(42% 62% at 66% 46%, var(--stage-b), color-mix(in srgb, var(--stage-a) 70%, transparent) 55%, transparent 80%); pointer-events: none; }
.kicker-chip { display: inline-flex; align-items: center; gap: 10px; font: 700 12.5px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--accent-soft); padding: 8px 16px; border-radius: 999px; }
.kicker-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.hero h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.02; font-weight: 800; margin: 22px 0 18px; }
.hero-lead { font-size: 19px; color: color-mix(in srgb, var(--ink) 80%, transparent); max-width: 34ch; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-feats { list-style: none; padding: 0; margin: 34px 0 0; display: flex; gap: 28px; flex-wrap: wrap; }
.hero-feats li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); line-height: 1.3; }
.hero-feats svg { width: 30px; height: 30px; color: var(--ink); }
.hero-stage { position: relative; height: min(620px, 72vh); min-height: 420px; }
.hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; -webkit-mask-image: radial-gradient(ellipse 72% 78% at 54% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 72% 78% at 54% 50%, #000 62%, transparent 100%); }
.callout { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--surface); border-radius: 16px; padding: 10px 16px 10px 10px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 10px; box-shadow: var(--shadow); white-space: nowrap; will-change: transform; margin: -22px 0 0 -10px; }
.callout i { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.callout i svg { width: 18px; height: 18px; }
.callout::after { content: ""; position: absolute; left: 22px; bottom: -7px; width: 14px; height: 14px; background: var(--surface); transform: rotate(45deg); border-radius: 3px; }
.callout.bip-say { padding: 14px 18px; line-height: 1.3; font-size: 15px; margin: -64px 0 0 -16px; }
@media (max-width: 960px) { .kicker-chip { font-size: 11px; letter-spacing: .07em; } .hero { grid-template-columns: 1fr; min-height: 0; } .hero::before { inset: 35% -40px -40px -40px; } .hero-stage { height: 420px; } .callout { font-size: 12.5px; } }
.block { margin-top: 80px; }
.block > h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; }
.block .sub, .sub { color: var(--muted); font-size: 18px; margin: 8px 0 28px; max-width: 62ch; }
.tracks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1040px) { .tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tracks { grid-template-columns: 1fr; } }
.track-card { text-align: left; border: 0; border-radius: var(--r-xl); padding: 22px 22px 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden; transition: transform .2s, box-shadow .2s; min-height: 330px; }
.track-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.t-k { background: var(--k); } .t-b { background: var(--b); } .t-c { background: var(--c); } .t-e { background: var(--e); }
.tc-head { display: flex; justify-content: space-between; align-items: center; }
.tc-head b { font: 800 28px var(--f-display); letter-spacing: -.02em; }
.arrow-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .15); }
.age-chip { align-self: flex-start; font-weight: 700; font-size: 14px; padding: 4px 12px; border-radius: 999px; }
.t-k .age-chip { background: var(--k-chip); color: var(--k-ink); } .t-b .age-chip { background: var(--b-chip); color: var(--b-ink); } .t-c .age-chip { background: var(--c-chip); color: var(--c-ink); } .t-e .age-chip { background: var(--e-chip); color: var(--e-ink); }
.tc-text { font-size: 17px; line-height: 1.35; }
.track-card img { margin-top: auto; width: 100%; aspect-ratio: 42 / 32; object-fit: contain; }
.how-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; margin-top: 26px; }
@media (max-width: 980px) { .how-grid { grid-template-columns: 1fr; } }
.demo-card { position: relative; border-radius: var(--r-xl); background: radial-gradient(80% 90% at 60% 40%, var(--stage-a), var(--stage-b)); min-height: 470px; overflow: hidden; padding: 18px; }
.demo-panel { position: absolute; left: 18px; top: 18px; width: min(240px, 44%); background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); z-index: 2; }
.dp-head { display: flex; justify-content: space-between; align-items: center; font: 800 17px var(--f-display); }
.dp-head svg { color: var(--accent); }
.dp-step { font-size: 13px; color: var(--muted); }
.dp-bar { display: block; height: 7px; border-radius: 4px; background: var(--line); margin: 8px 0 12px; overflow: hidden; }
.dp-bar b { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 4px; }
.demo-panel p { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.dp-illus { display: flex; align-items: center; background: var(--surface-2); border-radius: 14px; padding: 8px; }
.dp-illus img { width: 45%; }
.arrow { flex: 1; height: 3px; background: var(--accent); position: relative; border-radius: 2px; min-width: 18px; }
.arrow::after { content: ""; position: absolute; right: -2px; top: -5px; border: 6.5px solid transparent; border-left: 9px solid var(--accent); border-right: 0; }
.demo-model { position: absolute; right: 2%; top: 2%; width: 72%; }
.demo-tools { position: absolute; right: 18px; top: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.demo-tools span { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow); }
.demo-tray { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; gap: 10px; background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: blur(8px); padding: 10px; border-radius: var(--r-lg); overflow-x: auto; }
.demo-tray span { flex: 1 0 80px; background: var(--surface); border-radius: 14px; border: 2px solid transparent; display: grid; place-items: center; }
.demo-tray span.on { border-color: var(--accent); }
.demo-tray img { width: 90px; }
.how-side { display: flex; flex-direction: column; gap: 18px; }
.info-card { background: var(--surface); border-radius: var(--r-xl); padding: 22px; display: flex; gap: 16px; align-items: flex-start; box-shadow: var(--shadow); }
.info-card b { font: 800 18px var(--f-display); display: block; margin-bottom: 4px; }
.info-card p { margin: 0; color: var(--muted); font-size: 15px; }
.ic { width: 60px; height: 60px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; overflow: hidden; }
.ic svg { width: 30px; height: 30px; } .ic.bip img { width: 74px; margin-top: 8px; }
.bt .ic.bip { background: var(--leaf-soft); } .bt .ic.bip img { width: 116px; max-width: none; margin-top: 62px; } /* Брикс: в кружке — голова */
.flow { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; counter-reset: f; }
.flow li { background: var(--surface); border-radius: var(--r-lg); padding: 20px 18px; box-shadow: var(--shadow); counter-increment: f; }
.flow li::before { content: counter(f); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 800 16px var(--f-display); margin-bottom: 12px; }
.flow b { display: block; font: 800 17px var(--f-display); } .flow span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.foot-bar { margin-top: 70px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 22px; }
/* ── BrixTree на главной: «знания растут из кубиков» — зелень листвы поверх лавандовой мастерской ── */
.bt .hero::before { background: radial-gradient(40% 58% at 64% 48%, color-mix(in srgb, var(--leaf-2) 26%, var(--stage-b)), color-mix(in srgb, var(--stage-a) 70%, transparent) 55%, transparent 80%), radial-gradient(28% 30% at 58% 88%, color-mix(in srgb, var(--leaf) 16%, transparent), transparent 70%); }
.bt .kicker-chip { background: var(--leaf-soft); color: color-mix(in srgb, var(--leaf) 70%, var(--ink)); }
.bt .kicker-chip i { background: var(--leaf); }
.bt-grad { background: linear-gradient(100deg, var(--leaf) 0%, #58b947 45%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bt .hero-feats svg { color: var(--leaf); }
.bt .callout.bip-say { border: 2px solid color-mix(in srgb, var(--leaf) 40%, transparent); }
.bt .callout.bip-say::after { border-right: 2px solid color-mix(in srgb, var(--leaf) 40%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--leaf) 40%, transparent); bottom: -9px; }
.bt-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1040px) { .bt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bt-cards { grid-template-columns: 1fr; } }
.bt-card { background: var(--surface); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.bt-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 70px; height: 70px; border-radius: 22px; background: var(--leaf-soft); transform: rotate(14deg); z-index: 0; opacity: .8; }
.bt-card > * { position: relative; z-index: 1; }
.bt-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--leaf-soft); font-size: 28px; margin-bottom: 14px; }
.bt-card b { display: block; font: 800 19px var(--f-display); margin-bottom: 6px; }
.bt-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.bt-tracks .track-card { position: relative; padding-top: 18px; }
.bt-stage { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 2px; }
.bt-tree { width: 96px; height: 90px; flex: none; filter: drop-shadow(0 6px 8px rgba(40, 90, 50, .18)); }
.bt-stage em { font-style: normal; font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--leaf) 75%, var(--ink)); background: color-mix(in srgb, var(--surface) 70%, transparent); padding: 4px 10px; border-radius: 999px; margin-bottom: 6px; }
.bt-tracks { position: relative; }
@media (max-width: 560px) { .bt .kc-mid { display: none; } }
@media (min-width: 1041px) { .bt-tracks::before { content: ""; position: absolute; left: 6%; right: 6%; top: 84px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--leaf) 0 18px, transparent 18px 28px); opacity: .35; z-index: 0; } .bt-tracks .track-card { z-index: 1; } }

/* ── вход ── */
.onb { position: fixed; inset: 0; z-index: 30; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); background: radial-gradient(90% 80% at 30% 45%, var(--stage-a), var(--stage-b) 65%, var(--stage-c)); padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.onb-x { position: absolute; right: max(20px, env(safe-area-inset-right, 0px)); top: calc(20px + env(safe-area-inset-top, 0px)); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); font-size: 18px; box-shadow: var(--shadow); }
.onb-stage { position: relative; min-height: 0; }
.onb-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.onb-say { position: absolute; left: 50%; top: 9%; transform: translateX(-50%); max-width: min(440px, 86%); background: var(--surface); border-radius: 22px; padding: 16px 22px; font: 700 19px/1.35 var(--f-display); box-shadow: var(--shadow-lg); text-align: center; }
.onb-say::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 16px; margin-left: -8px; background: var(--surface); transform: rotate(45deg); border-radius: 3px; }
.pop { animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: translateX(-50%) scale(.85); opacity: 0; } }
.bubble.pop { animation-name: pop2; } @keyframes pop2 { from { transform: scale(.9); opacity: 0; } }
.onb-panel { background: var(--surface); margin: 18px; border-radius: var(--r-xl); padding: 34px 32px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; box-shadow: var(--shadow-lg); }
.onb-panel h2 { font-size: 30px; font-weight: 800; }
.onb-sub { margin: -6px 0 6px; color: var(--muted); }
.onb-dots { display: flex; gap: 6px; } .onb-dots i { width: 28px; height: 6px; border-radius: 3px; background: var(--line); } .onb-dots i.on { background: var(--accent); }
.onb-input { font-size: 22px; padding: 16px 18px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface-2); outline: none; }
.onb-input:focus { border-color: var(--accent); }
.age-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.age-tile { border: 3px solid transparent; border-radius: var(--r-lg); padding: 12px 12px 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; transition: transform .15s; }
.age-tile:hover, .age-tile.on { border-color: var(--accent); transform: translateY(-2px); }
.age-tile img { width: 100%; aspect-ratio: 22 / 16; object-fit: contain; }
.age-tile b { font: 800 22px var(--f-display); } .age-tile span { font-size: 13px; color: var(--muted); }
.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt { text-align: left; padding: 18px 20px; border-radius: 18px; border: 2px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 17px; }
.opt:hover, .opt.on { border-color: var(--accent); background: var(--accent-soft); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.sw { width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--surface); background: var(--sw); box-shadow: 0 0 0 2px var(--line-2); }
.sw.on { box-shadow: 0 0 0 3px var(--ink); } .sw.sm { width: 26px; height: 26px; border-width: 2px; }
.onb-note { font-size: 13px; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .onb { grid-template-columns: 1fr; grid-template-rows: 38vh 1fr; } .onb-panel { margin: 0 12px 12px; padding: 24px 20px; } .onb-say { font-size: 16px; top: 6%; } }

/* ── мой путь ── */
.path { max-width: 1280px; margin: 0 auto; padding-bottom: 60px; }
.path-hero { border-radius: var(--r-xl); padding: 32px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.path-hero h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; margin: 12px 0 6px; }
.path-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.path-stats { display: flex; gap: 12px; }
.path-stats div { background: var(--surface); border-radius: var(--r-lg); padding: 14px 18px; min-width: 104px; }
.path-stats b { display: block; font: 800 30px var(--f-display); font-variant-numeric: tabular-nums; } .path-stats span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .path-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; } .path-hero > * { min-width: 0; } .path-cta .btn { white-space: normal; max-width: 100%; text-align: left; } .path-stats { flex-wrap: wrap; } .path-stats div { flex: 1 1 90px; min-width: 0; padding: 12px; } .path-stats b { font-size: 24px; } }
.track-switch { display: flex; gap: 10px; margin: 18px 0 8px; overflow-x: auto; padding-bottom: 4px; }
.track-switch button { border: 2px solid transparent; border-radius: 16px; padding: 10px 16px; text-align: left; display: flex; flex-direction: column; min-width: 128px; }
.track-switch button.on { border-color: var(--accent); } .track-switch b { font: 800 16px var(--f-display); } .track-switch span { font-size: 12.5px; color: var(--muted); }
.module { margin-top: 18px; border-radius: var(--r-lg); }
.mod-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; cursor: pointer; list-style: none; padding: 10px 4px 0; }
.mod-head::-webkit-details-marker { display: none; }
.mod-head::before { content: ''; width: 10px; height: 10px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(-45deg) translateY(-2px); transition: transform .2s; align-self: center; }
.module[open] > .mod-head::before { transform: rotate(45deg) translateY(-4px); }
.module:not([open]) > .mod-head { margin-bottom: 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.mod-prog { margin-left: auto; font-style: normal; font-weight: 700; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.mod-prog i { width: 90px; height: 7px; border-radius: 9px; background: var(--surface-2); overflow: hidden; position: relative; }
.mod-prog i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--ok); border-radius: 9px; }
.m-done > .mod-head h2::after { content: ' ✓'; color: var(--ok); }
.m-soon > .mod-head { opacity: .6; }
.mod-head h2 { font-size: 24px; font-weight: 800; } .mod-head span { color: var(--muted); }
.lesson-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 220px); gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; }
.lnode { text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; position: relative; scroll-snap-align: start; transition: transform .15s, border-color .15s, box-shadow .2s; }
.lnode:not(:disabled):hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.ln-img { display: block; background: var(--surface-2); border-radius: 14px; aspect-ratio: 26 / 19; overflow: hidden; }
.ln-img img { width: 100%; height: 100%; object-fit: contain; }
.lnode b { font: 800 15.5px/1.25 var(--f-display); margin-top: 6px; } .ln-kind { font-size: 12.5px; color: var(--muted); }
.ln-badge { position: absolute; top: 18px; left: 20px; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .2); }
.ln-badge svg { width: 14px; height: 14px; }
.s-mastered .ln-badge { background: var(--ok); color: #fff; } .s-completed .ln-badge { background: var(--ok-soft); color: #23824a; }
.s-open { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); } .s-open .ln-badge { background: var(--accent); color: #fff; }
.s-locked, .s-soon { opacity: .55; cursor: default; } .s-soon .ln-img { filter: grayscale(1); }

/* ── плеер урока ── */
.lesson-host { height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))) calc(-1 * max(16px, env(safe-area-inset-right, 0px))); }
.pl { user-select: none; -webkit-user-select: none; height: 100%; display: flex; flex-direction: column; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); gap: 12px; background: var(--bg); }
.pl-top { display: flex; align-items: center; gap: 18px; min-height: 58px; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; flex: none; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 16px; padding: 10px 16px; font-weight: 700; font-size: 15px; }
.pl-title { font-size: 22px; font-weight: 800; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.segs { display: flex; gap: 6px; }
.segs i { width: 52px; height: 26px; border-radius: 999px; background: var(--line); display: grid; place-items: center; color: #fff; transition: background .3s; }
.segs i.done { background: var(--ok); } .segs i.cur { background: var(--accent); }
.segs svg { width: 15px; height: 15px; }
.pl-count { color: var(--muted); font-size: 15px; white-space: nowrap; margin-right: auto; }
.pl-tools { display: flex; align-items: center; gap: 10px; }
.sq-btn { width: 50px; height: 50px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; }
.sq-btn svg { width: 24px; height: 24px; }
.pl-tools .avatar { width: 50px; height: 50px; font-size: 20px; }
.pl-recover:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.voice-retry:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.pl-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 410px); gap: 14px; min-height: 0; }
.pl.coding .pl-main { grid-template-columns: minmax(0, 1fr) minmax(380px, 560px); }
.pl-stage { position: relative; border-radius: var(--r-xl); overflow: hidden; background: radial-gradient(90% 85% at 50% 40%, var(--stage-a), var(--stage-b) 60%, var(--stage-c)); min-height: 300px; }
.pl-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.chip { position: absolute; display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 11px 18px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow); z-index: 2; }
.chip.mode { left: 20px; top: 20px; } .chip.mode svg { width: 24px; height: 24px; }
.chip.task { left: 50%; top: 20px; transform: translateX(-50%); font: 800 21px var(--f-display); padding: 12px 34px; max-width: 54%; text-align: center; }
.tool-col { position: absolute; right: 18px; top: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.tool { width: 74px; border: 0; border-radius: 16px; background: var(--surface); padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; box-shadow: var(--shadow); }
.tool svg { width: 26px; height: 26px; } .tool.on { background: var(--accent); color: #fff; }
.stage-hint { position: absolute; left: 22px; bottom: 196px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; z-index: 2; color: var(--ink); }
.stage-hint svg { width: 30px; height: 30px; }
.tray[hidden] ~ .stage-hint, .pl-stage:has(.tray[hidden]) .stage-hint { bottom: 22px; }
.tray { position: absolute; left: 16px; right: 16px; bottom: 16px; background: var(--surface); border-radius: var(--r-lg); padding: 12px 16px 16px; z-index: 3; box-shadow: var(--shadow); }
.tray-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tray-head b { font: 800 17px var(--f-display); }
.tray-tools { display: flex; gap: 8px; }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 12px; padding: 6px 12px; font-weight: 700; font-size: 13px; }
.mini-btn svg { width: 18px; height: 18px; } kbd { font: 700 11px var(--f-mono); background: var(--surface-2); border-radius: 5px; padding: 1px 5px; }
.tray-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; overflow-x: auto; }
.part-card { border: 2.5px solid var(--line); background: var(--surface); border-radius: 18px; padding: 6px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; touch-action: none; user-select: none; -webkit-user-select: none; transition: border-color .15s, transform .15s; }
.part-card:first-child:not(.used) { border-color: var(--accent); }
.part-card:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.part-card img { width: 100%; max-width: 140px; aspect-ratio: 4 / 3; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.part-card span { font-weight: 700; font-size: 15px; } .part-card b { color: var(--muted); }
.part-card.used { opacity: .4; cursor: default; }
.hand { position: absolute; left: 0; top: 0; width: 46px; height: 52px; z-index: 4; pointer-events: none; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 52'%3E%3Cpath d='M15 4.5c2.5 0 4 1.8 4 4.3v13.4l.9-.5c1-3.5 6.8-3 7.5.6 1.6-2.5 6.5-1.9 7 1.7 2.2-1.6 6.3-.6 6.6 3.4.3 4.4-.3 9.6-2.6 14.4-2.6 5.6-6.6 8.2-14 8.2-6.2 0-9.4-2.4-12.8-7.4L4.4 32.4c-2-3 1.8-6.4 4.6-4.1l2 1.8V8.8c0-2.5 1.5-4.3 4-4.3z' fill='%23fff' stroke='%2316133b' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E"); margin: -6px 0 0 -14px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }
.pin-tip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; background: var(--ink); color: var(--bg); font: 700 13px var(--f-mono); padding: 5px 10px; border-radius: 10px; white-space: nowrap; margin-left: -20px; }
.loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; font-weight: 700; color: var(--muted); background: inherit; z-index: 5; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pl-side { background: var(--surface); border-radius: var(--r-xl); min-height: 0; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.side-body { padding: 26px 24px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; flex: 1; min-height: 0; }
.side-body > * { flex-shrink: 0; }
.eyebrow-chip { align-self: flex-start; font: 700 12.5px var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 7px 14px; border-radius: 999px; }
.side-title { font-size: clamp(26px, 2.6vw, 38px); font-weight: 800; line-height: 1.08; }
.side-title.q { font-size: clamp(21px, 2vw, 26px); white-space: pre-line; } .side-title.code { font-family: var(--f-mono); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.lead { margin: 0; font-size: 16.5px; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.illus { background: linear-gradient(160deg, var(--surface-2), var(--stage-a)); border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; padding: 12px; min-height: 170px; }
.illus img { width: 72%; max-height: 220px; object-fit: contain; }
.illus.duo img { width: 42%; } .illus .arrow { flex: 0 0 34px; }
.mentor { display: flex; align-items: flex-end; gap: 4px; }
.bip-img { width: 112px; height: 112px; object-fit: contain; flex: none; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.mentor.talking .bip-img { animation: bob 3.2s ease-in-out infinite, talk .32s ease-in-out infinite; }
@keyframes talk { 50% { scale: 1.035 .97; } }
.bubble { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px 20px 20px 6px; padding: 14px 16px; font-size: 15.5px; font-weight: 600; line-height: 1.4; box-shadow: var(--shadow); margin-bottom: 30px; }
.mentor[data-mood="happy"] .bubble { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok-soft) 70%, var(--surface)); }
.mentor[data-mood="think"] .bubble { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.mentor[data-mood="care"] .bubble { border-color: var(--accent-2); background: var(--accent-soft); }
.foot { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--muted); }
.foot i { width: 28px; height: 28px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex: none; }
.foot svg { width: 16px; height: 16px; }
.choices { display: grid; gap: 10px; } .choices.two { grid-template-columns: 1fr 1fr; }
.choice { text-align: left; padding: 16px 18px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 17px; transition: border-color .15s, background .15s, opacity .2s; }
.choice:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.choice.right { border-color: var(--ok); background: var(--ok-soft); }
.choice.wrong { border-color: var(--err); background: var(--err-soft); animation: shake .35s; opacity: .7; }
.choice.gone { opacity: .25; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.wire-path { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 16px; padding: 14px; }
.w-end { font: 700 13.5px var(--f-mono); background: var(--surface); border-radius: 10px; padding: 6px 10px; white-space: nowrap; }
.w-line { flex: 1; height: 5px; border-radius: 3px; background: var(--wc); min-width: 30px; }
.meter { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; } .meter i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .3s; }
.count-note { margin: 0; color: var(--muted); }
.pl-overlay { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--ink) 40%, transparent); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(4px); }
.ov-card { background: var(--surface); border-radius: var(--r-xl); padding: 32px; max-width: 480px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-lg); animation: rise .4s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes rise { from { transform: translateY(30px) scale(.95); opacity: 0; } }
.ov-card h2 { font-size: 28px; font-weight: 800; } .ov-card p { margin: 0; color: var(--muted); font-size: 16.5px; } .ov-card .soft { font-size: 14.5px; }
.star-img img { width: 150px; height: 150px; animation: bob 2.6s ease-in-out infinite; }
.ov-actions { display: flex; gap: 10px; } .ov-actions .btn { flex: 1; }
/* код */
.editor { background: var(--code-bg); border-radius: 16px; overflow: hidden; }
.ed-scroll { overflow: auto; max-height: 300px; }
.ed-inner { display: grid; grid-template-columns: auto 1fr; min-width: 100%; width: max-content; }
.gutter { position: sticky; left: 0; z-index: 1; background: var(--code-bg); padding: 12px 10px 12px 12px; text-align: right; font: 13px/1.65 var(--f-mono); color: var(--code-dim); user-select: none; }
.gutter span { display: block; } .gutter span.err { color: #fff; background: #6b2033; margin: 0 -10px 0 -12px; padding: 0 10px 0 12px; }
.ed-code { position: relative; user-select: text; -webkit-user-select: text; }
.serial, .errbox { user-select: text; -webkit-user-select: text; }
.ed-code pre, .ed-code textarea { margin: 0; padding: 12px 16px 12px 12px; font: 13.5px/1.65 var(--f-mono); tab-size: 2; white-space: pre; border: 0; }
.ed-code pre { color: var(--code-ink); pointer-events: none; }
.ed-code textarea { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; background: transparent; color: transparent; caret-color: #fff; outline: none; overflow: hidden; }
.editor.ed-plain .ed-inner { display: block; width: 100%; min-width: 0; }
.editor.ed-plain .ed-scroll { overflow: visible; height: auto; max-height: none; }
.editor.ed-plain .gutter, .editor.ed-plain pre.hl { display: none; }
.editor.ed-plain textarea { position: relative; inset: auto; display: block; color: var(--code-ink); height: 260px; min-height: 160px; max-width: 100%; overflow: auto; resize: vertical; }
.ed-limit { margin: 0; padding: 10px 14px; color: var(--code-ink); font: 13px/1.5 var(--f-body, system-ui, sans-serif); }
.t-kw { color: var(--code-kw); } .t-ty { color: var(--code-ty); } .t-fn { color: var(--code-fn); } .t-num { color: var(--code-num); } .t-str { color: var(--code-str); } .t-com { color: var(--code-dim); font-style: italic; } .t-pp { color: #b8a6f0; }
.code-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .code-clock { margin-left: auto; white-space: nowrap; font: 700 13px var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.errbox { background: var(--err-soft); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; } .errbox b { color: var(--err); }
.serial { margin: 0; background: var(--code-bg); color: var(--code-ink); font: 13px/1.6 var(--f-mono); border-radius: 14px; padding: 10px 14px; height: 110px; overflow: auto; white-space: pre-wrap; }
.serial:empty::before { content: "Монитор порта: здесь появится вывод Serial.print()"; color: var(--code-dim); }
/* адаптив плеера */
@media (max-width: 1180px) { .segs i { width: 34px; } .pl-title { font-size: 18px; } .brand.sm { display: none; } }
@media (max-width: 900px) {
  .lesson-host { height: auto; min-height: 100dvh; }
  .pl { height: auto; min-height: 100%; }
  .pl-top { flex-wrap: wrap; gap: 10px; } .pl-title { order: 3; width: 100%; margin: 0; font-size: 19px; } .segs { order: 4; flex: 1; } .segs i { flex: 1; width: auto; height: 10px; } .segs svg { display: none; } .pl-count { order: 5; margin: 0; font-size: 13px; }
  .pill-btn span { display: none; } .pl-tools { margin-left: auto; } .sq-btn, .pl-tools .avatar { width: 42px; height: 42px; }
  .pl-main, .pl.coding .pl-main { grid-template-columns: 1fr; }
  .pl-stage { height: 58vh; min-height: 380px; }
  .chip.mode { display: none; } .chip.task { font-size: 16px; padding: 9px 18px; top: 12px; max-width: 70%; }
  .tool-col { right: 10px; top: 60px; } .tool { width: 54px; font-size: 0; padding: 8px; } .tool svg { width: 22px; height: 22px; }
  .tray { left: 8px; right: 8px; bottom: 8px; padding: 10px; } .tray-row { grid-auto-columns: 120px; } .part-card span { font-size: 13px; }
  .stage-hint { display: none; }
  .side-body { padding: 20px 18px; } .bip-img { width: 86px; height: 86px; }
}

/* ── каталог и просмотрщик ── */
.catalog, .parents { max-width: 1280px; margin: 0 auto; padding-bottom: 60px; }
.cat-head h1, .parents h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; margin-top: 10px; }
.cat-group { margin-top: 30px; } .cat-group h2 { font-size: 22px; margin-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.saved-models { display: grid; gap: 16px; padding-bottom: 32px; }
.saved-model-row { min-width: 0; padding: 22px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow-wrap: anywhere; }
.saved-model-row h2 { margin: 0 0 8px; font-size: 21px; }
.saved-model-row p { margin: 8px 0; }
.saved-model-row .row { flex-wrap: wrap; gap: 10px; }
.hc .saved-model-row { border: 2px solid var(--ink); }
.mcard { text-align: left; border: 0; background: var(--surface); border-radius: var(--r-lg); padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow); transition: transform .15s; }
.mcard:hover { transform: translateY(-3px); }
.mc-img { display: block; background: linear-gradient(160deg, var(--surface-2), var(--stage-a)); border-radius: 14px; aspect-ratio: 30 / 22; margin-bottom: 6px; }
.mc-img img { width: 100%; height: 100%; object-fit: contain; }
.mcard b { font: 800 15.5px var(--f-display); } .mcard span:last-child { font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); }
.viewer { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--ink) 45%, transparent); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); backdrop-filter: blur(4px); }
.v-card { width: min(1180px, 100%); height: min(760px, 100%); background: var(--surface); border-radius: var(--r-xl); display: grid; grid-template-columns: minmax(0, 1fr) 340px; overflow: hidden; box-shadow: var(--shadow-lg); }
.v-stage { position: relative; background: radial-gradient(90% 85% at 50% 40%, var(--stage-a), var(--stage-b) 60%, var(--stage-c)); }
.v-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.v-side { padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; position: relative; }
.v-x { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); }
.v-title { font-size: 26px; font-weight: 800; padding-right: 44px; } .v-meta { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.v-params { display: flex; flex-direction: column; gap: 12px; }
.vp { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; } .vp span { display: flex; justify-content: space-between; } .vp output { color: var(--accent); font-family: var(--f-mono); }
.vp input[type=range] { accent-color: var(--accent); } .vp select { padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); }
.vsw { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; } .chk input { accent-color: var(--accent); width: 18px; height: 18px; }
details summary { cursor: pointer; font-weight: 700; } .v-json { font: 11.5px/1.5 var(--f-mono); background: var(--surface-2); border-radius: 12px; padding: 10px; max-height: 260px; overflow: auto; white-space: pre; }
@media (max-width: 860px) { .v-card { grid-template-columns: 1fr; grid-template-rows: 50% 50%; } }
/* родителям */
.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 24px 0; }
.info-card.big { flex-direction: column; gap: 2px; } .info-card.big b { font-size: 38px; margin: 0; font-variant-numeric: tabular-nums; } .info-card.big span { color: var(--muted); }
.pr-tracks h2, .principles h2 { font-size: 24px; margin: 26px 0 12px; }
.pr-row { display: grid; grid-template-columns: 110px 90px 1fr 80px; align-items: center; gap: 14px; background: var(--surface); border-radius: 16px; padding: 14px 18px; margin-bottom: 8px; font-size: 15px; }
.pr-row span { color: var(--muted); } .pr-bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; } .pr-bar b { display: block; height: 100%; background: var(--accent); }
@media (max-width: 600px) { .pr-row { grid-template-columns: 1fr 1fr; } }
.principles ul { padding: 0; list-style: none; display: grid; gap: 10px; } .principles li { background: var(--surface); border-radius: 16px; padding: 14px 18px; } .principles li b { font-family: var(--f-display); }
.soft { color: var(--muted); font-size: 14px; }
.err-page { max-width: 520px; margin: 18vh auto; text-align: center; display: grid; gap: 14px; }
/* тосты и заставка */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%); z-index: 60; background: var(--ink); color: var(--bg); padding: 14px 20px; border-radius: 16px; font-weight: 600; max-width: min(520px, calc(100% - 32px)); box-shadow: var(--shadow-lg); transition: transform .35s cubic-bezier(.2, 1.3, .4, 1); }
.toast.show { transform: translate(-50%, 0); }
.splash { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: radial-gradient(80% 70% at 50% 40%, var(--stage-a), var(--bg)); z-index: 70; font-weight: 700; color: var(--muted); }
.splash .logo-mark { width: 84px; height: 84px; animation: bob 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── входы схемы, весы рычага, журнал горки ── */
.inputs-hud { position: absolute; left: 20px; bottom: 64px; z-index: 3; display: flex; flex-direction: column; gap: 8px; width: min(250px, 46%); }
.tray:not([hidden]) ~ .inputs-hud { display: none; }
.inp { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 9px 12px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); border: 2px solid transparent; }
.inp input { flex: 1; min-width: 60px; accent-color: var(--accent); } .inp output { font: 700 12.5px var(--f-mono); color: var(--accent); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.inp.hold { touch-action: none; user-select: none; } .inp.hold i { width: 18px; height: 18px; border-radius: 50%; background: #2a2b33; box-shadow: inset 0 -3px 0 rgba(0,0,0,.35); }
.inp.hold.on { border-color: var(--accent); background: var(--accent-soft); } .inp.hold.on i { background: var(--accent); box-shadow: none; }
@media (max-width: 900px) { .inputs-hud { bottom: 14px; left: 10px; } }
.balance-meter { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 16px; padding: 12px 16px; font-size: 14px; color: var(--muted); }
.balance-meter b { color: var(--ink); font: 800 18px var(--f-display); font-variant-numeric: tabular-nums; }
.balance-meter i { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--warn), var(--ok) 45% 55%, var(--warn)); }
.bm-needle { position: absolute; left: 50%; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--ink); transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.seg-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .seg-pick .opt { text-align: center; padding: 14px 8px; }
.ramp-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; } .ramp-log li { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.ramp-log i { width: 12px; height: 12px; border-radius: 3px; flex: none; }

.adult { margin-top: 26px; background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 8px; justify-items: start; } .adult h2 { font-size: 20px; } .adult p { margin: 0; }

/* ── блочное программирование ── */
.palette { display: flex; flex-wrap: wrap; gap: 8px; }
.pal { border: 0; border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 14.5px; color: #fff; background: var(--kc); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.pal:hover { filter: brightness(1.08); } .pal:active { transform: translateY(1px); }
.k-move { --kc: #7a3cf0; } .k-control { --kc: #f08419; } .k-sensor { --kc: #10a39b; }
.prog { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: 18px; padding: 12px; border: 2px dashed transparent; min-height: 90px; }
.prog.tgt, .blk-body.tgt { border-color: var(--accent-2); }
.blk { display: flex; flex-direction: column; gap: 6px; border-radius: 14px; background: var(--surface); box-shadow: inset 5px 0 0 var(--kc), 0 2px 6px -2px rgba(40, 20, 100, .18); padding: 8px 10px 8px 14px; transition: box-shadow .2s, transform .2s; }
.blk.run { box-shadow: inset 5px 0 0 var(--kc), 0 0 0 3px var(--cyan); transform: translateX(3px); }
.blk-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.blk-row > b { font-size: 15px; color: var(--kc); flex: 1 1 auto; min-width: 0; }
.stepper { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 10px; }
.stepper button { width: 32px; height: 32px; border: 0; background: none; font: 800 18px var(--f-display); color: var(--kc); }
.stepper output { min-width: 34px; text-align: center; font: 800 16px var(--f-mono); font-variant-numeric: tabular-nums; }
.unit { font-style: normal; font-size: 13px; color: var(--muted); }
.blk-tools { display: inline-flex; gap: 2px; margin-left: auto; } .blk-tools button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 14px; } .blk-tools button:hover { background: var(--surface-2); color: var(--ink); }
.blk-body { margin-left: 6px; display: flex; flex-direction: column; gap: 6px; border-left: 3px solid var(--kc); padding: 6px 0 6px 10px; border-radius: 0 0 0 10px; border-top: 2px dashed transparent; border-right: 2px dashed transparent; border-bottom: 2px dashed transparent; }
.blk-cap { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.slot { align-self: flex-start; border: 2px dashed var(--line-2); background: none; border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: 13px; color: var(--muted); }
.slot:hover { border-color: var(--accent); color: var(--accent); }
.btn.press { background: var(--warn, #f59e0b); color: #1b1300; animation: pressPulse 1s ease-in-out infinite; }
@keyframes pressPulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 6px color-mix(in srgb, var(--warn, #f59e0b) 25%, transparent); } }
.sensor-chip.beeping b::after { content: ' ♪ пи-пи!'; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .btn.press { animation: none; } }
.sensor-chip { margin-left: auto; font: 600 13px var(--f-body); color: var(--muted); white-space: nowrap; } .sensor-chip b { font-family: var(--f-mono); color: var(--ink); }
.bot-hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.bot-hud span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; font: 600 11.5px var(--f-body); color: var(--muted); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bot-hud b { font: 700 14px var(--f-mono); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiring { margin: 10px 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 0 12px; }
.wiring summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--accent); padding: 10px 0; }
.wiring table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wiring td { padding: 5px 0; border-top: 1px solid var(--line); vertical-align: top; } .wiring td:first-child { color: var(--muted); padding-right: 10px; white-space: nowrap; }
.wiring td:last-child { font-family: var(--f-mono); font-size: 12.5px; }
.wiring p { font-size: 13px; color: var(--muted); margin: 8px 0 12px; }
@media (max-width: 520px) { .bot-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* режим «Картинки»: лента пиктограмм, числа точками */
.palette.pics { gap: 10px; }
.pal-pic { width: 64px; height: 64px; padding: 10px; border-radius: 18px; display: grid; place-items: center; }
.pic-svg { width: 34px; height: 34px; display: block; }
.prog.ribbon { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.blk.pic { width: 84px; padding: 8px 6px 6px; align-items: center; gap: 4px; box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--kc) 70%, #000), 0 2px 6px -2px rgba(40, 20, 100, .18); background: var(--kc); color: #fff; border-radius: 16px; }
.blk.pic.run { box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--kc) 70%, #000), 0 0 0 4px var(--cyan); transform: translateY(-3px); }
.pic-ic { display: grid; place-items: center; height: 40px; }
.dots { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; min-height: 10px; } .dots i { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.pic-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; } .pic-tools .br { flex-basis: 100%; height: 0; } .pic-head .pic-tools .br { display: none; } .pic-tools button { width: 22px; height: 22px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .22); color: #fff; font: 800 13px var(--f-body); line-height: 1; }
.pic-tools button:hover { background: rgba(255, 255, 255, .4); }
.blk.pic-loop { width: auto; min-width: 120px; max-width: 100%; background: color-mix(in srgb, var(--kc) 14%, var(--surface)); color: var(--kc); align-items: stretch; box-shadow: inset 0 0 0 3px var(--kc); }
.pic-loop .pic-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .pic-loop .pic-head .dots i { background: var(--kc); }
.pic-loop > .pic-head .pic-tools button { background: color-mix(in srgb, var(--kc) 18%, transparent); color: var(--kc); }
.pic-head:has(.laps.show) > .dots { display: none; }
.pic .laps em { display: none; } .pic .laps i { width: 12px; height: 12px; }
.pic-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; padding: 6px; border-radius: 12px; border: 2px dashed transparent; }
.pic-body.tgt { border-color: var(--kc); }
.slot.pic-slot { width: 52px; height: 52px; align-self: center; font: 800 22px var(--f-display); padding: 0; border-radius: 14px; }
/* видимое исполнение: счётчик кругов на скобе, пузырёк значения, память робота */
.k-cell { --kc: #d9467a; } .k-proc { --kc: #2f6fde; } .k-event { --kc: #d4a106; } .k-lab { --kc: #0e86d4; } .k-anim { --kc: #e0533d; }
.laps { display: none; align-items: center; gap: 4px; font: 700 12.5px var(--f-body); color: var(--kc); }
.laps.show { display: inline-flex; } .laps i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--kc); background: transparent; transition: background .2s, transform .2s; }
.laps i.on { background: var(--kc); } .laps i.cur { transform: scale(1.25); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kc) 25%, transparent); }
.laps em { font-style: normal; margin-left: 4px; background: color-mix(in srgb, var(--kc) 12%, transparent); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.laps.done em { color: var(--muted); background: var(--surface-2); }
.vbub { display: none; font: 700 13px var(--f-mono); color: #8a1d47; background: #ffe3ee; border-radius: 999px; padding: 2px 9px; }
.vbub.show { display: inline-block; animation: bubIn .3s ease-out; } @keyframes bubIn { from { transform: translateY(4px); opacity: 0; } }
.cellchip, .refchip { border: 0; border-radius: 9px; padding: 5px 10px; font: 700 13.5px var(--f-body); background: #ffe3ee; color: #8a1d47; box-shadow: inset 0 0 0 2px #f4a3c0; }
.cellchip { border-radius: 6px 6px 9px 9px; box-shadow: inset 0 3px 0 #f4a3c0, inset 0 0 0 2px #f4a3c0; }
.refchip:not(.on) { background: transparent; box-shadow: none; padding: 4px 6px; opacity: .55; } .refchip:not(.on):hover { opacity: 1; background: #ffe3ee; }
.ico-cell { display: block; width: 14px; height: 13px; border: 2px solid #d9467a; border-top-width: 4px; border-radius: 2px 2px 3px 3px; }
.refchip.on { border-radius: 999px; }
.mem { margin: 12px 0; padding: 10px 12px 12px; border-radius: 16px; background: linear-gradient(180deg, #fff5f9, var(--surface)); border: 1.5px solid #f4c2d4; }
.mem-h { display: flex; align-items: center; gap: 8px; font: 800 14px var(--f-display); color: #8a1d47; margin-bottom: 8px; flex-wrap: wrap; } .mem-h small { font: 600 12px var(--f-body); color: var(--muted); }
.mem-bot { width: 22px; height: 16px; border-radius: 5px; background: radial-gradient(circle at 32% 50%, #fff 0 2.4px, transparent 2.8px), radial-gradient(circle at 68% 50%, #fff 0 2.4px, transparent 2.8px), #d9467a; }
.mem-cells { display: flex; gap: 10px; flex-wrap: wrap; }
.cell { width: 104px; } .cell .lid { background: #d9467a; color: #fff; font: 700 13px var(--f-body); text-align: center; padding: 4px 6px; border-radius: 8px 8px 3px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .box { position: relative; height: 50px; border: 2.5px solid #d9467a; border-top: 0; border-radius: 0 0 10px 10px; background: var(--surface); overflow: hidden; display: grid; place-items: center; }
.cell .val { grid-area: 1 / 1; font: 800 24px var(--f-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.cell .val.empty { color: var(--muted); font-size: 22px; }
.cell .val.in { animation: valIn .45s cubic-bezier(.2, .8, .3, 1.2); } @keyframes valIn { from { transform: translateY(-34px); opacity: 0; } }
.cell .val.out { animation: valOut .55s ease-in forwards; color: var(--muted); } @keyframes valOut { 30% { opacity: .45; } to { transform: translate(40px, 34px) rotate(28deg); opacity: 0; } }
.cell.read .box { box-shadow: 0 0 0 4px #ffd1e2; } .cell.put .lid, .cell.add .lid { filter: brightness(1.15); }
.cell.shake { animation: shake .45s; } .cell.shake .box { border-color: var(--warn, #f59e0b); } @keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.btn.slow[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.prog.ro { gap: 5px; } .prog.ro .blk { padding-top: 6px; padding-bottom: 6px; }
.q-pred { font-weight: 700; margin: 12px 0 8px; }
.pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.pcard { position: relative; border: 2.5px solid var(--line); border-radius: 16px; background: var(--surface); padding: 8px; cursor: pointer; transition: border-color .15s, transform .15s; min-height: 84px; }
.pcard:hover:not(:disabled) { border-color: var(--accent-2); transform: translateY(-2px); }
.pcard.sel { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pcard.right { border-color: var(--ok, #16a34a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok, #16a34a) 20%, transparent); }
.pcard.wrong { border-color: var(--warn, #f59e0b); opacity: .85; }
.pcard .pc-l { display: block; text-align: left; font: 800 13px var(--f-display); color: var(--muted); line-height: 1; margin: 0 0 4px 2px; }
.pcard.right .pc-l::after { content: ' ✓'; color: var(--ok, #16a34a); }
.pcard svg.tr-svg { width: 100%; height: auto; display: block; }
.tr-svg .mat { fill: #eef1f6; stroke: none; } .tr-svg .wall { stroke: #9a6bff; stroke-width: 3; stroke-linecap: round; } .tr-svg .ob { fill: #8b95a7; } .tr-svg .st { fill: #fff; stroke: #64748b; stroke-width: 1.4; }
.tr-svg .pth { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tr-svg .bot { fill: var(--accent); stroke: #fff; stroke-width: 1; } .tr-svg .bot.crash { fill: #ef4444; }
.tr-svg .lap text { font: 700 7px var(--f-body); text-anchor: middle; fill: #0b1020; } .tr-svg .boom { font: 800 10px var(--f-display); text-anchor: middle; fill: #ef4444; }
.pcard.num { display: grid; place-items: center; } .pv { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 12px; } .pv b { font: 800 30px var(--f-mono); color: var(--ink); } .pv small { font-size: 12px; color: var(--muted); }
:root[data-track="engineer"] .mem, :root[data-theme="dark"] .mem { background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .cell .val.in, .cell .val.out, .cell.shake, .vbub.show { animation: none; } .cell .val.out { display: none; } }

.cpp summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--accent); }
.hl-pre .ln { display: block; margin: 0 -14px; padding: 0 14px; border-left: 3px solid transparent; transition: background .2s; }
.bl .hl-pre .ln { cursor: pointer; }
.hl-pre .ln.on { background: rgba(255, 216, 74, .16); border-left-color: #ffd84a; }
.hl-pre { margin: 8px 0 0; background: var(--code-bg); color: var(--code-ink); font: 12.5px/1.6 var(--f-mono); border-radius: 14px; padding: 12px 14px; overflow-x: auto; white-space: pre; }

/* ═══ Мастерская и Миры ═══ */
.studio-host { padding-bottom: 16px; }
.studio { display: grid; grid-template-columns: minmax(300px, 360px) 1fr; gap: 16px; height: calc(100vh - 96px); min-height: 560px; }
.st-side { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.st-head { padding: 20px 20px 12px; display: grid; gap: 8px; }
.st-head h1 { font-size: 28px; font-weight: 800; }
.st-count { margin: 0; color: var(--muted); font-size: 14px; } .st-count b { color: var(--ink); font-size: 16px; }
.st-progress { height: 8px; border-radius: 9px; background: var(--surface-2); overflow: hidden; } .st-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--cyan)); border-radius: 9px; }
.st-next { display: flex; gap: 10px; align-items: center; text-align: left; border: 1.5px dashed var(--line-2); background: var(--surface-2); color: var(--ink); border-radius: 14px; padding: 9px 12px; font-size: 13.5px; font-weight: 600; }
.st-next svg { width: 20px; height: 20px; flex: none; color: var(--accent); } .st-next:hover { border-color: var(--accent); }
.st-scale { display: flex; gap: 6px; padding: 0 20px 10px; } .st-scale button { flex: 1; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 12px; padding: 8px 6px; font-weight: 700; font-size: 13.5px; }
.st-scale button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.st-colors { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 20px 12px; }
.st-colors button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1.5px var(--line-2), inset 0 -3px 0 rgba(0, 0, 0, .18); transition: transform .12s; }
.st-colors button.on { box-shadow: 0 0 0 3px var(--accent), inset 0 -3px 0 rgba(0, 0, 0, .18); transform: scale(1.1); }
.st-search { margin: 0 20px 10px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 9px 12px; font: inherit; background: var(--surface-2); color: var(--ink); }
.st-groups { overflow-y: auto; padding: 0 14px 18px 20px; flex: 1; min-height: 0; }
.st-groups h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 8px; display: flex; gap: 8px; align-items: center; } .st-groups h3 span { background: var(--surface-2); border-radius: 99px; padding: 1px 8px; font-size: 12px; }
.st-parts > p { grid-column: 1 / -1; margin: 0; }
.st-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.st-part { border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 6px 6px 8px; display: grid; gap: 2px; font-size: 12px; font-weight: 600; line-height: 1.2; touch-action: none; cursor: grab; transition: border-color .15s, transform .15s; }
.st-part:hover { border-color: var(--accent); transform: translateY(-2px); }
.st-part img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface-2); border-radius: 10px; opacity: 0; transition: opacity .25s; pointer-events: none; } .st-part img.in { opacity: 1; }
.st-part span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-stage { position: relative; border-radius: var(--r-xl); overflow: hidden; background: radial-gradient(90% 85% at 50% 40%, var(--stage-a), var(--stage-b) 60%, var(--stage-c)); box-shadow: var(--shadow); min-height: 0; }
.st-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.st-bar { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; pointer-events: none; }
.st-bar > * { pointer-events: auto; } .st-bar .sp { flex: 1; pointer-events: none; } .st-bar .btn { padding: 8px 16px; } .st-bar .btn svg { width: 18px; height: 18px; }
.mini-btn.warn { border-color: var(--err); color: var(--err); } .mini-btn:disabled { opacity: .45; }
.st-chip { position: absolute; left: 14px; bottom: 14px; right: 14px; display: flex; gap: 14px; align-items: center; pointer-events: none; font-size: 13.5px; }
.st-chip > span:first-child { background: var(--surface); border-radius: 99px; padding: 6px 14px; font-weight: 700; box-shadow: var(--shadow); }
.st-tip { color: var(--muted); background: color-mix(in srgb, var(--surface) 75%, transparent); border-radius: 99px; padding: 6px 14px; }
.st-dialog { position: absolute; inset: 0; background: rgba(22, 19, 59, .32); display: grid; place-items: center; padding: 20px; z-index: 5; }
.st-dialog[hidden] { display: none; }
.st-card { background: var(--surface); border-radius: var(--r-xl); padding: 24px; width: min(640px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 12px; box-shadow: var(--shadow-lg); }
.st-card h2 { font-size: 24px; } .st-card h3 { font-size: 15px; color: var(--muted); margin-top: 6px; } .st-card .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.st-key-card { min-width: 0; grid-template-columns: minmax(0, 1fr); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.st-key-card .field, .st-key-card .row, .st-key-card .row > * { min-width: 0; max-width: 100%; }
.st-key-card .row { flex-wrap: wrap; justify-content: flex-start; }
.st-key-card .row button, .st-key-card [data-key-status] { white-space: normal; overflow-wrap: anywhere; }
.st-key-card select { width: 100%; min-width: 0; max-width: 100%; padding: 8px 10px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
@media (max-width: 640px) {
  .st-dialog.st-key-dialog { position: fixed; inset: 0; z-index: 60; padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .st-key-card { width: 100%; max-height: 100%; padding: 16px; }
}
.st-card .cards.sm { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } .st-card .mcard { box-shadow: none; border: 1.5px solid var(--line); }
.field { display: grid; gap: 6px; font-weight: 600; } .field input { border: 1.5px solid var(--line-2); border-radius: 12px; padding: 10px 12px; font: inherit; background: var(--surface-2); color: var(--ink); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; } .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.st-back { color: var(--accent); font-weight: 700; text-decoration: none; cursor: pointer; font-size: 14px; }
.w-title { font: 800 24px var(--f-display); border: 0; border-bottom: 2px dashed var(--line-2); background: none; color: var(--ink); padding: 2px 0; width: 100%; }
.st-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 20px 12px; }
.st-tiles[hidden] { display: none; }
.st-tiles button { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); padding: 7px 8px; font-weight: 700; font-size: 13px; }
.st-tiles button.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.st-tiles i, .w-prev i { display: block; width: 18px; height: 18px; border-radius: 5px; }
.t-grass { background: #2fae5c; } .t-road { background: repeating-linear-gradient(90deg, #4a4d58 0 40%, #f4f4f7 40% 48%, #4a4d58 48%); } .t-water { background: #34a6e8; } .t-sand { background: #e0c49a; } .t-snow { background: #f4f4f7; box-shadow: inset 0 0 0 1px #ddd; }
.w-prev { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 12px; aspect-ratio: 26 / 19; }
.w-prev i { width: auto; height: auto; border-radius: 6px; }
.w-stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); margin: 8px 0 14px; } .w-stats b { color: var(--ink); font: 800 20px var(--f-display); }
.unlocked { display: grid; gap: 8px; margin-top: 6px; } .unlocked h3 { font-size: 15px; } .unlocked .ul-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.unlocked img { width: 72px; height: 54px; object-fit: contain; background: var(--surface-2); border-radius: 10px; }
@media (max-width: 640px) { .st-bar .mini-btn { font-size: 0; gap: 0; padding: 8px; } .st-bar .mini-btn svg { width: 20px; height: 20px; } .st-bar .mini-btn kbd { display: none; } .st-bar { gap: 6px; } }
@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; grid-template-rows: 58vh auto; height: auto; }
  .st-stage { order: -1; min-height: 58vh; } .st-side { max-height: 70vh; }
  .st-tip { display: none; }
}

@media (min-width: 901px) { .pl.coding.bl .pl-main { grid-template-columns: minmax(0, 1fr) minmax(420px, 660px); } }
/* ── редактор блоков (Blockly, рендерер Zelos): форма блока показывает, куда он встаёт ── */
.ed-sw { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.ed-sw button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ed-sw button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 2px 8px -4px rgba(60, 30, 140, .4); }
.bl-wrap { position: relative; height: clamp(320px, 46vh, 520px); min-width: 0; border-radius: 18px; overflow: hidden; border: 1.5px solid var(--line-2); background: #f7f5fe; }
.bl-ws { position: absolute; inset: 0; } /* поле не распирает колонку: размер задаёт рамка */
.bl-load { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-weight: 700; background: #f7f5fe; }
.bl-wrap.running::after { content: ""; position: absolute; inset: 0; cursor: progress; background: rgba(247, 245, 254, .08); }
.bl-wrap.running { border-color: var(--accent-2); }
.bl-ws .blocklyText.rp-lap, .bl-ws .blocklyText.rp-rt { font-weight: 800; fill: #fff; }
.bl-ws .blocklyText.rp-lap { letter-spacing: .02em; }
.bl-ws .blocklyMainBackground { stroke: none; }
.bl-ws .blocklyFlyoutBackground { fill: #ece6ff; fill-opacity: 1; }
.bl-ws .rp-caller > .blocklyPath { stroke: #9cc0ff; stroke-width: 3px; stroke-dasharray: 6 4; }
.bl-ws .rp-active > .blocklyPath { stroke: #ffc928; stroke-width: 4px; filter: drop-shadow(0 0 6px rgba(255, 201, 40, .9)); }
@media (max-width: 560px) { .bl-wrap { height: clamp(300px, 52vh, 460px); } }

/* выбор миссии */
.missions { display: grid; gap: 10px; }
.mission { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; text-align: left; padding: 10px; border-radius: 18px; border: 1.5px solid var(--line-2); background: var(--surface); transition: border-color .15s, transform .15s, box-shadow .15s; }
.mission:hover { border-color: var(--accent-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.mission .ms-map svg.tr-svg { width: 112px; height: auto; display: block; }
.ms-txt { display: grid; gap: 2px; } .ms-txt b { font-size: 17px; } .ms-txt small { color: var(--muted); font-size: 14px; line-height: 1.35; }
.ms-lvl { color: var(--warn); letter-spacing: .12em; font-size: 15px; }

.blk.caller { outline: 2px dashed #6ea0f5; outline-offset: 2px; }

/* мост «блоки → C++»: программа из блоков над редактором скетча */
.bridge-blocks { border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 10px 12px; background: var(--surface-2); }
.bb-cap { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.bridge-blocks .prog { margin: 0; }

/* «Проследи»: таблица по кругам */
.trace { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 15px; }
.trace th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 8px; }
.trace td { background: var(--surface-2); padding: 6px 8px; position: relative; }
.trace td:first-child { border-radius: 12px 0 0 12px; font-weight: 800; white-space: nowrap; } .trace td:last-child { border-radius: 0 12px 12px 0; width: 28px; text-align: center; font-weight: 800; }
.trace td small { font-weight: 600; color: var(--muted); font-size: 11px; }
.trace tr.ex td { background: var(--accent-soft); }
.tr-ex { font-weight: 800; font-size: 17px; }
.tr-in { width: 64px; padding: 6px 8px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 800; font-size: 16px; }
.tr-face { display: inline-flex; gap: 4px; }
.tr-face button { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 17px; font-weight: 800; }
.tr-face button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.trace tr.right td { background: var(--ok-soft); } .trace tr.right .tr-mark { color: var(--ok); }
.trace tr.wrong td { background: var(--err-soft); } .trace tr.wrong .tr-mark { color: var(--err); }
.trace td[data-real]::after { content: "было " attr(data-real); display: block; font-size: 12px; font-weight: 700; color: var(--err); margin-top: 2px; }

/* «Блоки + C++»: переключатель и панель кода под полем блоков */
.ed-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cpp-tg { border: 1.5px solid var(--line-2); background: var(--surface); color: var(--muted); font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 999px; font-family: var(--f-mono); }
.cpp-tg[aria-pressed="true"] { background: var(--code-bg); color: var(--code-ink); border-color: var(--code-bg); }
.with-cpp details.cpp summary { display: none; }
.with-cpp details.cpp .hl-pre { margin-top: 0; max-height: 210px; overflow-y: auto; scroll-behavior: smooth; }

/* сообщения: кто ещё на арене (ворота, другие роботы и их программы) и почта */
.world { margin: 12px 0; padding: 10px 12px 12px; border-radius: 16px; background: linear-gradient(180deg, #fffaea, var(--surface)); border: 1.5px solid #f1d98a; display: grid; gap: 8px; }
.world-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font: 800 14px var(--f-display); color: #8a6400; } .world-h small { font: 600 12px var(--f-body); color: var(--muted); }
.wobj { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: var(--surface); box-shadow: inset 4px 0 0 var(--oc, #d4a106); }
.wobj > b { font: 800 14.5px var(--f-display); } .wobj > span, .wobj > small { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.wobj.c-yellow { --oc: #e3b400; } .wobj.c-red { --oc: #dc2626; } .wobj.c-blue { --oc: #2f6fde; } .wobj.c-green { --oc: #16a34a; } .wobj.c-orange { --oc: #f08419; } .wobj.c-purple { --oc: #7a3cf0; }
.peer-prog { display: flex; flex-direction: column; gap: 5px; background: var(--surface-2); border-radius: 12px; padding: 8px; } .peer-prog .blk { padding: 6px 8px 6px 12px; } .peer-prog .blk-row > b { font-size: 13.5px; }
.blk.prun { box-shadow: inset 5px 0 0 var(--kc), 0 0 0 3px #6ea0f5; transform: translateX(3px); }
.msgchip { border: 0; border-radius: 9px; padding: 5px 10px; font: 700 13.5px var(--f-body); background: #fff3c4; color: #7a5800; box-shadow: inset 0 0 0 2px #f1d98a; }
.msgchip:disabled { opacity: 1; cursor: default; }
.mail { border-top: 1.5px dashed #f1d98a; padding-top: 8px; } .mail-h { font: 800 13px var(--f-display); color: #8a6400; margin-bottom: 4px; }
.mail-log { margin: 0; padding-left: 20px; display: grid; gap: 3px; max-height: 132px; overflow: auto; font-size: 13.5px; } .mail-log li { animation: rp-in .35s ease-out; } .mail-log li.lost { color: var(--err); }
@keyframes rp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
:root[data-theme="dark"] .world, :root[data-track="engineer"] .world { background: var(--surface); }
:root[data-theme="dark"] .msgchip { background: #3a3110; color: #ffe08a; }
/* вкладки роботов: чья программа сейчас в редакторе */
.actors { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.actors [data-actor] { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 8px 14px; background: var(--surface); font: 800 14px var(--f-display); color: var(--muted); }
.actors [data-actor] i { width: 14px; height: 14px; border-radius: 4px; background: var(--oc, #7a3cf0); }
.actors [data-actor][aria-selected="true"] { color: var(--ink); border-color: var(--oc, #7a3cf0); box-shadow: inset 0 -3px 0 var(--oc, #7a3cf0); }
.actors .c-purple { --oc: #7a3cf0; } .actors .c-blue { --oc: #2f6fde; } .actors .c-green { --oc: #16a34a; } .actors .c-orange { --oc: #f08419; } .actors .c-red { --oc: #dc2626; }

/* лаборатория: таблица замеров, график и выгрузка CSV */
.lab { margin: 12px 0; padding: 10px 12px 12px; border-radius: 16px; background: linear-gradient(180deg, #ecf7ff, var(--surface)); border: 1.5px solid #a9d8f5; display: grid; gap: 8px; }
.lab-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font: 800 14px var(--f-display); color: #075985; } .lab-h small { font: 600 12px var(--f-body); color: var(--muted); }
.lab-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: start; } /* таблица, под ней график: панель узкая */
@media (max-width: 560px) { .lab-body { grid-template-columns: 1fr; } }
.lab-tbl { max-height: 168px; overflow: auto; border-radius: 10px; background: var(--surface); }
.lab-tbl table { width: 100%; border-collapse: collapse; font: 600 13px var(--f-body); font-variant-numeric: tabular-nums; }
.lab-tbl th { position: sticky; top: 0; background: #dff0fb; color: #075985; font-weight: 800; text-align: right; padding: 5px 8px; } .lab-tbl th:first-child, .lab-tbl td:first-child { text-align: center; color: var(--muted); }
.lab-tbl td { text-align: right; padding: 4px 8px; border-top: 1px solid var(--line); } .lab-tbl tr:last-child td { background: #f2faff; animation: rp-in .35s ease-out; }
.lab-empty { margin: 0; padding: 10px; color: var(--muted); font-size: 13px; }
.lab-svg { width: 100%; height: auto; display: block; background: var(--surface); border-radius: 10px; }
.lab-svg .g { stroke: var(--line); stroke-width: 1; } .lab-svg .ax { stroke: #94a3b8; stroke-width: 1.2; }
.lab-svg .ln { fill: none; stroke: #0e86d4; stroke-width: 2.4; stroke-linejoin: round; } .lab-svg .pt { fill: #0e86d4; stroke: #fff; stroke-width: 1.4; }
.lab-svg text { font: 600 10px var(--f-body); fill: var(--muted); } .lab-svg .ty { text-anchor: end; } .lab-svg .tx, .lab-svg .lx, .lab-svg .ly { text-anchor: middle; } .lab-svg .lx, .lab-svg .ly { font-weight: 700; fill: #075985; }
.lab-csv { justify-self: start; }
:root[data-theme="dark"] .lab, :root[data-track="engineer"] .lab { background: var(--surface); }
:root[data-theme="dark"] .lab-tbl th { background: #0c2a3d; color: #9bd3f5; }

/* ── телефон: компактная лента деталей поверх нижнего края сцены, крупные кнопки «Повернуть» ── */
.rot-deg { font: 700 12px var(--f-mono); font-style: normal; color: var(--muted); min-width: 2.6em; text-align: right; }
.mini-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 900px) {
  .tray { left: 6px; right: 6px; bottom: 6px; padding: 6px 8px 8px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .tray-head { margin-bottom: 5px; } .tray-head b { font-size: 13px; }
  .tray-row { grid-auto-columns: 78px; gap: 6px; scrollbar-width: none; } .tray-row::-webkit-scrollbar { display: none; }
  .part-card { padding: 3px 4px 4px; border-radius: 12px; border-width: 2px; } .part-card img { max-width: 64px; } .part-card span { font-size: 11px; line-height: 1.15; text-align: center; }
  .tray-tools .mini-btn { padding: 8px 10px; min-height: 40px; } .tray-tools kbd { display: none; }
  .side-body .illus { display: none; }
  .pl-stage { height: 62vh; min-height: 360px; }
}
@media (max-width: 420px) { .tray-tools .mini-btn > span { display: none; } }
@media (max-width: 900px) {
  /* длинная строка кода не должна раздвигать страницу вбок */
  .pl-main, .pl.coding .pl-main { grid-template-columns: minmax(0, 1fr); }
  .pl-side, .side-body { min-width: 0; }
  /* программа и робот одновременно: сцена прилипает к верху экрана, редактор прокручивается под ней */
  .pl.coding .pl-stage { position: sticky; top: 0; z-index: 6; height: 38vh; min-height: 220px; box-shadow: 0 10px 24px -16px rgba(40, 20, 100, .45); }
  .pl.coding .chip.task { font-size: 13px; padding: 6px 12px; top: 8px; }
  .pl.coding .tool-col { top: 8px; right: 8px; gap: 6px; } .pl.coding .tool { width: 40px; padding: 6px; }
}
.bl-wrap { isolation: isolate; } /* полосы прокрутки и меню Blockly не вылезают поверх прилипшей сцены */
@media (max-width: 900px) {
  /* Мастерская на телефоне: сцена прилипает к верху, детали — под ней, их можно тащить прямо на сцену */
  .studio { grid-template-rows: auto auto; min-height: 0; }
  .st-stage { position: sticky; top: 0; z-index: 6; height: 46vh; min-height: 280px; }
  .st-side { max-height: none; overflow: visible; }
  .st-parts { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; } .st-part { padding: 4px 4px 6px; font-size: 11px; }
}

/* ═══ Миры: оживление объектов и игра ═══ */
.w-main { display: contents; } .w-main[hidden] { display: none; }
.w-task { margin: 0; background: var(--accent-soft); color: var(--ink); border-radius: 14px; padding: 10px 12px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.w-obj { margin: 0 20px 10px; border: 1.5px solid var(--accent); border-radius: 16px; padding: 12px; display: grid; gap: 8px; background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.w-obj[hidden] { display: none; }
.w-obj-h { display: grid; gap: 2px; } .w-obj-h b { font: 800 17px var(--f-display); } .w-abil { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.w-l { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.w-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.w-pre { border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 6px 11px; font: 700 13px var(--f-body, inherit); color: var(--ink); }
.w-pre:hover { border-color: var(--accent); } .w-pre.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.w-obj-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .w-obj-row .btn { padding: 8px 14px; }
.w-obj .soft { margin: 0; font-size: 13px; }
.w-code { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 0; flex: 1; } .w-code[hidden] { display: none; }
.w-code-h { display: flex; gap: 10px; align-items: center; } .w-code-h b { font: 800 18px var(--f-display); } .w-code-h .btn { padding: 7px 12px; }
.w-code .soft { margin: 0; font-size: 13px; }
.w-code .bl-wrap { flex: 1; height: auto; min-height: 340px; }
.studio.world.coding { grid-template-columns: minmax(440px, 48%) 1fr; }
.w-play { padding: 8px 16px !important; } .w-play.stop { background: var(--err, #e5484d); border-color: var(--err, #e5484d); }
.w-hud { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; pointer-events: none; z-index: 3; }
.w-hud[hidden] { display: none; }
.w-hud span { background: var(--surface); border-radius: 99px; padding: 6px 14px; box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.w-hud .w-score { font-size: 16px; } .w-hud .w-score b { font: 800 20px var(--f-display); color: var(--accent); }
.w-hud .w-mail.lost { color: var(--err, #c0262d); }
.w-measures { position: absolute; top: 62px; right: 10px; z-index: 5; width: min(310px, calc(100% - 20px)); max-height: min(55%, 390px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-size: 13px; }
.w-measures[hidden] { display: none; }
.w-measures summary { cursor: pointer; padding: 8px 10px; font-weight: 700; }
.w-measure-body { padding: 0 10px 10px; }
.w-measure-body p { margin: 4px 0 8px; }
.w-measure-info:empty { display: none; }
.w-measure-scroll { max-height: 170px; overflow: auto; }
.w-measure-scroll table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.w-measure-scroll th, .w-measure-scroll td { padding: 3px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.w-measure-body button { margin-top: 8px; }
.studio.playing .w-measures { right: 60px; width: min(310px, calc(100% - 70px)); }
.w-experiment { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.w-experiment-guide { margin-bottom: 10px; }
.w-measures .w-experiment-guide summary { padding: 2px 0; color: var(--accent); }
.w-experiment-guide ol { padding-left: 20px; margin: 8px 0; }
.w-experiment-guide li { margin-bottom: 6px; }
.w-experiment-guide pre { max-width: 100%; overflow-x: auto; padding: 8px; border-radius: 8px; background: var(--surface-2); font: 12px/1.45 var(--f-mono); }
.w-experiment label { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.w-experiment input { accent-color: var(--accent); }
.w-experiment-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.w-experiment-actions button[hidden] { display: none; }
@media (max-width: 900px) {
  /* The toolbar may wrap: reserve its actual height before placing the panel. */
  .studio.w2 .st-stage { display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .studio.w2 .st-bar { position: relative; inset: auto; grid-column: 1; grid-row: 1; margin: 14px 14px 0; z-index: 5; }
  .studio.w2 .w-snd { z-index: 4; }
  .studio.w2 .w-measures, .studio.w2.playing .w-measures { position: relative; inset: auto; grid-column: 1; grid-row: 2; justify-self: end; align-self: start; margin: 8px 10px 0 0; max-height: min(390px, calc(100% - 18px)); }
}
.w-say { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; background: #fff; color: #16133b; border-radius: 16px; padding: 7px 13px; font: 800 15px var(--f-display); box-shadow: 0 8px 20px -10px rgba(30, 20, 90, .5); white-space: nowrap; }
.w-say::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
.w-say.pop { animation: wsay .25s ease-out; } @keyframes wsay { from { opacity: 0; margin-top: 8px; } to { opacity: 1; margin-top: 0; } }
.studio.playing .st-bar [data-k=rot], .studio.playing .st-bar [data-k=del] { opacity: .4; pointer-events: none; }
.w-examples { margin-top: 28px; } .w-examples h2 { font: 800 24px var(--f-display); margin-bottom: 4px; }
@media (max-width: 900px) {
  .studio.world.coding { grid-template-columns: 1fr; }
  .studio.world.coding .st-stage { height: 38vh; min-height: 230px; }
  .w-code .bl-wrap { min-height: 52vh; }
  .w-obj { margin: 0 12px 10px; }
  .w-hud { top: 54px; } .w-hud span { font-size: 12px; padding: 5px 10px; }
}
.studio.coding .st-bar [data-k=export], .studio.coding .st-bar [data-k=publish], .studio.coding .st-tip, .studio.playing .st-tip { display: none; }
.st-stage.night { background: radial-gradient(90% 85% at 50% 40%, #2c2a5e, #17153a 60%, #0d0c24); }
@media (max-width: 900px) {
  .w-obj { scroll-margin-top: calc(46vh + 12px); scroll-margin-bottom: 12px; }
  .studio.playing .st-chip { display: none; }
  .w-hud { top: auto; bottom: 12px; }
}
@media (max-width: 640px) { .st-bar [data-k=save] span { display: none; } .st-bar [data-k=save] { padding: 8px 12px; } }

/* ═══ Миры 2.0: вкладки, кисти рельефа, свойства, джойстик ═══ */
.w2 .st-side { overflow: hidden; }
.w-tabs { display: flex; gap: 4px; padding: 0 14px 10px; }
.w-tabs button { flex: 1; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 12px; padding: 8px 4px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.w-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.w-pane[hidden] { display: none; }
.w-pane .st-search { margin: 4px 0 4px; width: 100%; box-sizing: border-box; }
.w-hint { margin: 14px 0 0; font-size: 13px; }
.w-brushes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.w-brush { border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 14px; padding: 8px 4px 7px; display: grid; justify-items: center; gap: 2px; font-weight: 700; font-size: 12.5px; color: var(--ink); }
.w-brush i { font-style: normal; font-size: 24px; line-height: 1.1; }
.w-brush.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.w2.kid .w-brush { padding: 12px 4px 10px; font-size: 14px; } .w2.kid .w-brush i { font-size: 30px; }
.w-bopts { display: grid; gap: 10px; margin-top: 12px; }
.w-bopts [hidden] { display: none !important; }
.w-range { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.w-range b { color: var(--ink); } .w-range input { width: 100%; accent-color: var(--accent); }
.w-mats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.w-mats button { display: flex; align-items: center; gap: 7px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); padding: 7px 8px; font-weight: 700; font-size: 13px; color: var(--ink); min-width: 0; }
.w-mats button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: left; }
.w-mats button b { font-size: 13px; }
.w-mats i { width: 20px; height: 20px; border-radius: 5px; background: linear-gradient(var(--c) 0 58%, var(--s, var(--c)) 58%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); flex: none; }
.w-mats i.glow { box-shadow: 0 0 8px 1px var(--c), inset 0 -3px 0 rgba(0, 0, 0, .18); }
.w-mats button.edit { justify-content: center; color: var(--accent); border-style: dashed; }
.w-mats button.on, .w-biomes button.on, .w-chips button.on, .w-tpls button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.w-biomes, .w-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.w-biomes .w-range { flex-basis: 100%; }
.w-biomes button, .w-chips button { border: 1.5px solid var(--line-2); border-radius: 99px; background: var(--surface); padding: 6px 12px; font-weight: 700; font-size: 13px; color: var(--ink); }
.w-bhelp { margin: 0; font-size: 13px; line-height: 1.4; }
.w-set { display: grid; gap: 8px; margin-top: 4px; } .w-set h3 { margin: 12px 0 0 !important; } .w-set .soft { margin: 0; font-size: 13px; } .w-set .btn { justify-self: start; padding: 8px 14px; }
.w-set input[type=range] { width: 100%; accent-color: var(--accent); }
.w-taskin { font: inherit; font-size: 14px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 8px 10px; background: var(--surface-2); color: var(--ink); resize: vertical; }
.w-name { font: 800 17px var(--f-display); border: 0; border-bottom: 2px dashed var(--line-2); background: none; color: var(--ink); padding: 1px 0; width: 100%; }
.w-props { display: grid; gap: 6px; }
.w-prop { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.w-prop > span { width: 62px; color: var(--muted); font-weight: 700; } .w-prop b { min-width: 46px; text-align: center; font-size: 13.5px; }
.w-prop .mini-btn { padding: 4px 8px; font-size: 12.5px; } .w-prop input[type=range] { flex: 1; min-width: 60px; accent-color: var(--accent); }
.w-flags { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; font-weight: 600; } .w-flags input { accent-color: var(--accent); }
.w-olist { display: grid; gap: 4px; margin-top: 6px; }
.w-orow { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 7px 10px; text-align: left; font-size: 13.5px; color: var(--ink); }
.w-orow i { font-style: normal; font-size: 18px; } .w-orow b { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-orow.on { border-color: var(--accent); background: var(--accent-soft); }
.w-badge { font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 2px 7px; }
.w-hud .w-keys { font-size: 12.5px; color: var(--muted); }
.w-pad { position: absolute; inset: auto 0 0 0; height: 0; z-index: 4; }
.w-pad[hidden] { display: none; }
.w-stick { position: absolute; left: 22px; bottom: 22px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .28); border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 6px 22px -10px rgba(20, 10, 70, .6); touch-action: none; backdrop-filter: blur(3px); }
.w-knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: #fff; box-shadow: 0 4px 12px rgba(20, 10, 70, .3); pointer-events: none; }
.w-jump { position: absolute; right: 26px; bottom: 34px; width: 74px; height: 74px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 30px; font-weight: 800; box-shadow: 0 8px 22px -8px rgba(60, 20, 160, .7); touch-action: none; }
.w-map { padding: 0 !important; overflow: hidden; display: grid; place-items: center; }
.w-map img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.w-map.big { font-size: 64px; background: linear-gradient(160deg, #bfe3ff, #9fd8a8 60%, #2fae5c); }
.st-dialog.fixed { position: fixed; z-index: 60; }
.w-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.w-tpls button { display: grid; gap: 2px; text-align: left; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface); padding: 10px 12px; color: var(--ink); }
.w-tpls i { font-style: normal; font-size: 26px; } .w-tpls b { font-size: 14.5px; } .w-tpls span { font-size: 12.5px; color: var(--muted); }
.w2 .st-stage.night { background: linear-gradient(180deg, #0c1534, #2a3a6e); }
.studio.playing .st-bar [data-k=copy], .studio.playing .st-bar [data-k=undo], .studio.playing .st-bar [data-k=redo] { opacity: .4; pointer-events: none; }
@media (max-width: 900px) {
  .w-tabs { padding: 0 12px 10px; } .w-tabs button span { display: none; } .w-tabs button { font-size: 18px; padding: 8px 4px; }
  .w-brushes { grid-template-columns: repeat(3, 1fr); }
  .w-stick { width: 104px; height: 104px; left: 14px; bottom: 14px; } .w-jump { right: 16px; bottom: 22px; width: 64px; height: 64px; }
}
@media (max-width: 640px) { .st-bar .mini-btn span { display: none; } }
.w2 .st-bar .mini-btn > span, .w2 .st-bar .mini-btn kbd { display: none; }
.w2 .st-bar .mini-btn { padding: 7px 9px; } .w2 .st-bar .mini-btn svg { width: 20px; height: 20px; }
.w-buildbtn { width: 100%; margin: 2px 0 6px; justify-content: center; }
.w-buildh { display: grid; gap: 4px; margin: 2px 0 8px; } .w-buildh b { font: 800 18px var(--f-display); } .w-buildh .soft { font-size: 13px; }
.w-bcolors { padding: 6px 0 4px !important; } .w-bcount { margin: 4px 0 0; font-size: 13px; }
.w-pane[data-pane=build] .field { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.w-pane[data-pane=build] .field input { font: inherit; font-size: 15px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 8px 10px; color: var(--ink); background: var(--surface-2); }
.studio.building .st-bar [data-k=undo], .studio.building .st-bar [data-k=redo], .studio.building .st-bar [data-k=rot], .studio.building .st-bar [data-k=copy], .studio.building .st-bar [data-k=del] { opacity: .35; pointer-events: none; }
@media (max-width: 900px) {
  .w2 .w-hud { top: 108px; bottom: auto; }
  .studio.w2.playing .st-stage { height: 74vh; }
}
.cards > .empty { grid-column: 1 / -1; max-width: 560px; }
.worlds-page .cat-head + .cards { margin-top: 18px; }
/* на весь экран: настоящий полноэкранный режим или окно игры поверх страницы */
.st-stage:fullscreen { border-radius: 0; width: 100vw; height: 100vh; }
.st-stage:-webkit-full-screen { border-radius: 0; width: 100vw; height: 100vh; }
.studio.w-max .st-stage { position: fixed !important; inset: 0; z-index: 90; border-radius: 0; height: auto !important; min-height: 0 !important; top: 0 !important; }
body.w-noscroll { overflow: hidden; }
.w2 .st-bar .w-full.on { border-color: var(--accent); background: var(--accent-soft); }
.st-stage:fullscreen .w-hud, .studio.w-max .w-hud { top: 64px; bottom: auto; }
.st-stage:fullscreen .st-chip, .studio.w-max .st-chip { display: none; }
.w-check { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; } .w-check input { accent-color: var(--accent); width: 18px; height: 18px; }
@media (max-width: 900px) { .st-stage:fullscreen .w-hud, .studio.w-max .w-hud { top: 112px; } }

/* ── цель игры, итог игры и проверка игры (ворота 3) ── */
.w-hud .w-hrow { display: flex; gap: 6px; justify-content: center; }
.w-hud .w-goal, .w-hud .w-time { font-size: 15px; }
.w-hud .w-goal b, .w-hud .w-time b { font: 800 19px var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.w-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(22, 19, 59, .34); z-index: 6; padding: 16px; animation: wEndIn .3s ease; }
.w-overc { background: var(--surface); border-radius: var(--r-xl); padding: 26px 30px; box-shadow: var(--shadow-lg); display: grid; gap: 10px; justify-items: center; text-align: center; width: min(380px, 100%); animation: wEndPop .45s cubic-bezier(.2, 1.4, .4, 1); }
.w-overc > b { font: 800 34px/1.1 var(--f-display); }
.w-over.win .w-overc > b { color: var(--accent); }
.w-over.lose .w-overc > b { color: var(--warn); }
.w-overc .row { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
@keyframes wEndIn { from { opacity: 0; } }
@keyframes wEndPop { from { transform: scale(.7); opacity: 0; } }
.w-goalset .w-num { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; }
.w-goalset .w-num[hidden], .w-goalset .w-limit[hidden] { display: none; }
.w-goalset .w-num input { width: 76px; padding: 6px 8px; border-radius: 10px; border: 1.5px solid var(--line); font: inherit; background: var(--surface); color: var(--ink); }
.w-goalset h4 { margin: 12px 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.w-goalset [data-k=check] { margin-top: 10px; width: 100%; }
.w-checkcard h2 { margin: 0; }
.w-ckhead { font-weight: 700; margin: 0; }
.w-ckhead.ok { color: var(--ok); } .w-ckhead.bad { color: var(--err); }
.w-cklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 44vh; overflow: auto; }
.w-ck { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: 14px; line-height: 1.35; }
.w-ck.err { background: var(--err-soft); } .w-ck.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.w-ck i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; color: #fff; font-size: 13px; }
.w-ck.err i { background: var(--err); } .w-ck.warn i { background: var(--warn); }
@media (max-width: 600px) { .w-overc { padding: 20px; } .w-overc > b { font-size: 28px; } .w-hud .w-goal, .w-hud .w-time { font-size: 13px; } .w-hud .w-goal b, .w-hud .w-time b { font-size: 16px; } }

/* ── скрипт C++ объекта мира (ступень 4) ── */
.w-lang { margin-left: auto; font: 700 12px var(--f-mono); background: var(--code-bg); color: var(--code-ink); border-radius: 8px; padding: 4px 8px; }
.w-sced .ed-scroll { max-height: none; height: clamp(260px, 46vh, 620px); }
.w-sced .gutter span.run { color: #10162e; background: #ffd84a; margin: 0 -10px 0 -12px; padding: 0 10px 0 12px; }
.w-scst { font: 600 13px/1.4 var(--f-body); padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.w-scst.ok { color: var(--ok); background: var(--ok-soft); } .w-scst.bad { color: var(--err); background: var(--err-soft); }
.w-ref { border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.w-ref summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.w-ref h4 { margin: 10px 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.w-refl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.w-refb { display: grid; gap: 2px; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 9px; cursor: pointer; color: var(--ink); }
.w-refb:hover { border-color: var(--accent); } .w-refb code { font: 600 12.5px var(--f-mono); color: var(--accent); } .w-refb span { font-size: 12px; color: var(--muted); }
.w-refb.off { opacity: .5; }
.w-serial { background: var(--code-bg); color: var(--code-ink); border-radius: 14px; padding: 8px 12px; } .w-serial[hidden] { display: none; }
.w-serial b { font: 700 12px var(--f-body); color: var(--code-dim); }
.w-serial pre { margin: 4px 0 0; max-height: 120px; overflow: auto; font: 12.5px/1.5 var(--f-mono); white-space: pre-wrap; }
.w-say.bad { background: var(--err); color: #fff; }
.w-cppbtn { font-family: var(--f-mono); }
.w-say.bad::after { border-top-color: var(--err); }

/* ── наборы материалов рельефа ── */
.w-matbox { display: grid; gap: 8px; }
.w-sets { display: flex; flex-wrap: wrap; gap: 5px; }
.w-setc { border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 5px 10px; font: 700 12.5px var(--f-body); color: var(--ink); cursor: pointer; }
.w-setc.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent); }
.w-setc.add { border-style: dashed; color: var(--accent); }
.w-pmode button { font-size: 12.5px; }
.w-setcard { width: min(720px, 100%); }
.w-setcard .row { display: flex; gap: 8px; align-items: center; } .w-setcard .row .sp { flex: 1; }
.w-pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.w-pal button { aspect-ratio: 1; border-radius: 9px; border: 2px solid rgba(0, 0, 0, .08); background: var(--c); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); cursor: pointer; }
.w-pal button:hover { transform: translateY(-1px); border-color: var(--accent); }
.w-setlist { display: grid; gap: 6px; max-height: 40vh; overflow: auto; }
.w-setrow { display: grid; grid-template-columns: 26px minmax(90px, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 12px; background: var(--surface-2); }
.w-setrow > i { width: 24px; height: 24px; border-radius: 6px; background: linear-gradient(var(--c) 0 58%, var(--s) 58%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.w-setrow input { min-width: 0; padding: 5px 8px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink); }
.w-setrow .w-side { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; } .w-setrow select { font: inherit; font-size: 12.5px; border-radius: 8px; padding: 3px 4px; }
.w-props2 { display: flex; gap: 3px; } .w-props2 button { border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 3px 6px; font-size: 14px; cursor: pointer; opacity: .55; }
.w-props2 button.on { opacity: 1; border-color: var(--accent); background: var(--accent-soft); } .w-props2 button[data-t=del] { opacity: .8; }
.w-props2 button:disabled { opacity: .25; cursor: default; }
@media (max-width: 600px) { .w-setrow { grid-template-columns: 24px 1fr; } .w-setrow .w-side, .w-setrow .w-props2 { grid-column: 1 / -1; } }
/* палитра кисти «Краска» */
.w-now { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.w-now i { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(var(--c) 0 58%, var(--s) 58%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); flex: none; }
.w-now i.glow { box-shadow: 0 0 10px 2px var(--c), inset 0 -3px 0 rgba(0, 0, 0, .18); }
.w-pal2 { grid-template-columns: repeat(9, 1fr); gap: 5px; margin: 6px 0; }
.w-pal2 button.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent), inset 0 -4px 0 rgba(0, 0, 0, .18); }
.w-pprops { flex-wrap: wrap; } .w-pprops button { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.w-setrow2 { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 4px; } .w-setrow2 .soft { font-size: 12.5px; margin-right: 2px; }
.w-mats[hidden] { display: none; }
@media (max-width: 600px) { .w-pal2 { grid-template-columns: repeat(9, 1fr); gap: 4px; } }
.w-pal2 button { width: 100%; min-height: 30px; aspect-ratio: 1; padding: 0; border-radius: 8px; }
/* ── уровни мира ── */
.w-levels { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 2px 0 8px; font-size: 13px; }
.w-levels button { min-width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--line-2); background: var(--surface); font: 800 13px var(--f-body); color: var(--ink); cursor: pointer; }
.w-levels button.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.w-levels button.add { border-style: dashed; color: var(--accent); }
.w-levels .w-lvname { font-weight: 700; margin-left: 4px; color: var(--muted); }
/* ── свойства объекта (компоненты) ── */
.w-cprops { display: grid; gap: 8px; margin-top: 8px; }
.w-cprop { border: 1.5px solid var(--line-2); border-radius: 14px; padding: 8px 10px; display: grid; gap: 6px; background: var(--surface); }
.w-cph { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .w-cph b { font-size: 14px; }
.w-cprop .soft { margin: 0; font-size: 12.5px; }
.w-pp { display: grid; gap: 4px; font-size: 13px; } .w-pp > span { color: var(--muted); font-weight: 700; font-size: 12px; }
label.w-pp { grid-template-columns: 1fr auto; align-items: center; } label.w-pp > span { grid-column: 1 / -1; }
.w-pp select { font: inherit; padding: 6px 8px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); grid-column: 1 / -1; }
.w-pp input[type=range] { width: 100%; }
.w-kcol { display: flex; gap: 6px; } .w-kcol button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .1); background: var(--c); cursor: pointer; }
.w-kcol button.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.w-warn { color: var(--warn) !important; }
.w-addprop summary { cursor: pointer; font-weight: 800; color: var(--accent); font-size: 14px; padding: 4px 0; }
.w-proplist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 6px; }
.w-proplist button { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); padding: 7px 8px; font: 700 13px var(--f-body); color: var(--ink); text-align: left; cursor: pointer; }
.w-proplist button i { font-style: normal; font-size: 18px; } .w-proplist button:hover { border-color: var(--accent); }
/* ── в игре: сесть, ключи ── */
.w-seat { position: absolute; right: 92px; bottom: 26px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); font-size: 26px; box-shadow: var(--shadow); pointer-events: auto; }
.w-seat[hidden] { display: none; }
.w-key { font-style: normal; display: inline-block; filter: drop-shadow(0 0 0 var(--c)); text-shadow: 0 0 6px var(--c); margin: 0 1px; }
.w-hud .w-seathint b { font: 800 12px var(--f-mono); background: var(--ink); color: var(--surface); border-radius: 5px; padding: 1px 5px; margin-right: 3px; }

/* звук в игре: кнопка рядом с табло */
.w-snd { position: absolute; right: 12px; top: 64px; z-index: 6; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.9); box-shadow: 0 2px 10px rgba(20,10,60,.18); font-size: 18px; cursor: pointer; }
.w-snd.off { opacity: .7; }
.w-pgroup { margin: 8px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted, #6b6880); text-transform: uppercase; letter-spacing: .04em; }

/* ── окно «Кости и анимация» ── */
.an-tabs { margin: 6px 0 10px; }
.an-tabs button.on { background: var(--accent, #7b3cf0); color: #fff; }
.an-tree { display: grid; gap: 3px; max-height: 260px; overflow: auto; margin: 8px 0; padding: 4px; border-radius: 12px; background: rgba(123, 60, 240, .05); }
.an-bone { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px calc(8px + var(--d) * 16px); border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.an-bone i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(0,0,0,.12) inset; flex: none; }
.an-bone span { margin-left: auto; font-size: 12px; color: var(--muted, #6b6880); }
.an-bone.on { background: #fff; box-shadow: 0 0 0 2px var(--c) inset; font-weight: 700; }
.an-bone.kid { background: rgba(255,255,255,.6); }
.an-name input { width: 100%; }
.an-hint { min-height: 2.4em; }
.an-clip { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.an-clip .field { flex: 1; min-width: 160px; }
.an-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.an-dur { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 200px; }
.an-dur input { flex: 1; }
.an-chk { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; cursor: pointer; }
.an-tl { position: relative; flex: 0 0 54px; height: 54px; margin: 10px 4px 4px; border-radius: 10px; background: linear-gradient(#fff, #f3efff); box-shadow: 0 0 0 1px rgba(123,60,240,.25) inset; cursor: pointer; touch-action: none; }
.an-ticks span { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 11px; color: var(--muted, #6b6880); pointer-events: none; }
.an-ticks span::before { content: ''; position: absolute; left: 50%; bottom: 15px; width: 1px; height: 8px; background: rgba(0,0,0,.2); }
.an-key { position: absolute; top: 10px; width: 14px; height: 14px; margin-left: -7px; transform: rotate(45deg); background: #ffd84a; border: 2px solid #b8860b; border-radius: 3px; }
.an-key.on { background: #ff8a00; border-color: #8a4500; }
.an-head { position: absolute; top: 2px; bottom: 2px; width: 3px; margin-left: -1.5px; background: #7b3cf0; border-radius: 2px; pointer-events: none; }
.an-head::before { content: ''; position: absolute; top: -4px; left: -5px; border: 6.5px solid transparent; border-top-color: #7b3cf0; }
.an-play { align-items: center; }
.an-now { font-variant-numeric: tabular-nums; font-weight: 700; color: #7b3cf0; }
.an-keys { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.an-keys button { border: 0; border-radius: 999px; padding: 5px 10px; background: rgba(123,60,240,.08); font: inherit; font-size: 13px; cursor: pointer; }
.an-keys button.on { background: #ffd84a; }
.an-pose { margin-top: 10px; padding: 10px; border-radius: 12px; background: rgba(53,228,255,.08); }
.an-sl { display: grid; grid-template-columns: minmax(110px, 1fr) auto minmax(80px, 2fr) auto 44px; gap: 6px; align-items: center; margin: 4px 0; font-size: 13px; }
.an-sl input[type=range] { width: 100%; }
.an-sl b { text-align: right; font-variant-numeric: tabular-nums; }
.w-pbool { display: flex; gap: 8px; align-items: center; }
@media (max-width: 520px) { .an-sl { grid-template-columns: 1fr auto 1.4fr auto 40px; } .an-sl span { font-size: 12px; } }

/* окно «Кости и анимация» на телефоне: кнопки поз — плиткой по две, а не столбиком */
@media (max-width: 600px) {
  .an-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: center; }
  .an-tools .btn { padding: 9px 8px; font-size: 14px; justify-content: center; }
  .an-tools .an-chk { justify-self: start; padding-left: 6px; }
}

/* фильтр свободного текста (safety.js): подсказка под полем */
.safe-bad { border-color: #e0743f !important; box-shadow: 0 0 0 3px rgba(224, 116, 63, 0.18); }
.safe-tip { margin-top: 4px; padding: 6px 10px; border-radius: 10px; background: #fff1e6; color: #8a3a10; font-size: 13px; font-weight: 600; line-height: 1.35; }

/* мир: переключатели тяжёлой графики */
.w-gfx { display: grid; gap: 6px; }
.w-gfx .w-pbool { display: flex; gap: 8px; align-items: center; font-size: 14px; min-height: 32px; } .w-gfx input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.w-gfx input:disabled + span { opacity: 0.45; }

/* ── путь обучения и настройки (v24) ── */
/* вход: ответы картинками (темп, ошибки, что радует, внимание) */
.pic-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pic-opts.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pic-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 128px; padding: 14px 10px; border-radius: 20px; border: 2px solid var(--line-2); background: var(--surface); text-align: center; transition: transform .15s, border-color .15s, background .15s; }
.pic-opt:hover, .pic-opt.on { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.po-pic { font-size: 46px; line-height: 1; }
.pic-opt b { font: 700 15.5px/1.25 var(--f-body); }
@media (max-width: 440px) { .pic-opts.n3 { grid-template-columns: minmax(0, 1fr); } .pic-opts.n3 .pic-opt { flex-direction: row; justify-content: flex-start; min-height: 68px; text-align: left; gap: 14px; padding: 10px 16px; } .pic-opts.n3 .po-pic { font-size: 34px; } .pic-opt { min-height: 112px; } }
.onb-err { margin: -6px 0 0; color: var(--err); font-weight: 600; }
/* треки: закрытый — с замком, открывают навыки */
svg.lk { width: 14px; height: 14px; flex: none; }
.track-switch button { min-height: 56px; }
.track-switch button.locked { background: var(--surface-2); color: var(--muted); }
.track-switch button.locked b { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
/* карточки уроков: причина замка, звёзды, «ещё» при коротком внимании */
.lnode[data-lock] { cursor: pointer; }
.lnode.s-locked:has(.ln-why) { opacity: .82; }
.lnode.s-review { border-color: var(--warn); border-style: dashed; } .s-review .ln-badge { background: var(--warn); color: #fff; }
.ln-badge svg.lk { width: 12px; height: 12px; }
.ln-why { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: var(--accent); margin-top: 2px; }
.ln-hide { display: none !important; }
.ln-more { border: 2px dashed var(--line-2); background: transparent; border-radius: var(--r-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: 13px; min-height: 120px; padding: 10px; }
.ln-more b { font: 800 26px var(--f-display); color: var(--ink); } .ln-more svg { width: 22px; height: 22px; color: var(--ok); }
.stars { color: #f0a800; letter-spacing: 1px; white-space: nowrap; } .stars i { font-style: normal; color: var(--line-2); }
.path-almost { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); font-weight: 700; max-width: 680px; }
/* окно-объяснение замка */
.rp-pop { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--ink) 40%, transparent); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pop-card { position: relative; max-width: 520px; text-align: left; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 26px 24px; }
.pop-card h2 { font-size: 24px; padding-right: 44px; } .pop-card .ov-actions .btn { flex: 1 1 200px; } .pop-card .ov-actions .btn.primary { flex-basis: 100%; }
@media (max-width: 520px) { .pop-card .ov-actions { flex-direction: column; } .pop-card .ov-actions .btn { flex: none; } }
.pop-x { position: absolute; right: 14px; top: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 16px; }
.pop-img img { width: 140px; height: 100px; object-fit: contain; display: block; margin: 0 auto; }
.pop-stars { font-size: 30px; text-align: center; margin: 0; }
.gate-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.gate-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; line-height: 1.25; }
.gate-list li b { display: inline-flex; gap: 6px; align-items: center; } .gate-list li > span { color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
.gate-list li i { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--line); position: relative; overflow: hidden; }
.gate-list li i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--ok); }
.gate-list li.ok { background: var(--ok-soft); } .gate-list li.ok svg { color: var(--ok); }
/* значки: полка на карте пути и у родителей */
.shelf { margin: 14px 0 4px; background: var(--surface); border-radius: var(--r-lg); padding: 14px 16px 8px; }
.shelf-head { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 10px; } .shelf-head h2 { font-size: 20px; }
.badge-row { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.shelf.all .badge-row { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); overflow: visible; }
.medal { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; scroll-snap-align: start; }
.md-ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff, var(--accent-soft)); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1), 0 6px 14px -8px rgba(60, 30, 140, .5); font-size: 36px; line-height: 1; position: relative; overflow: hidden; flex: none; }
.medal.sk .md-ic { background: radial-gradient(circle at 35% 30%, #fff6c9, #ffd34d 60%, #e7a900); }
.md-ic img { width: 86%; height: 86%; object-fit: contain; }
.medal b { font: 700 13px/1.2 var(--f-body); }
.medal.off .md-ic { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--line-2); } .medal.off .md-ic > span { filter: grayscale(1); opacity: .45; }
.medal.off .md-ic svg.lk { position: absolute; right: 9px; bottom: 9px; width: 16px; height: 16px; color: var(--muted); }
.medal.off b { color: var(--muted); } .md-how { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
/* портфолио проектов */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 4px 2px 14px; }
.pf-card { background: var(--surface); border-radius: var(--r-lg); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); min-width: 0; }
.pf-img { display: block; background: var(--surface-2); border-radius: 14px; aspect-ratio: 26 / 19; overflow: hidden; } .pf-img img { width: 100%; height: 100%; object-fit: contain; }
img[data-pf]:not(.in) { opacity: 0; } img[data-pf] { transition: opacity .35s; }
.pf-card b { font: 800 15px/1.25 var(--f-display); margin-top: 4px; } .pf-card .soft { font-size: 13px; }
.pf-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; } .pf-act .mini-btn { min-height: 40px; }
.module.pf > .mod-head h2::after { content: none; }
/* конец урока: звёзды, «почти», новые значки; кнопки переносятся на узком экране */
.ov-card { max-height: calc(100dvh - 40px); overflow-y: auto; }
.ov-card .stars { font-size: 34px; letter-spacing: 3px; margin-top: -6px; }
.ov-card .almost { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--ink); border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: 15.5px; }
.new-badges { display: grid; gap: 8px; } .new-badges h3 { font-size: 16px; }
.new-badges .badge-row { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(100px, 120px)); justify-content: center; overflow: visible; }
.ov-actions { flex-wrap: wrap; } .ov-actions .btn { min-width: 0; white-space: normal; flex: 1 1 140px; }
/* шапка урока при коротком внимании: окно из нескольких шагов */
.segs i.more { background: transparent; color: var(--muted); font: 700 12px var(--f-body); width: auto; padding: 0 4px; }
@media (max-width: 900px) { .segs i.more { flex: none; height: 14px; } }
/* родителям: настройки устройства и профиль подстройки */
.pr-settings, .pr-pf { margin-top: 26px; } .pr-settings h2, .pr-pf h2 { font-size: 24px; margin: 0 0 12px; } .pr-settings h3 { font-size: 17px; margin: 18px 0 8px; }
.parents .shelf { margin-top: 26px; } .pr-tracks .soft { margin: 6px 0 0; }
.set-list { display: grid; gap: 8px; }
.set-row { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: 16px; padding: 14px 18px; cursor: pointer; min-height: 56px; }
.set-row > span { display: grid; gap: 2px; } .set-row b { font-family: var(--f-display); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; border-radius: 999px; background: var(--line-2); position: relative; margin: 2px 0 0; cursor: pointer; transition: background .2s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch:checked { background: var(--accent); } .switch:checked::after { transform: translateX(22px); }
.ux-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.ux-row { display: grid; gap: 6px; background: var(--surface); border-radius: 16px; padding: 12px 16px; min-width: 0; } .ux-row > span { font-weight: 700; }
.ux-row select { min-height: 44px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--surface-2); padding: 8px 10px; width: 100%; min-width: 0; }
.ux-effects { margin: 0; padding: 0 0 0 20px; display: grid; gap: 6px; }
/* мягкий режим ошибок (переживает или злится): без красного и без тряски — «попробуем ещё» */
.ux-soft .choice.wrong { border-color: var(--line-2); background: var(--surface-2); animation: none; opacity: .6; }
.ux-soft .errbox { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); } .ux-soft .errbox b { color: var(--warn); }
.ux-soft .trace tr.wrong td { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); } .ux-soft .trace tr.wrong .tr-mark { color: var(--warn); }
.ux-soft .gutter span.err { background: #5a4410; }
/* подписи к словам Брикса выключены (голос включён) */
.no-subs .mentor .bubble, .no-subs .onb-say { display: none; }
/* меньше движения — выбор родителя поверх системной настройки */
.rm *, .rm *::before, .rm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
/* касания: в Kicker и Builder кнопки сцены и панели — не меньше 44 пикселей (аудит 11.4) */
.pl[data-track="kicker"] .mini-btn, .pl[data-track="builder"] .mini-btn { min-height: 44px; min-width: 44px; }
@media (max-width: 900px) {
  .pl[data-track="kicker"].coding .tool, .pl[data-track="builder"].coding .tool { width: 48px; min-height: 48px; padding: 8px; }
  .pl[data-track="kicker"] .tray-tools .mini-btn, .pl[data-track="builder"] .tray-tools .mini-btn { min-height: 44px; }
}
/* высокий контраст: класс .hc (выбор родителя) или системная настройка, если родитель её не выключил (.hc-off) */
:root.hc { --bg: #fff; --surface: #fff; --surface-2: #f0f0f0; --ink: #000; --muted: #262626; --line: #000; --line-2: #000; --accent: #4a00c2; --accent-2: #2e007a; --accent-soft: #ebe1ff; --accent-ink: #fff; --ok: #006b29; --ok-soft: #dcf3e3; --err: #a3001b; --err-soft: #ffe3e8; --warn: #8a3b00; --k: #fff; --b: #fff; --c: #fff; --e: #fff; --k-ink: #000; --b-ink: #000; --c-ink: #000; --e-ink: #000; --shadow: none; --shadow-lg: 0 0 0 2px #000; }
:root.hc[data-track="engineer"] { --bg: #000; --surface: #000; --surface-2: #161616; --ink: #fff; --muted: #e8e8e8; --line: #fff; --line-2: #fff; --accent: #c7a6ff; --accent-2: #e0ccff; --accent-soft: #24123f; --accent-ink: #000; --ok: #6ee79a; --ok-soft: #0c2c17; --err: #ff8a9d; --err-soft: #3a0c15; --warn: #ffb066; --k: #000; --b: #000; --c: #000; --e: #000; --shadow-lg: 0 0 0 2px #fff; }
.hc :is(.btn, .choice, .lnode, .opt, .pic-opt, .tool, .sq-btn, .pill-btn, .mini-btn, .part-card, .age-tile, .track-switch button, .bubble, .info-card, .set-row, .ux-row, .shelf, .pf-card, .ov-card, .path-hero, .pr-row, .chip, .ln-more) { border: 2px solid var(--ink) !important; }
.hc :is(.s-locked, .s-soon, .m-soon > .mod-head, .medal.off .md-ic > span) { opacity: 1 !important; } .hc .s-locked .ln-img { filter: grayscale(1); }
.hc :focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px #ffd400; }
.hc .stars { color: #7a4f00; } .hc .stars i { color: var(--muted); }
@media (prefers-contrast: more) {
  :root:not(.hc-off) { --muted: #262626; --line: #000; --line-2: #000; --ink: #000; --shadow: none; }
  :root:not(.hc-off)[data-track="engineer"] { --muted: #e8e8e8; --line: #fff; --line-2: #fff; --ink: #fff; }
  :root:not(.hc-off) :is(.btn, .choice, .lnode, .opt, .pic-opt, .tool, .sq-btn, .pill-btn, .mini-btn, .part-card, .age-tile, .track-switch button, .bubble, .set-row, .ux-row, .pf-card, .chip) { border: 2px solid var(--ink) !important; }
  :root:not(.hc-off) :is(.s-locked, .s-soon) { opacity: 1; }
}
/* системные цвета Windows (forced-colors): рамки и выбранное — системными цветами, цветные метки — как есть */
@media (forced-colors: active) {
  :is(.btn, .choice, .lnode, .opt, .pic-opt, .tool, .sq-btn, .pill-btn, .mini-btn, .part-card, .age-tile, .track-switch button, .bubble, .set-row, .ux-row, .pf-card, .ln-more, .chip) { border: 2px solid ButtonText !important; }
  :is(.choice.right, .s-open, .pic-opt.on, .track-switch button.on, .opt.on, .age-tile.on) { outline: 3px solid Highlight; outline-offset: 2px; }
  .segs i, .mod-prog i, .pr-bar, .gate-list li i { border: 1px solid CanvasText; }
  :is(.segs i.cur, .segs i.done, .mod-prog i::after, .pr-bar b, .gate-list li i::after) { forced-color-adjust: none; background: Highlight; }
  .sw, .avatar, canvas, .md-ic, .stars { forced-color-adjust: none; }
  .switch { appearance: auto; -webkit-appearance: auto; width: 22px; height: 22px; } .switch::after { display: none; }
  :focus-visible { outline: 3px solid Highlight; }
}

/* ── кости (v24) ── */
/* ряд готовых анимаций в окне «Кости и анимация»: крупные кнопки — малышу хватает двух нажатий («Кости сами» → «Ходьба») */
.an-quick { margin: 10px 0; padding: 10px; border-radius: 14px; background: rgba(255, 216, 74, .16); box-shadow: 0 0 0 1px rgba(184, 134, 11, .22) inset; }
.an-quick .w-l { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--muted, #6b6880); }
.an-qrow { display: flex; flex-wrap: wrap; gap: 8px; }
.an-qrow .btn { min-height: 44px; padding: 8px 14px; font-size: 16px; border-radius: 999px; }
.an-qrow .btn.on { box-shadow: 0 0 0 3px #ffd84a; }
@media (max-width: 600px) { .an-qrow { display: grid; grid-template-columns: 1fr 1fr; } .an-qrow .btn { justify-content: center; padding: 8px 10px; font-size: 15px; } }

/* ── уроки (v24) ── */
/* нумерация строк — той же высоты, что строки кода: иначе к 40-й строке номер уезжает на строку вверх */
.editor .gutter { line-height: calc(13.5px * 1.65); }
/* L3 «рука на руке» в скетче: строка, которую ребёнок дописывает сам, — полоса за текстом и номер в нумерации */
.ed-code pre { position: relative; }
.ed-tip { position: absolute; left: 0; right: 0; top: calc(12px + var(--ln, 0) * 13.5px * 1.65); height: calc(13.5px * 1.65); background: rgba(255, 216, 74, .17); box-shadow: inset 3px 0 0 #ffd84a; pointer-events: none; animation: edTip 1.6s ease-in-out 3; }
@keyframes edTip { 50% { background: rgba(255, 216, 74, .34); } }
.gutter span.tip { color: #10162e; background: #ffd84a; margin: 0 -10px 0 -12px; padding: 0 10px 0 12px; font-weight: 700; }
/* короткое замыкание: заметная красная плашка, мягкая пульсация рамки */
.errbox.short { border: 2px solid var(--err); animation: shortPulse 1.1s ease-in-out 4; line-height: 1.45; }
.errbox.short b { display: block; margin-bottom: 4px; font-size: 16px; }
@keyframes shortPulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--err) 28%, transparent); } }
/* вопрос с картинками (Kicker): крупные карточки, подпись — одно-два слова */
.choices.pics { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; }
.choices.pics.n2 { --n: 2; } .choices.pics.n3 { --n: 3; }
.choice.pic { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 12px; text-align: center; }
.choice.pic img { width: 100%; max-width: 170px; aspect-ratio: 5 / 4; object-fit: contain; border-radius: 12px; background: var(--surface-2, transparent); pointer-events: none; }
.choice.pic span { font-size: 17px; }
@media (max-width: 420px) { .choices.pics.n3 { --n: 2; } }
@media (prefers-reduced-motion: reduce) { .ed-tip, .errbox.short { animation: none; } }
.mentor[data-mood="oops"] .bubble { border-color: color-mix(in srgb, var(--warn) 50%, transparent); } /* «ой!» после ошибки — как подсказка, без красного */

/* ═══ v25 · Мастерская и производительность уроков: подсказки по конструкции, выделение/копия/зеркало, «Крутить», инструкция ═══ */
.studio.mk .mk-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; z-index: 2; }
.studio.mk .mk-top .st-bar { position: static; }
.studio.mk .mk-top > * { pointer-events: auto; } .studio.mk .mk-top > .st-bar { pointer-events: none; }
.mk-sel, .mk-hint { align-self: flex-start; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--surface); border-radius: 14px; padding: 6px 8px; box-shadow: var(--shadow); max-width: 100%; }
.mk-sel[hidden], .mk-hint[hidden] { display: none; }
.mk-sel b { font-size: 13px; padding: 0 6px; }
.mk-hint { border: 2px solid var(--warn); gap: 10px; padding: 8px 10px; max-width: min(560px, 100%); font-size: 13.5px; line-height: 1.35; }
.mk-hint.bad { border-color: var(--err); } .mk-hint > svg { width: 22px; height: 22px; flex: none; color: var(--warn); } .mk-hint.bad > svg { color: var(--err); }
.mk-hint-t { flex: 1 1 220px; }
.studio.mk.testing .st-groups, .studio.mk.testing .st-bar [data-k=rot], .studio.mk.testing .st-bar [data-k=sel], .studio.mk.testing .st-bar [data-k=paste] { opacity: .45; }
.studio.mk.testing .st-bar [data-k=test] { border-color: var(--ok); background: var(--ok-soft); }
.mk-mine { display: grid; gap: 6px; } .mk-acts { display: flex; gap: 6px; } .mk-acts .mini-btn { flex: 1; justify-content: center; padding: 6px 8px; font-size: 12.5px; }
.mk-import { float: right; cursor: pointer; font-size: 12.5px; color: var(--ink, inherit); }
@media (max-width: 640px) {
  .studio.mk .mk-top { top: 10px; left: 10px; right: 10px; gap: 6px; }
  .mk-sel .mini-btn > span { display: none; } .mk-sel .mini-btn { padding: 7px; }
  .mk-hint { font-size: 12.5px; padding: 6px 8px; }
}
.studio.mk .st-bar [hidden] { display: none; }

/* ═══ v25 · Педагогика и наставник без сервера: текстовый режим, песочные часы, микрошаги L3, «Вернуть вид», «Дома», куратор, журнал ═══ */
/* текстовый режим: крупный текст реплик и подсвеченные ключевые слова */
.pl.tm .bubble { font-size: 19px; line-height: 1.5; }
.pl.tm .side-title { font-size: clamp(22px, 2.4vw, 28px); } .pl.tm .lead { font-size: 18.5px; line-height: 1.5; }
mark.kw { background: color-mix(in srgb, var(--warn) 22%, transparent); color: inherit; border-radius: 6px; padding: 0 3px; font-weight: 800; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
mark.kw.dir { background: color-mix(in srgb, var(--cyan) 28%, transparent); } mark.kw.term { background: var(--accent-soft); }
html.hc mark.kw { background: #ffef5a; color: #000; outline: 1.5px solid #000; }
/* песочные часы в шапке урока */
.sq-btn.hourglass { color: var(--accent); } .sq-btn.hourglass svg { width: 22px; height: 30px; }
.hg-sand { fill: color-mix(in srgb, var(--warn) 80%, #ffd36b); transition: y 1.2s ease, height 1.2s ease; }
/* L3: маленькие шаги */
.micro { display: grid; gap: 6px; padding: 10px 12px; border-radius: 16px; background: var(--accent-soft); border: 1.5px dashed var(--accent-2); }
.micro-h { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.micro-i { display: flex; align-items: flex-start; gap: 10px; text-align: left; border: 0; background: transparent; padding: 6px 4px; border-radius: 12px; font: 600 15px/1.35 var(--f-body); color: var(--ink); opacity: .55; min-height: 44px; }
.micro-i i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; background: var(--surface); border: 2px solid var(--line-2); }
.micro-i.now { opacity: 1; background: var(--surface); box-shadow: var(--shadow); } .micro-i.now i { border-color: var(--accent); color: var(--accent); }
.micro-i.ok { opacity: .8; } .micro-i.ok i { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 0; } .micro-i.ok i::before { content: '✓'; font-size: 15px; } .micro-i.ok span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ok) 60%, transparent); }
/* «Вернуть вид»: камера потерялась */
.tool.cam-back { background: var(--accent); color: var(--accent-ink); animation: pop2 .35s ease-out; } .tool.cam-back[hidden] { display: none; }
.tool[data-act="labels"].on { outline: 2.5px solid var(--cyan); }
/* шаг «Дома» */
.eyebrow-chip .eb-ic { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; }
.home-ideas { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.home-ideas li { background: var(--surface-2); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14.5px; }
.home-q { margin: 0; } .home-q .soft { display: block; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.home-guess .choice.sel { border-color: var(--accent); background: var(--accent-soft); }
.home-acts { display: flex; flex-wrap: wrap; gap: 10px; } .home-acts .btn { flex: 1 1 180px; } .home-acts svg { width: 20px; height: 20px; }
/* куратор недели (путь и «Родителям») */
.wkc { background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px; padding: 16px 18px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.path .wkc.compact { margin: 0 0 18px; }
.wkc-head { display: flex; align-items: center; gap: 12px; } .wkc-head h2 { margin: 0; font-size: 19px; } .wkc-head p { margin: 2px 0 0; font-size: 14px; }
.wkc-ic { flex: none; width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; } .wkc-ic img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s; } .wkc-ic img.in { opacity: 1; }
.wkc-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; line-height: 1.4; } .wkc-list li::marker { color: var(--accent); }
.wkc-done { display: flex; flex-wrap: wrap; gap: 6px; } .wkc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 700; } .wkc-chip.ok { background: var(--ok-soft); } .wkc-chip svg { width: 14px; height: 14px; color: var(--ok); }
.home-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.home-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); }
.home-list li > span:nth-child(2) { flex: 1; display: grid; gap: 2px; min-width: 0; } .home-list .soft { font-size: 13px; color: var(--muted); } .home-list .hl-text { font-size: 14px; }
.home-list .hl-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 16px; } .home-list li.ok .hl-ic { background: var(--ok); color: #fff; } .home-list .hl-ic svg { width: 16px; height: 16px; }
.home-list .mini-btn { min-height: 44px; }
/* журнал попыток у родителей */
.pr-home, .pr-log { display: grid; gap: 10px; }
.log-top { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; } .log-top .soft { display: block; font-size: 13px; color: var(--muted); }
.log-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 16px; max-height: 420px; overflow-y: auto; }
.log { width: 100%; border-collapse: collapse; font-size: 13.5px; } .log th, .log td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; } .log th { position: sticky; top: 0; background: var(--surface-2); font-size: 12.5px; }
.log td:nth-child(2) { white-space: normal; min-width: 140px; } .log tr.ok td:nth-child(4) { color: var(--ok); font-weight: 700; } .log tr.bad td:nth-child(4) { color: color-mix(in srgb, var(--warn) 80%, var(--ink)); font-weight: 700; } .log svg { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 640px) {
  .pl.tm .bubble { font-size: 17.5px; } .wkc { padding: 12px 14px; } .wkc-head h2 { font-size: 17px; } .wkc-ic { width: 46px; height: 46px; }
  .log th:nth-child(5), .log td:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hg-sand { transition: none; } .tool.cam-back { animation: none; } }
html.rm .hg-sand { transition: none; } html.rm .tool.cam-back { animation: none; }

/* ═══ v25 · Миры: новые свойства и генератор дорог — окно разговора, задание, метки целей, миникарта, полоски здоровья,
   края экрана (холод, жара, газ, заморозка, невидимость), вспышка вместо тряски, теги и реплики в карточке, кисть «Дороги» ═══ */
.w-dlg { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(540px, calc(100% - 24px)); z-index: 5; cursor: pointer; animation: wsay .2s ease-out; }
.w-dlgc { background: var(--surface); color: var(--ink); border-radius: 18px; padding: 12px 16px 10px; box-shadow: 0 14px 34px -14px rgba(20, 12, 70, .55); border: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); display: grid; gap: 4px; }
.w-dlgc b { font: 800 14px var(--f-display); color: var(--accent); }
.w-dlgc p { margin: 0; font: 700 17px/1.35 var(--f-display); }
.w-dlgc small { color: var(--muted); font-size: 12px; justify-self: end; }
.w-hud .w-quest { background: #fff6d6; color: #5a4200; } .w-hud .w-quest b { color: #8a5a00; font-size: 15px; }
.w-hud .w-quest.done { background: #dcfce7; color: #14532d; }
.w-hud .w-stat { font-size: 13.5px; } .w-hud .w-stat b { font-size: 15px; }
.w-mark { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; display: grid; justify-items: center; font-style: normal; color: var(--c, #ffd84a); }
.w-mark b { font: 900 22px/1 var(--f-display); text-shadow: 0 2px 0 #16133b, 0 0 8px rgba(0, 0, 0, .35); animation: wmark 1s ease-in-out infinite alternate; }
.w-mark span { font: 800 11px var(--f-display); color: #fff; background: rgba(22, 19, 59, .72); border-radius: 99px; padding: 1px 7px; }
.w-mark.edge b { animation: none; font-size: 26px; display: inline-block; }
@keyframes wmark { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.w-hpbar { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; width: 46px; height: 7px; border-radius: 99px; background: rgba(22, 19, 59, .55); padding: 1px; }
.w-hpbar i { display: block; height: 100%; border-radius: 99px; background: #4ade80; transition: width .2s; }
.w-hpbar[data-low="1"] i { background: #f87171; }
.st-stage canvas.w-mini { position: absolute; inset: auto; right: 12px; top: 112px; z-index: 5; width: 132px; height: 132px; touch-action: manipulation; border-radius: 14px; background: rgba(22, 19, 59, .35); border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 6px 18px -8px rgba(20, 10, 60, .55); image-rendering: pixelated; cursor: zoom-in; transition: width .2s, height .2s; }
.st-stage canvas.w-mini.big { width: 240px; height: 240px; cursor: zoom-out; }
.w-envfx { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: box-shadow .5s, background .5s; }
.w-envfx[data-clim="cold"] { box-shadow: inset 0 0 70px 18px rgba(150, 205, 255, .55); }
.w-envfx[data-clim="heat"] { box-shadow: inset 0 0 70px 18px rgba(255, 150, 60, .5); }
.w-envfx[data-clim="gas"] { box-shadow: inset 0 0 80px 22px rgba(120, 220, 60, .5); background: rgba(150, 220, 90, .08); }
.w-envfx[data-st="freeze"] { box-shadow: inset 0 0 90px 30px rgba(170, 225, 255, .8); background: rgba(190, 235, 255, .12); }
.w-envfx[data-st="invis"] { box-shadow: inset 0 0 60px 14px rgba(190, 160, 255, .45); }
.w-envfx[data-st="fast"] { box-shadow: inset 0 0 50px 10px rgba(255, 225, 77, .4); }
.w-envfx.flash { background: rgba(255, 255, 255, .3); transition: none; }
.w-tags { display: grid; gap: 4px; margin: 2px 0 8px; } .w-tags > span { font-weight: 700; font-size: 13px; }
.w-tags .w-chips button { padding: 4px 10px; font-size: 12.5px; }
.w-lines { margin: 4px 0 6px; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
.w-lines li span { margin-right: 6px; }
.w-roads { display: grid; gap: 8px; }
@media (max-width: 900px), (pointer: coarse) {
  .w-dlg { bottom: 158px; }
  .st-stage canvas.w-mini { width: 96px; height: 96px; top: 112px; } .st-stage canvas.w-mini.big { width: 200px; height: 200px; }
}
@media (prefers-reduced-motion: reduce) { .w-mark b, .w-dlg { animation: none; } }
:root[data-theme="dark"] .w-hud .w-quest { background: #3b2f00; color: #ffe9a3; }
@media (max-width: 640px) { .mk-hint-t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .mk-hint.open .mk-hint-t { -webkit-line-clamp: unset; } .mk-hint [data-h=show] { padding: 6px 10px; } }

/* ══ Engineer, Arduino и схемы (v25): схема по цели, таблица замеров скетча, клавиатура на сцене, датчик линии ══ */
.slab { margin: 10px 0 0; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); }
.slab > summary { cursor: pointer; padding: 9px 12px; font: 800 14px var(--f-display); list-style: none; display: flex; gap: 8px; align-items: baseline; }
.slab > summary::-webkit-details-marker { display: none; } .slab > summary::before { content: '▸'; color: var(--muted); } .slab[open] > summary::before { content: '▾'; }
.slab > summary small { font: 600 12px var(--f-body); color: var(--muted); }
.slab .lab { margin: 0 8px 8px; } .slab-y { font: 700 13px var(--f-body); display: flex; gap: 6px; align-items: center; } .slab-y select { font: inherit; border-radius: 8px; padding: 3px 6px; }
.slab-seed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; }
.slab-seed input { max-width: 100%; min-height: 36px; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
#lab-seed-help, .slab-seed-error, .slab-seed-result { margin: 0; font-size: 13px; }
.slab-seed-error { color: var(--danger, #a11b1b); }
:root[data-track="engineer"] .slab .lab { background: var(--surface-2); border-color: var(--line-2); } :root[data-track="engineer"] .slab .lab-h { color: var(--cyan); }
:root[data-track="engineer"] .slab .lab-tbl th { background: var(--surface-2); color: var(--ink); } :root[data-track="engineer"] .slab .lab-tbl tr:last-child td { background: var(--surface-2); }
:root[data-track="engineer"] .slab .lab-svg { background: var(--surface); } :root[data-track="engineer"] .slab .lab-svg .lx, :root[data-track="engineer"] .slab .lab-svg .ly { fill: var(--cyan); }
.goal-list { margin: 4px 0 10px; padding-left: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; }
.goal-list li { padding-left: 24px; position: relative; } .goal-list li::before { content: '◻'; position: absolute; left: 2px; color: var(--accent); font-weight: 800; }
.kbd-help { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.tray-tools kbd, .mini-btn kbd { font: 700 11px var(--f-mono); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); }
.mini-btn .del-x { font-style: normal; font-weight: 800; font-size: 15px; line-height: 1; }
/* рамка фокуса: сцена (клавиатурный курсор по гнёздам) и карточки деталей */
.pl-stage canvas:focus-visible { outline: 4px solid #ffd400; outline-offset: -4px; border-radius: 18px; }
.part-card:focus-visible { outline: 3px solid #ffd400; outline-offset: 2px; border-color: var(--accent); }
.ed-code textarea:focus-visible { outline: 3px solid var(--accent-2); outline-offset: -3px; } /* прозрачное поле кода: рамка фокуса внутри редактора (8.4.3) */
.inp.line { touch-action: manipulation; } .inp.line i { width: 18px; height: 18px; border-radius: 4px; background: #fff; border: 2px solid #2a2b33; }
.inp.line.on { border-color: var(--accent); background: var(--accent-soft); } .inp.line.on i { background: #111; }
.inp.line b { font-weight: 800; }
@media (max-width: 640px) { .kbd-help { display: none; } }
@media (max-width: 640px) {
  .studio.mk .st-bar { gap: 4px; } .studio.mk .st-bar .mini-btn { padding: 7px; } .studio.mk .st-bar .mini-btn svg { width: 19px; height: 19px; }
  .studio.mk .st-bar [data-k=save] { padding: 7px 9px; } .studio.mk .st-bar .sp { display: none; }
  .mk-sel { gap: 4px; padding: 4px 6px; } .mk-sel b { font-size: 12px; padding: 0 2px; }
}

/* ── v25 · Облака и лучи света в мирах: вкладка «Мир» → «Небо» ── */
.w-skyset h4 { margin: 8px 0 4px; }
.w-cdir button { min-width: 2.4em; padding-left: 6px; padding-right: 6px; }
.w-skytxt { margin-top: 6px; }

/* ── v25 · Анимации Брикса: живой наставник в уроке (3D вместо картинки) и в карточке итога ── */
.bip-img.bip-3d { width: 120px; height: 132px; animation: none; pointer-events: none; position: relative; }
.mentor.talking .bip-img.bip-3d { animation: none; }
.bip-3d canvas { display: block; width: 100%; height: 100%; }
.star-img.with-brix { display: flex; align-items: flex-end; justify-content: center; gap: 0; }
.star-img.with-brix img { width: 116px; height: 116px; }
.star-img.with-brix .bip-3d { width: 136px; height: 150px; }
@media (max-width: 900px) { .bip-img.bip-3d { width: 94px; height: 104px; } .star-img.with-brix .bip-3d { width: 112px; height: 124px; } }

/* библиотека анимаций в окне «Кости и анимация»: «Взять из библиотеки», вариант персонажа, «Мои анимации» */
.an-libbar { margin: 6px 0; } .an-libbar .btn.on { box-shadow: 0 0 0 3px #ffd84a; }
.an-lib { margin: 6px 0 10px; padding: 10px; border-radius: 14px; background: rgba(123, 60, 240, .07); box-shadow: 0 0 0 1px rgba(123, 60, 240, .18) inset; }
.an-lib .w-l { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted, #6b6880); text-transform: none; letter-spacing: 0; }
.an-lib-g { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.an-lib-g > span:first-child { flex: 0 0 100%; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b6880); }
.an-lib-it { min-height: 40px; border: 0; border-radius: 999px; padding: 7px 12px; background: var(--surface, #fff); box-shadow: 0 0 0 1px rgba(123, 60, 240, .25) inset; font: inherit; font-size: 14px; cursor: pointer; }
.an-lib-it:hover { background: #fff6cc; } .an-lib-it i { font-style: normal; font-size: 11px; color: var(--muted, #6b6880); }
.an-lib-my { display: inline-flex; align-items: center; gap: 2px; }
.an-from, .an-own { margin: 8px 0; padding: 10px; border-radius: 12px; background: rgba(53, 228, 255, .08); }
.an-from .an-dur { margin: 4px 0; } .an-own { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .an-own .soft { flex: 1; min-width: 180px; margin: 0; }
@media (max-width: 600px) { .an-lib-it { font-size: 13.5px; padding: 6px 10px; } .an-from .an-dur { min-width: 0; } }
