.fm-topic .gt-nav {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.fm-experiment {
  display: grid;
  gap: 18px;
}

.fm-exp-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.fm-exp-story {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid rgba(20, 184, 166, 0.26);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #ecfeff);
  box-shadow: 0 16px 34px rgba(15, 118, 110, 0.08);
}

.fm-exp-story > span {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  font-size: 0.78rem;
  font-weight: 950;
}

.fm-exp-story > strong {
  color: #102033;
  font-size: 1.08rem;
}

.fm-exp-story p {
  margin: 0;
  color: #536171;
  line-height: 1.65;
}

.fm-exp-board,
.fm-area-visual,
.fm-division-visual,
.fm-case-visual {
  min-height: 220px;
  border: 1px solid rgba(190, 202, 222, 0.82);
  border-radius: 16px;
  padding: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    repeating-linear-gradient(0deg, rgba(20, 184, 166, 0.06) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(245, 158, 11, 0.06) 0 1px, transparent 1px 28px);
  overflow: hidden;
}

.fm-exp-board {
  display: grid;
  gap: 12px;
}

.fm-exp-visual {
  display: grid;
  place-items: center;
  min-height: 190px;
}

.fm-area-model {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows), minmax(22px, 1fr));
  gap: 4px;
  width: min(100%, 520px);
  min-height: 210px;
  padding: 10px;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: #f8fafc;
}

.fm-area-model i {
  display: block;
  min-height: 24px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 8px;
  background: #e2e8f0;
}

.fm-area-model i.is-left {
  background: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.44);
}

.fm-area-model i.is-right {
  background: #fde68a;
  border-color: rgba(245, 158, 11, 0.42);
}

.fm-area-model i.is-overlap {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0 22%, transparent 22% 100%),
    #14b8a6;
  border-color: rgba(15, 118, 110, 0.55);
}

.fm-division-model,
.fm-contains-line {
  display: grid;
  gap: 14px;
  width: min(100%, 560px);
}

.fm-strip-line,
.fm-target-strip {
  position: relative;
  min-height: 58px;
  border: 3px solid #475569;
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
}

.fm-strip-line span,
.fm-target-strip span {
  position: absolute;
  inset-block: 0;
  left: 0;
  background: linear-gradient(90deg, #60a5fa, #22c55e);
}

.fm-strip-line b,
.fm-target-strip b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #0f172a;
  font-weight: 950;
}

.fm-piece-row,
.fm-unit-pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.fm-piece-row i,
.fm-unit-pieces i {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 34px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 950;
}

.fm-piece-row i.is-used {
  color: #064e3b;
  border-color: rgba(16, 185, 129, 0.5);
  background: #d1fae5;
}

.fm-reciprocal-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed rgba(15, 118, 110, 0.45);
  border-radius: 14px;
  color: #475569;
  background: #f8fafc;
  opacity: 0.58;
}

.fm-reciprocal-card.is-on {
  opacity: 1;
  color: #0f766e;
  background: #ecfdf5;
}

.fm-reciprocal-card strong {
  color: #0f172a;
}

.fm-lab-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fm-lab-board section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.fm-lab-board section.is-wide {
  grid-column: 1 / -1;
}

.fm-segments {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 5px;
  min-height: 42px;
}

.fm-segments i {
  display: block;
  min-height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: #e2e8f0;
}

.fm-segments.is-left i.is-on,
.fm-segments.is-target i.is-on {
  background: #60a5fa;
}

.fm-segments.is-right i.is-on,
.fm-segments.is-unit i.is-on {
  background: #f59e0b;
}

.fm-segments.is-recipe i.is-on {
  background: #38bdf8;
}

.fm-case-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fm-case {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(190, 202, 222, 0.78);
  border-radius: 16px;
  background: #fff;
}

.fm-case-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: start;
}

.fm-case-head span {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  font-size: 0.78rem;
  font-weight: 950;
}

.fm-case-head strong {
  color: #111827;
  font-size: 1.05rem;
}

.fm-case-head em {
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: #172033;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.fm-case p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
  font-size: 0.9rem;
}

.fm-case-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fm-case-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(190, 202, 222, 0.78);
  border-radius: 12px;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 900;
  background: #f8fafc;
}

.fm-case-controls output,
.fm-case-controls b {
  color: #0f172a;
  font-size: 1rem;
}

.fm-case-visual {
  min-height: 190px;
}

.fm-case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fm-case-metrics span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 0.78rem;
  font-weight: 900;
}

.fm-case-metrics b {
  color: #111827;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.fm-case-result {
  min-height: 82px;
  padding: 12px;
  border-radius: 12px;
  color: #334155;
  font-weight: 850;
  line-height: 1.58;
  background: #f8fafc;
}

.fm-pizza-scene,
.fm-chocolate-scene,
.fm-recipe-scene,
.fm-discount-scene,
.fm-track-scene,
.fm-garden-scene,
.fm-ribbon-scene,
.fm-juice-scene,
.fm-paint-scene,
.fm-book-scene,
.fm-plank-scene,
.fm-clock-scene {
  display: grid;
  gap: 10px;
  align-items: center;
}

.fm-pizza {
  display: grid;
  place-items: center;
}

.fm-pizza .fm-area-model {
  width: 156px;
  min-height: 156px;
  aspect-ratio: 1;
  border-radius: 999px;
  overflow: hidden;
  background: #ffedd5;
}

.fm-area-model.is-pizza i {
  border-radius: 2px 18px 18px 2px;
  background: #fed7aa;
}

.fm-area-model.is-pizza i.is-overlap {
  background: #fb923c;
}

.fm-pizza-scene strong,
.fm-chocolate-scene strong,
.fm-track-scene strong,
.fm-ribbon-scene strong,
.fm-juice-scene strong,
.fm-paint-scene strong,
.fm-book-scene strong,
.fm-plank-scene strong,
.fm-clock-scene strong {
  padding: 8px 10px;
  border-radius: 12px;
  color: #0f172a;
  background: #f1f5f9;
  text-align: center;
}

.fm-area-model.is-chocolate {
  min-height: 150px;
  background: #fef3c7;
}

.fm-area-model.is-chocolate i {
  border-radius: 6px;
  background: #d6b692;
}

.fm-area-model.is-chocolate i.is-overlap {
  background: #7c3f18;
}

.fm-recipe-scene {
  grid-template-columns: 110px minmax(0, 1fr);
}

.fm-cup,
.fm-pitcher,
.fm-paint-can {
  position: relative;
  width: 92px;
  height: 138px;
  margin: 0 auto;
  border: 4px solid #64748b;
  border-radius: 12px 12px 24px 24px;
  overflow: hidden;
  background: #fff;
}

.fm-cup span,
.fm-pitcher span,
.fm-paint-can span {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  background: rgba(56, 189, 248, 0.58);
}

.fm-cup b,
.fm-pitcher b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #0f172a;
  font-weight: 950;
}

.fm-discount-scene {
  grid-template-columns: 1fr auto auto 1fr;
}

.fm-discount-scene section {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: #fff7ed;
}

.fm-discount-scene section.is-final {
  background: #dcfce7;
}

.fm-discount-scene strong {
  color: #0f172a;
  font-size: 1.4rem;
}

.fm-discount-scene i {
  color: #92400e;
  font-style: normal;
  font-weight: 950;
}

.fm-track {
  position: relative;
  min-height: 64px;
  border: 4px solid #475569;
  border-radius: 999px;
  background: #e2e8f0;
}

.fm-track span {
  position: absolute;
  inset-block: 0;
  left: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #14b8a6);
}

.fm-track i {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border: 4px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

.fm-area-model.is-garden {
  min-height: 160px;
  background: #dcfce7;
}

.fm-area-model.is-garden i {
  background: #bbf7d0;
}

.fm-area-model.is-garden i.is-overlap {
  background:
    radial-gradient(circle at 50% 40%, #f97316 0 26%, transparent 27%),
    #22c55e;
}

.fm-garden-scene span {
  padding: 8px 10px;
  border-radius: 12px;
  color: #166534;
  background: #dcfce7;
  font-weight: 950;
  text-align: center;
}

.fm-contains-line.is-ribbon .fm-target-strip,
.fm-contains-line.is-plank .fm-target-strip {
  border-radius: 8px;
}

.fm-contains-line.is-ribbon .fm-target-strip span {
  background: repeating-linear-gradient(90deg, #f472b6 0 18px, #f9a8d4 18px 36px);
}

.fm-contains-line.is-plank .fm-target-strip span {
  background: repeating-linear-gradient(90deg, #a16207 0 18px, #d97706 18px 36px);
}

.fm-juice-scene {
  grid-template-columns: 110px minmax(0, 1fr);
}

.fm-cups,
.fm-bottles,
.fm-task-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.fm-cups i {
  width: 26px;
  height: 34px;
  border: 3px solid #64748b;
  border-radius: 4px 4px 12px 12px;
  background: linear-gradient(to top, #38bdf8 var(--level, 100%), #fff 0);
}

.fm-paint-scene {
  grid-template-columns: 105px minmax(0, 1fr);
}

.fm-paint-can {
  height: 112px;
  border-radius: 18px 18px 12px 12px;
}

.fm-paint-can span {
  background: #a855f7;
}

.fm-bottles i {
  width: 24px;
  height: 38px;
  border-radius: 8px 8px 12px 12px;
  border: 1px solid rgba(107, 33, 168, 0.18);
  background: linear-gradient(to top, #a855f7 var(--level, 100%), #e9d5ff 0);
}

.fm-book-scene {
  grid-template-columns: 96px minmax(0, 1fr);
}

.fm-book {
  position: relative;
  width: 82px;
  height: 124px;
  border: 4px solid #334155;
  border-radius: 8px 16px 16px 8px;
  background: repeating-linear-gradient(0deg, #fff 0 10px, #e2e8f0 10px 12px);
  overflow: hidden;
}

.fm-book span {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  background: rgba(96, 165, 250, 0.44);
}

.fm-book b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 950;
}

.fm-clock-scene {
  grid-template-columns: 118px minmax(0, 1fr);
}

.fm-clock {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border: 7px solid #334155;
  border-radius: 999px;
  background: conic-gradient(#60a5fa var(--pct), #f8fafc 0);
}

.fm-clock b {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
}

.fm-task-stack i {
  width: 36px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  background: linear-gradient(to top, #f59e0b var(--level, 100%), #fde68a 0);
}

@media (max-width: 1080px) {
  .fm-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .fm-exp-workbench,
  .fm-lab-board,
  .fm-recipe-scene,
  .fm-juice-scene,
  .fm-paint-scene,
  .fm-book-scene,
  .fm-clock-scene {
    grid-template-columns: 1fr;
  }

  .fm-topic .gt-nav,
  .fm-case-grid {
    grid-template-columns: 1fr;
  }

  .fm-case-controls,
  .fm-case-metrics,
  .fm-discount-scene {
    grid-template-columns: 1fr;
  }

  .fm-case-head {
    grid-template-columns: 1fr;
  }

  .fm-case-head em {
    width: fit-content;
  }
}
