/* ProfiMind — дизайн v2: «Маршрут миссии» (лаванда · коралл · бирюза) */
:root {
  --bg: #F6F3FF;
  --primary: #5B4BDB;
  --primary-700: #4535C2;
  --primary-900: #2C2378;
  --primary-100: #ECE8FF;
  --primary-50: #F7F5FF;
  --coral: #FF7A59;
  --coral-700: #D9532F;
  --coral-100: #FFE7DF;
  --teal: #22A99A;
  --teal-100: #DCF5F1;
  --sun: #FFC83D;
  --sun-700: #B98400;
  --sun-100: #FFF3D2;
  --ink: #241F4D;
  --ink-2: #57537F;
  --ink-3: #8E8AB3;
  --line: #E5E1F5;
  --card: #FFFFFF;
  --radius: 26px;
  --shadow: 0 2px 0 rgba(44, 35, 120, .05), 0 14px 34px rgba(44, 35, 120, .10);
  --shadow-lg: 0 2px 0 rgba(44, 35, 120, .05), 0 24px 56px rgba(44, 35, 120, .16);
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}
/* мягкие цветные пятна на фоне */
body::before, body::after {
  content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(60px); opacity: .55;
}
body::before { width: 520px; height: 520px; top: -180px; right: -140px; background: #FFD6C7; }
body::after { width: 560px; height: 560px; bottom: -220px; left: -200px; background: #CFE9FF; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--primary-700); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- шапка: плавающая панель */
.site-header {
  position: sticky; top: 10px; z-index: 20;
  width: calc(100% - 24px); max-width: 1160px; margin: 10px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 10px 16px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 22px; box-shadow: 0 8px 24px rgba(44, 35, 120, .08);
  border: 1.5px solid #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand-name { font-weight: 900; font-size: 19px; }
.brand-name b { color: var(--coral); font-weight: 900; }
.brand-tag { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: -3px; }
.nav { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; gap: 2px; background: var(--primary-50); border-radius: 14px; padding: 4px; }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 900; padding: 6px 10px; border-radius: 10px; color: var(--ink-3);
}
.lang-switch button.active { background: #fff; color: var(--primary); box-shadow: 0 2px 6px rgba(44, 35, 120, .12); }
.psy-link {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-weight: 800; font-size: 14px; color: var(--ink-2);
  padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line);
}
.psy-link:hover { border-color: var(--primary); color: var(--primary); }
.psy-link.active { background: var(--primary-100); border-color: var(--primary-100); color: var(--primary-700); }

/* ---------- общие элементы */
.site-main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 32px) 40px; outline: none; }
.site-footer { display: flex; justify-content: center; gap: 8px; padding: 16px 16px 26px; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); }
.lead { font-size: clamp(16px, 1.7vw, 19px); color: var(--ink-2); font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 16px; border: 2px solid transparent;
  font-weight: 900; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease, opacity .2s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 5px 0 var(--primary-900); }
.btn-primary:hover:not(:disabled) { background: var(--primary-700); }
.btn-primary:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--primary-900); }
.btn-secondary { background: var(--coral); color: #fff; box-shadow: 0 5px 0 var(--coral-700); }
.btn-secondary:hover:not(:disabled) { background: #FF6A44; }
.btn-secondary:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--coral-700); }
.btn-ghost { background: #fff; color: var(--primary-700); border-color: var(--line); box-shadow: 0 4px 0 var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--primary-100); background: var(--primary-50); }
.btn-ghost:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 14px; border-radius: 12px; }
.btn-lg { min-height: 56px; padding: 12px 26px; font-size: 17px; border-radius: 18px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field-label { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.input, .select {
  width: 100%; min-height: 52px; padding: 10px 16px;
  border: 2px solid var(--line); border-radius: 16px; background: var(--primary-50);
  font-size: 16px; font-weight: 700; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--ink-3); font-weight: 600; }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 5px rgba(91, 75, 219, .14); background: #fff; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B4BDB' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 900;
  padding: 6px 14px; border-radius: 999px;
  background: var(--primary-100); color: var(--primary-700);
}
.badge-coral { background: var(--coral-100); color: var(--coral-700); }
.pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-low { background: var(--teal-100); color: #13786C; }
.pill-high { background: var(--coral-100); color: var(--coral-700); }

.fade-in { animation: fadeIn .45s ease both; }
.pop-in { animation: popIn .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-6px) rotate(4deg); } }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(18deg); } 86% { transform: rotate(-10deg); } 94% { transform: rotate(12deg); } }

.loader { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 80px 0; color: var(--ink-3); font-weight: 700; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid var(--primary-100); border-top-color: var(--coral); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- главная */
.home { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; max-width: 720px; }
.hello-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-weight: 800; font-size: 14px; color: var(--ink-2); }
.hello-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-100); }
.hero h1 { font-size: clamp(46px, 7.5vw, 80px); font-weight: 900; color: var(--ink); }
.hero h1 .wave { display: inline-block; animation: wiggle 2.6s ease-in-out infinite; transform-origin: 70% 80%; }
.hero h1 .hl { background: linear-gradient(transparent 62%, #FFD9CC 62%); padding: 0 6px; border-radius: 6px; }

/* маршрут миссии */
.route { position: relative; width: 100%; max-width: 880px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0; margin: 0; list-style: none; }
.route::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 34px; border-top: 3px dashed #CFC8F3; z-index: 0; }
.station { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.station .ico {
  width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; font-size: 32px;
  background: var(--st-soft); border: 3px solid #fff; box-shadow: 0 8px 18px rgba(44, 35, 120, .12);
  transform: rotate(var(--rot, -4deg)); animation: bob 5s ease-in-out infinite; animation-delay: var(--delay, 0s);
}
.station b { font-size: 14px; font-weight: 900; color: var(--ink); }
.station small { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: -6px; }

.start-grid { width: 100%; max-width: 920px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 20px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 16px; }

/* форма как посадочный талон */
.ticket { position: relative; background: #fff; border-radius: 28px; box-shadow: var(--shadow-lg); }
.ticket-head {
  display: flex; align-items: center; gap: 14px; padding: 20px 24px;
  border-radius: 28px 28px 0 0; color: #fff;
  background: linear-gradient(120deg, #5B4BDB 0%, #7D6BF2 55%, #A28BFF 100%);
}
.ticket-head .t-ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: rgba(255, 255, 255, .18); }
.ticket-head h2 { font-size: 20px; font-weight: 900; }
.ticket-head p { font-size: 13px; font-weight: 700; opacity: .85; }
.ticket-cut { position: relative; height: 0; margin: 0 22px; border-top: 2.5px dashed var(--line); }
.ticket-cut::before, .ticket-cut::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.ticket-cut::before { left: -35px; }
.ticket-cut::after { right: -35px; }
.ticket-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.grade-row { display: grid; grid-template-columns: 1fr 112px; gap: 12px; align-items: end; }
.grade-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gp {
  min-height: 56px; border: 2px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer;
  font-weight: 900; font-size: 22px; color: var(--ink-2); box-shadow: 0 4px 0 var(--line);
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
  transition: transform .12s, box-shadow .12s, border-color .2s, background .2s;
}
.gp small { font-size: 12px; font-weight: 800; color: var(--ink-3); }
.gp:hover { border-color: var(--primary-100); }
.gp.active { background: var(--primary-100); border-color: var(--primary); color: var(--primary-700); box-shadow: 0 4px 0 var(--primary); }
.gp:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }

.resume { width: 100%; max-width: 920px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 18px; background: var(--sun-100); border-radius: 20px; border: 2px dashed #F3D277; }
.resume p { font-weight: 800; color: #7A5600; }
.resume .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.side-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.side-card .sc-head { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.side-card .sc-ico { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: var(--sun-100); }
.side-card.calm { background: var(--teal-100); box-shadow: none; }
.side-card.calm .sc-ico { background: #fff; }
.side-card.calm p { color: #1B6B62; font-weight: 700; font-size: 14px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { min-height: 46px; padding: 8px 12px; font-size: 16px; text-transform: uppercase; letter-spacing: .14em; }
.inline-form .input::placeholder { text-transform: none; letter-spacing: 0; }

/* ---------- тест */
.test { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.test-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sec-chip { display: flex; align-items: center; gap: 12px; }
.sec-chip .sc-ico { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: #fff; box-shadow: var(--shadow); }
.sec-chip small { display: block; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--coral); }
.sec-chip h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 900; }
.counter { font-weight: 900; font-size: 14px; color: var(--primary-700); background: #fff; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.instr { font-weight: 700; color: var(--ink-2); }
.steps-bar { display: flex; gap: 6px; }
.steps-bar i { flex: 1; height: 10px; border-radius: 999px; background: #E3DEF7; transition: background .3s; }
.steps-bar i.done { background: var(--primary); }
.steps-bar i.current { background: linear-gradient(90deg, var(--coral), #FFAA8F); animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 89, .0); } 50% { box-shadow: 0 0 0 4px rgba(255, 122, 89, .18); } }

.q-card { position: relative; padding: 44px clamp(18px, 3vw, 32px) clamp(20px, 3vw, 30px); margin-top: 30px; }
.q-emoji {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; font-size: 34px;
  background: var(--sun-100); border: 4px solid #fff; box-shadow: 0 10px 20px rgba(44, 35, 120, .12);
}
.q-text { font-size: clamp(19px, 2.4vw, 23px); font-weight: 900; text-align: center; margin-bottom: 22px; }
.options { display: grid; gap: 12px; }
.options.grid2 { grid-template-columns: 1fr 1fr; }
.option {
  --oc: var(--primary); --oc-soft: var(--primary-100);
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px 16px; min-height: 68px; border-radius: 20px; cursor: pointer;
  border: 2.5px solid var(--line); background: #fff; box-shadow: 0 4px 0 var(--line);
  transition: border-color .2s, background .2s, transform .12s, box-shadow .12s;
}
.option:hover:not(:disabled) { border-color: var(--oc); transform: translateY(-2px); box-shadow: 0 6px 0 var(--oc-soft); }
.option:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.option .opt-badge {
  flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 900; font-size: 16px; background: var(--oc-soft); color: var(--oc);
}
.option .opt-mood { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: var(--oc-soft); }
.option .opt-text { font-size: 16px; font-weight: 700; }
.options.grid2 .option { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 130px; padding: 16px; }
.option.selected { border-color: var(--oc); background: var(--oc-soft); box-shadow: 0 4px 0 var(--oc); animation: popIn .35s ease; }
.option.selected .opt-badge { background: var(--oc); color: #fff; }
.option:disabled { cursor: default; }
.test-nav { display: flex; justify-content: space-between; min-height: 46px; }

/* ---------- дыхание */
.breath { max-width: 760px; margin: 0 auto; }
.breath-card {
  padding: clamp(22px, 4vw, 40px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F6F2FF 55%, #FFF1EB 100%);
}
.breath-card h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; }
.breath-card .lead { max-width: 580px; font-size: 16px; }
.breath-stage { position: relative; width: min(280px, 72vw); aspect-ratio: 1; display: grid; place-items: center; margin: 10px 0 4px; }
.breath-stage .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(124, 108, 242, .25); transform: scale(.7); transition: transform 4s cubic-bezier(.45, 0, .55, 1), opacity 4s; opacity: .5; }
.breath-stage .ring.r2 { border-color: rgba(255, 122, 89, .25); }
.breath-stage .ring.r3 { border-style: dashed; }
.breath-bubble {
  width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #FFFFFF 0%, #D9D1FF 28%, #9D8CF7 62%, #6F5DE6 100%);
  box-shadow: inset -12px -16px 30px rgba(44, 35, 120, .25), 0 24px 50px rgba(91, 75, 219, .30);
  transform: scale(.55); transition: transform 4s cubic-bezier(.45, 0, .55, 1);
}
.breath-stage.inhale .breath-bubble { transform: scale(.92); }
.breath-stage.inhale .ring.r1 { transform: scale(1.02); opacity: 1; }
.breath-stage.inhale .ring.r2 { transform: scale(1.1); opacity: .9; }
.breath-stage.inhale .ring.r3 { transform: scale(1.18); opacity: .7; }
.breath-stage.hold .breath-bubble { transform: scale(.92); animation: holdPulse 1.4s ease-in-out infinite; }
.breath-stage.hold .ring.r1 { transform: scale(1.02); opacity: 1; }
.breath-stage.hold .ring.r2 { transform: scale(1.1); opacity: .9; }
.breath-stage.hold .ring.r3 { transform: scale(1.18); opacity: .7; }
.breath-stage.exhale .breath-bubble { transform: scale(.5); }
.breath-stage.rest .breath-bubble { transform: scale(.7); transition-duration: 1.2s; }
@keyframes holdPulse { 0%, 100% { transform: scale(.92); } 50% { transform: scale(.95); } }
.breath-say { font-size: clamp(18px, 2.6vw, 22px); font-weight: 900; color: var(--primary-900); min-height: 1.5em; }
.phases { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.phases span { font-size: 13px; font-weight: 800; padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--ink-3); border: 2px solid var(--line); transition: all .3s; }
.phases span.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.breath-meta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.breath-meta span { font-weight: 900; font-size: 14px; padding: 6px 14px; border-radius: 999px; background: var(--sun-100); color: #7A5600; min-width: 96px; }
.breath-actions { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 440px; margin-top: 4px; }

/* ---------- результат */
.result { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.result-capture { display: flex; flex-direction: column; gap: 20px; padding: 4px; }
.result-capture.capturing { padding: 28px; background: var(--bg); border-radius: 28px; }
.result-head { position: relative; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; padding-top: 6px; }
.result-head .confetti { font-size: 30px; letter-spacing: 10px; }
.result-head h1 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 900; }
.result-head .who { font-weight: 800; color: var(--primary-700); background: #fff; padding: 6px 16px; border-radius: 999px; box-shadow: var(--shadow); }
.scores-card { padding: 20px 22px; display: grid; gap: 12px; }
.scores-card h3 { font-size: 15px; font-weight: 900; color: var(--ink-2); }
.eq { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; height: 190px; padding-top: 8px; }
.eq-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.eq-val { font-weight: 900; font-size: 18px; color: var(--ink); }
.eq-bar { width: 100%; max-width: 70px; height: 6px; border-radius: 16px 16px 8px 8px; background: var(--dir-soft); transition: height .9s cubic-bezier(.2, 1.2, .4, 1); }
.eq-col.top .eq-bar { background: var(--dir); }
.eq-lbl { display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: 13px; color: var(--dir); line-height: 1.2; }
.eq-lbl small { color: var(--ink-3); font-weight: 700; font-size: 11px; text-align: center; }
/* горизонтальные полоски (окно деталей психолога) */
.score-row { display: grid; grid-template-columns: 80px 1fr 30px; align-items: center; gap: 12px; font-size: 14px; }
.score-row .lbl { font-weight: 800; white-space: nowrap; }
.score-row .track { display: block; height: 12px; border-radius: 999px; background: #EFEDFA; overflow: hidden; }
.score-row .fill { display: block; height: 100%; border-radius: inherit; background: var(--dir); }
.score-row .val { font-weight: 900; text-align: right; }
.tie-note { text-align: center; font-weight: 800; color: var(--primary-700); }
.profile-grid { display: grid; gap: 20px; }
.profile-grid.multi { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.profile-card { overflow: hidden; background: #fff; border-radius: 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.pc-head { position: relative; padding: 24px 24px 22px; color: #fff; background: linear-gradient(135deg, var(--dir) 0%, var(--dir-2) 100%); display: flex; gap: 16px; align-items: center; }
.pc-head::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.pc-icon { flex: none; width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; font-size: 34px; background: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .12); transform: rotate(-6deg); }
.pc-head h2 { font-size: clamp(22px, 2.8vw, 28px); font-weight: 900; }
.pc-head .sub { font-weight: 800; opacity: .9; font-size: 14px; }
.pc-code { position: absolute; top: 14px; right: 16px; font-size: 12px; font-weight: 900; letter-spacing: .12em; background: rgba(255, 255, 255, .22); padding: 3px 10px; border-radius: 999px; z-index: 1; }
.pc-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.pc-body > p { font-weight: 600; color: var(--ink-2); }
.pc-body h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 900; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; font-weight: 800; padding: 7px 13px; border-radius: 12px; background: var(--dir-soft); color: var(--ink); }
.advice { margin: 8px 0 0; padding: 16px 18px 16px 58px; position: relative; border-radius: 20px; background: var(--sun-100); }
.advice::before { content: '💡'; position: absolute; left: 16px; top: 14px; font-size: 26px; }
.advice span { display: block; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--sun-700); margin-bottom: 4px; }
.advice p { font-weight: 800; color: var(--ink); }
.soft-note { text-align: center; color: #1B6B62; font-weight: 800; background: var(--teal-100); padding: 12px 16px; border-radius: 18px; }
.code-card { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 2.5px dashed #CFC8F3; box-shadow: none; background: #fff; }
.code-card .c-label { font-size: 13px; font-weight: 800; color: var(--ink-3); }
.code-card .code { font-size: 28px; font-weight: 900; letter-spacing: .22em; color: var(--primary); font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.code-card .hint { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.result-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; padding-bottom: 6px; }
.empty-state { max-width: 480px; margin: 40px auto; padding: 32px; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.error-box { padding: 14px 16px; border-radius: 14px; background: #FFE9E9; color: #A12A2A; font-weight: 800; font-size: 14px; }

/* ---------- вход психолога */
.login-card { max-width: 440px; margin: 10px auto 0; padding: 0 28px 30px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.login-ico { width: 84px; height: 84px; margin: -42px auto 0; border-radius: 28px; display: grid; place-items: center; font-size: 40px; background: linear-gradient(135deg, var(--primary), #A28BFF); border: 5px solid #fff; box-shadow: 0 12px 26px rgba(91, 75, 219, .3); }
.login-card h1 { font-size: 28px; font-weight: 900; }
.login-card .field { text-align: left; }
.login-wrap { padding-top: 56px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 54px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; color: var(--ink-3); display: grid; place-items: center; }
.pw-toggle:hover { background: var(--primary-100); color: var(--primary); }

/* ---------- кабинет психолога */
.admin { display: flex; flex-direction: column; gap: 20px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 900; }
.admin-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); align-self: flex-start; }
.seg button { border: 0; background: transparent; cursor: pointer; font-weight: 800; font-size: 14px; padding: 8px 16px; border-radius: 12px; color: var(--ink-2); }
.seg button.active { background: var(--primary); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; border-top: 5px solid var(--primary-100); }
.kpi .k-label { font-size: 13px; font-weight: 800; color: var(--ink-3); }
.kpi .k-value { font-size: 34px; font-weight: 900; line-height: 1.1; }
.kpi .k-sub { font-size: 13px; color: var(--ink-3); font-weight: 700; }
.kpi.low { border-top-color: var(--teal); }
.kpi.low .k-value { color: #13786C; }
.kpi.high { border-top-color: var(--coral); }
.kpi.high .k-value { color: var(--coral-700); }
.kpi.top { border-top-color: var(--sun); }
.charts { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; }
.chart-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.chart-card h3 { font-size: 17px; font-weight: 900; }
.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.donut { width: 180px; height: 180px; flex: none; }
.donut .center-num { font-size: 32px; font-weight: 900; fill: var(--ink); font-family: var(--font); }
.donut .center-lbl { font-size: 12px; font-weight: 700; fill: var(--ink-3); font-family: var(--font); }
.legend { display: grid; gap: 12px; }
.legend-item { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; }
.legend-item i { width: 14px; height: 14px; border-radius: 5px; }
.legend-item b { font-weight: 900; }
.legend-item small { color: var(--ink-3); font-weight: 700; margin-left: 6px; }
.dir-bars { display: grid; gap: 14px; }
.dir-bar { display: grid; gap: 6px; }
.dir-bar .top-line { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.dir-bar .name { font-weight: 900; display: flex; align-items: center; gap: 8px; }
.dir-bar .name small { font-weight: 700; color: var(--ink-3); }
.dir-bar .num { font-weight: 900; white-space: nowrap; }
.dir-bar .num small { color: var(--ink-3); font-weight: 700; }
.dir-bar .track { height: 14px; border-radius: 999px; background: #EFEDFA; overflow: hidden; }
.dir-bar .fill { height: 100%; border-radius: inherit; background: var(--dir); width: 0; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.chart-note { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.table-card { padding: 20px 0 8px; }
.table-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 22px 14px; }
.table-head h3 { font-size: 17px; font-weight: 900; }
.table-head h3 small { color: var(--ink-3); font-weight: 700; margin-left: 6px; }
.table-head .input { width: 260px; min-height: 44px; font-size: 15px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 820px; }
table.data th { text-align: left; font-size: 12px; font-weight: 900; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; background: var(--primary-50); white-space: nowrap; }
table.data th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
table.data th button.sorted { color: var(--primary); }
table.data td { padding: 12px 14px; border-bottom: 1px solid #F0EEF9; vertical-align: middle; font-weight: 600; }
table.data tbody tr { cursor: pointer; transition: background .15s; }
table.data tbody tr:hover { background: var(--primary-50); }
table.data td.name { font-weight: 900; }
table.data td.date { white-space: nowrap; }
table.data td.center, table.data th.center { text-align: center; }
.dir-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 900; padding: 3px 9px; border-radius: 999px; background: var(--dir-soft); color: var(--dir); margin: 2px 4px 2px 0; white-space: nowrap; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 22px; font-size: 14px; font-weight: 800; color: var(--ink-2); }
.table-empty { padding: 40px 20px; text-align: center; color: var(--ink-3); font-weight: 700; }

/* ---------- модальное окно */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(36, 31, 77, .45); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; animation: fadeIn .2s ease; }
.modal { width: 100%; max-width: 720px; background: #fff; border-radius: 26px; box-shadow: var(--shadow-lg); padding: 24px clamp(18px, 3vw, 30px) 28px; display: flex; flex-direction: column; gap: 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { font-size: 24px; font-weight: 900; }
.modal-close { width: 42px; height: 42px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: 22px; line-height: 1; flex: none; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.meta-grid div { background: var(--primary-50); border-radius: 14px; padding: 10px 12px; }
.meta-grid span { display: block; font-size: 12px; color: var(--ink-3); font-weight: 800; }
.meta-grid b { font-size: 15px; font-weight: 900; }
.answers { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.answers li { padding: 12px 14px; border: 2px solid #F0EEF9; border-radius: 14px; }
.answers .aq { font-size: 13px; color: var(--ink-3); font-weight: 700; margin-bottom: 4px; }
.answers .aa { font-weight: 800; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.modal h3 { font-size: 16px; font-weight: 900; color: var(--primary-700); }

/* ---------- адаптивность */
@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .start-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .brand-tag { display: none; }
  .psy-link .txt { display: none; }
  .route { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .route::before { display: none; }
  .station .ico { width: 58px; height: 58px; font-size: 28px; border-radius: 18px; }
  .grade-row { grid-template-columns: 1fr 92px; }
  .gp { font-size: 19px; min-height: 52px; }
  .ticket-head, .ticket-body { padding-left: 18px; padding-right: 18px; }
  .options.grid2 { grid-template-columns: 1fr; }
  .options.grid2 .option { flex-direction: row; align-items: center; min-height: 68px; padding: 12px 14px; }
  .option { padding: 12px; gap: 12px; }
  .option .opt-text { font-size: 15px; }
  .eq { height: 160px; gap: 8px; }
  .eq-lbl small { display: none; }
  .kpi .k-value { font-size: 26px; }
  .table-head .input { width: 100%; }
  .result-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .breath-bubble, .breath-stage .ring { transition-duration: 1s !important; }
}

/* ================= Персонажи-эмоции (Шуақ, Толқын, Ойшыл) ================= */
.char { display: block; overflow: visible; }
.char .c-body { transform-box: fill-box; transform-origin: 50% 100%; animation: charBob 3.2s ease-in-out infinite; }
.char.mood-anxious .c-body { animation: charShake .55s ease-in-out infinite; }
.actor.active .char .c-body { animation: charTalk .42s ease-in-out infinite alternate; }
.char .spark { transform-box: fill-box; transform-origin: center; animation: spark 1.4s ease-in-out infinite; }
.char .spark.s2 { animation-delay: -.7s; }
.char .bulb { animation: bulb 2s ease-in-out infinite; }
.char .sweat { animation: sweat 1.6s ease-in infinite; }
@keyframes charBob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.015, .985); } }
@keyframes charTalk { from { transform: translateY(0) scale(1); } to { transform: translateY(-6px) scale(1.03, .97); } }
@keyframes charShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.6px) rotate(-1.2deg); } 75% { transform: translateX(1.6px) rotate(1.2deg); } }
@keyframes spark { 50% { transform: scale(1.5) rotate(25deg); opacity: .6; } }
@keyframes bulb { 50% { opacity: .5; } }
@keyframes sweat { 0% { transform: translateY(-3px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }

/* пузырь реплики */
.speech {
  --tail: 50%; --sp-c: var(--primary);
  position: relative; background: #fff; border-radius: 22px; padding: 14px 20px 16px;
  box-shadow: var(--shadow); border: 2px solid var(--line); text-align: left;
}
.speech[data-who="joy"] { --sp-c: #D98A00; }
.speech[data-who="anx"] { --sp-c: #7E5FEA; }
.speech[data-who="thinker"] { --sp-c: #2F7FD0; }
.speech b { display: block; font-size: 13px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; color: var(--sp-c); margin-bottom: 2px; }
.speech p { font-size: 18px; font-weight: 700; color: var(--ink); }
.speech::before {
  content: ''; position: absolute; top: -12px; left: var(--tail); width: 20px; height: 20px; background: #fff;
  border-left: 2px solid var(--line); border-top: 2px solid var(--line); border-radius: 4px 0 0 0;
  transform: translateX(-50%) rotate(45deg); transition: left .35s ease;
}
.speech.down::before { top: auto; bottom: -12px; transform: translateX(-50%) rotate(225deg); }
.speech.left::before { top: 50%; left: -12px; transform: translateY(-50%) rotate(-45deg); }

/* сцена знакомства на главной */
.stage { width: 100%; max-width: 900px; padding: 22px clamp(16px, 3vw, 32px); display: flex; flex-direction: column; align-items: center; gap: 16px; background: linear-gradient(180deg, #FFFFFF 0%, #F6F2FF 100%); }
.cast { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; }
.actor { border: 0; background: none; cursor: pointer; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: .55; transform: scale(.86); filter: saturate(.7); transition: transform .35s ease, opacity .35s ease, filter .35s ease; }
.actor .char { width: min(160px, 26vw); height: auto; }
.actor.active { opacity: 1; transform: scale(1.04); filter: none; }
.actor .nm { display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: 16px; color: var(--ink); line-height: 1.1; }
.actor .nm small { font-size: 11px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.stage .speech { width: 100%; cursor: pointer; }
.stage .speech[data-who="thinker"] { --tail: 17%; }
.stage .speech[data-who="anx"] { --tail: 83%; }
.stage .speech p { min-height: 2.8em; font-size: clamp(17px, 2vw, 20px); }
.sp-hint { display: block; margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.stage-actions { width: 100%; display: flex; justify-content: space-between; gap: 10px; }
.stage.done .actor { opacity: 1; transform: scale(.94); filter: none; }
.stage.done .sp-hint { display: none; }
.stage.done .speech { cursor: default; }
.start-grid.locked { display: none; }
.start-grid.reveal { animation: popIn .55s cubic-bezier(.2, 1.4, .4, 1) both; }

/* гид рядом с вопросом */
.guide { display: flex; align-items: center; gap: 14px; }
.guide .g-char .char { width: 84px; height: auto; }
.guide .speech { flex: 1; padding: 10px 16px 12px; }
.guide .speech p { font-size: 16px; }

/* шарики-эмоции вместо смайликов */
.orb {
  --orb: #ECE8FF; --orb-d: #B9A2FF; --orb-g: rgba(91, 75, 219, .35);
  flex: none; position: relative; width: 62px; height: 62px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #FFFFFF 0%, var(--orb) 45%, var(--orb-d) 100%);
  box-shadow: inset 0 -6px 12px rgba(44, 35, 120, .12), 0 0 0 3px #fff, 0 0 18px var(--orb-g);
}
.orb::after { content: ''; position: absolute; left: 14%; top: 10%; width: 34%; height: 22%; border-radius: 50%; background: rgba(255, 255, 255, .75); filter: blur(1px); }
.orb .char { width: 54px; height: auto; margin-top: 10px; }
.orb-anx { --orb: #E2D8FF; --orb-d: #A68CF7; --orb-g: rgba(126, 95, 234, .5); }
.orb-thinker { --orb: #D6EEFF; --orb-d: #7CBDF5; --orb-g: rgba(62, 142, 224, .45); }
.orb-joy { --orb: #FFF2B8; --orb-d: #FFC94A; --orb-g: rgba(255, 186, 40, .55); }
.option.selected .orb { animation: popIn .45s ease; box-shadow: inset 0 -6px 12px rgba(44, 35, 120, .12), 0 0 0 3px var(--oc), 0 0 24px var(--orb-g); }

/* похвала Шуақ при низком стрессе */
.verdict { max-width: 720px; margin: 0 auto; }
.verdict-card { padding: 28px clamp(18px, 4vw, 40px) 32px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; background: linear-gradient(180deg, #FFF8DD 0%, #FFFFFF 55%); }
.v-char .char { width: 210px; height: auto; }
.verdict .speech h2 { font-size: clamp(26px, 3.6vw, 34px); font-weight: 900; margin: 2px 0 6px; }
.verdict .speech p { font-size: 17px; }

/* дыхание с Толқын */
.breath-card .speech { max-width: 620px; width: 100%; margin-bottom: 6px; }
.breath-card .speech h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 900; margin: 2px 0 6px; }
.breath-card .speech p { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.breath-bubble.with-char { background: none; box-shadow: none; display: grid; place-items: center; }
.breath-bubble.with-char .char { width: 82%; height: auto; }
.breath-stage::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(185, 162, 255, .35), transparent 70%); z-index: -1; }

/* Шуақ на карте результата */
.res-cheer { display: flex; align-items: center; justify-content: center; gap: 14px; }
.res-cheer .g-char .char { width: 112px; height: auto; }
.res-cheer .speech { max-width: 440px; }
.res-cheer .speech p { font-size: 17px; }

@media (max-width: 600px) {
  .actor .char { width: 27vw; }
  .actor .nm { font-size: 14px; }
  .guide .g-char .char { width: 64px; }
  .guide .speech p { font-size: 14.5px; }
  .orb { width: 52px; height: 52px; }
  .orb .char { width: 46px; }
  .v-char .char { width: 160px; }
  .res-cheer { flex-direction: column; }
  .res-cheer .speech.left::before { top: -12px; left: 50%; transform: translateX(-50%) rotate(45deg); }
}

/* ---------- кабинет v3: вкладки, редактор вопросов, пользователи */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); align-self: flex-start; max-width: 100%; }
.tabs a { text-decoration: none; font-weight: 800; font-size: 14px; color: var(--ink-2); padding: 9px 16px; border-radius: 13px; white-space: nowrap; }
.tabs a:hover { background: var(--primary-50); }
.tabs a.active { background: var(--primary); color: #fff; }
.who-chip { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px; border-radius: 12px; background: var(--primary-50); font-weight: 800; font-size: 14px; color: var(--primary-700); }
.stats-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats-bar .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.danger, .btn-ghost.danger { color: #B42318; }
.btn.danger:hover:not(:disabled) { background: #FFF0EE; border-color: #F7C6BF; }
.btn-danger { background: #D92D20; color: #fff; box-shadow: 0 5px 0 #912018; }
.btn-danger:disabled { opacity: .45; cursor: not-allowed; }
.ok-box { padding: 14px 16px; border-radius: 14px; background: var(--teal-100); color: #0E6B60; font-weight: 800; font-size: 14px; }
.small { font-size: 13px; }
.modal-sm { max-width: 460px; }
.cf-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modal-foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 800; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }

.qe-intro { font-weight: 700; max-width: 820px; }
.qe-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 18px 20px; }
.qe-ver { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; min-width: 0; font-weight: 800; font-size: 13px; color: var(--ink-3); }
.qe-ver .select { width: 100%; font-size: 14px; }
.qe-files { display: flex; flex-wrap: wrap; gap: 8px; }
.qe-upload { cursor: pointer; }
.qe-help { flex-basis: 100%; font-weight: 700; color: var(--ink-2); }
.qe-help summary { cursor: pointer; font-weight: 900; color: var(--primary-700); }
.qe-help p { margin-top: 8px; }
.qe-sec { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.qe-sec-head h3 { font-size: 19px; font-weight: 900; }
.qe-sec-head h3 small { color: var(--ink-3); font-weight: 800; }
.qe-sec-head p { margin-top: 4px; font-weight: 700; }
.qe-low { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: 16px; background: var(--sun-100); }
.qe-low .input { width: 90px; min-height: 42px; text-align: center; font-weight: 900; }
.qe-item { border: 2px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.qe-item.bad { border-color: #F04438; box-shadow: 0 0 0 5px rgba(240, 68, 56, .12); }
.qe-item-head { display: flex; align-items: center; gap: 10px; }
.qe-item-head b { font-weight: 900; }
.qe-num { width: 30px; height: 30px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 14px; flex: none; }
.qe-tools { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border-radius: 11px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 900; color: var(--primary-700); }
.icon-btn:hover:not(:disabled) { background: var(--primary-50); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.del { color: #B42318; }
.qe-field { display: flex; flex-direction: column; gap: 6px; }
.qe-lbl { font-size: 13px; font-weight: 900; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.qe-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qe-pair .lg { position: relative; display: block; }
.qe-pair .lg span { position: absolute; top: 8px; right: 10px; font-size: 10px; font-weight: 900; letter-spacing: .08em; color: var(--ink-3); pointer-events: none; }
.qe-pair .input { width: 100%; min-height: 44px; font-size: 15px; padding: 10px 44px 10px 12px; resize: vertical; line-height: 1.4; font-family: inherit; }
.opt-badge.sm { width: 24px; height: 24px; font-size: 12px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--primary-100); color: var(--primary-700); }
.qe-save { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 10px; padding: 12px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-radius: 20px; box-shadow: var(--shadow-lg); }
.qe-save .input { flex: 1; min-width: 0; min-height: 48px; }

.users-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.u-form { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.u-form h3 { font-size: 18px; font-weight: 900; }
.u-form.narrow { max-width: 460px; }
.u-form .inline-form .input, .modal .inline-form .input { text-transform: none; letter-spacing: 0; flex: 1; min-width: 0; }
table.data.compact { min-width: 640px; }
table.data tr.static { cursor: default; }
table.data tr.warn td { background: #FFF7F5; }
table.data td.detail { max-width: 340px; word-break: break-word; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { margin-left: 4px; }
.pill-admin { background: var(--primary-100); color: var(--primary-700); }
.pill-psy { background: var(--sun-100); color: var(--sun-700); }
@media (max-width: 960px) { .users-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .qe-pair { grid-template-columns: 1fr; }
  .qe-save { flex-direction: column; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
}
[hidden] { display: none !important; }
/* таблица пользователей помещается в колонку без горизонтальной прокрутки */
#uTable table.data.compact { min-width: 0; }
#uTable table.data td, #uTable table.data th { padding: 10px 10px; }
#uTable td.date { white-space: normal; min-width: 90px; }
@media (max-width: 700px) { #uTable table.data.compact { min-width: 600px; } }
