/* Thematic technique landing (/chat/<method>/<topic>) — not a chat shell */

body.technique-page {
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(1200px 480px at 12% -10%, rgba(124, 92, 252, 0.1), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(59, 130, 246, 0.08), transparent 55%),
    #f4f7fd;
}

/* chat.css раньше ставил overflow:hidden на html — страница не скроллилась на мобиле */
@media (max-width: 768px) {
  html:has(body.technique-page),
  body.technique-page {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
    padding-bottom: var(--mobile-bottom-nav-space, calc(56px + env(safe-area-inset-bottom, 0px)));
  }
}

body.technique-page .technique-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px clamp(16px, 3vw, 28px) 48px;
  box-sizing: border-box;
}

body.technique-page .technique-wrap > * {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.technique-hero,
.technique-nav,
.technique-card,
.technique-seo,
.technique-benefit,
.technique-calc-base,
.technique-method-desc,
.technique-actions,
.technique-nav__row,
.technique-form,
.technique-form .form-row,
.technique-form .form-group,
.technique-form input,
.technique-form select,
.technique-nav select,
.technique-actions .tech-btn {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.technique-hero {
  margin: 0 0 18px;
}

.technique-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: stretch;
  width: 100%;
}

.technique-hero-grid:not(:has(.technique-benefit)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.technique-hero-grid > * {
  min-width: 0;
}

@media (min-width: 768px) {
  .technique-hero-grid {
    gap: 14px 18px;
  }
}

@media (max-width: 960px) {
  .technique-hero-grid,
  .technique-hero-grid:not(:has(.technique-benefit)) {
    grid-template-columns: 1fr;
  }
}

.technique-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(30, 58, 138, 0.1);
  border-radius: 14px;
  box-sizing: border-box;
}

.technique-hero-copy .technique-method-desc {
  margin: 0;
}

.technique-kicker {
  margin: 0 0 8px;
  color: #7c5cfc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.technique-page .technique-hero > h1 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(32px, 4.4vw, 44px);
  font-weight: 500;
  font-style: normal;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #2c2416;
  text-align: left;
}

.technique-method-desc,
.technique-benefit {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.65;
}

.technique-benefit {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 58, 138, 0.12);
  border-radius: 14px;
  height: 100%;
  box-sizing: border-box;
}

button.technique-calc-base.calculation-base-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  margin: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 58, 138, 0.12);
  border-radius: 14px;
  height: 100%;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: #334155;
  text-shadow: none;
  box-shadow: none;
  filter: none;
  letter-spacing: normal;
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

button.technique-calc-base.calculation-base-btn:hover,
button.technique-calc-base.calculation-base-btn:focus-visible {
  background: #fff;
  border-color: rgba(30, 58, 138, 0.28);
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.08);
  color: #334155;
}

button.technique-calc-base.calculation-base-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.technique-calc-base__preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  min-height: 0;
  flex: 1 1 auto;
  color: #334155;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  white-space: normal;
  word-break: break-word;
}

.technique-calc-base__more {
  display: inline-block;
  margin-top: 8px;
  flex: 0 0 auto;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

button.technique-calc-base.calculation-base-btn:hover .technique-calc-base__more,
button.technique-calc-base.calculation-base-btn:focus-visible .technique-calc-base__more {
  color: #1d4ed8;
}

.technique-benefit__label {
  display: block;
  margin: 0 0 4px;
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.technique-card {
  background: #fff;
  border: 1px solid #e4e8f4;
  border-radius: 18px;
  padding: 18px clamp(16px, 2vw, 22px) 16px;
  box-shadow: 0 8px 28px rgba(30, 58, 138, 0.06);
}

.technique-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: #1e3a8a;
  text-align: left;
}

.technique-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px 14px;
}

.technique-form .form-group {
  margin: 0;
}

.technique-form label {
  display: block;
  margin: 0 0 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.technique-nav select,
.technique-form input,
.technique-form select {
  padding: 11px 12px;
  border: 1px solid #d4e0f5;
  border-radius: 12px;
  background: #fbfcff;
  color: #1a2340;
  font-size: 15px;
  /* styles.css @480px sets height:40px — clips Cyrillic descenders on Android */
  height: auto;
  min-height: 48px;
  line-height: 1.35;
  overflow: visible;
}

.technique-nav select,
.technique-nav .chat-thematic-nav__select,
.technique-nav .form-group select {
  padding: 12px 36px 12px 12px;
  box-sizing: border-box;
}

.technique-form input:focus,
.technique-form select:focus {
  outline: none;
  border-color: #7c5cfc;
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.15);
}

.technique-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
  margin-top: 16px;
  width: 100%;
}

.technique-actions .tech-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid #c9d4ef;
  background: #fff;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.technique-actions .tech-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.technique-actions .tech-btn.is-active,
.technique-actions .tech-btn--full.is-active,
.technique-actions .tech-btn--chat.is-active,
.technique-actions .tech-btn--viz.is-active {
  background: linear-gradient(135deg, #5b3df5 0%, #7c5cfc 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(91, 61, 245, 0.28);
}

/* Make the two next-step actions read as clickable, even while Visualization is selected. */
.technique-actions .tech-btn--full:not(:disabled):not(.is-active) {
  color: #fff;
  border-color: #6039e8;
  background: linear-gradient(135deg, #7047ff 0%, #4e2bd5 100%);
  box-shadow: 0 5px 18px rgba(91, 61, 245, 0.42), 0 0 0 2px rgba(124, 92, 252, 0.16);
  animation: technique-action-nudge 2.8s ease-out 1, technique-full-glow 2s ease-in-out infinite alternate;
}

.technique-actions .tech-btn--chat:not(:disabled):not(.is-active) {
  color: #fff;
  border-color: #058d91;
  background: linear-gradient(135deg, #12b8ad 0%, #087e9a 100%);
  box-shadow: 0 5px 18px rgba(8, 145, 178, 0.42), 0 0 0 2px rgba(18, 184, 173, 0.16);
  animation: technique-action-nudge 2.8s ease-out 1 0.35s, technique-chat-glow 2s ease-in-out infinite alternate;
}

@keyframes technique-action-nudge {
  0%, 100% { transform: translateY(0); }
  14%, 34% { transform: translateY(-3px); }
  24%, 44% { transform: translateY(0); }
}

@keyframes technique-full-glow {
  to { box-shadow: 0 7px 24px rgba(91, 61, 245, 0.58), 0 0 0 4px rgba(124, 92, 252, 0.2); }
}

@keyframes technique-chat-glow {
  to { box-shadow: 0 7px 24px rgba(8, 145, 178, 0.58), 0 0 0 4px rgba(18, 184, 173, 0.2); }
}

.technique-actions .tech-btn:hover:not(:disabled):not(.is-active) {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 9px 26px rgba(91, 61, 245, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .technique-actions .tech-btn--full:not(:disabled):not(.is-active),
  .technique-actions .tech-btn--chat:not(:disabled):not(.is-active) {
    animation: none;
  }
}

.technique-viz-panel {
  margin-top: 14px;
  width: 100%;
  padding: 14px;
  border: 1px solid #e4e8f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.05);
  box-sizing: border-box;
}

.technique-viz-status {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 14px;
}

.technique-viz-status.is-error {
  margin: 0;
  padding: 48px 20px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #b91c1c;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
}

.technique-viz-status.is-loading {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}

.technique-viz-progress {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.technique-viz-progress__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.technique-viz-progress__text {
  color: #475569;
  font-size: 14px;
  line-height: 1.35;
}

.technique-viz-progress__pct {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #5b3df5;
  font-size: 13px;
}

.technique-viz-progress__track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e8ecf7;
  overflow: hidden;
}

.technique-viz-progress__fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5b3df5 0%, #7c5cfc 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
  will-change: transform;
}

/* CSP-safe progress width: JS sets data-pct, not element.style */
.technique-viz-progress__fill[data-pct="0"] { transform: scaleX(0); }
.technique-viz-progress__fill[data-pct="1"] { transform: scaleX(0.01); }
.technique-viz-progress__fill[data-pct="2"] { transform: scaleX(0.02); }
.technique-viz-progress__fill[data-pct="3"] { transform: scaleX(0.03); }
.technique-viz-progress__fill[data-pct="4"] { transform: scaleX(0.04); }
.technique-viz-progress__fill[data-pct="5"] { transform: scaleX(0.05); }
.technique-viz-progress__fill[data-pct="6"] { transform: scaleX(0.06); }
.technique-viz-progress__fill[data-pct="7"] { transform: scaleX(0.07); }
.technique-viz-progress__fill[data-pct="8"] { transform: scaleX(0.08); }
.technique-viz-progress__fill[data-pct="9"] { transform: scaleX(0.09); }
.technique-viz-progress__fill[data-pct="10"] { transform: scaleX(0.1); }
.technique-viz-progress__fill[data-pct="11"] { transform: scaleX(0.11); }
.technique-viz-progress__fill[data-pct="12"] { transform: scaleX(0.12); }
.technique-viz-progress__fill[data-pct="13"] { transform: scaleX(0.13); }
.technique-viz-progress__fill[data-pct="14"] { transform: scaleX(0.14); }
.technique-viz-progress__fill[data-pct="15"] { transform: scaleX(0.15); }
.technique-viz-progress__fill[data-pct="16"] { transform: scaleX(0.16); }
.technique-viz-progress__fill[data-pct="17"] { transform: scaleX(0.17); }
.technique-viz-progress__fill[data-pct="18"] { transform: scaleX(0.18); }
.technique-viz-progress__fill[data-pct="19"] { transform: scaleX(0.19); }
.technique-viz-progress__fill[data-pct="20"] { transform: scaleX(0.2); }
.technique-viz-progress__fill[data-pct="21"] { transform: scaleX(0.21); }
.technique-viz-progress__fill[data-pct="22"] { transform: scaleX(0.22); }
.technique-viz-progress__fill[data-pct="23"] { transform: scaleX(0.23); }
.technique-viz-progress__fill[data-pct="24"] { transform: scaleX(0.24); }
.technique-viz-progress__fill[data-pct="25"] { transform: scaleX(0.25); }
.technique-viz-progress__fill[data-pct="26"] { transform: scaleX(0.26); }
.technique-viz-progress__fill[data-pct="27"] { transform: scaleX(0.27); }
.technique-viz-progress__fill[data-pct="28"] { transform: scaleX(0.28); }
.technique-viz-progress__fill[data-pct="29"] { transform: scaleX(0.29); }
.technique-viz-progress__fill[data-pct="30"] { transform: scaleX(0.3); }
.technique-viz-progress__fill[data-pct="31"] { transform: scaleX(0.31); }
.technique-viz-progress__fill[data-pct="32"] { transform: scaleX(0.32); }
.technique-viz-progress__fill[data-pct="33"] { transform: scaleX(0.33); }
.technique-viz-progress__fill[data-pct="34"] { transform: scaleX(0.34); }
.technique-viz-progress__fill[data-pct="35"] { transform: scaleX(0.35); }
.technique-viz-progress__fill[data-pct="36"] { transform: scaleX(0.36); }
.technique-viz-progress__fill[data-pct="37"] { transform: scaleX(0.37); }
.technique-viz-progress__fill[data-pct="38"] { transform: scaleX(0.38); }
.technique-viz-progress__fill[data-pct="39"] { transform: scaleX(0.39); }
.technique-viz-progress__fill[data-pct="40"] { transform: scaleX(0.4); }
.technique-viz-progress__fill[data-pct="41"] { transform: scaleX(0.41); }
.technique-viz-progress__fill[data-pct="42"] { transform: scaleX(0.42); }
.technique-viz-progress__fill[data-pct="43"] { transform: scaleX(0.43); }
.technique-viz-progress__fill[data-pct="44"] { transform: scaleX(0.44); }
.technique-viz-progress__fill[data-pct="45"] { transform: scaleX(0.45); }
.technique-viz-progress__fill[data-pct="46"] { transform: scaleX(0.46); }
.technique-viz-progress__fill[data-pct="47"] { transform: scaleX(0.47); }
.technique-viz-progress__fill[data-pct="48"] { transform: scaleX(0.48); }
.technique-viz-progress__fill[data-pct="49"] { transform: scaleX(0.49); }
.technique-viz-progress__fill[data-pct="50"] { transform: scaleX(0.5); }
.technique-viz-progress__fill[data-pct="51"] { transform: scaleX(0.51); }
.technique-viz-progress__fill[data-pct="52"] { transform: scaleX(0.52); }
.technique-viz-progress__fill[data-pct="53"] { transform: scaleX(0.53); }
.technique-viz-progress__fill[data-pct="54"] { transform: scaleX(0.54); }
.technique-viz-progress__fill[data-pct="55"] { transform: scaleX(0.55); }
.technique-viz-progress__fill[data-pct="56"] { transform: scaleX(0.56); }
.technique-viz-progress__fill[data-pct="57"] { transform: scaleX(0.57); }
.technique-viz-progress__fill[data-pct="58"] { transform: scaleX(0.58); }
.technique-viz-progress__fill[data-pct="59"] { transform: scaleX(0.59); }
.technique-viz-progress__fill[data-pct="60"] { transform: scaleX(0.6); }
.technique-viz-progress__fill[data-pct="61"] { transform: scaleX(0.61); }
.technique-viz-progress__fill[data-pct="62"] { transform: scaleX(0.62); }
.technique-viz-progress__fill[data-pct="63"] { transform: scaleX(0.63); }
.technique-viz-progress__fill[data-pct="64"] { transform: scaleX(0.64); }
.technique-viz-progress__fill[data-pct="65"] { transform: scaleX(0.65); }
.technique-viz-progress__fill[data-pct="66"] { transform: scaleX(0.66); }
.technique-viz-progress__fill[data-pct="67"] { transform: scaleX(0.67); }
.technique-viz-progress__fill[data-pct="68"] { transform: scaleX(0.68); }
.technique-viz-progress__fill[data-pct="69"] { transform: scaleX(0.69); }
.technique-viz-progress__fill[data-pct="70"] { transform: scaleX(0.7); }
.technique-viz-progress__fill[data-pct="71"] { transform: scaleX(0.71); }
.technique-viz-progress__fill[data-pct="72"] { transform: scaleX(0.72); }
.technique-viz-progress__fill[data-pct="73"] { transform: scaleX(0.73); }
.technique-viz-progress__fill[data-pct="74"] { transform: scaleX(0.74); }
.technique-viz-progress__fill[data-pct="75"] { transform: scaleX(0.75); }
.technique-viz-progress__fill[data-pct="76"] { transform: scaleX(0.76); }
.technique-viz-progress__fill[data-pct="77"] { transform: scaleX(0.77); }
.technique-viz-progress__fill[data-pct="78"] { transform: scaleX(0.78); }
.technique-viz-progress__fill[data-pct="79"] { transform: scaleX(0.79); }
.technique-viz-progress__fill[data-pct="80"] { transform: scaleX(0.8); }
.technique-viz-progress__fill[data-pct="81"] { transform: scaleX(0.81); }
.technique-viz-progress__fill[data-pct="82"] { transform: scaleX(0.82); }
.technique-viz-progress__fill[data-pct="83"] { transform: scaleX(0.83); }
.technique-viz-progress__fill[data-pct="84"] { transform: scaleX(0.84); }
.technique-viz-progress__fill[data-pct="85"] { transform: scaleX(0.85); }
.technique-viz-progress__fill[data-pct="86"] { transform: scaleX(0.86); }
.technique-viz-progress__fill[data-pct="87"] { transform: scaleX(0.87); }
.technique-viz-progress__fill[data-pct="88"] { transform: scaleX(0.88); }
.technique-viz-progress__fill[data-pct="89"] { transform: scaleX(0.89); }
.technique-viz-progress__fill[data-pct="90"] { transform: scaleX(0.9); }
.technique-viz-progress__fill[data-pct="91"] { transform: scaleX(0.91); }
.technique-viz-progress__fill[data-pct="92"] { transform: scaleX(0.92); }
.technique-viz-progress__fill[data-pct="93"] { transform: scaleX(0.93); }
.technique-viz-progress__fill[data-pct="94"] { transform: scaleX(0.94); }
.technique-viz-progress__fill[data-pct="95"] { transform: scaleX(0.95); }
.technique-viz-progress__fill[data-pct="96"] { transform: scaleX(0.96); }
.technique-viz-progress__fill[data-pct="97"] { transform: scaleX(0.97); }
.technique-viz-progress__fill[data-pct="98"] { transform: scaleX(0.98); }
.technique-viz-progress__fill[data-pct="99"] { transform: scaleX(0.99); }
.technique-viz-progress__fill[data-pct="100"] { transform: scaleX(1); }

.technique-page .form-hint--flush {
  margin: 0;
}

.technique-page .technique-extra-title {
  margin: 14px 0 10px;
  font-size: 15px;
  color: #1e3a8a;
  font-weight: 600;
  border-bottom: none;
  padding-bottom: 0;
}

.technique-page .additional-section {
  margin-top: 14px;
}

.technique-viz-mount {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: auto;
  min-height: 160px;
}

.technique-viz-frame {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Readable but larger chart area */
.technique-viz-mount > svg,
.technique-viz-frame > svg,
.technique-viz-frame .wnw-chart-root > svg,
.technique-viz-frame .hd-svg-wrap > svg {
  display: block;
  width: 100%;
  max-width: 880px;
  height: auto;
  max-height: min(78vh, 780px);
  margin: 0 auto;
}

.technique-viz-frame--hd {
  max-width: 1100px;
}

.technique-viz-frame--hd .hd-stage {
  max-height: none;
  padding: 10px 6px 12px;
  gap: 10px;
  grid-template-columns: minmax(200px, 260px) 1fr;
}

.technique-viz-frame--hd .hd-graph {
  grid-template-columns: 84px minmax(0, 1fr) 84px;
}

.technique-viz-frame--hd .hd-svg-wrap svg {
  max-width: 100%;
  max-height: min(72vh, 680px);
}

.technique-viz-frame--western > svg,
.technique-viz-frame--western .wnw-chart-root > svg,
.technique-viz-frame--destiny_matrix > svg,
.technique-viz-frame--pythagorean > svg,
.technique-viz-frame--ba_zi > svg,
.technique-viz-frame--zi_wei > svg,
.technique-viz-frame--qi_men > svg,
.technique-viz-frame--lunar > svg,
.technique-viz-frame--life_force > svg,
.technique-viz-frame--billionaire > svg,
.technique-viz-frame--vedic > svg,
.technique-viz-frame--western_extended > svg,
.technique-viz-frame--palmistry {
  max-width: min(100%, 980px);
  max-height: min(84vh, 880px);
}

.technique-viz-frame--method_viz > svg {
  max-width: min(100%, 1100px);
  max-height: none;
}

.technique-viz-frame--western-overlay .wnw-chart-root > svg {
  max-width: min(100%, 1280px);
  max-height: min(94vh, 1200px);
}

.technique-viz-frame--western .wnw-chart-root {
  width: 100%;
}

.technique-viz-frame--western .wnw-timeline {
  max-width: min(100%, 960px);
  margin-left: auto;
  margin-right: auto;
}

.technique-viz-frame--tibetan > svg {
  max-width: min(100%, 1100px);
  max-height: min(82vh, 820px);
  width: 100%;
  height: auto;
}

.technique-viz-frame--kabbalistic_astro > svg {
  max-width: min(100%, 1180px);
  max-height: min(82vh, 720px);
  width: 100%;
  height: auto;
}

.technique-viz-frame--soul_formula {
  max-width: 1200px;
  width: 100%;
}

.technique-viz-frame--soul_formula .sfc-inline {
  width: 100%;
}

.technique-viz-frame--soul_formula .sfc-panels {
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(180px, 1fr);
}

.technique-viz-frame--soul_formula .sfc-formula-panel svg,
.technique-viz-frame--soul_formula .sfc-cosmo-panel svg,
.technique-viz-frame--soul_formula .sfc-inline > svg {
  max-width: 100%;
  max-height: none;
  width: 100%;
  height: auto;
  margin: 0;
}

@media (max-width: 900px) {
  .technique-viz-frame--soul_formula .sfc-panels {
    grid-template-columns: 1fr;
  }
}

.technique-viz-frame--vedic {
  width: 100%;
  max-width: 1280px;
}
.technique-viz-frame--vedic .vk-inline {
  width: 100%;
}
.technique-viz-frame--vedic > svg,
.technique-viz-frame--vedic .vk-inline-body > svg,
.technique-viz-frame--vedic .vk-varga-focus > svg {
  width: 100%;
  max-width: 1280px;
  height: auto;
  max-height: none;
}

.technique-viz-frame--palmistry,
.technique-palmistry-mount {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.technique-viz-empty {
  margin: 0;
  padding: 24px 12px;
  text-align: center;
  color: #64748b;
}

.technique-viz-compat {
  margin: 16px 12px 8px;
  max-width: 720px;
}

.zwds-transit--compat {
  background: linear-gradient(90deg, #f3e8ff, #ede9fe);
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .technique-viz-frame--hd .hd-stage {
    grid-template-columns: 1fr;
  }

  .technique-viz-frame--hd .hd-graph {
    grid-template-columns: 64px 1fr 64px;
  }

  .technique-viz-mount > svg,
  .technique-viz-frame > svg,
  .technique-viz-frame .hd-svg-wrap > svg {
    max-height: min(65vh, 520px);
  }

  .technique-viz-frame--qi_men,
  .technique-viz-frame--zi_wei,
  .technique-viz-frame--ba_zi,
  .technique-viz-frame--vedic,
  .technique-viz-frame--soul_formula,
  .technique-viz-frame--destiny_matrix,
  .technique-viz-frame--pythagorean,
  .technique-viz-frame--life_force,
  .technique-viz-frame--billionaire,
  .technique-viz-frame--method_viz,
  .technique-viz-frame--western,
  .technique-viz-frame--western_extended,
  .technique-viz-frame--lunar,
  .technique-viz-frame--tibetan,
  .technique-viz-frame--kabbalistic_astro,
  .technique-viz-frame--palmistry,
  .technique-viz-frame--astrocartography {
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .technique-viz-frame--qi_men .qimen-workspace {
    width: 100%;
    max-width: 100%;
  }

  .technique-viz-frame--zi_wei .zwds-chart {
    width: 100%;
  }

  .technique-viz-lightbox__body .technique-viz-frame > svg,
  .technique-viz-lightbox__body .technique-viz-frame .wnw-chart-root > svg,
  .technique-viz-lightbox__body .technique-viz-frame .hd-svg-wrap > svg,
  .technique-viz-lightbox__body .technique-viz-frame--vedic .vk-inline-body > svg,
  .technique-viz-lightbox__body .technique-viz-frame--destiny_matrix > svg,
  .technique-viz-lightbox__body .technique-viz-frame--pythagorean > svg,
  .technique-viz-lightbox__body .technique-viz-frame--life_force > svg,
  .technique-viz-lightbox__body .technique-viz-frame--billionaire > svg,
  .technique-viz-lightbox__body .technique-viz-frame--method_viz > svg,
  .technique-viz-lightbox__body .technique-viz-frame--tibetan > svg,
  .technique-viz-lightbox__body .technique-viz-frame--kabbalistic_astro > svg {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

.technique-viz-frame--expandable {
  position: relative;
  cursor: zoom-in;
}

.technique-viz-expand-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e4e8f4;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.12);
  color: #334155;
  font-size: 16px;
  line-height: 1;
  cursor: zoom-in;
  pointer-events: auto;
  opacity: 0.95;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
  font-family: inherit;
}

.technique-viz-expand-hint__label {
  display: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.technique-viz-frame--expandable:hover .technique-viz-expand-hint,
.technique-viz-frame--expandable:focus-visible .technique-viz-expand-hint,
.technique-viz-expand-hint:focus-visible {
  opacity: 1;
  transform: scale(1.05);
  outline: none;
}

.technique-viz-frame.is-lightbox .technique-viz-expand-hint {
  display: none;
}

.technique-viz-lightbox {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: rgba(15, 23, 42, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.technique-viz-lightbox[hidden] {
  display: none !important;
}

.technique-viz-lightbox__dialog {
  width: min(1560px, 100%);
  max-height: calc(100vh - 24px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.technique-viz-lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #eceff3;
  background: #fafbfc;
  flex-shrink: 0;
}

.technique-viz-lightbox__title {
  font-size: 14px;
  line-height: 1.35;
  color: #1f2937;
  font-weight: 600;
}

.technique-viz-lightbox__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.technique-viz-lightbox__zoom-btn,
.technique-viz-lightbox__close {
  border: 1px solid #1f2937;
  background: #1f2937;
  color: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.technique-viz-lightbox__zoom-btn {
  background: #5b3df5;
  border-color: #5b3df5;
  min-width: 44px;
  font-weight: 700;
}

.technique-viz-lightbox__zoom-btn:hover,
.technique-viz-lightbox__close:hover {
  background: #111827;
  border-color: #111827;
}

.technique-viz-lightbox__zoom-btn:hover {
  background: #4c2fe0;
  border-color: #4c2fe0;
}

.technique-viz-lightbox__hint {
  margin: 0;
  padding: 6px 16px 0;
  font-size: 12px;
  color: #64748b;
  flex-shrink: 0;
}

.technique-viz-lightbox__body {
  overflow: auto;
  padding: 12px 12px 20px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
}

.technique-viz-lightbox__body.is-zoomed {
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.technique-viz-lightbox__zoom-stage {
  transform-origin: 0 0;
  will-change: transform;
  width: 100%;
}

.technique-viz-fit {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.technique-viz-fit > * {
  display: block;
}

.technique-viz-fit.is-scaled {
  /* Height is set inline from natural size × scale */
  margin-bottom: 4px;
}

.technique-viz-lightbox__body .technique-viz-frame {
  max-width: none;
  width: 100%;
  margin: 0;
  cursor: default;
}

.technique-viz-lightbox__body .technique-viz-mount > svg,
.technique-viz-lightbox__body .technique-viz-frame > svg,
.technique-viz-lightbox__body .technique-viz-frame .wnw-chart-root > svg,
.technique-viz-lightbox__body .technique-viz-frame .hd-svg-wrap > svg,
.technique-viz-lightbox__body .technique-viz-frame--western > svg,
.technique-viz-lightbox__body .technique-viz-frame--western .wnw-chart-root > svg,
.technique-viz-lightbox__body .technique-viz-frame--destiny_matrix > svg,
.technique-viz-lightbox__body .technique-viz-frame--method_viz > svg,
.technique-viz-lightbox__body .technique-viz-frame--pythagorean > svg,
.technique-viz-lightbox__body .technique-viz-frame--ba_zi > svg,
.technique-viz-lightbox__body .technique-viz-frame--zi_wei > svg,
.technique-viz-lightbox__body .technique-viz-frame--qi_men > svg,
.technique-viz-lightbox__body .technique-viz-frame--lunar > svg,
.technique-viz-lightbox__body .technique-viz-frame--life_force > svg,
.technique-viz-lightbox__body .technique-viz-frame--billionaire > svg,
.technique-viz-lightbox__body .technique-viz-frame--vedic > svg,
.technique-viz-lightbox__body .technique-viz-frame--vedic .vk-inline-body > svg,
.technique-viz-lightbox__body .technique-viz-frame--vedic .vk-varga-focus > svg,
.technique-viz-lightbox__body .technique-viz-frame--western_extended > svg,
.technique-viz-lightbox__body .technique-viz-frame--tibetan > svg,
.technique-viz-lightbox__body .technique-viz-frame--kabbalistic_astro > svg,
.technique-viz-lightbox__body .technique-viz-frame--soul_formula .sfc-formula-panel svg,
.technique-viz-lightbox__body .technique-viz-frame--soul_formula .sfc-cosmo-panel svg,
.technique-viz-lightbox__body .technique-viz-frame--soul_formula .sfc-inline > svg,
.technique-viz-lightbox__body .technique-viz-frame--hd .hd-svg-wrap svg,
.technique-viz-lightbox__body .technique-viz-frame--palmistry,
.technique-viz-lightbox__body .technique-palmistry-mount {
  max-width: 100%;
  max-height: none;
  width: 100%;
  height: auto;
}

.technique-viz-lightbox__body .technique-viz-frame--western-overlay .wnw-chart-root > svg {
  max-width: 100%;
  max-height: none;
}

.technique-viz-lightbox__body .technique-viz-frame--hd .hd-stage {
  max-height: none;
}

.technique-viz-lightbox__body .technique-viz-frame--vedic,
.technique-viz-lightbox__body .technique-viz-frame--soul_formula {
  max-width: none;
}

body.technique-viz-lightbox-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .technique-viz-lightbox {
    padding: 0;
    background: rgba(15, 23, 42, 0.72);
  }

  .technique-viz-lightbox__dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .technique-viz-lightbox__toolbar {
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
  }

  .technique-viz-lightbox__hint {
    padding: 6px 12px 0;
  }

  .technique-viz-lightbox__body {
    padding: 8px 8px max(16px, env(safe-area-inset-bottom, 0px));
  }

  .technique-viz-expand-hint {
    top: 8px;
    right: 8px;
    min-height: 40px;
    height: auto;
    padding: 8px 12px;
    border-radius: 12px;
    background: #5b3df5;
    border-color: #5b3df5;
    color: #fff;
    box-shadow: 0 6px 18px rgba(91, 61, 245, 0.35);
  }

  .technique-viz-expand-hint__label {
    display: inline;
  }

  .technique-viz-expand-hint__icon {
    font-size: 15px;
  }
}

.technique-nav {
  margin: 0 0 16px;
}

.technique-nav__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.technique-nav .chat-thematic-nav__label-row,
.technique-nav .form-group > label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.technique-nav .chat-thematic-nav__label-row label {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.technique-hint {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.technique-chat-panel {
  margin-top: 8px;
  width: 100%;
}

.technique-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.technique-chat-back {
  border: 0;
  background: transparent;
  color: #5b3df5;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 0;
}

.technique-chat-back:hover {
  text-decoration: underline;
}

.technique-chat-topic {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

body.technique-page.technique-chat-open .technique-chat-container {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 1px solid #e4e8f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.05);
  overflow: hidden;
}

body.technique-page .technique-chat-container .chat-messages {
  min-height: 360px;
  max-height: min(72vh, 760px);
  padding: 14px;
}

body.technique-page .technique-chat-container .bot-message {
  width: 100%;
  max-width: 100%;
}

body.technique-page .technique-chat-container .bot-message .message-content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.technique-page .technique-chat-container .bot-message .message-text {
  max-width: none;
}

body.technique-page .technique-chat-container .chat-input-container,
body.technique-page .technique-chat-container .balance-panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

body.technique-page .chat-status-notice {
  margin: 0 0 10px;
}

/* Mobile: chat input / session panel edge-to-edge */
@media (max-width: 768px) {
  body.technique-page.technique-chat-open .technique-wrap {
    padding-left: 0;
    padding-right: 0;
  }

  body.technique-page.technique-chat-open .technique-hero,
  body.technique-page.technique-chat-open .technique-nav,
  body.technique-page.technique-chat-open .technique-card,
  body.technique-page.technique-chat-open .technique-viz-panel,
  body.technique-page.technique-chat-open .technique-hint {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  body.technique-page.technique-chat-open .technique-chat-panel {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  body.technique-page.technique-chat-open .technique-chat-toolbar,
  body.technique-page.technique-chat-open .chat-status-notice {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  body.technique-page.technique-chat-open .technique-chat-container {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }

  body.technique-page.technique-chat-open .technique-chat-container .chat-messages {
    flex: 1 1 auto;
    min-height: 42vh;
    max-height: calc(100dvh - 240px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.technique-page.technique-chat-open .technique-chat-container .chat-suggested-questions {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  body.technique-page.technique-chat-open .technique-chat-container .chat-input-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 6px max(10px, env(safe-area-inset-right, 0px)) 6px max(10px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    flex-shrink: 0;
  }

  body.technique-page.technique-chat-open .technique-chat-container .chat-input-wrapper {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border-radius: 14px;
    padding: 4px 6px;
    gap: 6px;
    align-items: center;
  }

  body.technique-page.technique-chat-open .technique-chat-container .chat-input-wrapper:focus-within {
    transform: none;
  }

  body.technique-page.technique-chat-open .technique-chat-container #messageInput {
    min-height: 36px;
    max-height: 88px;
    padding: 8px 10px;
    font-size: 16px; /* avoid iOS zoom */
    line-height: 1.35;
  }

  body.technique-page.technique-chat-open .technique-chat-container #sendButton {
    width: 40px;
    height: 40px;
    padding: 0;
  }

  body.technique-page.technique-chat-open .technique-chat-container .balance-panel {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    flex-shrink: 0;
  }

  body.technique-page[data-auth-notice="subscription"] .chat-status-notice--active,
  body.technique-page[data-auth-notice="subscription"] .chat-tariff-hint {
    display: none !important;
  }

  body.technique-page[data-auth-notice="subscription"].technique-chat-open .technique-chat-container .balance-panel {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}


.technique-seo.is-modern {
  text-align: center;
}

.technique-seo-lead {
  width: 100%;
  margin: 0;
  padding: 28px clamp(18px, 4vw, 40px);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 247, 255, 0.92) 100%);
  border: 1px solid rgba(124, 92, 252, 0.12);
  box-shadow: 0 12px 36px rgba(30, 58, 138, 0.06);
}

.technique-seo-lead h2 {
  margin: 0 0 12px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #1a2340;
}

.technique-seo-lead p {
  margin: 0 auto;
  max-width: 720px;
  color: #475569;
  font-size: 16.5px;
  line-height: 1.7;
}

.technique-seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.technique-seo-block {
  width: 100%;
  margin: 0;
  padding: 22px clamp(16px, 3vw, 28px);
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e4e8f4;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.05);
  text-align: center;
}

.technique-seo-block h2,
.technique-seo-block h3 {
  margin: 0 0 10px;
  color: #1e3a8a;
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 700;
  line-height: 1.3;
}

.technique-seo-block h3 {
  font-size: clamp(15px, 2vw, 17px);
  color: #312e81;
}

.technique-seo-block p,
.technique-seo-block li {
  margin: 0;
  color: #475569;
  font-size: 15.5px;
  line-height: 1.65;
}

.technique-seo-block p + p,
.technique-seo-block ol {
  margin-top: 10px;
}

.technique-seo-block ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: left;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.technique-seo-block ol li {
  position: relative;
  padding: 10px 12px 10px 44px;
  background: #f7f8ff;
  border-radius: 12px;
  border: 1px solid #e8ecf8;
}

.technique-seo-block ol li::before {
  counter-increment: technique-step;
  content: counter(technique-step);
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5b3df5, #7c5cfc);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.technique-seo-block ol {
  counter-reset: technique-step;
}

.technique-seo-block a {
  color: #5b3df5;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 61, 245, 0.25);
}

.technique-seo-block a:hover {
  border-bottom-color: #5b3df5;
}

.technique-seo-faq {
  width: 100%;
  display: grid;
  gap: 10px;
}

.technique-seo-faq > h2 {
  margin: 8px 0 2px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(20px, 2.8vw, 26px);
  color: #1a2340;
  text-align: center;
}

.technique-seo-faq-item {
  width: 100%;
  margin: 0;
  padding: 16px clamp(16px, 3vw, 24px);
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e4e8f4;
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.04);
  text-align: left;
}

.technique-seo-faq-item h3 {
  margin: 0 0 6px;
  color: #312e81;
  font-size: 16px;
  font-weight: 700;
}

.technique-seo-faq-item p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .technique-seo-grid {
    grid-template-columns: 1fr;
  }

  .technique-seo-block ol {
    text-align: left;
  }
}

/* Mobile UX: hide SEO article visually; HTML stays for crawlers */
@media (max-width: 768px) {
  .technique-seo {
    display: none !important;
  }

  body.technique-page .technique-hero > h1 {
    font-size: clamp(20px, 5.2vw, 26px);
    line-height: 1.25;
    margin-bottom: 12px;
  }
}

@media (max-width: 640px) {
  .technique-wrap {
    padding: 12px 12px 36px;
  }

  .technique-hero-grid {
    display: none;
  }

  .technique-form .form-row,
  .technique-nav__row {
    grid-template-columns: 1fr;
  }

  .technique-actions {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .technique-actions .tech-btn {
    min-height: 44px;
    padding: 10px 6px;
    font-size: 12px;
  }

  .technique-card {
    border-radius: 14px;
    padding: 14px;
  }

  /* Beat styles.css height:40px that clips select text on Android */
  body.technique-page .technique-nav select,
  body.technique-page .technique-nav .form-group select,
  body.technique-page .technique-form select,
  body.technique-page .chat-thematic-nav__select {
    height: auto !important;
    min-height: 48px !important;
    line-height: 1.35 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    overflow: visible !important;
  }
}

/* Full analysis — highlight existing «Направление» field */
#thematicTopicField.is-nudge,
#thematicTopicField.is-direction-ack {
  border-radius: 12px;
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

#thematicTopicField.is-nudge {
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.18);
}

#thematicTopicField .technique-direction-ack {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: #5b3df5;
  font-weight: 600;
  line-height: 1.35;
}

.technique-field-nudge {
  outline: 2px solid #7c5cfc;
  outline-offset: 2px;
  border-radius: 8px;
}
