.fs-method-figure {
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid var(--method-line, #dce5f3);
  border-radius: 18px;
  background: var(--method-surface, #fff);
  box-shadow: var(--method-shadow, 0 14px 36px rgba(19, 45, 92, .08));
}

.fs-method-figure__open {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  cursor: zoom-in;
}

.fs-method-figure__open:focus-visible {
  outline: 3px solid #075cf6;
  outline-offset: 3px;
}

.fs-method-figure__open img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .2s ease;
}

.fs-method-figure__open:hover img { transform: scale(1.012); }
.fs-method-figure figcaption { margin: 12px 4px 2px; color: var(--method-text, #3f527d); font-size: .94rem; line-height: 1.55; }
.fs-method-figure figcaption strong { color: var(--method-ink, #0b1b4d); }

.fs-method-zoom {
  position: fixed;
  inset: 0;
  width: min(96vw, 1720px);
  height: min(94dvh, 1120px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 25px 75px rgba(0, 0, 0, .32);
}

.fs-method-zoom::backdrop { background: rgba(5, 14, 34, .88); }
.fs-method-zoom__layout { display: flex; flex-direction: column; height: 100%; }
.fs-method-zoom__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #cbd5e1; background: #fff; }
.fs-method-zoom__title { flex: 1; min-width: 0; overflow: hidden; font-size: .97rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.fs-method-zoom__controls { display: flex; align-items: center; gap: 6px; }
.fs-method-zoom__controls button { min-width: 40px; min-height: 40px; padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; color: #0f172a; font: inherit; font-weight: 750; cursor: pointer; }
.fs-method-zoom__controls button:hover { background: #eaf1ff; }
.fs-method-zoom__controls button:focus-visible { outline: 3px solid #075cf6; outline-offset: 2px; }
.fs-method-zoom__controls button:disabled { opacity: .4; cursor: default; }
.fs-method-zoom__level { min-width: 48px; text-align: center; font-size: .86rem; font-variant-numeric: tabular-nums; }
.fs-method-zoom__stage { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; cursor: grab; }
.fs-method-zoom__stage.is-dragging { cursor: grabbing; user-select: none; }
.fs-method-zoom__stage img { display: block; max-width: none; height: auto; margin: auto; }
.fs-method-zoom__hint { margin: 0; padding: 8px 14px; border-top: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: .79rem; text-align: center; }

@media (max-width: 640px) {
  .fs-method-figure { padding: 8px; }
  .fs-method-figure figcaption { margin: 10px 5px 3px; font-size: .88rem; }
  .fs-method-zoom { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .fs-method-zoom__bar { flex-wrap: wrap; padding: 8px; }
  .fs-method-zoom__title { flex-basis: 100%; padding: 0 4px; }
  .fs-method-zoom__controls { width: 100%; justify-content: space-between; }
  .fs-method-zoom__hint { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .fs-method-figure__open img { transition: none; }
}
