/* Рабочие экраны: стенд и «Мои стенды». Шрифт, цвета, радиусы, шкала размеров, кнопка и поле ввода заданы
   в shell.css; здесь только раскладка и свои элементы. */

.ws-root {
  --ws-ink: var(--ink);
  --ws-muted: var(--muted);
  --ws-stroke: var(--line);
  color: var(--ws-ink);
  width: 100%;
  margin: 0;
  padding: 0;
}

.ws-root *,
.ws-root *::before,
.ws-root *::after {
  box-sizing: border-box;
}

.ws-root :where(button, textarea, a) {
  font: inherit;
}

/* Обводка фокуса как в анкете: тёмная, без синего браузерного кольца. Поле ввода вместо обводки темнит свою рамку. */
.ws-root :is(button, a):focus-visible {
  outline: 2px solid var(--ws-ink);
  outline-offset: 3px;
}

/* Та же сетка, что у экранов телефона и «О вас»: изображение не прыгает при переходе к стенду. */
.ws-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(300px, 1fr);
  align-items: start;
  gap: clamp(28px, 5.8vw, 84px);
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--page-top) var(--gutter) 96px;
}

.ws-gallery, .ws-sidebar { min-width: 0; }

.ws-image-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--soft);
}

.ws-image-frame > img,
.ws-card > img,
.ws-version img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.ws-image-frame > img { object-fit: contain; }

/* Ожидание доработки поверх текущей версии; вид панели — .wait-panel в shell.css. */
.ws-wait {
  position: absolute;
  inset: 0;
}

.ws-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.ws-parameters, .ws-download {
  font-size: var(--text-compact);
  line-height: 20px;
}

.ws-parameters {
  flex: 1 1 220px;
  min-width: 0;
  color: var(--ws-muted);
  overflow-wrap: anywhere;
}

.ws-root .ws-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ws-ink);
  text-decoration: none;
  font-weight: 600;
}
.ws-download::before { content: "↓"; font-size: 16px; font-weight: 500; }
.ws-download:hover { color: var(--muted); }

.ws-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.ws-root :is(.ws-version, .ws-card) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ws-root .ws-version {
  width: clamp(112px, 9vw, 128px);
  font-size: var(--text-compact);
  line-height: 20px;
}

.ws-version img { border-radius: var(--radius-s); }
.ws-version[aria-pressed=true] img {
  outline: 2px solid var(--ws-ink);
  outline-offset: 2px;
}
.ws-version-name { margin-top: 8px; }
.ws-version[aria-pressed=true] .ws-version-name { font-weight: 600; }
.ws-version-status { margin-top: 2px; font-size: var(--text-caption); line-height: 18px; color: var(--ws-muted); }

.ws-root .ws-title {
  margin: 0;
  font-size: var(--text-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Боковая колонка: заголовок — 24 — форма; подпись — 8 — поле — 8 — подсказка — 16 — кнопка. */
.ws-revision { margin: 24px 0 0; }
.ws-label { display: block; margin-bottom: 8px; font-size: var(--text-body); font-weight: 600; line-height: 20px; }

/* Пожелание длиннее названия продукта, поэтому минимум — четыре строки; в остальном это общее поле из shell.css. */
.ws-root .ws-field { min-height: calc(24px * 4 + 24px); }

.ws-root :is(.ws-hint, .ws-error) {
  margin: 8px 0 0;
  color: var(--ws-muted);
  font-size: var(--text-hint);
  line-height: 1.4;
}
.ws-root .ws-error { color: var(--error); }

.ws-root .ws-button { width: 100%; }
.ws-revision .ws-secondary { margin-top: 16px; }
.ws-root .ws-balance { margin-top: 12px; }
.ws-root .ws-limit { margin: 24px 0 0; color: var(--ws-muted); }
.ws-quote { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--ws-stroke); }
.ws-confirmation { font-size: var(--text-lead); line-height: 1.4; }
.ws-confirmation strong { font-weight: 600; }
.ws-confirmation .ws-hint { margin-top: 4px; }

/* «Мои стенды» стоят на той же левой линии, что шапка и экран стенда. */
.ws-list {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--page-top) var(--gutter) 96px;
}
.ws-root .ws-list .ws-title { font-size: var(--text-title); line-height: 1.12; letter-spacing: -0.022em; }
.ws-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 32px 24px; margin-top: 32px; }
.ws-card > img { border-radius: var(--radius); background: var(--soft); }
.ws-card-title { margin-top: 12px; font-size: var(--text-body); font-weight: 600; line-height: 20px; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ws-card:hover .ws-card-title { text-decoration: underline; text-underline-offset: 4px; }
.ws-card-status { margin-top: 4px; color: var(--ws-muted); font-size: var(--text-caption); line-height: 18px; }
.ws-root .ws-card { width: 100%; }
.ws-empty { margin-top: 24px; }
.ws-root .ws-empty-copy { margin: 0 0 20px; color: var(--ws-muted); }
.ws-root .ws-empty .ws-button { width: auto; }
/* Незаконченная идея: превью того же размера, что картинка стенда, панели — из ожидания первой идеи. */
.ws-root .ws-idea-card { cursor: pointer; }
.ws-card-preview { width: 100%; aspect-ratio: 3 / 2; border-radius: var(--radius); }
.ws-card-preview .en-ai-mark { fill: var(--accent); }
.ws-root .ws-card-action { width: auto; margin-top: 12px; }

@media (max-width: 980px) {
  .ws-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 48px; }
  .ws-list { padding-bottom: 48px; }
  .ws-versions { gap: 12px; }
  .ws-caption { margin-top: 12px; }
}
