
.ftm-main-wrap {
  display: grid;
  gap: 24px;
  color: #25314f;
}

.ftm-hero,
.ftm-card,
.ftm-empty-state,
.ftm-run-card,
.ftm-section-wrap,
.ftm-notice {
  background: #fff;
  border: 1px solid #ece6da;
  border-radius: 30px;
  box-shadow: 0 18px 44px rgba(67, 56, 31, 0.08);
}

.ftm-hero,
.ftm-card,
.ftm-empty-state,
.ftm-run-card,
.ftm-section-wrap {
  padding: 26px;
}

.ftm-notice {
  padding: 14px 16px;
  background: #fff7ef;
  border-color: #ecdcc7;
  color: #6a5535;
}

.ftm-notice-muted {
  background: #fffdf6;
  border-color: #eee1b8;
  color: #7f6520;
}

.ftm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.85fr);
  gap: 20px;
  align-items: center;
}

.ftm-hero-vivid {
  background: linear-gradient(145deg, #fff9ef 0%, #f4fbf8 48%, #eef6ff 100%);
  position: relative;
  overflow: hidden;
}

.ftm-hero-vivid::after {
  content: '';
  position: absolute;
  inset: auto -40px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 199, 96, 0.18);
  filter: blur(8px);
}

.ftm-hero-run {
  grid-template-columns: minmax(0, 1.4fr) 200px;
}

.ftm-hero-copy {
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.ftm-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f3ebdd;
  color: #6d5a36;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ftm-page-title,
.ftm-section-title,
.ftm-title,
.ftm-run-title {
  margin: 0;
  line-height: 1.1;
  color: #1f3154;
}

.ftm-page-title {
  font-size: 34px;
}

.ftm-section-title {
  font-size: 26px;
}

.ftm-title {
  font-size: 26px;
}

.ftm-title-medium {
  font-size: 22px;
}

.ftm-page-text,
.ftm-card-subtitle,
.ftm-parent-text,
.ftm-progress-text,
.ftm-preview-step-text,
.ftm-run-helper-text,
.ftm-run-step-hint,
.ftm-run-step-caption,
.ftm-run-text,
.ftm-step-icon-chip-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #60718d;
}

.ftm-selector-wrap {
  margin-top: 8px;
}

.ftm-core-context-switch {
  width: 100%;
}

.ftm-core-context-switch form,
.fm-module-context-switch form {
  margin: 0;
}

.ftm-hero-summary {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ftm-hero-summary-playful {
  align-self: stretch;
}

.ftm-context-summary-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #efe5d5;
  border-radius: 22px;
  padding: 18px;
}

.ftm-context-summary-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7f735f;
  margin-bottom: 8px;
}

.ftm-context-summary-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #1f3154;
}

.ftm-hero-bubbles {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  font-size: 28px;
  padding-top: 4px;
}

.ftm-section-wrap {
  display: grid;
  gap: 18px;
}

.ftm-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ftm-list-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ftm-card {
  display: grid;
  gap: 16px;
}

.ftm-transition-tile-vivid {
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
}

.ftm-card-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.ftm-card-header-tall {
  align-items: flex-start;
}

.ftm-icon,
.ftm-run-icon,
.ftm-run-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.ftm-icon-soft {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff3dd 0%, #edf7f4 100%);
  box-shadow: inset 0 0 0 1px rgba(228, 218, 200, 0.8);
  font-size: 38px;
}

.ftm-icon-hero {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  font-size: 34px;
}

.ftm-view-switch {
  display: inline-flex;
  align-items: center;
  padding: 5px;
  border-radius: 999px;
  background: #f7f3ea;
  gap: 6px;
  width: fit-content;
}

.ftm-view-btn {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: transparent;
  color: #55657f;
  font-weight: 700;
  cursor: pointer;
}

.ftm-view-btn.is-active {
  background: #fff;
  color: #22365e;
  box-shadow: 0 6px 18px rgba(46, 56, 83, 0.08);
}

.ftm-card-panel {
  display: none;
  gap: 16px;
}

.ftm-card-panel.is-active {
  display: grid;
}

.ftm-card-dashboard .ftm-card-panel-child {
  grid-template-rows: minmax(92px, auto) minmax(66px, auto) minmax(80px, auto) 36px auto auto auto;
}

.ftm-card-dashboard .ftm-card-header {
  min-height: 92px;
}

.ftm-card-dashboard .ftm-card-header .ftm-title {
  white-space: nowrap;
}

.ftm-chip-row,
.ftm-card-actions,
.ftm-run-actions,
.ftm-feedback-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.ftm-soft-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f7f4;
  color: #3f5d56;
  font-size: 13px;
  font-weight: 700;
}

.ftm-goal-connection {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e4ebdf;
  border-radius: 16px;
  background: #f7faf6;
  color: #314f49;
}

.ftm-goal-connection.is-placeholder,
.ftm-secondary-connection.is-placeholder {
  visibility: hidden;
}

.ftm-goal-connection-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(49, 79, 73, 0.08);
}

.ftm-goal-connection-icon .fm-symbol-img {
  width: 30px;
  height: 30px;
}

.ftm-goal-connection > div:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ftm-goal-connection-label {
  color: #687b75;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ftm-goal-connection strong {
  color: #28433d;
  font-size: 15px;
  line-height: 1.35;
}

.ftm-secondary-connections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ftm-secondary-connection {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e5e9ee;
  border-radius: 14px;
  background: #fafbfc;
  color: #425265;
}

.ftm-card-dashboard .ftm-secondary-connection {
  min-height: 80px;
}

.ftm-secondary-connection-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
  background: #fff;
  font-size: 17px;
  box-shadow: inset 0 0 0 1px rgba(66, 82, 101, 0.08);
}

.ftm-secondary-connection > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ftm-secondary-connection-label {
  color: #708093;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ftm-secondary-connection strong {
  display: -webkit-box;
  overflow: hidden;
  color: #34465a;
  font-size: 13px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 640px) {
  .ftm-secondary-connections {
    grid-template-columns: 1fr;
  }
}

.ftm-step-icon-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ftm-step-icon-chip {
  background: #f8fbff;
  border: 1px solid #e5edf6;
  border-radius: 20px;
  padding: 12px 10px;
  text-align: center;
  display: grid;
  gap: 8px;
  min-height: 118px;
  align-content: start;
}

.ftm-step-icon-chip-symbol {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  margin: 0 auto;
  background: linear-gradient(180deg, #fff4e2 0%, #eef9f6 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.ftm-step-icon-chip-text {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  color: #314159;
}

.ftm-parent-box,
.ftm-ritual-box,
.ftm-run-ritual-box,
.ftm-child-note {
  background: #f8faf5;
  border: 1px solid #e6ebdd;
  border-radius: 22px;
  padding: 16px;
}

.ftm-parent-label,
.ftm-ritual-label,
.ftm-progress-headline,
.ftm-step-counter {
  font-weight: 700;
  color: #24464d;
}

.ftm-parent-label,
.ftm-ritual-label {
  margin-bottom: 8px;
}

.ftm-inline-form,
.ftm-template-form {
  margin: 0;
}

.ftm-action-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid #e0d7c8;
  background: #fff;
  color: #25314f;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.ftm-action-btn:hover {
  transform: translateY(-1px);
}

.ftm-action-btn-primary {
  border-color: #2f6d69;
  background: linear-gradient(180deg, #3f807b 0%, #2f6d69 100%);
  color: #fff;
}

.ftm-action-btn-large {
  min-height: 54px;
  padding: 0 24px;
  font-size: 17px;
}

.ftm-action-btn-danger {
  border-color: #e7d5d5;
  color: #874646;
  background: #fff7f7;
}

.ftm-empty-state {
  text-align: center;
}

.ftm-empty-state-soft {
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
}

.ftm-run-wrap {
  gap: 22px;
}

.ftm-run-card-vivid {
  background: linear-gradient(180deg, #fffefb 0%, #ffffff 100%);
}

.ftm-run-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ftm-progress-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.ftm-progress-dots {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  align-items: center;
}

.ftm-progress-dot {
  height: 12px;
  border-radius: 999px;
  background: #e6edf2;
}

.ftm-progress-dot.is-complete {
  background: #95cfc3;
}

.ftm-progress-dot.is-current {
  background: #2f6d69;
}

.ftm-run-stage {
  display: grid;
  gap: 18px;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: 10px 0 4px;
}

.ftm-run-stage-illustration,
.ftm-run-icon-hero,
.ftm-run-icon-success {
  width: 112px;
  height: 112px;
  border-radius: 32px;
  background: linear-gradient(180deg, #fff3df 0%, #e9f8f0 100%);
  font-size: 54px;
  box-shadow: inset 0 0 0 1px rgba(226, 215, 196, 0.95);
}

.ftm-run-step-card-visual {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: min(100%, 560px);
}

.ftm-run-step-artboard {
  width: min(100%, 520px);
  min-height: 280px;
  border-radius: 34px;
  background: linear-gradient(180deg, #fff8ea 0%, #eff8ff 100%);
  border: 1px solid #e8e3d8;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}

.ftm-run-step-icon-xl {
  width: 160px;
  height: 160px;
  border-radius: 42px;
  background: #fff;
  font-size: 84px;
  box-shadow: 0 16px 30px rgba(68, 86, 114, 0.08);
}

.ftm-run-step-text-large {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 800;
  color: #1f3154;
}

.ftm-run-step-caption {
  font-size: 17px;
  color: #64738f;
}

.ftm-run-intro-badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f6efe3;
  color: #6e5b39;
  font-size: 13px;
  font-weight: 700;
}

.ftm-run-intro-badge-success {
  background: #ecf8f0;
  color: #2f6d4d;
}

.ftm-run-text {
  font-size: 24px;
  line-height: 1.35;
  color: #1f3154;
  max-width: 680px;
}

.ftm-run-helper-text,
.ftm-run-step-hint,
.ftm-run-step-caption {
  max-width: 520px;
}

.ftm-run-ritual-box-vivid {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: min(100%, 560px);
  background: linear-gradient(180deg, #fffaf0 0%, #f6fbf5 100%);
}

.ftm-run-ritual-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.ftm-feedback-row-centered,
.ftm-run-actions-center {
  justify-content: center;
}

.ftm-run-actions-split {
  width: min(100%, 560px);
  justify-content: space-between;
}

.ftm-feedback-btn {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid #dfe6ef;
  background: #fff;
  color: #374963;
  font-weight: 700;
  cursor: pointer;
}

.ftm-feedback-btn.is-active {
  border-color: #2f6d69;
  color: #2f6d69;
  background: #f1faf8;
}

@media (max-width: 900px) {
  .ftm-hero,
  .ftm-hero-run {
    grid-template-columns: 1fr;
  }

  .ftm-run-actions-split {
    justify-content: center;
  }
}

/* Einheitliche Familymap-Modulorientierung */
.ftm-help-strip{display:flex!important;width:100%!important;max-width:none!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;padding:10px!important;margin:0 0 18px!important;border:1px solid rgba(48,111,104,.14)!important;border-radius:24px!important;background:rgba(255,255,255,.72)!important;box-shadow:0 10px 24px rgba(32,73,69,.07)!important}
.ftm-help-strip__label{font-size:.95rem!important;font-weight:850!important}.ftm-help-links a{padding:9px 14px!important;border-radius:999px!important;background:#fff!important;box-shadow:none!important}
@media(max-width:640px){.ftm-help-strip{align-items:stretch!important;flex-direction:column!important}.ftm-help-links{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.ftm-help-links a{justify-content:center!important}}

@media (max-width: 640px) {
  .ftm-hero,
  .ftm-card,
  .ftm-empty-state,
  .ftm-run-card,
  .ftm-section-wrap {
    padding: 20px;
    border-radius: 24px;
  }

  .ftm-page-title {
    font-size: 28px;
  }

  .ftm-title {
    font-size: 24px;
  }

  .ftm-step-icon-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ftm-run-step-artboard {
    min-height: 220px;
  }

  .ftm-run-step-icon-xl {
    width: 128px;
    height: 128px;
    font-size: 68px;
  }

  .ftm-run-text {
    font-size: 22px;
  }

  .ftm-run-step-text-large {
    font-size: 30px;
  }
}

/* V1.5 frontend story mode */
.ftm-main-wrap-story {
  gap: 28px;
}

.ftm-hero-story {
  background: linear-gradient(145deg, #fff9ef 0%, #f7fcf7 42%, #eef5ff 100%);
}

.ftm-hero-route {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 26px;
  padding-top: 2px;
}

.ftm-hero-route-stop {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(233, 225, 211, 0.95);
  box-shadow: 0 10px 24px rgba(60, 66, 89, 0.08);
}

.ftm-hero-route-line {
  flex: 1 1 auto;
  min-width: 22px;
  max-width: 44px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f7dca6 0%, #b9dfd6 100%);
}

.ftm-route-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(229, 220, 206, 0.95);
  color: #4d5f7b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.ftm-route-target-chip-large {
  font-size: 15px;
  padding: 10px 16px;
}

.ftm-list-grid-story {
  gap: 22px;
}

.ftm-transition-tile {
  position: relative;
  overflow: hidden;
}

.ftm-transition-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.9), transparent 34%);
  pointer-events: none;
}

.ftm-theme-home.ftm-transition-tile-vivid,
.ftm-theme-home .ftm-run-card-vivid,
.ftm-theme-home .ftm-hero-story {
  background: linear-gradient(180deg, #fffaf3 0%, #fffefe 46%, #fff4eb 100%);
}

.ftm-theme-night.ftm-transition-tile-vivid,
.ftm-theme-night .ftm-run-card-vivid,
.ftm-theme-night .ftm-hero-story {
  background: linear-gradient(180deg, #f8f5ff 0%, #ffffff 48%, #f3f7ff 100%);
}

.ftm-theme-morning.ftm-transition-tile-vivid,
.ftm-theme-morning .ftm-run-card-vivid,
.ftm-theme-morning .ftm-hero-story {
  background: linear-gradient(180deg, #fffdf3 0%, #ffffff 42%, #eef8ff 100%);
}

.ftm-theme-meal.ftm-transition-tile-vivid,
.ftm-theme-meal .ftm-run-card-vivid,
.ftm-theme-meal .ftm-hero-story {
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 45%, #f7fef2 100%);
}

.ftm-theme-calm.ftm-transition-tile-vivid,
.ftm-theme-calm .ftm-run-card-vivid,
.ftm-theme-calm .ftm-hero-story,
.ftm-theme-play.ftm-transition-tile-vivid,
.ftm-theme-play .ftm-run-card-vivid,
.ftm-theme-play .ftm-hero-story {
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 44%, #eef8ff 100%);
}

.ftm-step-path-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ftm-step-path-item {
  min-width: 92px;
  max-width: 120px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding: 12px 10px;
  border-radius: 22px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(228, 234, 240, 0.92);
  box-shadow: 0 12px 26px rgba(76, 89, 110, 0.06);
}

.ftm-step-path-item-goal {
  background: linear-gradient(180deg, rgba(255, 246, 225, 0.95) 0%, rgba(255,255,255,0.92) 100%);
}

.ftm-step-path-symbol {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff7e9 0%, #eef8f5 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: inset 0 0 0 1px rgba(227, 219, 204, 0.95);
}

.ftm-step-path-text {
  font-size: 13px;
  line-height: 1.28;
  font-weight: 800;
  color: #33425b;
}

.ftm-step-path-line {
  width: 28px;
  min-width: 28px;
  align-self: center;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f4ddb0 0%, #c7e4d9 100%);
}

.ftm-step-path-line-goal {
  background: linear-gradient(90deg, #c7e4d9 0%, #f4ddb0 100%);
}

.ftm-route-caption {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  color: #47607d;
}

.ftm-run-card-story {
  position: relative;
  overflow: hidden;
}

.ftm-run-card-story::before {
  content: '';
  position: absolute;
  inset: -40px auto auto -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 224, 171, 0.22);
  filter: blur(14px);
  pointer-events: none;
}

.ftm-run-hero-icon-wrap-story {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.ftm-run-goal-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(230, 222, 208, 0.95);
  font-weight: 800;
  color: #3f5470;
  text-align: center;
}

.ftm-story-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 2px;
}

.ftm-story-stop {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 18px;
  background: #edf0f5;
  color: #68778f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: inset 0 0 0 1px rgba(221, 228, 235, 0.95);
}

.ftm-story-stop.is-complete {
  background: linear-gradient(180deg, #fff8e8 0%, #dff1ea 100%);
  color: #214056;
}

.ftm-story-stop.is-current {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 14px 26px rgba(56, 88, 93, 0.12);
}

.ftm-story-stop-goal {
  background: linear-gradient(180deg, #fff4d8 0%, #fffdf7 100%);
}

.ftm-story-line {
  height: 10px;
  min-width: 28px;
  flex: 1 1 28px;
  border-radius: 999px;
  background: #e7edf2;
}

.ftm-story-line.is-complete {
  background: linear-gradient(90deg, #f2d89d 0%, #b8dfd3 100%);
}

.ftm-run-stage-story {
  animation: ftmFadeStep 0.32s ease;
}

@keyframes ftmFadeStep {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ftm-run-destination-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(100%, 420px);
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(228, 222, 208, 0.95);
  box-shadow: 0 14px 28px rgba(68, 83, 102, 0.08);
}

.ftm-run-destination-card-soft {
  background: rgba(255,255,255,0.78);
}

.ftm-run-destination-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff6e0 0%, #eef7f5 100%);
  font-size: 32px;
}

.ftm-run-destination-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7f7360;
  margin-bottom: 4px;
}

.ftm-run-destination-text {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: #1f3154;
}

.ftm-run-step-card-story {
  width: min(100%, 640px);
}

.ftm-run-step-card-story .ftm-run-step-artboard {
  min-height: 330px;
  background: linear-gradient(180deg, rgba(255, 248, 234, 0.98) 0%, rgba(240, 248, 255, 0.98) 100%);
  box-shadow: inset 0 0 0 1px rgba(232, 225, 213, 0.96), 0 18px 34px rgba(76, 92, 114, 0.08);
}

.ftm-run-step-card-story .ftm-run-step-icon-xl {
  width: 182px;
  height: 182px;
  border-radius: 46px;
  font-size: 94px;
}

.ftm-run-sticky-actions {
  width: min(100%, 680px);
  position: sticky;
  bottom: 10px;
  z-index: 3;
}

.ftm-run-sticky-actions .ftm-run-actions {
  justify-content: space-between;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(229, 222, 208, 0.95);
  box-shadow: 0 16px 30px rgba(67, 74, 99, 0.10);
  border-radius: 24px;
  padding: 12px;
  backdrop-filter: blur(10px);
}

.ftm-run-ritual-box-story {
  width: min(100%, 560px);
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 249, 236, 0.98) 0%, rgba(248, 252, 255, 0.98) 100%);
}

.ftm-run-ritual-icon {
  width: 86px;
  height: 86px;
  border-radius: 30px;
  margin: 0 auto 14px;
  background: rgba(255,255,255,0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 12px 28px rgba(68, 86, 114, 0.08);
}

.ftm-run-title-small {
  font-size: clamp(28px, 4vw, 38px);
}

.ftm-feedback-row-centered {
  justify-content: center;
}

.ftm-feedback-btn {
  border-radius: 16px;
}

@media (max-width: 860px) {
  .ftm-step-path-item {
    min-width: 88px;
  }

  .ftm-run-sticky-actions {
    width: 100%;
    bottom: 0;
  }

  .ftm-run-sticky-actions .ftm-run-actions {
    padding: 10px;
  }
}

@media (max-width: 640px) {
  .ftm-hero-route {
    justify-content: flex-start;
  }

  .ftm-step-path-strip,
  .ftm-story-trail {
    padding-bottom: 6px;
  }

  .ftm-step-path-item {
    min-width: 84px;
    padding: 10px 8px;
  }

  .ftm-step-path-symbol,
  .ftm-story-stop {
    width: 50px;
    height: 50px;
  }

  .ftm-run-destination-card {
    grid-template-columns: 56px minmax(0, 1fr);
    padding: 14px;
  }

  .ftm-run-destination-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }

  .ftm-run-destination-text {
    font-size: 19px;
  }

  .ftm-run-step-card-story .ftm-run-step-artboard {
    min-height: 250px;
  }

  .ftm-run-step-card-story .ftm-run-step-icon-xl {
    width: 144px;
    height: 144px;
    font-size: 76px;
  }

  .ftm-run-step-text-large {
    font-size: clamp(25px, 8vw, 34px);
  }

  .ftm-run-sticky-actions .ftm-run-actions {
    flex-direction: column;
  }

  .ftm-run-sticky-actions .ftm-action-btn,
  .ftm-run-sticky-actions .ftm-action-btn-large {
    width: 100%;
  }
}

/* V1.6 image card mode */
.ftm-main-wrap-cards {
  gap: 30px;
}

.ftm-hero-cards .ftm-page-text {
  max-width: 720px;
}

.ftm-hero-summary-cards {
  gap: 14px;
}

.ftm-context-summary-card-child {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ftm-context-kid-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff1db 0%, #eef9f6 100%);
  font-size: 32px;
  line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-variant-emoji: emoji;
  text-rendering: optimizeLegibility;
  box-shadow: inset 0 0 0 1px rgba(226, 215, 196, 0.95);
}

.ftm-transition-tile-cards {
  gap: 18px;
}

.ftm-step-card-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.ftm-card-dashboard .ftm-step-card-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ftm-step-card-mini {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px 10px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff9ef 0%, #f3f8ff 100%);
  border: 1px solid #e8e3d8;
  min-height: 132px;
  text-align: center;
}

.ftm-step-card-mini-goal {
  background: linear-gradient(180deg, #fff6e8 0%, #f4fbf6 100%);
}

.ftm-step-card-mini-symbol {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-size: 30px;
  box-shadow: 0 12px 24px rgba(68, 86, 114, 0.08);
}

.ftm-step-card-mini-text {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 800;
  color: #314159;
}

.ftm-run-hero-icon-wrap-cards {
  gap: 14px;
  justify-items: center;
}

.ftm-run-child-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(229, 220, 206, 0.95);
  color: #4d5f7b;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-variant-emoji: emoji;
  text-rendering: optimizeLegibility;
}

.ftm-run-card-cards {
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
}

.ftm-story-trail-cards {
  gap: 8px;
}

.ftm-image-card-shell {
  width: min(100%, 560px);
  display: grid;
  gap: 16px;
  padding: 14px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.96) 100%);
  border: 1px solid rgba(231, 223, 212, 0.95);
  box-shadow: 0 20px 44px rgba(67, 56, 31, 0.08);
}

.ftm-image-card-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ftm-image-card-badge {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-variant-emoji: emoji;
  text-rendering: optimizeLegibility;

  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #f7f3ea;
  color: #596a82;
  font-size: 13px;
  font-weight: 800;
}

.ftm-run-step-card-image-mode {
  width: min(100%, 620px);
}

.ftm-run-step-artboard-image-mode {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff8ec 0%, #edf6ff 100%);
}

.ftm-image-card-spot {
  position: absolute;
  border-radius: 999px;
  opacity: 0.9;
}

.ftm-image-card-spot-a {
  width: 180px;
  height: 180px;
  top: 30px;
  left: 50px;
  background: rgba(255, 219, 148, 0.36);
}

.ftm-image-card-spot-b {
  width: 220px;
  height: 220px;
  right: 38px;
  bottom: 28px;
  background: rgba(182, 225, 216, 0.36);
}

.ftm-run-step-text-image-mode {
  max-width: 520px;
}

.ftm-run-destination-card-cards {
  background: linear-gradient(180deg, #fffaf1 0%, #f6fbf5 100%);
  border-color: #ebe2d4;
}

.ftm-run-ritual-box-cards {
  width: min(100%, 600px);
}

@media (max-width: 640px) {
  .ftm-step-card-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ftm-step-card-mini {
    min-height: 118px;
    padding: 12px 9px;
  }

  .ftm-step-card-mini-symbol {
    width: 52px;
    height: 52px;
    font-size: 28px;
  }

  .ftm-run-step-artboard-image-mode {
    min-height: 300px;
  }

  .ftm-image-card-shell {
    padding: 12px;
    border-radius: 28px;
  }
}

.ftm-context-summary-card-companion {
  align-items: center;
  gap: 14px;
}

.ftm-companion-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff8ef 0%, #eef7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 72px;
}

.ftm-companion-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ftm-companion-hero-note {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: #6b7391;
}

.ftm-companion-guide {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 18px 0 22px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid #ece3d7;
  background: linear-gradient(180deg, #fffaf2 0%, #f4f9ff 100%);
}

.ftm-companion-guide-figure {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ftm-companion-guide-image {
  width: min(100%, 168px);
  max-height: 180px;
  object-fit: contain;
}

.ftm-companion-guide-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ftm-companion-guide-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #7c6a46;
}

.ftm-companion-guide-bubble {
  max-width: 520px;
  padding: 14px 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(36, 49, 74, 0.08);
  color: #23314a;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.ftm-companion-guide.is-quiet .ftm-companion-guide-bubble {
  font-weight: 600;
  font-size: 16px;
}

@media (max-width: 860px) {
  .ftm-companion-guide {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ftm-companion-guide-copy {
    align-items: center;
  }

  .ftm-companion-guide-bubble {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .ftm-companion-avatar-wrap {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    flex-basis: 60px;
  }

  .ftm-companion-guide {
    padding: 14px;
    border-radius: 24px;
  }

  .ftm-companion-guide-image {
    width: min(100%, 136px);
    max-height: 150px;
  }
}

.ftm-companion-guide {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(160deg, #fffaf2 0%, #f6fbff 100%);
  border: 1px solid #ebdfcd;
  position: relative;
  overflow: hidden;
}

.ftm-companion-guide::after {
  content: '';
  position: absolute;
  inset: auto -40px -60px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(133, 189, 255, 0.18);
  filter: blur(8px);
}

.ftm-companion-guide-figure-wrap,
.ftm-companion-guide-copy {
  position: relative;
  z-index: 1;
}

.ftm-companion-guide-figure-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.ftm-companion-guide-phase-badge,
.ftm-companion-guide-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid #e9dac4;
  color: #6b5a38;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ftm-companion-guide-state {
  background: #f4efe5;
  color: #7b6840;
}

.ftm-companion-guide-figure {
  width: 100%;
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(248,241,230,0.92) 100%);
  border-radius: 24px;
  padding: 16px 12px 8px;
  box-shadow: inset 0 0 0 1px rgba(231, 220, 200, 0.8);
}

.ftm-companion-guide-image {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  transition: opacity 180ms ease, transform 180ms ease;
}

.ftm-companion-guide.is-transitioning .ftm-companion-guide-image,
.ftm-companion-guide.is-transitioning .ftm-companion-guide-bubble-wrap {
  opacity: 0.2;
  transform: translateY(4px);
}

.ftm-companion-guide-copy {
  display: grid;
  gap: 12px;
}

.ftm-companion-guide-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ftm-companion-guide-name {
  font-size: 24px;
  font-weight: 800;
  color: #1f3154;
}

.ftm-companion-guide-bubble-wrap {
  transition: opacity 180ms ease, transform 180ms ease;
}

.ftm-companion-guide-bubble-wrap.is-hidden {
  display: none;
}

.ftm-companion-guide-bubble {
  display: inline-block;
  padding: 14px 18px;
  border-radius: 22px 22px 22px 8px;
  background: #ffffff;
  border: 1px solid #eadfce;
  color: #30435f;
  font-size: 18px;
  line-height: 1.45;
  box-shadow: 0 12px 22px rgba(67, 56, 31, 0.08);
}

.ftm-companion-guide-helper {
  font-size: 15px;
  line-height: 1.6;
  color: #64738c;
}

.ftm-companion-guide.is-idle {
  background: linear-gradient(160deg, #fffdf8 0%, #f7fbfb 100%);
}

.ftm-companion-guide-phase-support {
  background: linear-gradient(160deg, #fff8f1 0%, #f6fbff 100%);
}

.ftm-companion-guide-phase-completion {
  background: linear-gradient(160deg, #fffaf0 0%, #f7fcf7 100%);
}

@media (max-width: 760px) {
  .ftm-companion-guide {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ftm-companion-guide-figure {
    min-height: 180px;
  }

  .ftm-companion-guide-image {
    max-height: 220px;
  }

  .ftm-companion-guide-name {
    font-size: 21px;
  }

  .ftm-companion-guide-bubble {
    font-size: 17px;
  }
}

/* Focus run mode v1.7.1 */
.ftm-focus-page {
  padding-top: 16px;
}

.ftm-focus-shell {
  background: linear-gradient(180deg, #f8f6ef 0%, #eef4fb 100%);
  border: 1px solid #e4dccf;
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(38, 49, 83, 0.08);
}

.ftm-focus-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.ftm-focus-header-left,
.ftm-focus-header-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ftm-focus-title-wrap .ftm-page-title {
  margin-bottom: 4px;
}

.ftm-focus-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 6px 4px;
}

.ftm-focus-progress-line {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  height: 6px;
  border-radius: 999px;
  background: #d7dfeb;
  transform: translateY(-50%);
  z-index: 0;
}

.ftm-focus-marker {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid #d8d6cd;
  background: #f8f6ef;
  color: #234075;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 18px rgba(38, 49, 83, 0.06);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ftm-focus-marker.is-active {
  background: #d9ebff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 26px rgba(38, 49, 83, 0.14);
}

.ftm-focus-marker.is-complete {
  background: #e4efe4;
}

.ftm-focus-body {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.ftm-focus-companion-card,
.ftm-focus-stage {
  height: 100%;
}

.ftm-focus-companion-card {
  position: sticky;
  top: 20px;
  background: #fffdf8;
  border: 1px solid #e4dccf;
  border-radius: 26px;
  padding: 18px;
  min-height: 100%;
  box-shadow: 0 14px 30px rgba(38, 49, 83, 0.06);
}

.ftm-focus-companion-phase {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3ead7;
  color: #7b5a1e;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.ftm-focus-companion-media {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 240px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f9f4e9 0%, #eef3fb 100%);
  margin-bottom: 14px;
  overflow: hidden;
}

.ftm-focus-companion-image {
  max-width: 85%;
  max-height: 240px;
  object-fit: contain;
  transition: opacity .24s ease, transform .24s ease;
}

.ftm-focus-companion-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ftm-focus-companion-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #17305f;
}

.ftm-focus-companion-state {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e4dccf;
  background: #f7f2e8;
  font-size: 13px;
  font-weight: 700;
  color: #7b5a1e;
}

.ftm-focus-companion-bubble {
  display: inline-flex;
  max-width: 100%;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid #d8cfbf;
  background: #fff;
  font-size: 28px;
  font-weight: 800;
  color: #17305f;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(38, 49, 83, 0.06);
  margin-bottom: 10px;
}

.ftm-focus-companion-bubble.is-hidden {
  display: none;
}

.ftm-focus-companion-helper {
  color: #5d6c8d;
  font-size: 16px;
  line-height: 1.5;
}

.ftm-focus-stage-wrap {
  min-height: 560px;
}

.ftm-focus-stage {
  display: none;
}

.ftm-focus-stage.is-active {
  display: block;
}

.ftm-focus-stage-card {
  background: rgba(255,255,255,.78);
  border: 1px solid #e4dccf;
  border-radius: 30px;
  padding: 24px;
  min-height: 520px;
  box-shadow: 0 14px 32px rgba(38, 49, 83, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.ftm-focus-stage-card-step {
  padding: 18px;
}

.ftm-focus-stage-overline {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6a7b9d;
  margin-bottom: 10px;
}

.ftm-focus-stage-title {
  font-size: 42px;
  line-height: 1.08;
  margin: 0 0 12px;
  color: #17305f;
}

.ftm-focus-stage-text {
  font-size: 24px;
  line-height: 1.35;
  color: #244373;
  max-width: 680px;
  margin: 0 auto 12px;
}

.ftm-focus-stage-illustration {
  font-size: 88px;
  line-height: 1;
  margin-bottom: 18px;
}

.ftm-focus-stage .ftm-step-counter,
.ftm-focus-stage .ftm-run-intro-badge {
  margin-bottom: 12px;
}

.ftm-focus-stage .ftm-image-card-shell-step {
  width: 100%;
  max-width: 720px;
}

.ftm-focus-stage .ftm-run-step-artboard-image-mode {
  min-height: 220px;
}

.ftm-focus-stage .ftm-run-step-icon-xl {
  font-size: 112px;
}

.ftm-focus-stage .ftm-run-step-text-image-mode {
  font-size: 44px;
  line-height: 1.05;
  margin-top: 18px;
}

.ftm-focus-stage .ftm-run-step-caption,
.ftm-focus-stage .ftm-run-step-hint,
.ftm-focus-stage .ftm-run-helper-text {
  max-width: 680px;
}

.ftm-focus-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e4dccf;
}

.ftm-focus-actions .ftm-focus-finish {
  display: none;
}

.ftm-focus-actions .ftm-action-btn.is-disabled,
.ftm-focus-actions .ftm-action-btn[disabled] {
  opacity: .45;
  pointer-events: none;
}

@media (max-width: 980px) {
  .ftm-focus-body {
    grid-template-columns: 1fr;
  }

  .ftm-focus-companion-card {
    position: static;
  }

  .ftm-focus-stage-card {
    min-height: auto;
  }

  .ftm-focus-companion-bubble {
    font-size: 22px;
  }

  .ftm-focus-stage-title {
    font-size: 34px;
  }

  .ftm-focus-stage-text,
  .ftm-focus-stage .ftm-run-step-text-image-mode {
    font-size: 22px;
  }
}

@media (max-width: 680px) {
  .ftm-focus-shell {
    padding: 16px;
    border-radius: 22px;
  }

  .ftm-focus-header {
    flex-direction: column;
  }

  .ftm-focus-progress {
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 8px;
  }

  .ftm-focus-marker {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 22px;
  }

  .ftm-focus-companion-media {
    min-height: 180px;
  }

  .ftm-focus-stage-illustration {
    font-size: 68px;
  }

  .ftm-focus-stage .ftm-run-step-icon-xl {
    font-size: 86px;
  }

  .ftm-focus-stage-title {
    font-size: 30px;
  }

  .ftm-focus-stage-text,
  .ftm-focus-stage .ftm-run-step-text-image-mode {
    font-size: 19px;
  }

  .ftm-focus-actions {
    flex-wrap: wrap;
  }

  .ftm-focus-actions .ftm-action-btn {
    flex: 1 1 46%;
    justify-content: center;
  }
}

/* Focus run mode v1.8.0 */
.ftm-focus-shell {
  background: rgba(248, 246, 239, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 54px rgba(38, 49, 83, 0.12);
}

.ftm-focus-body {
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.ftm-focus-companion,
.ftm-focus-stage-wrap {
  display: flex;
}

.ftm-focus-companion-card {
  position: sticky;
  top: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  min-height: 620px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,253,248,0.96) 0%, rgba(250,245,236,0.95) 100%);
}

.ftm-focus-stage-wrap {
  min-height: 620px;
}

.ftm-focus-stage {
  width: 100%;
}

.ftm-focus-stage.is-active {
  display: flex;
}

.ftm-focus-stage-card {
  width: 100%;
  min-height: 620px;
}

.ftm-focus-companion-hero {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 1fr);
  gap: 16px;
  align-items: center;
  flex: 1;
}

.ftm-focus-companion-media {
  min-height: 340px;
  height: 100%;
  margin-bottom: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, #fdf6ea 0%, #edf3fb 100%);
}

.ftm-focus-companion-image {
  max-width: 100%;
  max-height: 320px;
}

.ftm-focus-companion-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.ftm-focus-companion-bubble {
  width: 100%;
  min-height: 180px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  font-size: 30px;
  line-height: 1.15;
}

.ftm-focus-companion-footer {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.ftm-focus-companion-name {
  font-size: 32px;
  line-height: 1.05;
}

.ftm-focus-companion-helper {
  margin: 0;
}

.ftm-focus-stage-card-step {
  justify-content: flex-start;
  padding-top: 20px;
}

.ftm-focus-stage .ftm-image-card-shell-step {
  max-width: 760px;
}

.ftm-focus-stage .ftm-run-step-artboard-image-mode {
  min-height: 250px;
}

.ftm-focus-stage .ftm-run-step-icon-xl {
  font-size: 132px;
}

.ftm-focus-stage .ftm-run-step-text-image-mode {
  font-size: 50px;
  line-height: 1.02;
}

.ftm-focus-actions {
  position: sticky;
  bottom: 0;
  background: rgba(248, 246, 239, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 18px 4px 4px;
  margin-top: 22px;
}

@media (max-width: 1100px) {
  .ftm-focus-body {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  }

  .ftm-focus-companion-hero {
    grid-template-columns: 1fr;
  }

  .ftm-focus-companion-media {
    min-height: 280px;
  }

  .ftm-focus-companion-bubble {
    min-height: auto;
    font-size: 24px;
  }
}

@media (max-width: 980px) {
  .ftm-focus-body {
    grid-template-columns: 1fr;
  }

  .ftm-focus-companion-card,
  .ftm-focus-stage-wrap,
  .ftm-focus-stage-card {
    min-height: auto;
  }

  .ftm-focus-companion-card {
    position: static;
  }

  .ftm-focus-companion-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .ftm-focus-companion-media {
    min-height: 220px;
  }

  .ftm-focus-companion-image {
    max-height: 220px;
  }

  .ftm-focus-companion-bubble {
    font-size: 22px;
  }

  .ftm-focus-stage .ftm-run-step-icon-xl {
    font-size: 96px;
  }

  .ftm-focus-stage .ftm-run-step-text-image-mode {
    font-size: 28px;
  }
}

/* Focus run mode v1.8.1 */
.ftm-focus-shell {
  background: rgba(248, 246, 239, 0.74);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ftm-focus-marker-icon,
.ftm-focus-stage-illustration,
.ftm-run-step-icon,
.ftm-run-destination-icon,
.ftm-run-ritual-icon,
.ftm-run-icon {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1;
}

.ftm-focus-marker-icon {
  display: block;
  font-size: 26px;
  transform: translateY(1px);
}

.ftm-focus-body {
  position: relative;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
  min-height: 640px;
  padding: 24px;
  border-radius: 32px;
  border: 1px solid #e5dccd;
  background: rgba(255, 251, 244, 0.76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.ftm-focus-companion,
.ftm-focus-stage-wrap {
  display: flex;
  align-items: stretch;
  min-height: 100%;
}

.ftm-focus-companion-card {
  position: static;
  width: 100%;
  min-height: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ftm-focus-companion-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.ftm-focus-companion-name {
  font-size: 34px;
  line-height: 1.05;
  color: #17305f;
}

.ftm-focus-companion-state {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e4dccf;
  background: #f7f2e8;
  font-size: 13px;
  font-weight: 700;
  color: #7b5a1e;
}

.ftm-focus-companion-hero {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  flex: 1;
  min-height: 100%;
}

.ftm-focus-companion-media {
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 10px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  align-self: start;
}

.ftm-focus-companion-image {
  max-width: 100%;
  max-height: 248px;
  object-fit: contain;
}

.ftm-focus-companion-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  min-height: 0;
  padding-top: 18px;
}

.ftm-focus-companion-bubble {
  width: auto;
  max-width: 100%;
  min-height: 0;
  padding: 16px 18px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  font-size: 28px;
  line-height: 1.15;
  align-self: flex-start;
}

.ftm-focus-companion-helper {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
}

.ftm-focus-stage-wrap {
  min-height: 100%;
}

.ftm-focus-stage,
.ftm-focus-stage.is-active {
  width: 100%;
  height: 100%;
}

.ftm-focus-stage-card {
  width: 100%;
  min-height: 100%;
  height: 100%;
  padding: 28px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid #e4dccf;
  border-radius: 30px;
  box-shadow: 0 14px 32px rgba(38, 49, 83, 0.08);
}

.ftm-focus-stage-card-step {
  justify-content: center;
}

.ftm-focus-actions {
  background: rgba(248, 246, 239, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 1100px) {
  .ftm-focus-body {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 20px;
  }

  .ftm-focus-companion-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ftm-focus-companion-media {
    min-height: 260px;
  }

  .ftm-focus-companion-image {
    max-height: 250px;
  }

  .ftm-focus-companion-bubble {
    font-size: 24px;
  }
}

@media (max-width: 980px) {
  .ftm-focus-body {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px;
  }

  .ftm-focus-companion-card,
  .ftm-focus-stage-wrap,
  .ftm-focus-stage-card {
    min-height: auto;
    height: auto;
  }

  .ftm-focus-companion-hero {
    grid-template-columns: 140px minmax(0, 1fr);
    align-items: center;
  }

  .ftm-focus-companion-media {
    min-height: 220px;
  }

  .ftm-focus-stage-card {
    padding: 24px;
  }
}

@media (max-width: 680px) {
  .ftm-focus-companion-hero {
    grid-template-columns: 1fr;
  }

  .ftm-focus-companion-media {
    min-height: 200px;
  }

  .ftm-focus-companion-image {
    max-height: 200px;
  }

  .ftm-focus-companion-bubble {
    font-size: 22px;
  }
}


/* Focus run mode v1.8.2 */
.ftm-focus-progress {
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 18px;
  padding-inline: 18px;
  margin-bottom: 12px;
}

.ftm-focus-progress-line {
  left: 34px;
  right: 34px;
  height: 7px;
  background: #d9e1ee;
}

.ftm-focus-marker {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #fcfaf4;
  border-color: #d9d4c7;
}

.ftm-focus-marker.is-active {
  background: #dcedff;
}

.ftm-focus-marker.is-complete {
  background: #e6f2e4;
}

.ftm-focus-marker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 28px;
  line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-variant-emoji: emoji;
  text-rendering: optimizeLegibility;
}

.ftm-focus-status-bar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 16px;
  padding: 0 6px;
}

.ftm-focus-status-pill {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: #f3ecdf;
  color: #715a2f;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid #e4dccf;
}

.ftm-focus-status-pill.is-active {
  display: inline-flex;
}

.ftm-focus-body {
  gap: 24px;
  padding-top: 18px;
}

.ftm-focus-companion-card {
  justify-content: stretch;
}

.ftm-focus-companion-hero {
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  min-height: 100%;
  gap: 22px;
}

.ftm-focus-companion-media {
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.ftm-focus-companion-image {
  max-height: 320px;
}

.ftm-focus-companion-copy {
  justify-content: center;
  gap: 16px;
}

.ftm-focus-companion-bubble {
  font-size: 26px;
  max-width: 280px;
  box-shadow: 0 10px 24px rgba(27, 45, 84, 0.08);
}

.ftm-focus-stage-card {
  min-height: 100%;
}

.ftm-focus-stage .ftm-run-intro-badge,
.ftm-focus-stage .ftm-step-counter {
  display: none !important;
}

@media (max-width: 980px) {
  .ftm-focus-status-bar {
    justify-content: center;
    margin-bottom: 14px;
  }

  .ftm-focus-companion-hero {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .ftm-focus-companion-media {
    min-height: 240px;
  }

  .ftm-focus-companion-image {
    max-height: 220px;
  }
}

@media (max-width: 680px) {
  .ftm-focus-progress {
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 10px;
    padding-inline: 6px;
  }

  .ftm-focus-marker {
    width: 54px;
    height: 54px;
  }

  .ftm-focus-marker-icon {
    font-size: 24px;
  }

  .ftm-focus-companion-hero {
    grid-template-columns: 1fr;
  }

  .ftm-focus-companion-bubble {
    max-width: 100%;
    font-size: 22px;
  }
}


/* V1.8.3 companion alignment + stable emoji rendering */
.ftm-context-kid-icon,
.ftm-run-child-chip,
.ftm-image-card-badge,
.ftm-focus-marker-icon {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-variant-emoji: emoji;
  text-rendering: optimizeLegibility;
}

.ftm-focus-companion-card {
  justify-content: flex-start;
}

.ftm-focus-companion-hero {
  align-items: start;
}

.ftm-focus-companion-media {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding-top: 8px;
}

.ftm-focus-companion-image {
  display: block;
  margin: 0 auto 0 0;
}

.ftm-focus-companion-copy {
  justify-content: flex-start;
  padding-top: 18px;
}

@media (max-width: 900px) {
  .ftm-focus-companion-hero {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 18px;
  }

  .ftm-focus-companion-copy {
    padding-top: 8px;
  }
}

@media (max-width: 640px) {
  .ftm-focus-companion-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ftm-focus-companion-media {
    justify-self: start;
    padding-top: 0;
  }

  .ftm-focus-companion-copy {
    padding-top: 0;
  }
}


/* V1.8.4 marker visibility + companion vertical alignment */
.ftm-focus-marker {
  overflow: visible;
}

.ftm-focus-marker-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  font-size: 34px !important;
  line-height: 1 !important;
  transform: none !important;
  letter-spacing: normal !important;
  white-space: nowrap !important;
  text-rendering: geometricPrecision;
}

.ftm-focus-companion-hero {
  align-items: end !important;
}

.ftm-focus-companion-media {
  align-items: flex-end !important;
}

.ftm-focus-companion-copy {
  align-self: end;
  justify-content: end !important;
  padding-top: 0 !important;
  padding-bottom: 34px;
}

.ftm-focus-companion-bubble {
  margin-top: 0;
}

.ftm-focus-companion-helper {
  margin-top: 2px;
}

@media (max-width: 980px) {
  .ftm-focus-companion-copy {
    padding-bottom: 20px;
  }
}

@media (max-width: 640px) {
  .ftm-focus-marker-icon {
    font-size: 30px !important;
  }

  .ftm-focus-companion-copy {
    align-self: stretch;
    justify-content: flex-start !important;
    padding-bottom: 0;
  }
}


/* V1.9.0 run refactor */
.ftm-focus-shell {
  --ftm-run-border: rgba(228, 220, 206, 0.96);
  --ftm-run-panel: rgba(255, 255, 255, 0.68);
  --ftm-run-panel-strong: rgba(255, 255, 255, 0.82);
}

.ftm-focus-shell .ftm-focus-progress {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 36px 18px;
  margin-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ftm-focus-shell .ftm-focus-progress::-webkit-scrollbar {
  display: none;
}

.ftm-focus-shell .ftm-focus-progress-line {
  position: absolute;
  top: 50%;
  left: 72px;
  right: 72px;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #dbe6f3 0%, #d9e2f1 100%);
  z-index: 0;
}

.ftm-focus-shell .ftm-run-journey-stop.ftm-focus-marker,
.ftm-focus-shell .ftm-focus-marker {
  position: relative;
  z-index: 1;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  border: 1px solid var(--ftm-run-border);
  background: linear-gradient(180deg, rgba(255, 251, 243, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
  box-shadow: 0 12px 26px rgba(59, 73, 102, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.ftm-focus-shell .ftm-focus-marker.is-complete {
  background: linear-gradient(180deg, #eef8ea 0%, #edf7f0 100%);
  border-color: #cfe2d1;
}

.ftm-focus-shell .ftm-focus-marker.is-active {
  background: linear-gradient(180deg, #dcedff 0%, #e8f1ff 100%);
  border-color: #5c9fff;
  box-shadow: 0 14px 28px rgba(61, 108, 189, 0.16);
}

.ftm-focus-shell .ftm-run-journey-icon.ftm-focus-marker-icon,
.ftm-focus-shell .ftm-focus-marker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(231, 223, 210, 0.95);
  font-size: 36px;
  line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-variant-emoji: emoji;
  text-rendering: optimizeLegibility;
  white-space: nowrap;
}

.ftm-focus-shell .ftm-focus-status-bar {
  min-height: 44px;
  margin: 0 0 18px;
  padding: 0 6px;
}

.ftm-focus-shell .ftm-focus-body.ftm-run-focus-frame-wrap {
  padding-top: 0;
}

.ftm-focus-shell .ftm-run-focus-frame {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.38fr);
  gap: 26px;
  align-items: stretch;
}

.ftm-focus-shell .ftm-run-guide-panel,
.ftm-focus-shell .ftm-run-step-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.58) 0%, rgba(255,255,255,0.7) 100%);
  border: 1px solid var(--ftm-run-border);
  border-radius: 34px;
  box-shadow: 0 18px 38px rgba(82, 93, 123, 0.08);
  backdrop-filter: blur(14px);
  overflow: hidden;
  min-height: 620px;
}

.ftm-focus-shell .ftm-run-guide-card,
.ftm-focus-shell .ftm-run-step-panel {
  height: 100%;
}

.ftm-focus-shell .ftm-run-guide-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 22px;
  padding: 30px 28px;
  justify-content: stretch;
}

.ftm-focus-shell .ftm-run-guide-header-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.ftm-focus-shell .ftm-focus-companion-name {
  font-size: 56px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.ftm-focus-shell .ftm-focus-companion-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(247, 239, 223, 0.84);
  border: 1px solid rgba(229, 218, 196, 0.95);
  color: #7c602c;
  font-size: 14px;
  font-weight: 800;
}

.ftm-focus-shell .ftm-run-guide-scene {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 100%;
}

.ftm-focus-shell .ftm-run-guide-otter.ftm-focus-companion-media {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.ftm-focus-shell .ftm-focus-companion-image {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 280px;
  object-fit: contain;
}

.ftm-focus-shell .ftm-run-guide-speech.ftm-focus-companion-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 0;
  justify-content: start;
  align-self: center;
}

.ftm-focus-shell .ftm-focus-companion-bubble {
  margin: 0;
  max-width: 320px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(228, 218, 204, 0.95);
  box-shadow: 0 12px 28px rgba(34, 53, 92, 0.08);
  font-size: 24px;
  line-height: 1.18;
  font-weight: 900;
}

.ftm-focus-shell .ftm-focus-companion-helper {
  max-width: 340px;
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: #556b88;
}

.ftm-focus-shell .ftm-run-step-panel {
  padding: 18px;
}

.ftm-focus-shell .ftm-run-step-panel .ftm-focus-stage {
  height: 100%;
}

.ftm-focus-shell .ftm-run-step-panel .ftm-focus-stage-card {
  min-height: 100%;
}

.ftm-focus-shell .ftm-run-step-panel .ftm-image-card-shell {
  width: 100%;
  max-width: none;
}

.ftm-focus-shell .ftm-run-step-panel .ftm-run-destination-card {
  width: min(100%, 420px);
}

.ftm-context-kid-icon,
.ftm-run-child-chip,
.ftm-image-card-badge,
.ftm-focus-shell .ftm-focus-marker-icon {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-variant-emoji: emoji;
  text-rendering: optimizeLegibility;
}

@media (max-width: 1100px) {
  .ftm-focus-shell .ftm-run-focus-frame {
    grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.1fr);
    gap: 20px;
  }

  .ftm-focus-shell .ftm-run-guide-scene {
    grid-template-columns: 144px minmax(0, 1fr);
  }

  .ftm-focus-shell .ftm-focus-companion-name {
    font-size: 48px;
  }

  .ftm-focus-shell .ftm-focus-companion-bubble {
    font-size: 22px;
  }
}

@media (max-width: 860px) {
  .ftm-focus-shell .ftm-focus-progress {
    padding-inline: 16px;
  }

  .ftm-focus-shell .ftm-focus-progress-line {
    left: 58px;
    right: 58px;
  }

  .ftm-focus-shell .ftm-run-focus-frame {
    grid-template-columns: 1fr;
  }

  .ftm-focus-shell .ftm-run-guide-panel,
  .ftm-focus-shell .ftm-run-step-panel {
    min-height: auto;
  }

  .ftm-focus-shell .ftm-run-guide-scene {
    grid-template-columns: 136px minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ftm-focus-shell .ftm-focus-progress {
    gap: 12px;
    padding-inline: 8px;
  }

  .ftm-focus-shell .ftm-run-journey-stop.ftm-focus-marker,
  .ftm-focus-shell .ftm-focus-marker {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }

  .ftm-focus-shell .ftm-run-journey-icon.ftm-focus-marker-icon,
  .ftm-focus-shell .ftm-focus-marker-icon {
    width: 48px;
    height: 48px;
    font-size: 30px;
  }

  .ftm-focus-shell .ftm-run-guide-card {
    padding: 22px 18px;
  }

  .ftm-focus-shell .ftm-run-guide-header-row {
    flex-wrap: wrap;
  }

  .ftm-focus-shell .ftm-focus-companion-name {
    font-size: 40px;
  }

  .ftm-focus-shell .ftm-run-guide-scene {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 18px;
  }

  .ftm-focus-shell .ftm-run-guide-otter.ftm-focus-companion-media {
    justify-content: flex-start;
  }

  .ftm-focus-shell .ftm-focus-companion-bubble,
  .ftm-focus-shell .ftm-focus-companion-helper {
    max-width: 100%;
  }
}

/* ===============================
   Run V2 / Focus Refactor
   =============================== */
.ftm-run-v2 {
  --ftm-run-bg: linear-gradient(180deg, rgba(248, 248, 243, 0.96) 0%, rgba(239, 244, 248, 0.92) 100%);
  --ftm-run-card: rgba(255,255,255,0.76);
  --ftm-run-stroke: rgba(214, 202, 182, 0.78);
  --ftm-run-soft: rgba(241, 238, 228, 0.86);
  --ftm-run-text: #1f376d;
  --ftm-run-subtext: #62769c;
  --ftm-run-accent: #2e7b76;
  --ftm-run-active: #dcebfd;
  --ftm-run-done: #e6f3ea;
  --ftm-run-shadow: 0 18px 46px rgba(28, 47, 89, 0.08);
}

.ftm-run-v2 .ftm-run2-icon-text,
.ftm-run-v2 .ftm-run2-child-chip,
.ftm-context-kid-icon,
.ftm-run-child-chip {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  font-variant-emoji: emoji;
  line-height: 1;
}

.ftm-run-v2 .ftm-run-shell {
  position: relative;
  padding: 28px;
  border-radius: 28px;
  background: var(--ftm-run-bg);
  border: 1px solid rgba(222, 209, 189, 0.85);
  box-shadow: var(--ftm-run-shadow);
  overflow: hidden;
}
.ftm-run-v2 .ftm-run-shell::before {
  content: "";
  position: absolute;
  inset: auto -10% -12% auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(200,221,252,0.28) 0%, rgba(200,221,252,0) 70%);
  pointer-events: none;
}
.ftm-run-v2 .ftm-run-shell::after {
  content: "";
  position: absolute;
  inset: -16% auto auto -8%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(246,227,182,0.16) 0%, rgba(246,227,182,0) 72%);
  pointer-events: none;
}

.ftm-run-v2 .ftm-run-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 26px;
}
.ftm-run-v2 .ftm-run-header-left,
.ftm-run-v2 .ftm-run-header-right {
  display: grid;
  gap: 16px;
}
.ftm-run-v2 .ftm-run-header-right {
  justify-items: end;
}
.ftm-run-v2 .ftm-run2-child-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(222, 209, 189, 0.8);
  color: var(--ftm-run-text);
  font-size: 15px;
  font-weight: 700;
}
.ftm-run-v2 .ftm-run2-child-chip .ftm-run2-icon-text {
  font-size: 16px;
}

.ftm-run-v2 .ftm-run-journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}
.ftm-run-v2 .ftm-run-journey-track {
  position: absolute;
  left: 42px;
  right: 42px;
  top: 50%;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(201,220,243,0.95), rgba(224,234,245,0.95));
  z-index: 0;
}
.ftm-run-v2 .ftm-run-journey-stop {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid rgba(196, 207, 194, 0.92);
  background: rgba(255,255,255,0.86);
  color: var(--ftm-run-text);
  box-shadow: 0 10px 24px rgba(31, 55, 109, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.ftm-run-v2 .ftm-run-journey-stop:hover {
  transform: translateY(-1px);
}
.ftm-run-v2 .ftm-run-journey-stop.is-complete {
  background: var(--ftm-run-done);
  border-color: #bdd7c2;
}
.ftm-run-v2 .ftm-run-journey-stop.is-active {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--ftm-run-active);
  border: 2px solid #5d9bf6;
  box-shadow: 0 14px 30px rgba(55, 114, 223, 0.18);
  transform: translateY(-2px);
}
.ftm-run-v2 .ftm-run-journey-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 26px;
  font-size: 30px;
  line-height: 1;
}
.ftm-run-v2 .ftm-run-journey-stop.is-active .ftm-run-journey-icon {
  font-size: 34px;
}

.ftm-run-v2 .ftm-run-status-line {
  margin-bottom: 18px;
}
.ftm-run-v2 .ftm-run-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(242, 236, 220, 0.95);
  border: 1px solid rgba(219, 202, 170, 0.88);
  color: #805f1e;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.ftm-run-v2 .ftm-run-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(222, 209, 189, 0.8);
  background: rgba(255,255,255,0.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 12px 30px rgba(31, 55, 109, 0.04);
  backdrop-filter: blur(18px);
}

.ftm-run-v2 .ftm-run-companion,
.ftm-run-v2 .ftm-run-main {
  min-height: clamp(420px, 50vh, 540px);
}

.ftm-run-v2 .ftm-run-companion {
  display: flex;
}
.ftm-run-v2 .ftm-run-companion-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.ftm-run-v2 .ftm-run-companion-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ftm-run-text);
  letter-spacing: 0.01em;
}
.ftm-run-v2 .ftm-run-companion-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(243, 236, 218, 0.92);
  border: 1px solid rgba(222, 209, 189, 0.85);
  color: #7b6025;
  font-size: 12px;
  font-weight: 700;
}
.ftm-run-v2 .ftm-run-companion-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ftm-run-v2 .ftm-run-companion-scene {
  display: grid;
  grid-template-columns: minmax(132px, 170px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 360px;
}
.ftm-run-v2 .ftm-run-companion-media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ftm-run-v2 .ftm-run-companion-image,
.ftm-run-v2 .ftm-run-companion-placeholder {
  width: 150px;
  max-width: 100%;
}
.ftm-run-v2 .ftm-run-companion-image.is-hidden,
.ftm-run-v2 .ftm-run-companion-placeholder.is-hidden {
  display: none;
}
.ftm-run-v2 .ftm-run-companion-placeholder {
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 26px;
  background: linear-gradient(180deg, #fff4e2 0%, #eef8f6 100%);
  color: #d6a044;
  font-size: 56px;
}
.ftm-run-v2 .ftm-run-companion-copy {
  display: grid;
  gap: 12px;
  align-content: center;
}
.ftm-run-v2 .ftm-run-companion-bubble {
  position: relative;
  display: inline-block;
  max-width: 290px;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(214, 202, 182, 0.88);
  color: var(--ftm-run-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.22;
  box-shadow: 0 12px 26px rgba(31, 55, 109, 0.08);
}
.ftm-run-v2 .ftm-run-companion-bubble.is-hidden {
  display: none;
}
.ftm-run-v2 .ftm-run-companion-bubble::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 28px;
  width: 18px;
  height: 18px;
  border-left: 1px solid rgba(214, 202, 182, 0.88);
  border-bottom: 1px solid rgba(214, 202, 182, 0.88);
  background: rgba(255,255,255,0.94);
  transform: rotate(45deg);
}
.ftm-run-v2 .ftm-run-companion-helper {
  color: var(--ftm-run-subtext);
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.72;
  max-width: 280px;
}

.ftm-run-v2 .ftm-run-main {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
}
.ftm-run-v2 .ftm-run-stage {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.ftm-run-v2 .ftm-run-stage.is-active {
  display: block;
}
.ftm-run-v2 .ftm-run-card {
  min-height: 100%;
  max-height: min(100%, clamp(420px, 50vh, 540px));
  border-radius: 28px;
  border: 1px solid rgba(222, 209, 189, 0.8);
  background: rgba(255,255,255,0.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 14px 34px rgba(31,55,109,0.05);
  padding: 28px 30px 30px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.ftm-run-v2 .ftm-run-card-intro,
.ftm-run-v2 .ftm-run-card-ritual,
.ftm-run-v2 .ftm-run-card-completion {
  min-height: clamp(420px, 50vh, 540px);
}
.ftm-run-v2 .ftm-run-card-step {
  min-height: clamp(420px, 50vh, 540px);
  align-content: center;
}
.ftm-run-v2 .ftm-run-card-topline {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.ftm-run-v2 .ftm-run-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(243, 238, 227, 0.92);
  color: #596b8e;
  font-size: 14px;
  font-weight: 800;
}
.ftm-run-v2 .ftm-run-card-chip .ftm-run2-icon-text {
  font-size: 15px;
}
.ftm-run-v2 .ftm-run-card-illustration-wrap {
  position: relative;
  width: min(100%, 520px);
  min-height: clamp(170px, 23vh, 230px);
  border-radius: 28px;
  background: linear-gradient(180deg, #fff9ec 0%, #eef7fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}
.ftm-run-v2 .ftm-run-card-spot {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.72;
}
.ftm-run-v2 .ftm-run-card-spot-a {
  width: 170px;
  height: 170px;
  left: 18%;
  top: 24%;
  background: rgba(246, 218, 132, 0.36);
}
.ftm-run-v2 .ftm-run-card-spot-b {
  width: 200px;
  height: 200px;
  right: 12%;
  top: 12%;
  background: rgba(181, 217, 205, 0.38);
}
.ftm-run-v2 .ftm-run-card-step-icon {
  position: relative;
  z-index: 1;
  font-size: clamp(84px, 8vw, 104px);
  line-height: 1;
}
.ftm-run-v2 .ftm-run-card-hero-icon {
  font-size: 84px;
  line-height: 1;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: rgba(255,255,255,0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ftm-run-v2 .ftm-run-card-overline {
  color: #64779c;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ftm-run-v2 .ftm-run-card-title {
  margin: 0;
  color: var(--ftm-run-text);
  font-size: clamp(40px, 4vw, 60px);
  line-height: 1.02;
  font-weight: 900;
}
.ftm-run-v2 .ftm-run-card-text {
  margin: 0;
  max-width: 700px;
  color: var(--ftm-run-text);
  font-size: clamp(22px, 2.35vw, 34px);
  line-height: 1.28;
}
.ftm-run-v2 .ftm-run-card-step-main {
  color: var(--ftm-run-text);
  max-width: 700px;
  font-size: clamp(44px, 4.4vw, 64px);
  line-height: 0.98;
  font-weight: 900;
  text-wrap: balance;
}
.ftm-run-v2 .ftm-run-card-subtext {
  color: var(--ftm-run-subtext);
  font-size: 22px;
  line-height: 1.35;
  max-width: 760px;
}
.ftm-run-v2 .ftm-run-card-hint {
  color: var(--ftm-run-subtext);
  font-size: 15px;
  line-height: 1.45;
  max-width: 680px;
  opacity: 0.82;
}
.ftm-run-v2 .ftm-run-goal-card {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  border-radius: 24px;
  background: rgba(248, 247, 239, 0.95);
  border: 1px solid rgba(222, 209, 189, 0.82);
}
.ftm-run-v2 .ftm-run-goal-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: linear-gradient(180deg, #fff9ec 0%, #eef7fb 100%);
}
.ftm-run-v2 .ftm-run-goal-label {
  color: #856b3d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ftm-run-v2 .ftm-run-goal-text {
  color: var(--ftm-run-text);
  font-size: 24px;
  font-weight: 900;
}
.ftm-run-v2 .ftm-run-card::-webkit-scrollbar {
  width: 10px;
}
.ftm-run-v2 .ftm-run-card::-webkit-scrollbar-track {
  background: rgba(240, 236, 226, 0.65);
  border-radius: 999px;
}
.ftm-run-v2 .ftm-run-card::-webkit-scrollbar-thumb {
  background: rgba(160, 173, 197, 0.55);
  border-radius: 999px;
  border: 2px solid rgba(240, 236, 226, 0.75);
}
.ftm-run-v2 .ftm-run-card::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 139, 170, 0.7);
}

.ftm-run-v2 .ftm-run-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-top: 10px;
}
.ftm-run-v2 .ftm-focus-finish {
  display: none;
}

@media (max-width: 1100px) {
  .ftm-run-v2 .ftm-run-frame {
    grid-template-columns: 1fr;
  }
  .ftm-run-v2 .ftm-run-companion,
  .ftm-run-v2 .ftm-run-main,
  .ftm-run-v2 .ftm-run-card {
    min-height: auto;
    max-height: none;
  }
  .ftm-run-v2 .ftm-run-companion-scene {
    grid-template-columns: 140px 1fr;
    min-height: auto;
  }
}

@media (max-width: 780px) {
  .ftm-run-v2 .ftm-run-shell {
    padding: 18px;
  }
  .ftm-run-v2 .ftm-run-header {
    grid-template-columns: 1fr;
    display: grid;
  }
  .ftm-run-v2 .ftm-run-header-right {
    justify-items: stretch;
  }
  .ftm-run-v2 .ftm-run-journey {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  }
  .ftm-run-v2 .ftm-run-journey-track {
    left: 28px;
    right: 28px;
  }
  .ftm-run-v2 .ftm-run-journey-stop {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }
  .ftm-run-v2 .ftm-run-journey-stop.is-active {
    width: 56px;
    height: 56px;
  }
  .ftm-run-v2 .ftm-run-journey-icon {
    font-size: 24px;
  }
  .ftm-run-v2 .ftm-run-journey-stop.is-active .ftm-run-journey-icon {
    font-size: 28px;
  }
  .ftm-run-v2 .ftm-run-frame {
    padding: 18px;
    gap: 18px;
  }
  .ftm-run-v2 .ftm-run-companion-scene {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .ftm-run-v2 .ftm-run-companion-copy {
    justify-items: center;
  }
  .ftm-run-v2 .ftm-run-companion-bubble::before {
    left: 50%;
    top: -8px;
    transform: translateX(-50%) rotate(135deg);
  }
  .ftm-run-v2 .ftm-run-card {
    padding: 22px;
  }
  .ftm-run-v2 .ftm-run-card-title {
    font-size: clamp(30px, 9vw, 40px);
  }
  .ftm-run-v2 .ftm-run-card-text,
  .ftm-run-v2 .ftm-run-card-subtext {
    font-size: 18px;
  }
  .ftm-run-v2 .ftm-run-card-step-main {
    font-size: clamp(34px, 10vw, 44px);
  }
  .ftm-run-v2 .ftm-run-actions {
    flex-wrap: wrap;
  }
  .ftm-run-v2 .ftm-run-actions .ftm-action-btn {
    flex: 1 1 48%;
    justify-content: center;
  }
}


/* ===============================
   Run V2.1 / Viewport-first rebuild
   =============================== */
.ftm-run-v21 {
  --ftm-run-header-gap: 18px;
  --ftm-run-shell-pad: 22px;
  --ftm-run-shell-radius: 28px;
  --ftm-run-companion-col: minmax(300px, 34%);
  --ftm-run-card-col: minmax(0, 66%);
  --ftm-run-rail-stop: 56px;
  --ftm-run-rail-stop-active: 68px;
  --ftm-run-rail-icon: 28px;
  --ftm-run-rail-icon-active: 34px;
  --ftm-run-companion-art: 236px;
  --ftm-run-bubble-max: 176px;
  --ftm-run-card-pad: 18px;
  --ftm-run-card-illus: 126px;
  --ftm-run-step-title: clamp(32px, 3.2vw, 44px);
  --ftm-run-text-large: clamp(17px, 1.7vw, 24px);
}

.ftm-run-v21 .ftm-run-shell {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 0;
  min-height: min(920px, calc(100dvh - 24px));
  max-height: calc(100dvh - 20px);
  padding: var(--ftm-run-shell-pad);
  overflow: hidden;
}

.ftm-run-v21 .ftm-run-header {
  margin-bottom: 14px;
  gap: var(--ftm-run-header-gap);
  align-items: start;
}

.ftm-run-v21 .ftm-run-header-left,
.ftm-run-v21 .ftm-run-header-right {
  gap: 10px;
}

.ftm-run-v21 .ftm-run-header-left .ftm-action-btn {
  min-height: 44px;
  padding-inline: 20px;
}

.ftm-run-v21 .ftm-run-title-wrap {
  display: grid;
  gap: 6px;
}

.ftm-run-v21 .ftm-hero-kicker {
  padding: 6px 14px;
  font-size: 12px;
}

.ftm-run-v21 .ftm-page-title {
  font-size: clamp(32px, 3vw, 48px);
  line-height: 1.02;
  margin: 0;
}

.ftm-run-v21 .ftm-page-text {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.ftm-run-v21 .ftm-run-header-right .ftm-selector-wrap {
  min-width: min(100%, 260px);
}

.ftm-run-v21 .ftm-run2-child-chip {
  justify-self: end;
  padding: 7px 12px;
  font-size: 14px;
}

.ftm-run-v21 .ftm-run2-child-chip .ftm-run2-icon-text {
  font-size: 15px;
}

.ftm-run-v21 .ftm-run-journey {
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.ftm-run-v21 .ftm-run-journey-track {
  left: 28px;
  right: 28px;
  height: 5px;
}

.ftm-run-v21 .ftm-run-journey-stop {
  width: var(--ftm-run-rail-stop);
  height: var(--ftm-run-rail-stop);
  border-radius: 18px;
}

.ftm-run-v21 .ftm-run-journey-stop.is-active {
  width: var(--ftm-run-rail-stop-active);
  height: var(--ftm-run-rail-stop-active);
  border-radius: 22px;
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(55, 114, 223, 0.20);
}

.ftm-run-v21 .ftm-run-journey-icon {
  font-size: var(--ftm-run-rail-icon);
}

.ftm-run-v21 .ftm-run-journey-stop.is-active .ftm-run-journey-icon {
  font-size: var(--ftm-run-rail-icon-active);
}

.ftm-run-v21 .ftm-run-status-line {
  margin-bottom: 12px;
}

.ftm-run-v21 .ftm-run-status-pill {
  min-height: 40px;
  padding-inline: 16px;
  font-size: 14px;
}

.ftm-run-v21 .ftm-run-frame {
  grid-template-columns: var(--ftm-run-companion-col) var(--ftm-run-card-col);
  align-items: stretch;
  gap: 18px;
  padding: 18px;
  min-height: 0;
  margin-bottom: 14px;
  overflow: hidden;
}

.ftm-run-v21 .ftm-run-companion,
.ftm-run-v21 .ftm-run-main {
  min-height: 0;
  height: 100%;
}

.ftm-run-v21 .ftm-run-companion {
  padding: 6px 2px;
}

.ftm-run-v21 .ftm-run-companion-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  align-content: center;
  gap: 12px;
}

.ftm-run-v21 .ftm-run-companion-head {
  gap: 8px;
  margin-bottom: 0;
}

.ftm-run-v21 .ftm-run-companion-name {
  font-size: 14px;
  font-weight: 800;
}

.ftm-run-v21 .ftm-run-companion-scene {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  justify-content: start;
  min-height: 0;
}

.ftm-run-v21 .ftm-run-companion-media {
  align-self: center;
  justify-content: center;
}

.ftm-run-v21 .ftm-run-companion-image,
.ftm-run-v21 .ftm-run-companion-placeholder {
  width: var(--ftm-run-companion-art);
  max-width: 100%;
}

.ftm-run-v21 .ftm-run-companion-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  min-width: 0;
}

.ftm-run-v21 .ftm-run-companion-bubble {
  max-width: var(--ftm-run-bubble-max);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.18;
  border-radius: 20px;
}

.ftm-run-v21 .ftm-run-companion-bubble::before {
  left: -8px;
  top: 24px;
  width: 14px;
  height: 14px;
}

.ftm-run-v21 .ftm-run-main {
  display: flex;
  min-width: 0;
}

.ftm-run-v21 .ftm-run-stage.is-active {
  display: block;
  height: 100%;
}

.ftm-run-v21 .ftm-run-card {
  min-height: 0;
  height: 100%;
  padding: var(--ftm-run-card-pad);
  gap: 12px;
  overflow: hidden;
  justify-items: center;
}

.ftm-run-v21 .ftm-run-card-step,
.ftm-run-v21 .ftm-run-card-intro,
.ftm-run-v21 .ftm-run-card-ritual,
.ftm-run-v21 .ftm-run-card-completion {
  min-height: 0;
}

.ftm-run-v21 .ftm-run-card-topline {
  margin-bottom: 0;
}

.ftm-run-v21 .ftm-run-card-chip {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 13px;
}

.ftm-run-v21 .ftm-run-card-illustration-wrap {
  min-height: var(--ftm-run-card-illus);
  width: min(100%, 420px);
  border-radius: 24px;
  margin-bottom: 4px;
}

.ftm-run-v21 .ftm-run-card-step-icon {
  font-size: 84px;
}

.ftm-run-v21 .ftm-run-card-hero-icon {
  width: 72px;
  height: 72px;
  font-size: 56px;
  border-radius: 22px;
}

.ftm-run-v21 .ftm-run-card-overline {
  font-size: 14px;
}

.ftm-run-v21 .ftm-run-card-title {
  font-size: clamp(28px, 3.1vw, 44px);
}

.ftm-run-v21 .ftm-run-card-text {
  font-size: clamp(18px, 1.9vw, 24px);
  max-width: 640px;
}

.ftm-run-v21 .ftm-run-card-step-main {
  font-size: var(--ftm-run-step-title);
  line-height: 0.96;
  max-width: 9ch;
}

.ftm-run-v21 .ftm-run-card-subtext {
  font-size: 18px;
  max-width: 560px;
}

.ftm-run-v21 .ftm-run-card-hint {
  font-size: 15px;
  line-height: 1.45;
  max-width: 560px;
  opacity: 0.76;
}

.ftm-run-v21 .ftm-run-goal-card {
  gap: 14px;
  padding: 14px 20px;
  border-radius: 22px;
}

.ftm-run-v21 .ftm-run-goal-icon {
  width: 56px;
  height: 56px;
  font-size: 28px;
  border-radius: 18px;
}

.ftm-run-v21 .ftm-run-goal-text {
  font-size: 20px;
}

.ftm-run-v21 .ftm-run-actions {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

.ftm-run-v21 .ftm-run-actions::before {
  content: "";
  position: absolute;
  inset: -8px -12px -12px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(249,249,246,0.4) 0%, rgba(249,249,246,0.94) 34%, rgba(249,249,246,0.98) 100%);
  backdrop-filter: blur(12px);
  z-index: -1;
}

.ftm-run-v21 .ftm-run-actions .ftm-action-btn:nth-child(2),
.ftm-run-v21 .ftm-run-actions .ftm-focus-finish {
  justify-self: end;
}

.ftm-run-v21 .ftm-run-actions .ftm-focus-finish {
  display: none;
}

.ftm-run-v21 .ftm-run-actions .ftm-action-btn {
  min-height: 48px;
}

@media (max-width: 1180px) {
  .ftm-run-v21 {
    --ftm-run-companion-col: minmax(240px, 31%);
    --ftm-run-card-col: minmax(0, 69%);
    --ftm-run-companion-art: 112px;
    --ftm-run-bubble-max: 200px;
    --ftm-run-card-pad: 18px;
    --ftm-run-card-illus: 170px;
  }

  .ftm-run-v21 .ftm-run-header {
    gap: 14px;
  }

  .ftm-run-v21 .ftm-page-title {
    font-size: clamp(30px, 3.1vw, 44px);
  }

  .ftm-run-v21 .ftm-page-text {
    font-size: 17px;
  }
}

@media (max-width: 980px) {
  .ftm-run-v21 .ftm-run-shell {
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .ftm-run-v21 .ftm-run-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .ftm-run-v21 .ftm-run-header-right {
    justify-items: stretch;
  }

  .ftm-run-v21 .ftm-run-frame {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ftm-run-v21 .ftm-run-main {
    order: 1;
  }

  .ftm-run-v21 .ftm-run-companion {
    order: 2;
    padding-top: 0;
  }

  .ftm-run-v21 .ftm-run-card {
    overflow: visible;
  }

  .ftm-run-v21 .ftm-run-companion-card {
    gap: 8px;
  }

  .ftm-run-v21 .ftm-run-companion-scene {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .ftm-run-v21 .ftm-run-companion-image,
  .ftm-run-v21 .ftm-run-companion-placeholder {
    width: 82px;
  }

  .ftm-run-v21 .ftm-run-companion-bubble {
    max-width: 220px;
    font-size: 14px;
    padding: 12px 14px;
  }

  @media (max-width: 640px) {
  .ftm-run-v21 {
    --ftm-run-shell-pad: 14px;
  }

  .ftm-run-v21 .ftm-run-shell {
    padding: 14px;
    border-radius: 22px;
  }

  .ftm-run-v21 .ftm-run-header {
    margin-bottom: 10px;
  }

  .ftm-run-v21 .ftm-run-header-left,
  .ftm-run-v21 .ftm-run-header-right {
    gap: 8px;
  }

  .ftm-run-v21 .ftm-page-title {
    font-size: clamp(28px, 8vw, 36px);
  }

  .ftm-run-v21 .ftm-page-text {
    font-size: 15px;
  }

  .ftm-run-v21 .ftm-run-journey {
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    margin-bottom: 10px;
  }

  .ftm-run-v21 .ftm-run-journey-track {
    left: 18px;
    right: 18px;
    height: 4px;
  }

  .ftm-run-v21 .ftm-run-journey-stop {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .ftm-run-v21 .ftm-run-journey-stop.is-active {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .ftm-run-v21 .ftm-run-journey-icon {
    font-size: 20px;
  }

  .ftm-run-v21 .ftm-run-journey-stop.is-active .ftm-run-journey-icon {
    font-size: 24px;
  }

  .ftm-run-v21 .ftm-run-status-pill {
    min-height: 38px;
    font-size: 13px;
  }

  .ftm-run-v21 .ftm-run-frame {
    padding: 14px;
    gap: 12px;
    border-radius: 24px;
  }

  .ftm-run-v21 .ftm-run-companion-head {
    gap: 6px;
  }

  .ftm-run-v21 .ftm-run-companion-name {
    font-size: 13px;
  }

  .ftm-run-v21 .ftm-run-companion-badge {
    min-height: 28px;
    font-size: 10px;
    padding-inline: 9px;
  }

  .ftm-run-v21 .ftm-run-companion-scene {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .ftm-run-v21 .ftm-run-companion-image,
  .ftm-run-v21 .ftm-run-companion-placeholder {
    width: 68px;
  }

  .ftm-run-v21 .ftm-run-companion-bubble {
    max-width: 180px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 18px;
  }

  .ftm-run-v21 .ftm-run-companion-bubble::before {
    left: -6px;
    top: 18px;
    width: 10px;
    height: 10px;
  }

  .ftm-run-v21 .ftm-run-companion-helper {
    font-size: 10px;
    line-height: 1.35;
    max-width: 180px;
  }

  .ftm-run-v21 .ftm-run-card {
    padding: 16px;
    gap: 10px;
    border-radius: 24px;
  }

  .ftm-run-v21 .ftm-run-card-chip {
    min-height: 32px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .ftm-run-v21 .ftm-run-card-illustration-wrap {
    min-height: 160px;
    border-radius: 22px;
  }

  .ftm-run-v21 .ftm-run-card-step-icon {
    font-size: 74px;
  }

  .ftm-run-v21 .ftm-run-card-hero-icon {
    width: 72px;
    height: 72px;
    font-size: 58px;
    border-radius: 20px;
  }

  .ftm-run-v21 .ftm-run-card-title {
    font-size: clamp(26px, 10vw, 34px);
  }

  .ftm-run-v21 .ftm-run-card-text {
    font-size: 17px;
    max-width: 100%;
  }

  .ftm-run-v21 .ftm-run-card-step-main {
    font-size: clamp(26px, 12vw, 36px);
    max-width: 9ch;
  }

  .ftm-run-v21 .ftm-run-card-subtext,
  .ftm-run-v21 .ftm-run-card-hint {
    font-size: 14px;
    max-width: 100%;
  }

  .ftm-run-v21 .ftm-run-goal-card {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    gap: 12px;
  }

  .ftm-run-v21 .ftm-run-goal-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .ftm-run-v21 .ftm-run-goal-text {
    font-size: 18px;
  }

  .ftm-run-v21 .ftm-run-actions {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 10px -14px -14px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  }

  .ftm-run-v21 .ftm-run-actions .ftm-action-btn,
  .ftm-run-v21 .ftm-run-actions .ftm-focus-finish {
    width: 100%;
    justify-self: stretch;
    justify-content: center;
  }
}

}

/* v2.1.1 desktop refinements */
.ftm-run-v21 .ftm-run-companion-head {margin-bottom: 6px;}
.ftm-run-v21 .ftm-run-companion-media {padding-left: 10px;}
.ftm-run-v21 .ftm-run-companion-copy {align-self: center;}
.ftm-run-v21 .ftm-run-card-step {justify-items: center; align-content: center;}
.ftm-run-v21 .ftm-run-card-ritual .ftm-run-card-title {font-size: clamp(26px, 2.8vw, 40px);}
.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-title {font-size: clamp(30px, 3vw, 44px);}
.ftm-run-v21 .ftm-run-card-intro .ftm-run-card-title {font-size: clamp(34px, 3.4vw, 48px);}
.ftm-run-v21 .ftm-run-card-ritual .ftm-run-card-overline,
.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-overline,
.ftm-run-v21 .ftm-run-card-intro .ftm-run-card-overline {font-size: 13px;}
.ftm-run-v21 .ftm-run-card-ritual .ftm-run-card-text,
.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-text,
.ftm-run-v21 .ftm-run-card-intro .ftm-run-card-text {max-width: 620px;}
.ftm-run-v21 .ftm-run-card-step-main {max-width: 11ch;}
.ftm-run-v21 .ftm-run-goal-card {margin-top: 4px;}
.ftm-run-v21 .ftm-run-main {min-width: 0;}
.ftm-run-v21 .ftm-run-stage {min-width: 0;}
.ftm-run-v21 .ftm-run-companion-bubble {word-break: normal; text-wrap: balance;}

.ftm-run-v21 .ftm-run-companion {
  padding: 0 4px 0 2px;
}

.ftm-run-v21 .ftm-run-companion-scene {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.ftm-run-v21 .ftm-run-companion-image,
.ftm-run-v21 .ftm-run-companion-placeholder {
  width: min(100%, 236px);
}

.ftm-run-v21 .ftm-run-companion-copy {
  gap: 4px;
  align-content: center;
}

.ftm-run-v21 .ftm-run-companion-bubble {
  max-width: 176px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.15;
}

.ftm-run-v21 .ftm-run-card {
  padding: 18px 22px;
  gap: 10px;
  align-content: center;
}

.ftm-run-v21 .ftm-run-card-intro,
.ftm-run-v21 .ftm-run-card-completion {
  gap: 8px;
}

.ftm-run-v21 .ftm-run-card-intro .ftm-run-card-hero-icon,
.ftm-run-v21 .ftm-run-card-ritual .ftm-run-card-hero-icon,
.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-hero-icon {
  width: 60px;
  height: 60px;
  font-size: 42px;
  border-radius: 18px;
}

.ftm-run-v21 .ftm-run-card-intro .ftm-run-card-title {
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 0.98;
}

.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-title {
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 0.98;
}

.ftm-run-v21 .ftm-run-card-ritual .ftm-run-card-title {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.02;
}

.ftm-run-v21 .ftm-run-card-text {
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.22;
  max-width: 540px;
}

.ftm-run-v21 .ftm-run-card-hint {
  font-size: 14px;
  line-height: 1.35;
  max-width: 520px;
}

.ftm-run-v21 .ftm-run-goal-card {
  gap: 12px;
  padding: 10px 16px;
}

.ftm-run-v21 .ftm-run-goal-icon {
  width: 50px;
  height: 50px;
  font-size: 24px;
}

.ftm-run-v21 .ftm-run-goal-text {
  font-size: 18px;
}

.ftm-run-v21 .ftm-run-card-step-main {
  max-width: 10ch;
  font-size: clamp(34px, 3.4vw, 50px);
}

.ftm-run-v21 .ftm-run-card-step .ftm-run-card-illustration-wrap {
  min-height: 132px;
  width: min(100%, 360px);
  margin-bottom: 0;
}

.ftm-run-v21 .ftm-run-card-step .ftm-run-card-step-icon {
  font-size: 72px;
}

.ftm-run-v21 .ftm-run-card-step .ftm-run-card-hint,
.ftm-run-v21 .ftm-run-card-step .ftm-run-card-subtext {
  display: none;
}

.ftm-run-v21 .ftm-run-main,
.ftm-run-v21 .ftm-run-stage,
.ftm-run-v21 .ftm-run-card {
  overflow: hidden;
}

.ftm-run-v21 .ftm-feedback-row-centered {
  margin-top: 4px;
}

.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-text {
  max-width: 620px;
}


/* v2.1.3 desktop intro/completion + companion refinement */
.ftm-run-v21 .ftm-run-companion-scene {
  grid-template-columns: minmax(210px, 270px) minmax(0, 190px);
  gap: 12px;
}

.ftm-run-v21 .ftm-run-companion-image,
.ftm-run-v21 .ftm-run-companion-placeholder {
  width: min(100%, 270px);
}

.ftm-run-v21 .ftm-run-companion-copy {
  align-self: center;
  gap: 0;
}

.ftm-run-v21 .ftm-run-companion-bubble {
  max-width: 168px;
  margin-top: -4px;
}

.ftm-run-v21 .ftm-run-card-intro,
.ftm-run-v21 .ftm-run-card-completion {
  align-content: start;
  justify-items: center;
  padding-top: 28px;
  gap: 10px;
}

.ftm-run-v21 .ftm-run-card-intro .ftm-run-card-hero-icon,
.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-hero-icon {
  margin-top: 0;
  width: 52px;
  height: 52px;
  font-size: 36px;
  border-radius: 16px;
}

.ftm-run-v21 .ftm-run-card-intro .ftm-run-card-overline,
.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-overline {
  max-width: 560px;
  text-align: center;
}

.ftm-run-v21 .ftm-run-card-intro .ftm-run-card-text {
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.22;
  max-width: 640px;
  margin-top: 4px;
}

.ftm-run-v21 .ftm-run-card-intro .ftm-run-goal-card {
  margin-top: 6px;
}

.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-title {
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.02;
}

.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-text {
  font-size: clamp(18px, 1.9vw, 26px);
  line-height: 1.24;
  max-width: 660px;
}

.ftm-run-v21 .ftm-run-card-completion .ftm-run-card-hint {
  font-size: 13px;
  margin-top: 2px;
}

.ftm-run-v21 .ftm-run-card-completion .ftm-feedback-row-centered {
  margin-top: 2px;
}


/* v2.1.4 warmer, integrated right run surface */
.ftm-run-v21 .ftm-run-main {
  align-items: stretch;
  min-height: 0;
}

.ftm-run-v21 .ftm-run-stage,
.ftm-run-v21 .ftm-run-stage.is-active {
  height: 100%;
}

.ftm-run-v21 .ftm-run-card {
  width: 100%;
  height: 100%;
  padding: 24px 26px 24px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(250, 248, 242, 0.88) 0%, rgba(246, 243, 235, 0.84) 100%);
  border: 1px solid rgba(223, 211, 193, 0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -1px 0 rgba(233,226,212,0.18);
}

.ftm-run-v21 .ftm-run-card-intro,
.ftm-run-v21 .ftm-run-card-ritual,
.ftm-run-v21 .ftm-run-card-completion,
.ftm-run-v21 .ftm-run-card-step {
  background: linear-gradient(180deg, rgba(252, 249, 243, 0.90) 0%, rgba(247, 244, 236, 0.86) 100%);
}

.ftm-run-v21 .ftm-run-card-intro,
.ftm-run-v21 .ftm-run-card-completion {
  padding-top: 22px;
  gap: 8px;
}

.ftm-run-v21 .ftm-run-card-intro .ftm-run-card-text {
  max-width: 700px;
}

.ftm-run-v21 .ftm-run-goal-card {
  background: rgba(248, 244, 234, 0.92);
  border: 1px solid rgba(223, 211, 193, 0.6);
}


/* v2.1.5 run blueprint: companion + intro/completion refinement */
.ftm-run-v2 {
  --ftm-run-card: rgba(250,247,241,0.84);
  --ftm-run-card-soft: rgba(246,241,232,0.86);
}
.ftm-run-v2 .ftm-run-frame {
  gap: 22px;
}
.ftm-run-v2 .ftm-run-companion-scene {
  grid-template-columns: minmax(168px, 210px) minmax(0, 1fr);
  gap: 14px;
  min-height: 340px;
}
.ftm-run-v2 .ftm-run-companion-media {
  align-items: center;
  justify-content: flex-end;
}
.ftm-run-v2 .ftm-run-companion-image,
.ftm-run-v2 .ftm-run-companion-placeholder {
  width: 178px;
}
.ftm-run-v2 .ftm-run-companion-copy {
  align-content: center;
  justify-items: start;
}
.ftm-run-v2 .ftm-run-companion-bubble {
  max-width: 250px;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.24;
}
.ftm-run-v2 .ftm-run-card {
  background: linear-gradient(180deg, rgba(252,249,243,0.96) 0%, rgba(247,242,233,0.96) 100%);
  border-color: rgba(226, 214, 194, 0.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 10px 26px rgba(31,55,109,0.04);
}
.ftm-run-v2 .ftm-run-card-intro,
.ftm-run-v2 .ftm-run-card-completion {
  min-height: 500px;
  gap: 12px;
  padding: 28px 28px 30px;
}
.ftm-run-v2 .ftm-run-card-intro {
  align-content: center;
}
.ftm-run-v2 .ftm-run-card-completion {
  align-content: center;
}
.ftm-run-v2 .ftm-run-card-hero-icon {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  font-size: 60px;
  background: rgba(255,252,247,0.9);
}
.ftm-run-v2 .ftm-run-card-intro .ftm-run-card-hero-icon {
  margin-bottom: 2px;
}
.ftm-run-v2 .ftm-run-card-completion .ftm-run-card-hero-icon {
  margin-bottom: 0;
}
.ftm-run-v2 .ftm-run-card-title {
  font-size: clamp(30px, 3.2vw, 42px);
}
.ftm-run-v2 .ftm-run-card-intro-text {
  max-width: 700px;
  font-size: clamp(22px, 2.15vw, 30px);
  line-height: 1.24;
}
.ftm-run-v2 .ftm-run-card-completion .ftm-run-card-text {
  max-width: 720px;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.35;
}
.ftm-run-v2 .ftm-run-goal-card {
  gap: 14px;
  padding: 14px 22px;
  border-radius: 22px;
  background: rgba(247,243,234,0.96);
}
.ftm-run-v2 .ftm-run-goal-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  font-size: 30px;
}
.ftm-run-v2 .ftm-run-goal-label {
  font-size: 11px;
}
.ftm-run-v2 .ftm-run-goal-text {
  font-size: 22px;
}
.ftm-run-v2 .ftm-run-card-completion .ftm-feedback-row {
  margin-top: 8px;
}
@media (max-width: 1100px) {
  .ftm-run-v2 .ftm-run-companion-scene {
    grid-template-columns: 150px 1fr;
    min-height: auto;
  }
  .ftm-run-v2 .ftm-run-companion-image,
  .ftm-run-v2 .ftm-run-companion-placeholder {
    width: 160px;
  }
}


/* v2.1.6 desktop stability pass: no hard clipping, right stage flexible */
@media (min-width: 981px) {
  .ftm-run-v21 .ftm-run-shell {
    min-height: auto;
    max-height: none;
    overflow: visible;
    gap: 0;
  }

  .ftm-run-v21 .ftm-run-header {
    margin-bottom: 10px;
  }

  .ftm-run-v21 .ftm-run-journey {
    margin-bottom: 10px;
  }

  .ftm-run-v21 .ftm-run-status-line {
    margin-bottom: 10px;
  }

  .ftm-run-v21 .ftm-run-frame {
    min-height: auto;
    overflow: visible;
    align-items: stretch;
    padding: 16px 18px;
    gap: 20px;
  }

  .ftm-run-v21 .ftm-run-companion,
  .ftm-run-v21 .ftm-run-main,
  .ftm-run-v21 .ftm-run-stage,
  .ftm-run-v21 .ftm-run-card {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .ftm-run-v21 .ftm-run-main {
    display: block;
  }

  .ftm-run-v21 .ftm-run-stage,
  .ftm-run-v21 .ftm-run-stage.is-active {
    display: block;
    width: 100%;
  }

  .ftm-run-v21 .ftm-run-card {
    padding: 18px 24px 20px;
    gap: 10px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(248,245,238,0.94) 0%, rgba(244,239,231,0.92) 100%);
    border: 1px solid rgba(220,208,187,0.48);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 10px 24px rgba(31,55,109,0.035);
  }

  .ftm-run-v21 .ftm-run-card-intro,
  .ftm-run-v21 .ftm-run-card-ritual,
  .ftm-run-v21 .ftm-run-card-completion,
  .ftm-run-v21 .ftm-run-card-step {
    min-height: auto;
  }

  .ftm-run-v21 .ftm-run-card-intro,
  .ftm-run-v21 .ftm-run-card-completion {
    align-content: center;
    justify-items: center;
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 8px;
  }

  .ftm-run-v21 .ftm-run-card-ritual {
    align-content: center;
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 8px;
  }

  .ftm-run-v21 .ftm-run-card-step {
    align-content: center;
    justify-items: center;
    gap: 10px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .ftm-run-v21 .ftm-run-card-step .ftm-run-card-illustration-wrap {
    min-height: 118px;
    width: min(100%, 340px);
    margin-bottom: 0;
  }

  .ftm-run-v21 .ftm-run-card-step .ftm-run-card-step-icon {
    font-size: 64px;
  }

  .ftm-run-v21 .ftm-run-card-step-main {
    font-size: clamp(28px, 2.8vw, 42px);
    max-width: 10ch;
  }

  .ftm-run-v21 .ftm-run-card-intro .ftm-run-card-hero-icon,
  .ftm-run-v21 .ftm-run-card-ritual .ftm-run-card-hero-icon,
  .ftm-run-v21 .ftm-run-card-completion .ftm-run-card-hero-icon {
    width: 56px;
    height: 56px;
    font-size: 40px;
    border-radius: 18px;
  }

  .ftm-run-v21 .ftm-run-card-intro .ftm-run-card-text {
    font-size: clamp(18px, 1.8vw, 26px);
    line-height: 1.22;
    max-width: 700px;
    margin-top: 0;
  }

  .ftm-run-v21 .ftm-run-card-completion .ftm-run-card-title {
    font-size: clamp(22px, 2.2vw, 34px);
    line-height: 1.02;
  }

  .ftm-run-v21 .ftm-run-card-completion .ftm-run-card-text {
    font-size: clamp(17px, 1.7vw, 24px);
    line-height: 1.28;
    max-width: 660px;
  }

  .ftm-run-v21 .ftm-run-card-completion .ftm-feedback-row-centered {
    margin-top: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .ftm-run-v21 .ftm-run-goal-card {
    margin-top: 2px;
    padding: 10px 16px;
    gap: 12px;
  }

  .ftm-run-v21 .ftm-run-goal-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .ftm-run-v21 .ftm-run-goal-text {
    font-size: 18px;
  }

  .ftm-run-v21 .ftm-run-companion-scene {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: auto;
  }

  .ftm-run-v21 .ftm-run-companion-image,
  .ftm-run-v21 .ftm-run-companion-placeholder {
    width: min(100%, 206px);
  }

  .ftm-run-v21 .ftm-run-companion-bubble {
    max-width: 170px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.16;
  }

  .ftm-run-v21 .ftm-run-actions {
    padding-top: 4px;
  }
}

.ftm-section-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ftm-card-actions-secondary {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ftm-context-summary-card-companion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 18px;
  min-height: 148px;
}

.ftm-companion-summary-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
}

.ftm-companion-avatar-wrap-hero {
  width: 132px;
  height: 132px;
  border-radius: 32px;
  flex: 0 0 132px;
  justify-self: end;
}


.ftm-editor-shell,
.ftm-editor-section {
  display: grid;
  gap: 18px;
}

.ftm-editor-shell {
  background: linear-gradient(180deg, #fffdf7 0%, #f6fbff 100%);
  border: 1px solid #ece6da;
  border-radius: 32px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(67, 56, 31, 0.08);
}

.ftm-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ftm-editor-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ftm-editor-grid {
  display: grid;
  gap: 16px;
}

.ftm-editor-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ftm-editor-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ftm-editor-grid-step {
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
}

.ftm-field-block {
  display: grid;
  gap: 8px;
}

.ftm-field-block > span {
  font-size: 13px;
  font-weight: 700;
  color: #6c5c3a;
}

.ftm-field-block input,
.ftm-field-block select,
.ftm-field-block textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d9deeb;
  background: #fff;
  color: #25314f;
  font-size: 15px;
  box-sizing: border-box;
}

.ftm-field-block textarea {
  min-height: 92px;
  resize: vertical;
}

.ftm-field-hint {
  color: #70819a;
  font-size: 12px;
  line-height: 1.45;
}

.ftm-editor-steps {
  display: grid;
  gap: 14px;
}

.ftm-editor-step {
  display: grid;
  gap: 14px;
  border: 1px solid #e5dfd3;
  border-radius: 22px;
  padding: 16px;
  background: rgba(255,255,255,0.82);
}

.ftm-editor-step-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.ftm-editor-step-head h4 {
  margin: 0;
  color: #1f3154;
  font-size: 18px;
}

.ftm-editor-step-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ftm-step-mini-btn {
  border: 1px solid #d7dced;
  background: #fff;
  color: #35507f;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}

.ftm-step-mini-btn-danger {
  color: #a23f46;
}

.ftm-field-block-span-2 {
  grid-column: span 2;
}

.ftm-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  color: #25314f;
}

@media (max-width: 980px) {
  .ftm-editor-grid-4,
  .ftm-editor-grid-2,
  .ftm-editor-grid-step {
    grid-template-columns: 1fr;
  }

  .ftm-field-block-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .ftm-context-summary-card-companion {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .ftm-companion-avatar-wrap-hero {
    width: 96px;
    height: 96px;
    justify-self: start;
  }
}


.ftm-context-summary-card-companion .ftm-context-summary-value {
  margin-bottom: 2px;
}


/* v2.2.3 verification fix: dashboard companion card + step title width */
.ftm-context-summary-card-companion {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 148px !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 156px !important;
}

.ftm-context-summary-card-companion .ftm-companion-summary-copy {
  grid-column: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-self: center !important;
  min-width: 0 !important;
}

.ftm-context-summary-card-companion .ftm-companion-avatar-wrap-hero {
  grid-column: 2 !important;
  justify-self: end !important;
  align-self: center !important;
  width: 148px !important;
  height: 148px !important;
  margin: 0 !important;
  border-radius: 34px !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ftm-context-summary-card-companion .ftm-companion-avatar-wrap-hero .ftm-companion-avatar {
  width: 126% !important;
  height: 126% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
}

.ftm-run-v21 .ftm-run-card-step-main {
  width: 100% !important;
  max-width: none !important;
  padding-inline: 12px !important;
  text-wrap: pretty !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

@media (max-width: 760px) {
  .ftm-context-summary-card-companion {
    grid-template-columns: minmax(0, 1fr) 104px !important;
    min-height: 132px !important;
  }

  .ftm-context-summary-card-companion .ftm-companion-avatar-wrap-hero {
    width: 104px !important;
    height: 104px !important;
    justify-self: end !important;
  }
}

/* v2.3.1: Embed-/Popup-Modus für Kalenderstart */
.ftm-run-embed {
  margin: 0;
  padding: clamp(10px, 2vw, 18px);
  background: transparent;
}

.ftm-run-embed .ftm-run-shell {
  max-width: 1040px;
  margin: 0 auto;
  min-height: min(760px, calc(100vh - 40px));
  border-radius: 28px;
  overflow: hidden;
}

.ftm-run-embed .ftm-run-header {
  padding-top: clamp(14px, 2vw, 22px);
  padding-bottom: clamp(10px, 1.5vw, 16px);
}

.ftm-run-embed .ftm-run-header-left {
  gap: 10px;
}

.ftm-run-embed .ftm-hero-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.11em;
}

.ftm-run-embed .ftm-page-title {
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
}

.ftm-run-embed .ftm-page-text {
  margin-bottom: 0;
}

.ftm-run-embed .ftm-run-frame {
  min-height: 0;
}

.ftm-run-embed .ftm-run-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding-top: 14px;
  padding-bottom: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.96));
  backdrop-filter: blur(10px);
}

.ftm-run-embed .ftm-run-fallback-link {
  opacity: 0.78;
}

.ftm-run-embed-finish-note {
  margin: 14px auto 0;
  max-width: 560px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(47, 57, 78, 0.72);
  text-align: center;
}

.ftm-run-shell.is-completed .ftm-run-actions::before {
  content: "Übergang geschafft 🌟";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 8px 20px rgba(36, 45, 64, 0.08);
  font-weight: 800;
  color: #2f394e;
}

@media (max-width: 760px) {
  .ftm-run-embed {
    padding: 0;
  }

  .ftm-run-embed .ftm-run-shell {
    border-radius: 0;
    min-height: 100vh;
  }

  .ftm-run-embed .ftm-run-header-right {
    align-items: flex-start;
  }

  .ftm-run-embed .ftm-run-actions {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Embed-Seite: möglichst nur den Übergang im iframe zeigen */
body.ftm-transition-embed-mode {
  background: transparent !important;
}

body.ftm-transition-embed-mode #wpadminbar,
body.ftm-transition-embed-mode .site-header,
body.ftm-transition-embed-mode .site-footer,
body.ftm-transition-embed-mode header.site-header,
body.ftm-transition-embed-mode footer.site-footer,
body.ftm-transition-embed-mode #masthead,
body.ftm-transition-embed-mode #colophon,
body.ftm-transition-embed-mode .ast-primary-header-bar,
body.ftm-transition-embed-mode .ast-mobile-header-wrap,
body.ftm-transition-embed-mode .ast-above-header-wrap,
body.ftm-transition-embed-mode .ast-below-header-wrap,
body.ftm-transition-embed-mode .entry-header,
body.ftm-transition-embed-mode .entry-title,
body.ftm-transition-embed-mode .post-navigation,
body.ftm-transition-embed-mode .comments-area {
  display: none !important;
}

body.ftm-transition-embed-mode .site-content,
body.ftm-transition-embed-mode .content-area,
body.ftm-transition-embed-mode .entry-content,
body.ftm-transition-embed-mode .ast-container,
body.ftm-transition-embed-mode .wp-site-blocks {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

body.ftm-transition-embed-mode .entry-content > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Familymap Übergangsmodul v2.3.2 – ruhiger Schritt-Timer */
.ftm-run-v21 .ftm-run-step-timer {
  width: min(100%, 620px);
  margin: 6px auto 0;
  padding: 12px 14px 13px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(69, 116, 93, 0.16);
  box-shadow: 0 12px 28px rgba(57, 82, 70, 0.08);
}

.ftm-run-v21 .ftm-run-step-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #355c49;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.ftm-run-v21 .ftm-run-step-timer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 245, 218, 0.92);
}

.ftm-run-v21 .ftm-run-step-timer-label {
  margin-left: auto;
  text-align: right;
  color: #486653;
}

.ftm-run-v21 .ftm-run-step-timer-track {
  position: relative;
  width: 100%;
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(217, 228, 218, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.86);
}

.ftm-run-v21 .ftm-run-step-timer-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(127, 173, 139, 0.95), rgba(253, 210, 112, 0.9));
  transition: width 0.18s linear;
}

.ftm-run-v21 .ftm-run-step-timer.is-finished {
  background: rgba(252, 249, 240, 0.88);
}

.ftm-run-v21 .ftm-run-step-timer.is-finished .ftm-run-step-timer-fill {
  width: 0%;
}

.ftm-run-v21 .ftm-run-step-timer.is-finished .ftm-run-step-timer-label::before {
  content: "✓ ";
}

@media (max-width: 760px) {
  .ftm-run-v21 .ftm-run-step-timer {
    padding: 10px 12px 11px;
    margin-top: 4px;
  }

  .ftm-run-v21 .ftm-run-step-timer-track {
    height: 11px;
  }
}

/* Familymap Übergangsmodul v2.3.4 – sichtbarer kindgerechter Balken-Timer */
.ftm-run-v21 .ftm-run-step-timer,
.ftm-run-step-timer {
  width: min(100%, 640px) !important;
  margin: 4px auto 0 !important;
  padding: 15px 16px 13px !important;
  border-radius: 26px !important;
  background: linear-gradient(180deg, rgba(255, 252, 243, 0.95) 0%, rgba(248, 244, 232, 0.94) 100%) !important;
  border: 1px solid rgba(215, 199, 168, 0.72) !important;
  box-shadow: 0 14px 30px rgba(57, 82, 70, 0.1) !important;
  box-sizing: border-box !important;
}

.ftm-run-v21 .ftm-run-step-timer-track,
.ftm-run-step-timer-track {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: 24px !important;
  min-height: 24px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: rgba(223, 232, 220, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: inset 0 2px 6px rgba(45, 69, 53, 0.08), 0 2px 8px rgba(57, 82, 70, 0.05) !important;
}

.ftm-run-v21 .ftm-run-step-timer-fill,
.ftm-run-step-timer-fill {
  display: block !important;
  width: 100%;
  height: 100% !important;
  min-height: 24px !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, rgba(111, 166, 126, 0.98), rgba(250, 211, 118, 0.96)) !important;
  transition: width 0.22s linear !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45) !important;
}

.ftm-run-v21 .ftm-run-step-timer-row,
.ftm-run-step-timer-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 9px 0 0 !important;
  color: #3d604b !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  letter-spacing: 0.02em !important;
  text-align: center !important;
}

.ftm-run-v21 .ftm-run-step-timer-icon,
.ftm-run-step-timer-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  border-radius: 999px !important;
  background: rgba(239, 247, 231, 0.96) !important;
}

.ftm-run-v21 .ftm-run-step-timer-label,
.ftm-run-step-timer-label {
  margin-left: 0 !important;
  text-align: center !important;
  color: #3d604b !important;
  white-space: nowrap !important;
}

.ftm-run-v21 .ftm-run-step-timer.is-finished,
.ftm-run-step-timer.is-finished {
  background: linear-gradient(180deg, rgba(252, 249, 240, 0.98) 0%, rgba(247, 241, 228, 0.95) 100%) !important;
}

.ftm-run-v21 .ftm-run-step-timer.is-finished .ftm-run-step-timer-fill,
.ftm-run-step-timer.is-finished .ftm-run-step-timer-fill {
  width: 0% !important;
}

.ftm-run-v21 .ftm-run-step-timer.is-finished .ftm-run-step-timer-label::before,
.ftm-run-step-timer.is-finished .ftm-run-step-timer-label::before {
  content: "✓ ";
}

@media (max-width: 760px) {
  .ftm-run-v21 .ftm-run-step-timer,
  .ftm-run-step-timer {
    padding: 12px 13px 11px !important;
    border-radius: 22px !important;
  }

  .ftm-run-v21 .ftm-run-step-timer-track,
  .ftm-run-step-timer-track {
    height: 20px !important;
    min-height: 20px !important;
  }

  .ftm-run-v21 .ftm-run-step-timer-fill,
  .ftm-run-step-timer-fill {
    min-height: 20px !important;
  }
}

/* v2.3.8: Kalender-Verknüpfung – Core-Status und Konfliktwarnung */
.ftm-calendar-core-status {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f6fbf8;
  border: 1px solid #dceee4;
  color: #3f5d56;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.ftm-calendar-conflict-warning {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff7e8;
  border: 1px solid #f1d6a8;
  color: #7a4b1f;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.ftm-calendar-conflict-warning[hidden] {
  display: none !important;
}


/* v2.3.9 – Belohnungsoption nach eingebettetem Übergang */
.ftm-run-v21 .ftm-run-reward-btn,
.ftm-run-reward-btn {
  background: linear-gradient(135deg, #fff7d8, #f0fff2) !important;
  color: #17324d !important;
  border: 1px solid rgba(111, 166, 126, 0.34) !important;
  box-shadow: 0 10px 22px rgba(45, 69, 53, 0.10);
}
.ftm-run-v21 .ftm-run-reward-btn::before,
.ftm-run-reward-btn::before {
  content: '⭐';
  margin-right: 6px;
}
/* Familymap symbol keys in the guided transition run-card */
.ftm-run-v21 .ftm-run2-icon-text .fm-svg-icon,
.ftm-run-v2 .ftm-run2-icon-text .fm-svg-icon {
  width: 1em;
  height: 1em;
  display: block;
  margin: 0 auto;
}
.ftm-run-v21 .ftm-run2-icon-text .fm-symbol-img,
.ftm-run-v2 .ftm-run2-icon-text .fm-symbol-img {
  width: 1.45em;
  height: 1.45em;
  display: block;
  margin: 0 auto;
}

/* Familymap Hilfestellung: Einordnung / So geht's */
.ftm-help-strip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-top: 8px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(55, 88, 91, 0.14);
  box-shadow: 0 10px 24px rgba(40, 65, 69, 0.08);
}

.ftm-help-strip__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 2px;
  color: #617179;
  font-size: 13px;
  font-weight: 800;
}

.ftm-help-strip__label span,
.ftm-help-steps span {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #26776f, #4f9f94);
  box-shadow: 0 8px 18px rgba(38, 119, 111, 0.18);
}

.ftm-help-strip__label span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

.ftm-help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ftm-help-links a,
.ftm-help-links a:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #3f5360;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(55, 88, 91, 0.14);
  box-shadow: 0 8px 18px rgba(40, 54, 70, 0.05);
  transition: transform 0.18s ease, background 0.18s ease;
}

.ftm-help-links a:hover,
.ftm-help-links a:focus-visible {
  transform: translateY(-1px);
  background: #fff;
}

.ftm-help-links span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #26776f;
  background: rgba(223, 242, 236, 0.84);
  font-size: 13px;
  line-height: 1;
}

.ftm-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  visibility: hidden;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 46px);
}

.ftm-help-overlay:target {
  display: flex;
  visibility: visible;
  pointer-events: auto;
}

.ftm-help-backdrop {
  position: absolute;
  inset: 0;
  display: block;
  background: rgba(34, 49, 58, 0.46);
  backdrop-filter: blur(8px);
}

.ftm-help-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(84vh, 820px);
  overflow: auto;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 242, 0.94));
  box-shadow: 0 30px 90px rgba(34, 49, 58, 0.24);
}

.ftm-help-close,
.ftm-help-close:visited {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #1f3154;
  text-decoration: none;
  font-size: 26px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(55, 88, 91, 0.14);
}

.ftm-help-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #26776f;
  background: rgba(223, 242, 236, 0.84);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ftm-help-panel h2 {
  margin: 12px 48px 12px 0;
  max-width: 780px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  color: #1f3154;
}

.ftm-help-lead {
  max-width: 760px;
  margin: 0 0 22px;
  color: #60718d;
  font-size: 17px;
  line-height: 1.65;
}

.ftm-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.ftm-help-grid > div,
.ftm-help-steps > div {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(55, 88, 91, 0.12);
}

.ftm-help-grid h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: #1f3154;
}

.ftm-help-grid p,
.ftm-help-grid li,
.ftm-help-steps p {
  color: #60718d;
  line-height: 1.56;
}

.ftm-help-grid ul {
  margin: 0;
  padding-left: 20px;
}

.ftm-help-grid li + li {
  margin-top: 6px;
}

.ftm-help-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ftm-help-steps > div {
  display: grid;
  align-content: start;
  gap: 8px;
}

.ftm-help-steps span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-weight: 850;
}

.ftm-help-steps strong {
  color: #1f3154;
  font-size: 16px;
  line-height: 1.25;
}

.ftm-help-steps p {
  margin: 0;
  font-size: 14px;
}

.ftm-help-visual-placeholder {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(223, 242, 236, 0.72));
}

.ftm-help-visual-placeholder > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 16px;
  color: #26776f;
  background: rgba(223, 242, 236, 0.84);
  font-size: 20px;
  font-weight: 850;
}

@media (max-width: 1020px) {
  .ftm-help-grid,
  .ftm-help-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ftm-help-strip {
    display: grid;
    width: 100%;
    gap: 9px;
  }

  .ftm-help-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ftm-help-links a,
  .ftm-help-links a:visited {
    padding: 8px 10px;
    font-size: 13px;
  }

  .ftm-help-panel {
    border-radius: 24px;
    padding: 22px;
  }

.ftm-help-panel h2 {
    margin-right: 42px;
  }
}

/* Familymap Übergangseditor: ruhigere Arbeitsstruktur */
.ftm-editor-shell {
  background: linear-gradient(145deg, #fffaf2 0%, #eef8f5 58%, #fbf6ff 100%);
  border-color: rgba(55, 88, 91, 0.12);
  box-shadow: 0 22px 58px rgba(40, 65, 69, 0.12);
}

.ftm-editor-toolbar {
  position: sticky;
  top: 34px;
  z-index: 40;
  padding: 10px;
  border: 1px solid rgba(55, 88, 91, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(40, 65, 69, 0.08);
  backdrop-filter: blur(10px);
}

.ftm-editor-toolbar-bottom {
  top: auto;
  position: static;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.82);
}

.ftm-editor-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ftm-editor-guide > div {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 112px;
  padding: 15px;
  border-radius: 22px;
  border: 1px solid rgba(55, 88, 91, 0.12);
  background: rgba(255, 255, 255, 0.74);
}

.ftm-editor-guide span,
.ftm-editor-section-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #26776f, #4f9f94);
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(38, 119, 111, 0.16);
}

.ftm-editor-guide strong {
  color: #1f3154;
  font-size: 15px;
  line-height: 1.25;
}

.ftm-editor-guide p {
  margin: 0;
  color: #60718d;
  font-size: 13px;
  line-height: 1.45;
}

.ftm-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: start;
  gap: 20px;
}

.ftm-editor-main-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.ftm-editor-section {
  position: relative;
  gap: 20px;
  padding: 24px;
  border-color: rgba(55, 88, 91, 0.12);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(40, 65, 69, 0.07);
}

.ftm-editor-section .ftm-section-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(55, 88, 91, 0.12);
}

.ftm-editor-section .ftm-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(22px, 2.4vw, 30px);
  color: #1f3154;
}

.ftm-editor-section .ftm-page-text {
  max-width: 780px;
  margin-top: 8px;
  color: #60718d;
}

.ftm-editor-grid {
  gap: 18px;
}

.ftm-editor-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ftm-editor-grid-step {
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.9fr));
}

.ftm-field-block {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(55, 88, 91, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.ftm-field-block > span {
  color: #31464d;
  font-size: 13px;
  font-weight: 850;
}

.ftm-field-block input,
.ftm-field-block select,
.ftm-field-block textarea {
  min-height: 50px;
  border-radius: 15px;
  border-color: rgba(55, 88, 91, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.ftm-field-block select {
  height: auto;
  min-height: 52px;
  padding-top: 13px;
  padding-bottom: 13px;
  line-height: 1.45;
  overflow: visible;
}

.ftm-field-block input:focus,
.ftm-field-block select:focus,
.ftm-field-block textarea:focus {
  outline: none;
  border-color: rgba(79, 159, 148, 0.58);
  box-shadow: 0 0 0 4px rgba(79, 159, 148, 0.13);
}

.ftm-calendar-link-block {
  grid-column: 1 / -1;
}

.ftm-editor-step {
  padding: 18px;
  border-color: rgba(55, 88, 91, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(238, 248, 245, 0.58));
  box-shadow: 0 10px 24px rgba(40, 65, 69, 0.06);
}

.ftm-editor-step-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(55, 88, 91, 0.1);
}

.ftm-editor-step-head h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
}

.ftm-editor-step-head h4 span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  color: #26776f;
  background: rgba(223, 242, 236, 0.86);
}

.ftm-step-mini-btn {
  border-color: rgba(55, 88, 91, 0.14);
  border-radius: 999px;
  color: #26776f;
  background: rgba(255, 255, 255, 0.9);
}

.ftm-step-mini-btn-danger {
  color: #a93759;
  background: #fff2f4;
  border-color: #f0cad7;
}

.ftm-editor-preview-card {
  position: sticky;
  top: 124px;
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(55, 88, 91, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 242, 0.88));
  box-shadow: 0 18px 44px rgba(40, 65, 69, 0.11);
}

.ftm-editor-preview-kicker {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  color: #26776f;
  background: rgba(223, 242, 236, 0.84);
  font-size: 12px;
  font-weight: 850;
}

.ftm-editor-preview-icon {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff3dd 0%, #edf7f4 100%);
  box-shadow: inset 0 0 0 1px rgba(228, 218, 200, 0.8);
  font-size: 44px;
}

.ftm-editor-preview-card h3 {
  margin: 0;
  color: #1f3154;
  font-size: 25px;
  line-height: 1.15;
}

.ftm-editor-preview-card p {
  margin: 0;
  color: #60718d;
  line-height: 1.55;
}

.ftm-editor-preview-goal {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  background: rgba(255, 247, 216, 0.85);
  border: 1px solid rgba(244, 185, 111, 0.24);
  color: #1f3154;
}

.ftm-editor-preview-steps {
  display: grid;
  gap: 9px;
}

.ftm-editor-preview-steps > div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(238, 248, 245, 0.65);
}

.ftm-editor-preview-steps span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: #fff;
  font-size: 21px;
}

.ftm-editor-preview-steps em {
  min-width: 0;
  color: #31464d;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.ftm-editor-preview-note {
  padding-top: 12px;
  border-top: 1px solid rgba(55, 88, 91, 0.12);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .ftm-editor-layout {
    grid-template-columns: 1fr;
  }

  .ftm-editor-preview-card {
    position: static;
    order: -1;
  }
}

@media (max-width: 980px) {
  .ftm-editor-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ftm-editor-grid-4,
  .ftm-editor-grid-2,
  .ftm-editor-grid-step {
    grid-template-columns: 1fr;
  }

  .ftm-calendar-link-block,
  .ftm-field-block-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .ftm-editor-shell {
    padding: 16px;
    border-radius: 24px;
  }

  .ftm-editor-toolbar {
    position: static;
  }

  .ftm-editor-guide {
    grid-template-columns: 1fr;
  }

  .ftm-editor-section,
  .ftm-editor-preview-card {
    padding: 18px;
    border-radius: 22px;
  }

  .ftm-editor-section .ftm-section-title {
    align-items: flex-start;
    font-size: 22px;
  }
}

/* Familymap Übergangsdurchführung: Begleiter fest bei der aktuellen Karte */
.ftm-run-v21 {
  max-width: 100% !important;
  overflow-x: clip !important;
}

.ftm-run-v21 .ftm-run-shell {
  max-width: 100% !important;
  overflow-x: clip !important;
}

.ftm-run-v21 .ftm-run-frame {
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: clamp(16px, 2vw, 24px) !important;
  padding: clamp(16px, 2vw, 24px) !important;
  overflow: visible !important;
}

.ftm-run-v21 .ftm-run-companion {
  align-self: stretch !important;
  display: grid !important;
  min-width: 0 !important;
  padding: 0 !important;
}

.ftm-run-v21 .ftm-run-companion-scene {
  position: sticky !important;
  top: 18px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto auto !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 14px !important;
  min-height: 100% !important;
  padding: 22px 18px !important;
  border-radius: 30px !important;
  border: 1px solid rgba(55, 88, 91, 0.13) !important;
  background: linear-gradient(180deg, rgba(255, 252, 243, 0.96) 0%, rgba(238, 248, 245, 0.9) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 16px 38px rgba(40,65,69,0.09) !important;
}

.ftm-run-v21 .ftm-run-companion-media {
  display: grid !important;
  place-items: center !important;
  justify-content: center !important;
  justify-items: center !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0 !important;
}

.ftm-run-v21 .ftm-run-companion-image,
.ftm-run-v21 .ftm-run-companion-placeholder {
  width: min(100%, 220px) !important;
  max-height: 260px !important;
  object-fit: contain !important;
  justify-self: center !important;
  margin-inline: auto !important;
}

.ftm-run-v21 .ftm-run-companion-copy {
  display: grid !important;
  justify-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
}

.ftm-run-v21 .ftm-run-companion-bubble {
  position: relative !important;
  width: min(100%, 250px) !important;
  max-width: 250px !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  border-radius: 22px !important;
  background: #fff !important;
  color: #25314f !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  text-align: center !important;
  box-shadow: 0 12px 26px rgba(40,65,69,0.09) !important;
}

.ftm-run-v21 .ftm-run-companion-bubble::before {
  left: 50% !important;
  top: -7px !important;
  width: 14px !important;
  height: 14px !important;
  transform: translateX(-50%) rotate(45deg) !important;
  background: #fff !important;
}

.ftm-run-v21 .ftm-run-main {
  align-items: stretch !important;
  min-width: 0 !important;
}

.ftm-run-v21 .ftm-run-stage,
.ftm-run-v21 .ftm-run-stage.is-active {
  width: 100% !important;
  min-width: 0 !important;
}

.ftm-run-v21 .ftm-run-stage {
  display: none !important;
  height: auto !important;
}

.ftm-run-v21 .ftm-run-stage.is-active {
  display: grid !important;
  height: 100% !important;
  min-height: 0 !important;
}

.ftm-run-v21 .ftm-run-card {
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  min-height: min(560px, 58vh) !important;
  overflow: visible !important;
}

.ftm-run-v21 .ftm-run-card-step {
  gap: clamp(16px, 2.2vw, 26px) !important;
  padding: clamp(24px, 3vw, 38px) !important;
  text-align: center !important;
}

.ftm-run-v21 .ftm-run-card-step .ftm-run-card-illustration-wrap {
  width: min(100%, 520px) !important;
  min-height: clamp(170px, 24vh, 250px) !important;
  margin: 0 auto !important;
  border-radius: 30px !important;
}

.ftm-run-v21 .ftm-run-card-step .ftm-run-card-step-icon {
  font-size: clamp(76px, 9vw, 122px) !important;
}

.ftm-run-v21 .ftm-run-card-step-main {
  display: block !important;
  width: min(100%, 720px) !important;
  max-width: 720px !important;
  margin: 0 auto !important;
  color: #1f3154 !important;
  font-size: clamp(38px, 4.6vw, 68px) !important;
  line-height: 1.02 !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  hyphens: none !important;
}

.ftm-run-v21 .ftm-run-card-step .ftm-run-card-subtext,
.ftm-run-v21 .ftm-run-card-step .ftm-run-card-hint {
  display: block !important;
  width: min(100%, 620px) !important;
  max-width: 620px !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.ftm-run-v21 .ftm-run-actions {
  margin-top: 4px !important;
}

@media (min-width: 761px) {
  .ftm-run-v21 .ftm-run-companion {
    order: 1 !important;
  }

  .ftm-run-v21 .ftm-run-main {
    order: 2 !important;
  }
}

@media (max-width: 760px) {
  .ftm-run-v21 .ftm-run-frame {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .ftm-run-v21 .ftm-run-companion {
    order: 1 !important;
  }

  .ftm-run-v21 .ftm-run-main {
    order: 2 !important;
  }

  .ftm-run-v21 .ftm-run-companion-scene {
    position: static !important;
    grid-template-columns: minmax(82px, 110px) minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    justify-items: start !important;
    align-items: center !important;
    min-height: 0 !important;
    padding: 14px 16px !important;
    border-radius: 24px !important;
  }

  .ftm-run-v21 .ftm-run-companion-image,
  .ftm-run-v21 .ftm-run-companion-placeholder {
    width: min(100%, 104px) !important;
    max-height: 112px !important;
  }

  .ftm-run-v21 .ftm-run-companion-copy {
    justify-items: start !important;
  }

  .ftm-run-v21 .ftm-run-companion-bubble {
    width: min(100%, 520px) !important;
    max-width: 520px !important;
    text-align: left !important;
  }

  .ftm-run-v21 .ftm-run-companion-bubble::before {
    left: -7px !important;
    top: 28px !important;
    transform: rotate(45deg) !important;
  }
}

@media (max-width: 640px) {
  .ftm-run-v21 .ftm-run-frame {
    padding: 12px !important;
    border-radius: 24px !important;
  }

  .ftm-run-v21 .ftm-run-companion-scene {
    grid-template-columns: 74px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .ftm-run-v21 .ftm-run-companion-image,
  .ftm-run-v21 .ftm-run-companion-placeholder {
    width: 72px !important;
    max-height: 82px !important;
  }

  .ftm-run-v21 .ftm-run-companion-bubble {
    padding: 11px 13px !important;
    border-radius: 18px !important;
    font-size: 13px !important;
  }

  .ftm-run-v21 .ftm-run-card {
    min-height: 0 !important;
  }

  .ftm-run-v21 .ftm-run-card-step {
    padding: 20px 16px 24px !important;
  }

  .ftm-run-v21 .ftm-run-card-step .ftm-run-card-illustration-wrap {
    min-height: 160px !important;
  }

  .ftm-run-v21 .ftm-run-card-step-main {
    font-size: clamp(34px, 12vw, 48px) !important;
    overflow-wrap: break-word !important;
  }
}

/* Familymap Übergangsmodul: optionale Editorbereiche und klarere Vorlagenkarten */
.ftm-editor-details,
.ftm-editor-details-panel {
  display: block;
  min-width: 0;
  border: 1px solid rgba(53, 83, 86, 0.13);
  border-radius: 18px;
  background: rgba(255, 252, 243, 0.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.ftm-editor-details-panel {
  padding: 0;
}

.ftm-editor-details > summary,
.ftm-editor-details-panel > summary {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  min-height: 54px;
  padding: 14px 44px 14px 16px;
  cursor: pointer;
  list-style: none;
  color: #25314f;
  font-weight: 800;
}

.ftm-editor-details > summary::-webkit-details-marker,
.ftm-editor-details-panel > summary::-webkit-details-marker {
  display: none;
}

.ftm-editor-details > summary::after,
.ftm-editor-details-panel > summary::after {
  content: "⌄";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(94, 160, 153, 0.14);
  color: #35645f;
  font-size: 18px;
  transform: translateY(-50%);
  transition: transform .18s ease, background .18s ease;
}

.ftm-editor-details[open] > summary::after,
.ftm-editor-details-panel[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
  background: rgba(94, 160, 153, 0.22);
}

.ftm-editor-details > summary em,
.ftm-editor-details-panel > summary em {
  display: block;
  max-width: 100%;
  color: #6d7482;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ftm-editor-details > summary span,
.ftm-editor-details-panel > summary span {
  display: block;
  max-width: 100%;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ftm-editor-details-body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.ftm-editor-details .ftm-field-block,
.ftm-editor-details-panel .ftm-field-block {
  background: rgba(255,255,255,0.72);
}

.ftm-field-block-nested {
  margin: 0;
  box-shadow: none;
}

.ftm-calendar-link-block label {
  display: grid;
  gap: 8px;
}

.ftm-template-tile {
  display: grid;
  align-content: start;
  gap: 16px;
}

.ftm-list-grid-cards .ftm-template-tile {
  grid-template-rows: auto auto auto minmax(94px, 1fr) auto;
  align-content: stretch;
}

.ftm-list-grid-cards .ftm-template-tile .ftm-card-header {
  min-height: 92px;
}

.ftm-list-grid-cards .ftm-template-tile .ftm-title-medium {
  white-space: nowrap;
}

.ftm-list-grid-cards .ftm-template-tile .ftm-card-subtitle {
  display: -webkit-box;
  min-height: 51px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ftm-list-grid-cards .ftm-template-tile .ftm-chip-row {
  min-height: 36px;
}

.ftm-template-tile .ftm-card-header {
  min-width: 0;
}

.ftm-template-tile .ftm-card-header > div:last-child {
  min-width: 0;
}

.ftm-template-tile .ftm-icon,
.ftm-card-dashboard .ftm-icon {
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  overflow: hidden;
  justify-content: center;
}

.ftm-template-main-icon {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}

.ftm-step-card-strip-template {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.ftm-step-card-strip-template .ftm-step-card-mini {
  height: 100%;
}

.ftm-template-step-list {
  min-width: 0;
}

.ftm-template-step-item {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.ftm-template-step-item span {
  flex: 0 0 auto;
}

.ftm-template-kid-preview {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 94px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(238,248,245,0.74));
  border: 1px solid rgba(53, 83, 86, 0.12);
}

.ftm-template-kid-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(40,65,69,0.1);
  font-size: 34px;
}

.ftm-template-kid-preview strong {
  display: block;
  color: #25314f;
  font-size: 14px;
}

.ftm-template-kid-preview p {
  margin: 4px 0 0;
  color: #5f6675;
  font-size: 14px;
  line-height: 1.35;
}

.ftm-template-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-top: auto;
}

.ftm-template-form-primary {
  display: grid;
  margin: 0;
}

.ftm-template-actions .ftm-action-btn {
  width: 100%;
  justify-content: center;
  min-height: 46px;
}

.ftm-card-actions-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ftm-card-actions-secondary .ftm-action-btn,
.ftm-card-actions-secondary .ftm-inline-form {
  width: 100%;
}

.ftm-card-actions-secondary .ftm-action-btn {
  justify-content: center;
}

.ftm-card-dashboard .ftm-card-actions-primary,
.ftm-card-dashboard .ftm-card-actions-secondary {
  align-self: end;
}

.ftm-action-btn-soft {
  background: rgba(255,255,255,0.74);
  border-color: rgba(53, 83, 86, 0.18);
  color: #35645f;
}

.ftm-main-wrap .fm-symbol-img,
.ftm-run-v21 .fm-symbol-img,
.ftm-run-v2 .fm-symbol-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ftm-icon .fm-symbol-img,
.ftm-template-kid-icon .fm-symbol-img,
.ftm-context-kid-icon .fm-symbol-img {
  width: 100%;
  height: 100%;
}

.ftm-step-card-mini-symbol .fm-symbol-img {
  width: 46px;
  height: 46px;
}

.ftm-run-card-hero-icon .fm-symbol-img,
.ftm-run-card-step-icon .fm-symbol-img,
.ftm-run-goal-icon .fm-symbol-img {
  width: min(100%, 190px);
  height: min(100%, 190px);
  margin: 0 auto;
}

.ftm-run-journey-icon .fm-symbol-img {
  width: 100%;
  height: 100%;
}

.ftm-run-modal-open {
  overflow: hidden;
}

.ftm-run-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(31, 42, 45, 0.42);
  backdrop-filter: blur(8px);
}

.ftm-run-modal-backdrop.is-open {
  display: flex;
}

.ftm-run-modal-panel {
  width: min(980px, 100%);
  max-height: min(92vh, 860px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(230, 211, 184, 0.88);
  background: #fffdf8;
  box-shadow: 0 30px 90px rgba(28, 41, 50, 0.28);
}

.ftm-run-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(222, 205, 177, 0.7);
  background: linear-gradient(135deg, #fffaf2, #f4faf5);
}

.ftm-run-modal-overline {
  margin-bottom: 3px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7e5942;
}

.ftm-run-modal-title {
  color: #17263a;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 900;
  line-height: 1.15;
}

.ftm-run-modal-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(77, 111, 96, 0.1);
  color: #244153;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.ftm-run-modal-close:hover,
.ftm-run-modal-close:focus-visible {
  background: rgba(77, 111, 96, 0.18);
  outline: none;
}

.ftm-run-modal-frame-wrap {
  min-height: 0;
  background: #fffdf8;
}

.ftm-run-modal-frame {
  display: block;
  width: 100%;
  height: min(78vh, 760px);
  border: 0;
  background: #fffdf8;
}

@media (max-width: 720px) {
  .ftm-run-modal-backdrop {
    padding: 0;
  }

  .ftm-run-modal-panel {
    width: 100%;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .ftm-run-modal-head {
    padding: 14px 16px;
  }

  .ftm-run-modal-frame {
    height: calc(100vh - 76px);
  }

  .ftm-card-dashboard .ftm-card-panel-child {
    grid-template-rows: none;
  }

  .ftm-card-dashboard .ftm-card-header .ftm-title {
    white-space: normal;
  }

  .ftm-goal-connection.is-placeholder,
  .ftm-secondary-connection.is-placeholder {
    display: none;
  }

  .ftm-card-dashboard .ftm-step-card-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ftm-list-grid-cards .ftm-template-tile .ftm-title-medium {
    white-space: normal;
  }

  .ftm-template-actions {
    grid-template-columns: 1fr;
  }

  .ftm-card-actions-secondary {
    grid-template-columns: 1fr;
  }

  .ftm-template-kid-preview {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .ftm-template-kid-icon {
    width: 52px;
    height: 52px;
    border-radius: 17px;
    font-size: 29px;
  }
}

/* V2.3.22: stabile Übergangskarten mit kontrolliertem Titelumbruch */
.ftm-card-dashboard .ftm-card-panel-child {
  grid-template-rows: minmax(112px, auto) minmax(66px, auto) minmax(80px, auto) 36px auto auto auto;
}

.ftm-card-dashboard .ftm-card-header {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  min-height: 112px;
}

.ftm-card-dashboard .ftm-card-header .ftm-title {
  max-width: min(100%, 340px);
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.12;
}

.ftm-card-dashboard .ftm-card-header .ftm-card-subtitle {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ftm-card-dashboard .ftm-view-switch {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  align-items: center;
  overflow: hidden;
}

.ftm-card-dashboard .ftm-view-btn {
  box-sizing: border-box;
  height: 34px;
  max-height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  line-height: 1;
  white-space: nowrap;
}

/* Oeffentliche Gastansicht */
.ftm-public{
  width:min(100%,980px);
  margin:0 auto;
  padding:22px 16px 42px;
  color:#263f3b;
}
.ftm-public-promo{
  width:min(100%,560px);
  margin:0 auto 20px;
}
.ftm-public-promo img{
  display:block;
  width:100%;
  height:auto;
  border-radius:8px;
  box-shadow:0 16px 36px rgba(29,66,62,.16);
}
.ftm-public-hero{
  margin:0 auto;
  padding:28px clamp(18px,4vw,42px);
  border-radius:8px;
  background:#fff;
  border:1px solid rgba(48,111,104,.12);
  box-shadow:0 12px 32px rgba(29,66,62,.08);
}
.ftm-public-kicker{
  margin:0 0 8px;
  font-size:.86rem;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:0;
  color:#306f68;
}
.ftm-public h1{
  margin:0 0 12px;
  font-size:clamp(2rem,4vw,3.2rem);
  line-height:1.05;
  color:#213b38;
}
.ftm-public-lead{
  max-width:760px;
  margin:0;
  font-size:1.08rem;
  line-height:1.62;
}
.ftm-public-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}
.ftm-public .ftm-public-test-note{
  max-width:620px;
  margin:1.45rem 0 0;
  color:#60736a;
  font-size:.95rem;
  line-height:1.5;
}
.ftm-public-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:11px 18px;
  border-radius:999px;
  font-weight:850;
  text-decoration:none;
}
.ftm-public-btn-primary{
  background:#306f68;
  color:#fff;
}
.ftm-public-btn-secondary{
  background:#f4f8f6;
  color:#263f3b;
  border:1px solid rgba(48,111,104,.18);
}
.ftm-public-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}
.ftm-public-grid article{
  padding:18px;
  border-radius:8px;
  background:#f8fbfa;
  border:1px solid rgba(48,111,104,.1);
}
.ftm-public-grid span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  margin-bottom:10px;
  border-radius:999px;
  background:#dfeeea;
  color:#244a45;
  font-weight:900;
}
.ftm-public-grid h2{
  margin:0 0 8px;
  font-size:1.05rem;
  color:#213b38;
}
.ftm-public-grid p{
  margin:0;
  line-height:1.52;
}
@media(max-width:760px){
  .ftm-public-grid{grid-template-columns:1fr}
  .ftm-public-actions{align-items:stretch;flex-direction:column}
}

/* Familymap UI polish: Uebergaenge kompakter fuehren */
.ftm-main-wrap-cards {
  gap: 22px;
}

.ftm-main-wrap-cards .ftm-hero-cards {
  align-items: stretch;
  gap: 18px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(38, 119, 111, 0.18);
  box-shadow: 0 18px 44px rgba(31, 49, 84, 0.09);
}

.ftm-main-wrap-cards .ftm-hero-cards .ftm-hero-copy {
  gap: 12px;
}

.ftm-main-wrap-cards .ftm-hero-cards .ftm-page-title {
  max-width: 100%;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.04;
}

.ftm-main-wrap-cards .ftm-hero-cards .ftm-page-text {
  max-width: 760px;
  font-size: 1.02rem;
  line-height: 1.55;
}

.ftm-main-wrap-cards .ftm-help-strip {
  width: 100% !important;
  max-width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 8px 9px !important;
  border-color: rgba(38, 119, 111, 0.2) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.84) !important;
  box-shadow: 0 8px 20px rgba(40, 65, 69, 0.06) !important;
}

.ftm-main-wrap-cards .ftm-help-strip__label {
  color: #31464d !important;
}

.ftm-main-wrap-cards .ftm-help-links {
  margin-left: auto;
}

.ftm-main-wrap-cards .ftm-help-links a {
  min-height: 34px !important;
  padding: 7px 11px !important;
  font-size: 13px !important;
}

.ftm-main-wrap-cards .ftm-selector-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(38, 119, 111, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.ftm-main-wrap-cards .ftm-selector-wrap form,
.ftm-main-wrap-cards .ftm-selector-wrap .fm-context-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.ftm-main-wrap-cards .ftm-selector-wrap select,
.ftm-main-wrap-cards .ftm-selector-wrap button {
  min-height: 40px;
  line-height: 1.25;
}

.ftm-main-wrap-cards .ftm-hero-summary,
.ftm-main-wrap-cards .ftm-hero-summary-cards {
  gap: 10px;
  padding: 14px;
  border-color: rgba(38, 119, 111, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 250, 248, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 12px 30px rgba(31, 49, 84, 0.07);
}

.ftm-main-wrap-cards .ftm-context-summary-card {
  min-height: 0;
  padding: 12px;
  border-radius: 16px;
}

.ftm-main-wrap-cards .ftm-context-summary-card-child {
  gap: 12px;
}

.ftm-main-wrap-cards .ftm-context-kid-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 28px;
}

.ftm-main-wrap-cards .ftm-context-summary-card-companion {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 76px !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 0 !important;
}

.ftm-main-wrap-cards .ftm-context-summary-card-companion .ftm-companion-avatar-wrap,
.ftm-main-wrap-cards .ftm-context-summary-card-companion .ftm-companion-avatar-wrap-hero {
  grid-column: 2 !important;
  width: 76px !important;
  height: 76px !important;
  flex-basis: 76px !important;
  border-radius: 20px !important;
}

.ftm-main-wrap-cards .ftm-context-summary-card-companion .ftm-companion-avatar-wrap .ftm-companion-avatar,
.ftm-main-wrap-cards .ftm-context-summary-card-companion .ftm-companion-avatar-wrap-hero .ftm-companion-avatar {
  width: 100% !important;
  height: 100% !important;
  max-width: 76px !important;
  max-height: 76px !important;
}

.ftm-main-wrap-cards .ftm-companion-hero-note {
  font-size: 13px;
  line-height: 1.35;
}

.ftm-main-wrap-cards .ftm-list-grid-cards {
  gap: 18px;
}

.ftm-main-wrap-cards .ftm-card-dashboard {
  border: 1px solid rgba(38, 119, 111, 0.18);
  box-shadow: 0 14px 34px rgba(31, 49, 84, 0.08);
}

.ftm-main-wrap-cards .ftm-card-dashboard .ftm-card-panel-child {
  grid-template-rows: minmax(94px, auto) minmax(58px, auto) minmax(70px, auto) 36px auto auto auto;
  gap: 12px;
}

.ftm-main-wrap-cards .ftm-card-dashboard .ftm-card-header {
  min-height: 94px;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
}

.ftm-main-wrap-cards .ftm-card-dashboard .ftm-card-header-tall {
  min-height: 94px;
}

.ftm-main-wrap-cards .ftm-card-dashboard .ftm-card-header .ftm-title {
  font-size: clamp(22px, 2.4vw, 30px);
  max-width: 100%;
}

.ftm-main-wrap-cards .ftm-card-dashboard .ftm-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.ftm-main-wrap-cards .ftm-step-card-mini {
  min-height: 86px;
  gap: 5px;
  padding: 8px 7px;
  border-radius: 18px;
}

.ftm-main-wrap-cards .ftm-step-card-mini-symbol {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 22px;
}

.ftm-main-wrap-cards .ftm-step-card-mini strong {
  font-size: 12px;
  line-height: 1.2;
}

.ftm-editor-hero {
  margin-bottom: 16px;
  border: 1px solid rgba(38, 119, 111, 0.18);
  box-shadow: 0 18px 44px rgba(31, 49, 84, 0.08);
}

.ftm-editor-guide {
  gap: 10px;
  margin-bottom: 16px;
}

.ftm-editor-guide > div {
  min-height: 92px;
  gap: 5px;
  padding: 13px;
  border-color: rgba(38, 119, 111, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(31, 49, 84, 0.05);
}

.ftm-editor-guide span,
.ftm-editor-section-number {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.ftm-editor-guide strong {
  font-size: 14px;
}

.ftm-editor-guide p {
  font-size: 12.5px;
  line-height: 1.35;
}

.ftm-editor-section {
  border-color: rgba(38, 119, 111, 0.18);
  box-shadow: 0 14px 34px rgba(31, 49, 84, 0.08);
}

.ftm-calendar-link-block > summary,
.ftm-editor-details > summary,
.ftm-editor-details-panel > summary {
  min-height: auto;
  gap: 4px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.ftm-calendar-link-block > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.ftm-calendar-link-block > summary span,
.ftm-calendar-link-block > summary em {
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 761px) and (max-width: 1100px) {
  .ftm-main-wrap-cards .ftm-hero-cards {
    grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  }

  .ftm-main-wrap-cards .ftm-list-grid-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ftm-editor-guide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ftm-main-wrap-cards .ftm-selector-wrap form,
  .ftm-main-wrap-cards .ftm-selector-wrap .fm-context-form {
    grid-template-columns: 1fr;
  }

  .ftm-main-wrap-cards .ftm-help-links {
    margin-left: 0;
  }
}
