/* forge_stage.css — живая сцена Кузницы (templates/_forge_stage.html): главная и страница модели.
   Сцена тёмная в обеих темах, как верстак в /forge: чёрные детали читаются только на тёмном. */
.fs { position: relative; border-radius: 24px; overflow: hidden; background: #0d0f13; color: #eef0f3; isolation: isolate;
      box-shadow: 0 24px 60px rgba(0, 0, 0, .28); --fs-line: rgba(232, 236, 242, .13); --fl-ink: #fff; }
.fs-view { position: relative; height: min(58svh, 560px); min-height: 340px; overflow: hidden; }
.fs--compact .fs-view { height: min(44svh, 400px); min-height: 280px; }
.fs-view > canvas { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; cursor: grab; }
.fs-view > canvas:active { cursor: grabbing; }
.fs-glow { position: absolute; inset: 0; pointer-events: none;
           background: radial-gradient(60% 75% at 50% 62%, color-mix(in srgb, var(--c-accent) 26%, transparent), transparent 70%),
                       radial-gradient(90% 70% at 50% 110%, rgba(255, 255, 255, .07), transparent 72%); }
.fs-head { position: absolute; z-index: 2; left: 28px; top: 24px; display: flex; align-items: center; gap: 16px; max-width: min(520px, calc(100% - 56px)); pointer-events: none; }
.fs-logo { flex: none; width: 74px; }
.fs-logo svg { display: block; width: 100%; height: auto; }
.fs-title { margin: 0; font: 800 clamp(26px, 3.4vw, 40px)/1.05 var(--f-ui); letter-spacing: -.015em; color: #fff; }
.fs--compact .fs-title { font-size: clamp(20px, 2.4vw, 26px); }
.fs-lead { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: rgba(238, 240, 243, .72); }
.fs-plats { position: absolute; z-index: 2; right: 20px; top: 20px; display: flex; gap: 4px; padding: 4px; border-radius: 999px;
            background: rgba(14, 17, 20, .66); border: 1px solid var(--fs-line); backdrop-filter: blur(6px); }
.fs-plats[hidden], .fs-plats:empty { display: none; }
.fs-plat { min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; background: none; color: rgba(238, 240, 243, .74);
           font: 600 13px var(--f-ui); cursor: pointer; transition: background .2s, color .2s; }
.fs-plat.is-on { background: var(--c-accent); color: #fff; }
.fs-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; font-size: 14px; color: rgba(238, 240, 243, .6); }
.fs-loading[hidden] { display: none; }

.fs-dock { position: relative; z-index: 2; padding: 14px 20px 18px; border-top: 1px solid var(--fs-line); background: rgba(255, 255, 255, .025); }
.fs-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; }
.fs-tabs::-webkit-scrollbar { display: none; }
.fs-tab { flex: none; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: rgba(238, 240, 243, .6);
          font: 600 13.5px var(--f-ui); white-space: nowrap; cursor: pointer; transition: color .2s, background .2s; }
.fs-tab.is-on { color: #fff; background: rgba(255, 255, 255, .08); }
.fs-progress { height: 2px; margin: 8px 0 12px; border-radius: 2px; overflow: hidden; background: var(--fs-line); }
.fs-progress::after { content: ''; display: block; height: 100%; width: 100%; background: var(--c-accent); transform: scaleX(0); transform-origin: left; }
.fs.is-tour .fs-progress::after { animation: fs-tour var(--fs-tour, 3.6s) linear infinite; }
@keyframes fs-tour { to { transform: scaleX(1); } }
.fs-row { display: flex; align-items: center; gap: 16px; }
.fs-tiles { flex: 1 1 auto; min-width: 0; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; min-height: 92px; }
.fs-tiles::-webkit-scrollbar { display: none; }
.fs-tile { flex: none; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-content: center;
           width: 244px; min-height: 84px; padding: 10px 14px 10px 10px; border-radius: 14px; border: 1px solid var(--fs-line); background: rgba(255, 255, 255, .04);
           color: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.fs-tile.is-on { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 14%, transparent); }
.fs-tile-pic { grid-row: 1 / 3; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 10px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.fs-tile-pic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.fs-tile-pic img:not([src]) { visibility: hidden; }
.fs-tile-name { align-self: end; font: 700 13.5px/1.25 var(--f-ui); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fs-tile-kit { align-self: start; margin-top: 2px; font-size: 12px; color: rgba(238, 240, 243, .56); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-go { flex: none; display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--c-accent); color: #fff;
         font: 700 15px var(--f-ui); text-decoration: none; white-space: nowrap; transition: filter .2s, transform .2s; }
@media (hover: hover) {
  .fs-tile:hover { border-color: rgba(232, 236, 242, .34); transform: translateY(-1px); }
  .fs-tab:hover, .fs-plat:not(.is-on):hover { color: #fff; }
  .fs-go:hover { filter: brightness(1.1); }
}
.fs :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 760px) {
  .fs { border-radius: 20px; }
  .fs-view { height: 56svh; min-height: 380px; }
  .fs-head { left: 16px; top: 16px; gap: 10px; }
  .fs-logo { width: 52px; }
  .fs-plats { top: auto; right: auto; left: 12px; bottom: 12px; }
  .fs-dock { padding: 10px 12px 14px; }
  .fs-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .fs-tiles { flex: none; min-height: 0; }
  .fs-tile { width: 214px; }
  .fs-go { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .fs-tile, .fs-tab, .fs-plat, .fs-go { transition: none; }
  .fs.is-tour .fs-progress::after { animation: none; }
}

/* логотип слоями (без forge.css на этих страницах) */
.fl { display: block; width: 100%; height: auto; overflow: visible; fill: currentColor; }
.fl-spark { fill: var(--fl-spark, var(--c-accent)); }
.fl-flash { opacity: 0; }
.fl-letters { opacity: 0; }
.fl--static .fl-solid, .fl--static .fl-flash { display: none; }
.fl--static .fl-letters { opacity: 1; }
.fs .fl, .pf-logo .fl { color: #fff; }

/* FORGE-HOME-MOB: на главной сцена — не карточка, а тёмная полоса во всю ширину секции (фон сплошной на секцию) */
.fs-band { position: relative; isolation: isolate; padding-block: clamp(20px, 3vw, 40px); background: #0d0f13;
           border-block: 1px solid rgba(232, 236, 242, .08); overflow: hidden; }
.fs-band::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
                   background: radial-gradient(55% 70% at 50% 42%, color-mix(in srgb, var(--c-accent) 22%, transparent), transparent 72%),
                               radial-gradient(80% 60% at 50% 105%, rgba(255, 255, 255, .06), transparent 70%); }
.fs-band .fs { border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
.fs-band .fs-view { overflow: visible; }
.fs-band .fs-glow { display: none; }
.fs-band .fs-dock { background: none; }
@media (max-width: 760px) {
  /* пилюля платформ — по центру и не шире сцены; длинные названия в строку, лишнее листается */
  .fs-plats { left: 50%; right: auto; max-width: calc(100% - 24px); transform: translateX(-50%); overflow-x: auto; scrollbar-width: none; }
  /* не влезло — край тает, видно, что дальше есть ещё (как у палитры в /forge) */
  .fs-plats:is([data-more]) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
  .fs-plats::-webkit-scrollbar { display: none; }
  .fs-plat { flex: none; white-space: nowrap; }
  .fs-band { padding-block: 8px 16px; }
  .fs-band .fs-view { height: 52svh; min-height: 340px; }
}

/* FORGE-LOADER: заголовок и платформы — над прогревом (слой прогрева .fw — z-index 9 внутри сцены) */
.fs-head, .fs-plats { z-index: 10; }
/* на телефоне заголовок секции занимает верх сцены — прогрев опускаем к низу, чтобы надпись не наезжала */
@media (max-width: 760px) { .fs .fw { justify-content: flex-end; padding-bottom: 28px; } }

/* FORGE-DOCK-REVEAL: пока прогрев — вкладки, полоса и плитки скрыты, место под них занято (высота не прыгает);
   после удара молотом (.is-ready) выезжают по очереди. «Собрать свою» видна всегда */
.fs-tabs { min-height: 44px; }
.fs-tabs, .fs-progress, .fs-tiles { transition: opacity .45s ease, transform .5s cubic-bezier(.2, .8, .2, 1); }
.fs:not(.is-ready) .fs-tabs, .fs:not(.is-ready) .fs-progress, .fs:not(.is-ready) .fs-tiles { opacity: 0; transform: translateY(10px); pointer-events: none; }
.fs.is-ready .fs-progress { transition-delay: .09s; }
.fs.is-ready .fs-tiles { transition-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
  .fs-tabs, .fs-progress, .fs-tiles { transition: opacity .2s ease; transform: none !important; }
}
