/* «Шпаргалки для начинающих» (24.11.2026) — симуляторы, хаб, каталог. Палитра сайта: тёмная сцена, акцент #0071e3,
   коралловый #ff6b4a. Синий рядом с жёлтым не ставим (правило Андрея). Разметка — cheats_pages.py, логика — cheats.js. */
.cheat-page .tool-body.cheat { grid-template-columns: minmax(0, 1fr) 340px; }
.cheat .stage canvas { touch-action: manipulation; }
.cheat[data-sim="compose"] .stage canvas { cursor: ew-resize; touch-action: none; }
.cheat[data-sim="focus"] .stage canvas { cursor: crosshair; }
.cheat .panel { gap: 12px; }
.cheat-controls { display: flex; flex-direction: column; gap: 12px; }
.cheat-sl-top { display: flex; align-items: baseline; gap: 8px; }
.cheat-sl-top .panel-label { margin: 0; }
.cheat-sl-top b { font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cheat-sl-top em { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 107, 74, .18); color: #ff8f75; }
.cheat-sl.is-auto .range { opacity: .45; pointer-events: none; }
.cheat-sl-ends { display: flex; justify-content: space-between; font-size: 12px; opacity: .5; margin-top: -4px; }
.cheat-check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.cheat-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.cheat-hist canvas { width: 100%; height: 72px; border-radius: 10px; background: rgba(255, 255, 255, .05); display: block; }
.cheat-clip { font-size: 12.5px; opacity: .75; margin-top: 4px; }
.cheat-meter { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 12px; opacity: .8; }
.cheat-meter i { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgba(255,255,255,.12), rgba(255,255,255,.12)) center / 2px 100% no-repeat, rgba(255, 255, 255, .08); }
.cheat-meter i b { position: absolute; top: -4px; width: 6px; height: 18px; margin-left: -3px; border-radius: 3px; background: var(--ok); transition: left .15s; }
.cheat-meter.is-off i b { background: var(--coral); }
.cheat-hint { font-size: 14px; line-height: 1.45; min-height: 4.3em; }
.cheat-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.cheat-actions > .tool-btn { flex: 1 1 140px; padding-inline: 10px; font-size: 14px; white-space: nowrap; }
.cheat-share-more { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.cheat-share-more[hidden] { display: none; }
.cheat-show-btn { width: 100%; text-align: center; padding-top: 2px; }

/* чек-лист первого шага */
.cheat-list-col { position: relative; overflow: auto; padding-right: 4px; }
.cheat-cl-badge { position: static; display: inline-block; margin-bottom: 10px; }
.cheat-brands { margin-bottom: 10px; }
.cheat-brands button { font-size: 15px; padding: 8px 16px; }
.cheat-cl { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; counter-reset: cl; }
.cheat-cl li { counter-increment: cl; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); transition: background .2s, border-color .2s; }
.cheat-cl li.is-done { background: rgba(48, 209, 88, .12); border-color: rgba(48, 209, 88, .5); }
.cheat-cl label { display: flex; gap: 10px; padding: 10px 12px; cursor: pointer; }
.cheat-cl input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ok); }
.cheat-cl b { display: block; font-size: 14.5px; }
.cheat-cl b::before { content: counter(cl) ". "; opacity: .55; }
.cheat-cl small { display: block; font-size: 12.5px; opacity: .65; line-height: 1.35; margin-top: 2px; }
.cheat-cl em { display: block; font-style: normal; font-size: 13px; color: #ff9a82; margin-top: 4px; line-height: 1.35; }

/* окно «Моя шпаргалка» */
.cheat-dlg { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .72); }
.cheat-dlg[hidden] { display: none; }
.cheat-dlg-box { position: relative; max-width: min(460px, 100%); max-height: 100%; overflow: auto; padding: 16px; border-radius: var(--r-card); background: #1c1c1e; color: #fff; text-align: center; }
.cheat-dlg-box img { display: block; width: 100%; height: auto; border-radius: 14px; }
.cheat-dlg-row { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.cheat-dlg-row [hidden] { display: none; }
.cheat-dlg-note { font-size: 13px; opacity: .65; margin-top: 10px; }
.cheat-dlg-x { position: absolute; right: 8px; top: 4px; z-index: 1; width: 40px; height: 40px; border: 0; background: none; color: #fff; font-size: 30px; cursor: pointer; }
.cheat-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1001; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 999px; background: #1c1c1e; color: #fff; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: opacity .25s, transform .25s; }
.cheat-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* блок картинки-шпаргалки и навигация по шагам (светлая часть страницы) */
.cheat-steps-nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin: 26px 0 8px; font-size: 15px; }
.cheat-steps-nav a { padding: 8px 14px; border-radius: 999px; background: #f5f5f7; color: #1d1d1f; }
.cheat-steps-nav a.all { background: #1d1d1f; color: #fff; }
.cheat-card-block { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; align-items: start; margin: 18px 0 10px; }
.cheat-card-img img { width: 100%; height: auto; border-radius: var(--r-big); box-shadow: var(--tile-shadow); display: block; }
.cheat-eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #d9472b; font-weight: 600; }
.cheat-card-block h2 { margin-top: 4px !important; }
.cheat-card-block ul { margin: 10px 0 16px; }
.cheat-deeper, .cheat-more { font-size: 15.5px; margin-top: 12px; line-height: 1.5; }

/* хаб */
.cheat-hub-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 6px 0 18px; }
.cheat-hub-top [data-progress]:empty { display: none; }
.cheat-hub-top [data-progress] { font-weight: 600; color: #1f9d48; }
.cheat-ladder { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cheat-step { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: var(--r-card); background: #fff; position: relative; }
.cheat-step.is-done::after { content: "✓ пройдено"; position: absolute; right: 14px; top: 12px; font-size: 12.5px; font-weight: 600; color: #1f9d48; }
.cheat-step-img img { width: 100%; height: auto; border-radius: 12px; display: block; }
.cheat-step-n { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #d9472b; }
.cheat-step h2 { font-size: 21px; letter-spacing: -0.02em; margin: 2px 0 6px; }
.cheat-step h2 a { color: inherit; }
.cheat-step p { font-size: 15px; color: #444; margin-bottom: 10px; }
.cheat-step-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cheat-dl-link { font-size: 13.5px; }

/* каталог */
.cheat-cat-h { font-size: 26px; letter-spacing: -0.02em; margin: 26px 0 12px; }
.cheat-cat-h small { display: block; font-size: 15px; font-weight: 400; color: #666; letter-spacing: 0; margin-top: 4px; }
.cheat-topics { margin-bottom: 14px; }
.cheat-topics .chip { border: 1px solid rgba(0,0,0,.12); background: #fff; color: #1d1d1f; }
.cheat-topics .chip[aria-pressed="true"] { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }
.cheat-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.cheat-cat-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--r-card); background: #fff; color: #1d1d1f; transition: transform .2s; }
.cheat-cat-card[hidden] { display: none; }
.cheat-cat-card:hover { transform: translateY(-3px); text-decoration: none; }
.cheat-cat-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; background: #eee; }
.cheat-cat-card .tag { font-size: 12px; color: #d9472b; font-weight: 600; }
.cheat-cat-card strong { font-size: 15px; line-height: 1.3; }

/* режим показа: на весь экран, без шапки (для курса и стримов) */
.cheat-show body { overflow: hidden; }
.cheat-show header, .cheat-show .site-header, .cheat-show footer, .cheat-show .tool-seo, .cheat-show .tool-head, .cheat-show .cheat-actions > :not(.cheat-show-btn) { display: none !important; }
.cheat-show .tool-shell { position: fixed; inset: 0; z-index: 900; height: 100vh; min-height: 0; padding: 2.5vh 2.5vw; }
.cheat-show .tool-body.cheat { grid-template-columns: minmax(0, 1fr) 380px; }
.cheat-show .cheat-sl-top b { font-size: 28px; }
.cheat-show .cheat-hint { font-size: 17px; }
.cheat-show .range::-webkit-slider-thumb { width: 34px; height: 34px; margin-top: -14px; }

@media (max-width: 900px) {
  .cheat-page .tool-body.cheat { grid-template-columns: minmax(0, 1fr); }
  /* кадр остаётся на виду, пока крутите нижние ползунки */
  .cheat-page .tool-body.cheat > .tool-col:not(.cheat-list-col) { position: sticky; top: calc(var(--hdr, 76px) - 1px); z-index: 5; padding: 6px 0; margin: -6px 0; background: #0f0e11; }
  .cheat-sl-ends { display: none; }
  .cheat .stage-badge { left: 8px; top: 8px; padding: 4px 9px 5px; }
  .cheat .stage-badge b { font-size: 15px; }
  .cheat .stage-badge span { font-size: 12px; }
  .cheat-hint { min-height: 0; font-size: 13.5px; }
  .cheat-actions { gap: 6px; padding-top: 0; }
  .cheat .panel { gap: 8px; }
  .cheat-cl { grid-template-columns: 1fr; }
  .cheat-list-col { overflow: visible; }
  .cheat-card-block { grid-template-columns: 1fr; }
  .cheat-card-img { max-width: 320px; }
  .cheat-ladder { grid-template-columns: 1fr; }
  .cheat-step { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .cheat-step h2 { font-size: 18px; }
  .cheat-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cheat-show .tool-body.cheat { grid-template-columns: minmax(0, 1fr); }
  .cheat-show .tool-shell { overflow: auto; }
}

/* режим съёмки кадра для картинок-шпаргалок */
.cheat-shot body { overflow: hidden; }
.cheat-shot canvas.cheat-frame { position: fixed; left: 0; top: 0; z-index: 99999; border-radius: 0 !important; box-shadow: none !important; }
