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

.tm-lab {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.tm-lab-visual,
.tm-exp-visual {
  min-height: 320px;
  padding: 18px;
  border: 1px solid rgba(190, 202, 222, 0.82);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    repeating-linear-gradient(0deg, rgba(37, 99, 235, 0.055) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(20, 184, 166, 0.05) 0 1px, transparent 1px 30px);
  overflow: hidden;
}

.tm-case-grid {
  grid-template-columns: repeat(3, minmax(270px, 1fr));
}

.tm-case {
  display: grid;
  gap: 12px;
  min-height: 520px;
  padding: 14px;
  border: 1px solid rgba(190, 202, 222, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(30, 41, 59, 0.05);
}

.tm-case-head {
  display: grid;
  gap: 4px;
}

.tm-case-head span {
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 950;
}

.tm-case-head strong {
  color: #0f172a;
  font-size: 1.16rem;
  line-height: 1.2;
}

.tm-case p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.tm-case-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.tm-case-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-weight: 900;
}

.tm-case-controls output {
  color: #0f172a;
  font-weight: 950;
}

.tm-case-controls input {
  width: 100%;
}

.tm-case-scene {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 190px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, #f8fafc, #eef6ff);
  overflow: hidden;
}

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

.tm-case-metrics span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 12px;
  color: #64748b;
  background: #f8fafc;
  font-size: 0.74rem;
  font-weight: 900;
}

.tm-case-metrics b {
  color: #0f172a;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.tm-case-feedback {
  min-height: 62px;
  padding: 12px;
  border-radius: 14px;
  color: #254155;
  background: rgba(236, 253, 245, 0.85);
  font-weight: 850;
  line-height: 1.45;
}

.tm-clock-face,
.tm-clock-large {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border: 10px solid #334155;
  border-radius: 999px;
  background:
    radial-gradient(circle, #0f172a 0 6px, transparent 7px),
    conic-gradient(from 0deg, rgba(37, 99, 235, 0.14) 0 25%, rgba(20, 184, 166, 0.12) 25% 50%, rgba(245, 158, 11, 0.12) 50% 75%, rgba(239, 68, 68, 0.12) 75%);
}

.tm-clock-large {
  width: 220px;
  height: 220px;
  margin: auto;
}

.tm-clock-face i,
.tm-clock-face em,
.tm-clock-large i,
.tm-clock-large em {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 4px;
  border-radius: 999px;
  transform-origin: bottom center;
}

.tm-clock-face i,
.tm-clock-large i {
  height: 58px;
  background: #2563eb;
  transform: translateX(-50%) rotate(var(--minute));
}

.tm-clock-large i {
  height: 86px;
}

.tm-clock-face em,
.tm-clock-large em {
  height: 42px;
  background: #f97316;
  transform: translateX(-50%) rotate(var(--hour));
}

.tm-clock-large em {
  height: 64px;
}

.tm-clock-face b,
.tm-clock-large b,
.tm-register b,
.tm-money-row b,
.tm-parking b,
.tm-coupon b,
.tm-exp-receipt b,
.tm-receipt b {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: #2563eb;
  font-weight: 950;
  z-index: 1;
}

.tm-clock-large b {
  position: absolute;
  bottom: -46px;
}

.tm-bus-stop,
.tm-screen,
.tm-pot,
.tm-train,
.tm-notebook,
.tm-calendar {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
}

.tm-bus-stop span {
  width: 80px;
  height: 34px;
  border-radius: 10px 10px 6px 6px;
  background: #fbbf24;
  box-shadow: inset 0 -10px rgba(0, 0, 0, 0.14);
}

.tm-bus-stop i {
  width: 18px;
  height: 58px;
  border-radius: 999px;
  background: #475569;
}

.tm-screen span {
  width: 86px;
  height: 48px;
  border-radius: 8px;
  background: #111827;
  box-shadow: inset 0 0 0 8px #334155;
}

.tm-pot span:first-child {
  width: 94px;
  height: 44px;
  border-radius: 0 0 22px 22px;
  background: #64748b;
}

.tm-pot span:last-child {
  width: 44px;
  height: 28px;
  border-radius: 999px;
  background: #bae6fd;
}

.tm-train i {
  width: 48px;
  height: 34px;
  border-radius: 8px;
  background: #ef4444;
  box-shadow: inset 0 -10px rgba(0, 0, 0, 0.16);
}

.tm-notebook i,
.tm-calendar i {
  width: 42px;
  height: 50px;
  border-radius: 8px;
  background: #dbeafe;
  border: 4px solid #60a5fa;
}

.tm-register {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  align-items: center;
}

.tm-register i,
.tm-register strong,
.tm-money-row i,
.tm-exp-receipt span,
.tm-receipt span,
.tm-coupon strong,
.tm-coupon em {
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 8px;
  border-radius: 12px;
  color: #0f172a;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-style: normal;
  font-weight: 950;
}

.tm-register strong {
  background: #dcfce7;
}

.tm-money-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.tm-money-row b {
  grid-column: 1 / -1;
  margin: auto;
}

.tm-parking {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.tm-parking i {
  width: 160px;
  height: 96px;
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  box-shadow: inset 0 -18px rgba(0, 0, 0, 0.14);
}

.tm-parking span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 950;
}

.tm-coupon {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.tm-coupon em {
  color: #b91c1c;
  background: #fee2e2;
}

.tm-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);
}

.tm-experiment,
.tm-exp-board {
  display: grid;
  gap: 18px;
}

.tm-exp-story {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.08);
}

.tm-exp-story > span {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  font-size: 0.78rem;
  font-weight: 950;
}

.tm-exp-story > strong {
  color: #102033;
  font-size: 1.08rem;
  line-height: 1.35;
}

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

.tm-exp-receipt,
.tm-receipt {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 360px);
  margin: auto;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px dashed #94a3b8;
}

.tm-exp-receipt b,
.tm-receipt b {
  grid-column: 1 / -1;
  margin: auto;
}

html[lang="en"] .tm-case-head strong,
html[lang="en"] .tm-case-feedback,
html[lang="en"] .tm-case-metrics b,
html[lang="en"] .tm-exp-story > strong,
html[lang="en"] .tm-exp-story p {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

html[lang="en"] .tm-case-grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

html[lang="en"] .tm-case {
  min-height: 550px;
}

html[lang="en"] .tm-case-controls {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 980px) {
  .tm-lab,
  .tm-exp-workbench {
    grid-template-columns: 1fr;
  }

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

  .tm-case-controls,
  .tm-case-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .tm-topic .gt-nav,
  .tm-topic-layout .gt-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
