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

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

.pa-select-label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 900;
}

.pa-select-label select {
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 12px;
  padding: 0 10px;
  color: #0f172a;
  font-weight: 900;
  background: #fff;
}

.pa-model-visual,
.pa-exp-visual {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 18px;
  border: 1px solid rgba(190, 202, 222, 0.82);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(0deg, rgba(37, 99, 235, 0.055) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(20, 184, 166, 0.055) 0 1px, transparent 1px 30px);
  overflow: hidden;
}

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

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

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

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

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

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

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

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

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

.pa-case-scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 205px;
  padding: 16px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(248, 250, 252, 0.94), rgba(239, 246, 255, 0.92)),
    linear-gradient(90deg, transparent 0 48%, rgba(15, 23, 42, 0.05) 48% 52%, transparent 52%);
  overflow: hidden;
}

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

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

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

.pa-case-result {
  min-height: 78px;
  padding: 12px;
  border-radius: 14px;
  color: #254155;
  background: rgba(236, 253, 245, 0.9);
  font-weight: 850;
  line-height: 1.45;
}

.pa-object {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 250px);
  min-height: 170px;
}

.pa-object b,
.pa-object span {
  position: absolute;
  z-index: 4;
  width: max-content;
  max-width: 90%;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-size: 0.76rem;
  font-weight: 950;
  text-align: center;
}

.pa-object b {
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.pa-object span {
  right: 10px;
  top: 10px;
}

.pa-garden i {
  width: var(--w);
  height: var(--h);
  border: 12px dashed #92400e;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(22, 163, 74, 0.12) 50%, transparent 50%),
    #bbf7d0;
  background-size: 24px 24px;
}

.pa-carpet,
.pa-patio {
  display: grid;
  grid-template-columns: repeat(6, 24px);
  justify-content: center;
  align-content: center;
  gap: 3px;
  width: min(220px, calc(var(--w) + 70px));
  padding: 22px;
  border-radius: 12px;
}

.pa-carpet {
  background: #ede9fe;
  box-shadow: inset 0 0 0 8px #a78bfa;
}

.pa-patio {
  background: #e0f2fe;
  box-shadow: inset 0 0 0 8px #38bdf8;
}

.pa-carpet i,
.pa-patio i {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(79, 70, 229, 0.36);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
}

.pa-frame i {
  width: var(--w);
  height: var(--h);
  border: 16px solid #b45309;
  border-radius: 10px;
  background: #fff7ed;
  box-shadow: inset 0 0 0 4px #fbbf24;
}

.pa-wall i {
  width: var(--w);
  height: var(--h);
  border: 5px solid #94a3b8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.25), transparent 52%),
    repeating-linear-gradient(0deg, #f8fafc 0 16px, #e2e8f0 17px 18px);
}

.pa-track i {
  width: var(--w);
  height: var(--h);
  border: 18px solid #ef4444;
  border-radius: 36px;
  background: #dcfce7;
  box-shadow: inset 0 0 0 4px #fff;
}

.pa-tablecloth i {
  width: var(--w);
  height: var(--h);
  border: 8px dashed #db2777;
  border-radius: 18px;
  background:
    radial-gradient(circle at 22px 22px, rgba(219, 39, 119, 0.2) 0 6px, transparent 7px),
    #fce7f3;
  background-size: 44px 44px;
}

.pa-flag i,
.pa-tent i {
  width: var(--w);
  height: var(--h);
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  filter: drop-shadow(0 12px 16px rgba(15, 23, 42, 0.14));
}

.pa-flag i {
  background: linear-gradient(145deg, #fde68a, #f59e0b);
}

.pa-tent i {
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.8) 49% 52%, transparent 52%),
    linear-gradient(145deg, #fb7185, #ef4444);
}

.pa-flowerbed,
.pa-roundtable {
  width: calc(var(--r) * 2 + 46px);
  height: calc(var(--r) * 2 + 46px);
}

.pa-flowerbed::before,
.pa-roundtable i {
  content: "";
  position: absolute;
  inset: 23px;
  border-radius: 999px;
}

.pa-flowerbed::before {
  border: 10px solid #16a34a;
  background:
    radial-gradient(circle at 50% 50%, #fef3c7 0 28%, transparent 29%),
    #bbf7d0;
}

.pa-flowerbed em {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #f97316;
  transform: rotate(var(--rot)) translateX(calc(var(--r) + 18px));
  transform-origin: center;
}

.pa-roundtable i {
  border: 8px solid #0f766e;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 20%, transparent 21%),
    #ccfbf1;
}

.pa-pool i {
  width: var(--w);
  height: var(--h);
  border: 11px solid #0284c7;
  border-radius: 18px;
  background:
    repeating-linear-gradient(-20deg, rgba(255, 255, 255, 0.32) 0 8px, transparent 9px 24px),
    #bae6fd;
}

.pa-model-shape {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 330px);
  min-height: 260px;
}

.pa-model-shape b,
.pa-model-shape span {
  position: absolute;
  z-index: 3;
  padding: 8px 12px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
  font-weight: 950;
  text-align: center;
}

.pa-model-shape b {
  top: 16px;
}

.pa-model-shape span {
  bottom: 4px;
}

.pa-model-rect {
  display: grid;
  grid-template-columns: repeat(8, 22px);
  justify-content: center;
  align-content: center;
  gap: 3px;
  padding: 30px;
  border: 8px solid #2563eb;
  border-radius: 14px;
  background: #dbeafe;
}

.pa-model-rect i {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
}

.pa-model-tri i {
  width: var(--w);
  height: var(--h);
  background: linear-gradient(145deg, #fef3c7, #f59e0b);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.pa-model-circle i {
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  border: 8px solid #0f766e;
  border-radius: 999px;
  background: #ccfbf1;
}

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

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

.pa-experiment .control-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(190, 202, 222, 0.82);
  border-radius: 14px;
  color: #334155;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.pa-experiment .control-card > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pa-experiment .control-card strong {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: normal;
}

.pa-experiment .control-card input {
  width: 100%;
}

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

.pa-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;
}

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

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

.pa-exp-svg {
  width: min(100%, 540px);
  min-height: 280px;
}

.pa-exp-svg .area-fill {
  fill: rgba(37, 99, 235, 0.12);
  stroke: rgba(37, 99, 235, 0.16);
  stroke-width: 1;
  opacity: 0.28;
}

.pa-exp-svg .area-fill.is-on {
  fill: rgba(37, 99, 235, 0.28);
  opacity: 1;
}

.pa-exp-svg .edge-line {
  fill: none;
  stroke: #334155;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.45;
}

.pa-exp-svg .edge-line.is-on {
  stroke: #ef4444;
  opacity: 1;
}

.pa-exp-svg .unit-square {
  fill: rgba(20, 184, 166, 0.13);
  stroke: rgba(15, 118, 110, 0.12);
}

.pa-exp-svg .unit-square.is-on {
  fill: rgba(20, 184, 166, 0.32);
  stroke: rgba(15, 118, 110, 0.28);
}

.pa-exp-svg .helper-rect {
  fill: none;
  stroke: #f59e0b;
  stroke-dasharray: 8 8;
  stroke-width: 4;
  opacity: 0;
}

.pa-exp-svg .helper-rect.is-on {
  opacity: 0.9;
}

.pa-exp-svg .height-line,
.pa-exp-svg .radius-line {
  stroke: #f97316;
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.28;
}

.pa-exp-svg .height-line.is-on,
.pa-exp-svg .radius-line.is-on {
  opacity: 1;
}

.pa-exp-svg .center-dot {
  fill: #ef4444;
}

.pa-exp-svg text {
  fill: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.pa-exp-svg .shape-caption {
  text-anchor: middle;
  fill: #334155;
  font-size: 16px;
}

html[lang="en"] .pa-case-head strong,
html[lang="en"] .pa-case-result,
html[lang="en"] .pa-case-metrics b,
html[lang="en"] .pa-exp-story > strong,
html[lang="en"] .pa-exp-story p,
html[lang="en"] .pa-model-shape span,
html[lang="en"] .pa-object b,
html[lang="en"] .pa-object span {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

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

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

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

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

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

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

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