/* ==========================================================================
   1. ГЛОБАЛЬНЫЙ ФОН, ОСНОВНОЙ ЛЕЙАУТ
   ========================================================================== */

/* Фон всего сайта — глубокий космический градиент */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif;
  background: radial-gradient(
    circle at 0% 0%,
    #3a86ff 0%,
    #2b2f77 30%,
    #120b33 70%,
    #050814 100%
  );
  background-attachment: fixed;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Контейнер для страниц НЕ fullscreen */
.main {
  padding: 80px 16px 40px;
  flex: 1;
}

/* ==========================================================================
   2. ГЛАВНАЯ СТРАНИЦА: СТЕКЛЯННАЯ КАРТОЧКА
   ========================================================================== */

.home-root {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.home-card {
  width: 320px;
  height: 320px;
  border-radius: 28px;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);

  box-shadow:
    0 14px 35px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(58, 134, 255, 0.35);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  color: #ffffff;

  cursor: pointer;
  transition:
    transform 0.25s ease-out,
    box-shadow 0.25s ease-out,
    background 0.25s ease-out;
}

.home-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(90, 180, 255, 0.55);
}

.home-card:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================================
   3. НАВИГАЦИЯ (HEADER + ТАБЫ ПРОЕКТА)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;

  background: rgba(5, 8, 20, 0.7);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;

  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  color: #f9fafb;
}

.nav-link {
  color: #b0bddc;
  text-decoration: none;
  font-size: 14px;
}

.nav-link:hover {
  color: #ffffff;
}

/* Табы проекта */
.nav-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.nav-pill {
  padding: 6px 14px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);

  color: #f9fafb;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;

  backdrop-filter: blur(18px);
  transition:
    background 0.2s ease-out,
    border-color 0.2s ease-out,
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.nav-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.nav-pill--active {
  background: #3a86ff;
  border-color: #76aaff;
  color: #ffffff;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.5),
    0 0 20px rgba(58, 134, 255, 0.7);
}

/* ==========================================================================
   4. СЕКЦИИ СОДЕРЖИМОГО
   ========================================================================== */

.section {
  max-width: 960px;
  margin: 0 auto 20px;
  padding: 24px 20px;

  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);

  color: #e5e7eb;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(80, 140, 255, 0.25);
}

.section h2 {
  margin-top: 0;
  color: #f3f4ff;
}

/* ==========================================================================
   5. ФОРМЫ И КНОПКИ (iOS-like)
   ========================================================================== */

.input {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 10px 16px;
  font-size: 14px;
  background: rgba(7, 13, 34, 0.6);
  color: #ffffff;
  backdrop-filter: blur(14px);
  outline: none;
  transition: border-color 0.2s ease-out, background 0.2s ease-out, box-shadow 0.2s ease-out;
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.input:focus {
  border-color: rgba(123, 179, 255, 0.9);
  background: rgba(15, 23, 42, 0.85);
  box-shadow:
    0 0 0 1px rgba(123, 179, 255, 0.7),
    0 10px 25px rgba(15, 23, 42, 0.6);
}

/* Кнопки — капсулы в стиле iOS */
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff; /* ВСЕ кнопки — белый текст */
  transition:
    background 0.2s ease-out,
    box-shadow 0.2s ease-out,
    transform 0.12s ease-out;
}

/* Основная кнопка */
.btn-primary {
  background: linear-gradient(135deg, #3a86ff, #5aa2ff);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.6),
    0 0 20px rgba(58, 134, 255, 0.7);
}

.btn-primary:hover {
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.7),
    0 0 26px rgba(90, 180, 255, 0.8);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 6px 16px rgba(15, 23, 42, 0.6),
    0 0 18px rgba(58, 134, 255, 0.6);
}

/* Вторичная кнопка (стеклянная) */
.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.55),
    0 0 16px rgba(120, 180, 255, 0.45);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.5),
    0 0 12px rgba(80, 140, 255, 0.4);
}

/* ==========================================================================
   6. КАРТОЧКИ УЧЕНИКА И РАБОТ
   ========================================================================== */

.student-card,
.work-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 16px 18px;

  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(90, 150, 255, 0.25);

  backdrop-filter: blur(14px);
  color: #e5e7eb;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/* ==========================================================================
   7. FULLSCREEN VIEW (Просмотр работы)
   ========================================================================== */

/* FULLSCREEN LAYOUT — одинаковые отступы слева и справа */
.page-full {
  width: 100%;
  height: calc(100vh - 64px);
  padding: 12px 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.page-title {
  margin: 0 0 10px;
  font-size: 18px;
  color: #f3f4ff;
}

.preview-frame-full {
  flex: 1;
  width: 100%;
  border-radius: 20px;

  border: 1px solid rgba(255, 255, 255, 0.18);
  background: white;

  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(90, 150, 255, 0.35);
}

/* ==========================================================================
   8. FULLSCREEN РЕДАКТОР (Ace Editor)
   ========================================================================== */

.editor-page {
  background: transparent;
}

#editor-container {
  flex: 1;
  width: 100%;
  border-radius: 20px;

  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 10, 30, 0.7);

  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.65),
    0 0 30px rgba(90, 150, 255, 0.45);

  overflow: hidden;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#editor {
  width: 100%;
  height: 100%;
}

.editor-toolbar {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */

.footer {
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   10. АДАПТИВНОСТЬ
   ========================================================================== */

@media (max-width: 768px) {
  .page-full {
    height: calc(100vh - 56px);
    padding: 8px;
  }

  .page-title {
    font-size: 16px;
  }
}


.work-link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 12px;

  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;

  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(14px);

  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(80, 140, 255, 0.3);

  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background 0.18s ease-out;
}

li{
  margin-bottom: 10px;
}

.work-link:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(110, 160, 255, 0.45);
}

.work-link:active {
  transform: translateY(1px) scale(0.98);
}


/* ==========================================================================
   11. СТЕКЛЯННАЯ 404
   ========================================================================== */

.error-root {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.error-card {
  max-width: 460px;
  text-align: center;
}

/* Плашка с 404 */
.error-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 14px;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;

  color: #f9fafb;
  background: rgba(58, 134, 255, 0.2);
  border: 1px solid rgba(120, 180, 255, 0.6);

  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.5),
    0 0 18px rgba(90, 150, 255, 0.6);

  margin-bottom: 12px;
}

/* Заголовок */
.error-title {
  margin: 0 0 10px;
  font-size: 24px;
  color: #f3f4ff;
}

/* Основной текст */
.error-text {
  margin: 0 0 6px;
  font-size: 14px;
  color: #e5e7eb;
}

/* Дополнительный текст */
.error-subtext {
  margin: 0 0 18px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.8);
}

/* Подсветка номера ученика */
.error-id {
  font-weight: 600;
  color: #cfe2ff;
}

/* Кнопка(и) под текстом */
.error-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

/* Форма выбора ученика — единая стеклянная капсула */
.id-form {
  width: 100%;
  max-width: 480px;
  margin-top: 16px;

  display: flex;
  align-items: center;

  padding: 4px;
  border-radius: 999px;

  background: rgba(7, 13, 34, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(80, 140, 255, 0.35);
}

/* Центруем капсулу внутри секции */
.section .id-form {
  margin-left: auto;
  margin-right: auto;
}

/* Ввод внутри капсулы */
.id-form .input {
  flex: 1;
  width: 100%;

  border: none;
  background: transparent;
  box-shadow: none;

  padding: 8px 12px;
  font-size: 14px;
  color: #ffffff;
}

.id-form .input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

/* Убираем стандартный фокус и даём мягкий iOS-подсвет */
.id-form .input:focus {
  outline: none;
}

/* Кнопка внутри капсулы — компактная */
.id-form .btn-primary {
  margin-left: 4px;

  border-radius: 999px;
  padding: 8px 16px;

  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;

  background: linear-gradient(135deg, #3a86ff, #5aa2ff);
  color: #ffffff;
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.6),
    0 0 16px rgba(58, 134, 255, 0.7);

  transition:
    background 0.2s ease-out,
    box-shadow 0.2s ease-out,
    transform 0.12s ease-out;
}

.id-form .btn-primary:hover {
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.7),
    0 0 22px rgba(90, 180, 255, 0.8);
  transform: translateY(-1px);
}

.id-form .btn-primary:active {
  transform: translateY(1px) scale(0.97);
  box-shadow:
    0 6px 16px rgba(15, 23, 42, 0.6),
    0 0 16px rgba(58, 134, 255, 0.6);
}



/* Кликабельная карточка */
.work-card--link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

.work-card--link:hover {
  transform: translateY(-2px);
}

/* Неактивная карточка */
.work-card--disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Плейсхолдер загрузки */
.loading-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: rgba(255,255,255,0.95);
  animation: spin 0.9s linear infinite;
}

.loading-text {
  font-size: 13px;
  opacity: 0.85;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ======= Simple portfolio (учебная версия) ======= */

.simple-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.simple-nav__link {
  text-decoration: none;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
}

.simple-nav__link:hover {
  background: rgba(255,255,255,0.14);
}

.simple-hero {
  margin-bottom: 18px;
}

.simple-hero__title {
  margin: 0 0 6px;
  font-size: 26px;
  color: #f3f4ff;
}

.simple-hero__text {
  margin: 0 0 12px;
  opacity: 0.9;
}

.simple-block {
  margin-top: 18px;
}

.simple-block__title {
  margin: 0 0 8px;
  font-size: 18px;
  color: #f3f4ff;
}

.simple-block__text {
  margin: 0;
  opacity: 0.9;
  line-height: 1.5;
}

.simple-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.simple-item {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
}

.simple-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.simple-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  padding: 14px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  transition: 0.18s ease;
}

.simple-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.12);
}

.simple-card__title {
  font-weight: 600;
  margin-bottom: 6px;
}

.simple-card__text {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 10px;
}

.simple-card__link {
  font-weight: 600;
  color: rgba(255,255,255,0.95);
}

.simple-link {
  color: rgba(200,230,255,0.95);
  text-decoration: none;
}

.simple-link:hover {
  text-decoration: underline;
}

/* ======= Learn layout: слева страница, справа код ======= */

.section--learn {
  max-width: 1100px;
  margin: 0 auto 20px;
}

/* сетка */
.learn {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  align-items: start;
}

/* левая часть (контент) */
.learn-left {
  min-width: 0;
}

/* правая часть (панель) */
.learn-right {
  position: sticky;
  top: 84px; /* чуть ниже общего header */
  align-self: start;
  min-width: 0;
}

.code-panel {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}

.code-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.code-panel__title {
  font-weight: 600;
  color: #f3f4ff;
  line-height: 1.2;
}

.code-panel__hint {
  display: block;
  font-weight: 400;
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  flex: 0 0 auto;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.code-panel__section {
  margin-top: 12px;
}

.code-panel__label {
  font-size: 12px;
  opacity: 0.75;
  margin: 0 0 6px;
}

.code {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;

  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;

  overflow: auto;
  max-height: 260px;
  white-space: pre-wrap;
}

/* подсветка элемента */
.hover-outline {
  position: absolute;
  display: none;
  pointer-events: none;
  z-index: 2000;
  border-radius: 8px;
  outline: 2px solid rgba(58,134,255,0.9);
  box-shadow: 0 0 0 4px rgba(58,134,255,0.18);
}

/* адаптив: на телефоне панель уходит вниз */
@media (max-width: 900px) {
  .learn {
    grid-template-columns: 1fr;
  }

  .learn-right {
    position: static;
  }

  .code {
    max-height: 220px;
  }
}

/* ======= Кнопка снизу "Блоки" ======= */
.blocks-fab-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
}

.blocks-fab {
  pointer-events: auto;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(44, 44, 44, 0.774);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}

.blocks-fab:hover {
  background: rgba(24, 24, 24, 0.774);
}

/* ======= Панель "Блоки" ======= */
.blocks-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.blocks-sheet.is-open {
  display: block;
}

.blocks-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.blocks-sheet__panel {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);

  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 110px);

  border-radius: 20px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);

  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blocks-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.blocks-sheet__title {
  font-weight: 700;
  color: #f3f4ff;
}

.blocks-sheet__sub {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 4px;
}

.blocks-sheet__x {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.25);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.blocks-sheet__body {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 0;
  min-height: 0;
}

/* Список компонентов */
.blocks-list {
  padding: 10px;
  border-right: 1px solid rgba(255,255,255,0.14);
  overflow: auto;
}

.blocks-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.95);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  margin-bottom: 8px;
}

.blocks-item.is-active {
  background: rgba(58,134,255,0.25);
  border-color: rgba(58,134,255,0.55);
}

/* Правая часть */
.blocks-view {
  padding: 10px;
  overflow: hidden;
  min-width: 0;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.12);
  width: fit-content;
}

.tab {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.85);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.tab.is-active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Panels */
.tab-panels {
  margin-top: 10px;
  min-height: 0;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.preview-box {
  padding: 12px;
  border-radius: 16px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
}

.code-box {
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 44vh;
  color: rgba(255,255,255,0.95);
}

/* Мобилка */
@media (max-width: 860px) {
  .blocks-sheet__body {
    grid-template-columns: 1fr;
  }
  .blocks-list {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.14);
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }
  .blocks-item {
    min-width: 180px;
    margin-bottom: 0;
  }
}