/**
 * Детский премиальный ряд кнопок ответа на /ege-{N}/{slug}/:
 * Ответ · Решения · Покажи как · Нейрошка · Видео
 * (структура: icon-wrap + label + hint)
 */

@keyframes ege-kid-start-btn-icon-bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  35% {
    transform: translateY(-2px) rotate(-6deg);
  }
  70% {
    transform: translateY(0) rotate(4deg);
  }
}

@keyframes ege-kid-start-btn-glow-answer {
  0%,
  100% {
    box-shadow:
      0 3px 0 color-mix(in srgb, #b45309 40%, #ca8a04 60%),
      0 6px 18px color-mix(in srgb, #f59e0b 30%, transparent),
      0 1px 0 rgba(255, 255, 255, 0.7) inset;
  }
  50% {
    box-shadow:
      0 3px 0 color-mix(in srgb, #b45309 40%, #ca8a04 60%),
      0 8px 22px color-mix(in srgb, #fbbf24 28%, #f59e0b 36%),
      0 0 0 3px color-mix(in srgb, #f59e0b 16%, transparent),
      0 1px 0 rgba(255, 255, 255, 0.7) inset;
  }
}

@keyframes ege-kid-start-btn-glow-ai {
  0%,
  100% {
    box-shadow:
      0 3px 0 color-mix(in srgb, #be185d 35%, #7c3aed 65%),
      0 6px 18px color-mix(in srgb, #ec4899 28%, transparent),
      0 1px 0 rgba(255, 255, 255, 0.7) inset;
  }
  50% {
    box-shadow:
      0 3px 0 color-mix(in srgb, #be185d 35%, #7c3aed 65%),
      0 8px 22px color-mix(in srgb, #f9a8d4 22%, #a78bfa 40%),
      0 0 0 3px color-mix(in srgb, #ec4899 16%, transparent),
      0 1px 0 rgba(255, 255, 255, 0.7) inset;
  }
}

body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn,
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn,
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn.calc-solutions-start-btn,
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn.ege-task18-explain-start-btn,
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn.ege-task3-explain-start-btn,
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn.ege-task9-explain-start-btn,
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn.video-start-btn {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.65rem !important;
  padding: 0.35rem 0.85rem 0.35rem 0.45rem !important;
  border-radius: 999px !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: visible;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* Не перебивать [hidden] у «Решения» при активном dropdown (ege-16/18). */
body.libreoffice-page-task9 #task-answer-section .ege-kid-start-btn[hidden],
html.has-answer-row-parity #task-answer-section .ege-kid-start-btn[hidden],
body.libreoffice-page-task9 #task-answer-section .ege-kid-start-btn.calc-solutions-start-btn[hidden],
html.has-answer-row-parity #task-answer-section .ege-kid-start-btn.calc-solutions-start-btn[hidden] {
  display: none !important;
}

/* Ответ — янтарный */
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn--answer,
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn--answer {
  border: 2px solid color-mix(in srgb, #f59e0b 55%, #fbbf24 45%) !important;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 48%, #fde68a 100%) !important;
  color: #92400e !important;
  box-shadow:
    0 3px 0 color-mix(in srgb, #b45309 40%, #ca8a04 60%),
    0 6px 18px color-mix(in srgb, #f59e0b 30%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.7) inset !important;
  animation: ege-kid-start-btn-glow-answer 2.8s ease-in-out infinite;
}

/* Решения — фиолетово-голубой */
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn--solutions,
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn--solutions {
  border: 2px solid color-mix(in srgb, #8b5cf6 42%, #38bdf8 58%) !important;
  background: linear-gradient(135deg, #f5f3ff 0%, #e0f2fe 48%, #c7d2fe 100%) !important;
  color: #5b21b6 !important;
  box-shadow:
    0 3px 0 color-mix(in srgb, #5b21b6 32%, #0369a1 68%),
    0 6px 18px color-mix(in srgb, #8b5cf6 32%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.7) inset !important;
  animation: calc-solutions-start-glow 2.8s ease-in-out infinite;
}

/* Покажи как — бирюзово-янтарный */
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn--explain,
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn--explain {
  border: 2px solid color-mix(in srgb, #f59e0b 35%, #14b8a6 65%) !important;
  background: linear-gradient(135deg, #fff7ed 0%, #ccfbf1 45%, #a7f3d0 100%) !important;
  color: #0f766e !important;
  box-shadow:
    0 3px 0 color-mix(in srgb, #0f766e 28%, #b45309 72%),
    0 6px 18px color-mix(in srgb, #14b8a6 35%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.65) inset !important;
  animation: ege-task18-explain-start-glow 2.8s ease-in-out infinite;
}

/* Нейрошка — розово-лиловый */
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn--ai,
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn--ai {
  border: 2px solid color-mix(in srgb, #ec4899 48%, #a78bfa 52%) !important;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 45%, #ede9fe 100%) !important;
  color: #9d174d !important;
  box-shadow:
    0 3px 0 color-mix(in srgb, #be185d 35%, #7c3aed 65%),
    0 6px 18px color-mix(in srgb, #ec4899 28%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.7) inset !important;
  animation: ege-kid-start-btn-glow-ai 2.8s ease-in-out infinite;
}

body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn:hover:not(:disabled),
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.02);
}

body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn:active:not(:disabled),
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.ege-kid-start-btn__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  flex-shrink: 0;
  animation: ege-kid-start-btn-icon-bob 2.2s ease-in-out infinite;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid color-mix(in srgb, #cbd5e1 55%, #94a3b8 45%);
  box-shadow:
    0 2px 0 color-mix(in srgb, #64748b 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ege-kid-start-btn--answer .ege-kid-start-btn__icon-wrap {
  background: linear-gradient(145deg, #ffffff 0%, #fef3c7 100%);
  border-color: color-mix(in srgb, #fbbf24 60%, #f59e0b 40%);
  box-shadow:
    0 2px 0 color-mix(in srgb, #d97706 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ege-kid-start-btn--solutions .ege-kid-start-btn__icon-wrap,
.ege-kid-start-btn--solutions .calc-solutions-start-btn__icon-wrap {
  background: linear-gradient(145deg, #ffffff 0%, #ede9fe 100%);
  border: 1.5px solid color-mix(in srgb, #a78bfa 55%, #38bdf8 45%);
  box-shadow:
    0 2px 0 color-mix(in srgb, #7c3aed 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: ege-kid-start-btn-icon-bob 2.2s ease-in-out infinite;
}

.ege-kid-start-btn--explain .ege-kid-start-btn__icon-wrap,
.ege-kid-start-btn--explain .ege-task18-explain-start-btn__icon-wrap,
.ege-kid-start-btn--explain .ege-task3-explain-start-btn__icon-wrap,
.ege-kid-start-btn--explain .ege-task9-explain-start-btn__icon-wrap {
  background: linear-gradient(145deg, #ffffff 0%, #fef3c7 100%);
  border: 1.5px solid color-mix(in srgb, #fbbf24 55%, #2dd4bf 45%);
  box-shadow:
    0 2px 0 color-mix(in srgb, #d97706 25%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: ege-kid-start-btn-icon-bob 2.2s ease-in-out infinite;
}

.ege-kid-start-btn--ai .ege-kid-start-btn__icon-wrap {
  background: linear-gradient(145deg, #ffffff 0%, #fce7f3 100%);
  border-color: color-mix(in srgb, #f9a8d4 55%, #c4b5fd 45%);
  box-shadow:
    0 2px 0 color-mix(in srgb, #db2777 20%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ege-kid-start-btn__icon,
.ege-kid-start-btn .task-answer-peek__icon,
.ege-kid-start-btn .libreoffice-hf-action-btn__icon,
.ege-kid-start-btn .neuroege-ai-agent-btn__icon,
.ege-kid-start-btn .neuroege-ai-chat__fab-icon {
  font-size: 1.05rem !important;
  line-height: 1;
  margin: 0 !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.ege-kid-start-btn--ai .neuroege-ai-agent-btn__svg {
  width: 1.1rem;
  height: 1.1rem;
}

.ege-kid-start-btn__text-wrap,
.ege-kid-start-btn .calc-solutions-start-btn__text-wrap,
.ege-kid-start-btn .ege-task18-explain-start-btn__text-wrap,
.ege-kid-start-btn .ege-task3-explain-start-btn__text-wrap,
.ege-kid-start-btn .ege-task9-explain-start-btn__text-wrap,
.ege-kid-start-btn .video-start-btn__text-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  line-height: 1.15;
  text-align: left;
  min-width: 0;
}

.ege-kid-start-btn__label,
.ege-kid-start-btn .calc-solutions-start-btn__label,
.ege-kid-start-btn .ege-task18-explain-start-btn__label,
.ege-kid-start-btn .ege-task3-explain-start-btn__label,
.ege-kid-start-btn .ege-task9-explain-start-btn__label,
.ege-kid-start-btn .video-start-btn__label,
.ege-kid-start-btn .task-answer-peek__text {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

.ege-kid-start-btn--answer .ege-kid-start-btn__label,
.ege-kid-start-btn--answer .task-answer-peek__text {
  color: #92400e;
}

.ege-kid-start-btn--solutions .ege-kid-start-btn__label,
.ege-kid-start-btn--solutions .calc-solutions-start-btn__label,
.ege-kid-start-btn--solutions .task-answer-peek__text {
  color: #4c1d95;
}

.ege-kid-start-btn--explain .ege-kid-start-btn__label,
.ege-kid-start-btn--explain .ege-task18-explain-start-btn__label,
.ege-kid-start-btn--explain .ege-task3-explain-start-btn__label,
.ege-kid-start-btn--explain .ege-task9-explain-start-btn__label {
  color: #115e59;
}

.ege-kid-start-btn--ai .ege-kid-start-btn__label {
  color: #9d174d;
}

.ege-kid-start-btn__hint,
.ege-kid-start-btn .calc-solutions-start-btn__hint,
.ege-kid-start-btn .ege-task18-explain-start-btn__hint,
.ege-kid-start-btn .ege-task3-explain-start-btn__hint,
.ege-kid-start-btn .ege-task9-explain-start-btn__hint,
.ege-kid-start-btn .video-start-btn__hint {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  white-space: nowrap;
}

.ege-kid-start-btn--answer .ege-kid-start-btn__hint {
  color: color-mix(in srgb, #b45309 68%, #64748b 32%);
}

.ege-kid-start-btn--solutions .ege-kid-start-btn__hint,
.ege-kid-start-btn--solutions .calc-solutions-start-btn__hint {
  color: color-mix(in srgb, #6d28d9 68%, #64748b 32%);
}

.ege-kid-start-btn--explain .ege-kid-start-btn__hint,
.ege-kid-start-btn--explain .ege-task18-explain-start-btn__hint {
  color: color-mix(in srgb, #0f766e 72%, #64748b 28%);
}

.ege-kid-start-btn--ai .ege-kid-start-btn__hint {
  color: color-mix(in srgb, #be185d 68%, #64748b 32%);
}

.ege-kid-start-btn--answer[aria-expanded="true"] {
  animation: none;
}

.ege-kid-start-btn .task-answer-peek__value {
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Видео уже .video-start-btn — только помечаем как kid для единообразия оболочки */
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .video-start-btn.ege-kid-start-btn--video {
  /* базовые стили video-start-btn сохраняются; чуть выравниваем padding */
  padding: 0.35rem 0.85rem 0.35rem 0.45rem !important;
}

@media (prefers-reduced-motion: reduce) {
  .ege-kid-start-btn,
  .ege-kid-start-btn__icon-wrap,
  .ege-kid-start-btn .calc-solutions-start-btn__icon-wrap,
  .ege-kid-start-btn .ege-task18-explain-start-btn__icon-wrap {
    animation: none !important;
  }
}

/* --- Адаптация ряда: одна строка + уплотнение (без переноса в 2–3 ряда) --- */
#task-answer-section:not([hidden]) {
  container-type: inline-size;
  container-name: task-answer-panel;
}

#task-answer-section:not([hidden]) .libreoffice-hf-answer-actions-row {
  min-width: 0;
  max-width: 100%;
}

/* Одна линия: переопределяем wrap из oge_answer_actions_row_compact / layout */
body.libreoffice-page-task9 #task-answer-section.task-answer-section--fit:not([hidden]) .libreoffice-hf-answer-actions-row__row,
html.has-answer-row-parity #task-answer-section.task-answer-section--fit:not([hidden]) .libreoffice-hf-answer-actions-row__row {
  flex-wrap: nowrap !important;
  align-content: center;
  gap: 0.4rem;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.05rem;
}

/* Кнопки внутри группы — прямые дети ряда (не отдельный блок на вторую строку) */
body.libreoffice-page-task9 #task-answer-section.task-answer-section--fit:not([hidden]) .libreoffice-hf-answer-tools-group,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--fit:not([hidden]) .libreoffice-task2-answer-explain-tools,
html.has-answer-row-parity #task-answer-section.task-answer-section--fit:not([hidden]) .libreoffice-hf-answer-tools-group {
  display: contents;
}

/* Скрыть подсказки */
body.libreoffice-page-task9 #task-answer-section.task-answer-section--compact:not([hidden]) .ege-kid-start-btn__hint,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--compact:not([hidden]) .calc-solutions-start-btn__hint,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--compact:not([hidden]) .ege-task18-explain-start-btn__hint,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--compact:not([hidden]) .ege-task3-explain-start-btn__hint,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--compact:not([hidden]) .ege-task9-explain-start-btn__hint,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--compact:not([hidden]) .video-start-btn__hint,
html.has-answer-row-parity #task-answer-section.task-answer-section--compact:not([hidden]) .ege-kid-start-btn__hint,
html.has-answer-row-parity #task-answer-section.task-answer-section--compact:not([hidden]) .calc-solutions-start-btn__hint,
html.has-answer-row-parity #task-answer-section.task-answer-section--compact:not([hidden]) .ege-task18-explain-start-btn__hint,
html.has-answer-row-parity #task-answer-section.task-answer-section--compact:not([hidden]) .video-start-btn__hint {
  display: none !important;
}

@container task-answer-panel (max-width: 700px) {
  .ege-kid-start-btn__hint,
  .calc-solutions-start-btn__hint,
  .ege-task18-explain-start-btn__hint,
  .ege-task3-explain-start-btn__hint,
  .ege-task9-explain-start-btn__hint,
  .video-start-btn__hint {
    display: none !important;
  }
}

/* Плотнее padding */
body.libreoffice-page-task9 #task-answer-section.task-answer-section--tight:not([hidden]) .ege-kid-start-btn,
html.has-answer-row-parity #task-answer-section.task-answer-section--tight:not([hidden]) .ege-kid-start-btn {
  gap: 0.3rem !important;
  min-height: 2.35rem !important;
  padding: 0.28rem 0.55rem 0.28rem 0.32rem !important;
}

body.libreoffice-page-task9 #task-answer-section.task-answer-section--tight:not([hidden]) .ege-kid-start-btn__label,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--tight:not([hidden]) .calc-solutions-start-btn__label,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--tight:not([hidden]) .ege-task18-explain-start-btn__label,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--tight:not([hidden]) .video-start-btn__label,
html.has-answer-row-parity #task-answer-section.task-answer-section--tight:not([hidden]) .ege-kid-start-btn__label {
  font-size: 0.8rem;
}

@container task-answer-panel (max-width: 560px) {
  .ege-kid-start-btn {
    gap: 0.3rem !important;
    min-height: 2.35rem !important;
    padding: 0.28rem 0.55rem 0.28rem 0.32rem !important;
  }

  .ege-kid-start-btn__label,
  .calc-solutions-start-btn__label,
  .ege-task18-explain-start-btn__label,
  .ege-task3-explain-start-btn__label,
  .ege-task9-explain-start-btn__label,
  .video-start-btn__label {
    font-size: 0.8rem;
  }
}

/* Только иконки — полное --mini или поэтапно по ролям */
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn:not(.ege-kid-start-btn--answer) .ege-kid-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer:not([aria-expanded="true"]) .ege-kid-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .calc-solutions-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-task18-explain-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-task3-explain-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-task9-explain-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .video-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn:not(.ege-kid-start-btn--answer) .ege-kid-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer:not([aria-expanded="true"]) .ege-kid-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--mini:not([hidden]) .calc-solutions-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--mini:not([hidden]) .video-start-btn__text-wrap {
  display: none !important;
}

body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn:not(.ege-kid-start-btn--answer),
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer:not([aria-expanded="true"]),
html.has-answer-row-parity #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn:not(.ege-kid-start-btn--answer),
html.has-answer-row-parity #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer:not([aria-expanded="true"]) {
  gap: 0 !important;
  min-width: 2.45rem !important;
  min-height: 2.45rem !important;
  padding: 0.28rem !important;
  justify-content: center;
}

/* Поэтапно: Видео → ИИ → Ответ */
body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-video:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--video .ege-kid-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-video:not(.task-answer-section--mini):not([hidden]) .video-start-btn .ege-kid-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-video:not(.task-answer-section--mini):not([hidden]) .video-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--icon-video:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--video .ege-kid-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--icon-video:not(.task-answer-section--mini):not([hidden]) .video-start-btn__text-wrap {
  display: none !important;
}

body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-ai:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--ai .ege-kid-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--icon-ai:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--ai .ege-kid-start-btn__text-wrap {
  display: none !important;
}

body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-answer:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--answer:not([aria-expanded="true"]) .ege-kid-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--icon-answer:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--answer:not([aria-expanded="true"]) .ege-kid-start-btn__text-wrap {
  display: none !important;
}

body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-video:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--video,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-video:not(.task-answer-section--mini):not([hidden]) .video-start-btn.ege-kid-start-btn,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-ai:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--ai,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-answer:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--answer:not([aria-expanded="true"]),
html.has-answer-row-parity #task-answer-section.task-answer-section--icon-video:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--video,
html.has-answer-row-parity #task-answer-section.task-answer-section--icon-ai:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--ai,
html.has-answer-row-parity #task-answer-section.task-answer-section--icon-answer:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn--answer:not([aria-expanded="true"]) {
  gap: 0 !important;
  min-width: 2.45rem !important;
  min-height: 2.45rem !important;
  padding: 0.28rem !important;
  justify-content: center;
}

/* Раскрытый «Ответ»: после всех icon/mini-правил — показать значение. */
body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__text-wrap,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-answer:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__text-wrap,
html.has-answer-row-parity #task-answer-section.task-answer-section--icon-answer:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__text-wrap {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"],
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"],
body.libreoffice-page-task9 #task-answer-section.task-answer-section--icon-answer:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"],
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"],
html.has-answer-row-parity #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"],
html.has-answer-row-parity #task-answer-section.task-answer-section--icon-answer:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] {
  gap: 0.35rem !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: min(100%, 22rem) !important;
  min-height: 2.45rem !important;
  padding: 0.35rem 0.75rem 0.35rem 0.4rem !important;
  justify-content: flex-start;
}

body.libreoffice-page-task9 #task-answer-section:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__hint,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__hint,
html.has-answer-row-parity #task-answer-section:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__hint,
html.has-answer-row-parity #task-answer-section.task-answer-section--mini:not([hidden]) .ege-kid-start-btn--answer[aria-expanded="true"] .ege-kid-start-btn__hint {
  display: none !important;
}

/* Короткие подписи: чуть плотнее, текст остаётся читаемым */
body.libreoffice-page-task9 #task-answer-section.task-answer-section--short:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn__label,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--short:not(.task-answer-section--mini):not([hidden]) .calc-solutions-start-btn__label,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--short:not(.task-answer-section--mini):not([hidden]) .ege-task18-explain-start-btn__label,
body.libreoffice-page-task9 #task-answer-section.task-answer-section--short:not(.task-answer-section--mini):not([hidden]) .video-start-btn__label,
html.has-answer-row-parity #task-answer-section.task-answer-section--short:not(.task-answer-section--mini):not([hidden]) .ege-kid-start-btn__label {
  font-size: 0.78rem;
  letter-spacing: -0.01em;
})
