/* EMBA-41 Alumni Hub — дизайн-система:
   белый фон + почти чёрный текст + индиго-акцент (референс СКОЛКОВО),
   тёмно-синие панели с градиентными «лучами» как декоративный акцент. */

@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/Onest-var.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #0c0d12;
  --muted: #7c8089;
  --line: #ececf1;
  --soft: #f4f4f7;
  --accent: #4640d6;
  --accent-press: #3a34c2;
  --accent-soft: #edecfb;
  --accent-deep: #322da8;
  --navy: #0d1626;
  --danger: #c73a4e;
  --r-lg: 18px;
  --r-md: 14px;
  --font: "Onest", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); overscroll-behavior: none; }
body {
  font-family: var(--font);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}
button { font-family: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
input, textarea { font-family: inherit; color: inherit; }
svg { display: block; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
@media (min-width: 600px) {
  body { background: #eeeef2; }
  #app { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
}

.icon { display: inline-flex; flex: none; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- типографика ---------- */
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.d1 {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.d2 {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.005em;
  text-transform: uppercase;
}
.sub { color: var(--muted); font-size: 14.5px; }
.sec-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- кнопки ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 700;
  transition: transform .06s ease, background .12s ease, opacity .12s ease;
  user-select: none;
}
.btn:active { transform: scale(.985); }
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-press); }
.btn-ghost { background: var(--accent-soft); color: var(--accent-deep); }
.btn-dark-ghost { background: rgba(255,255,255,.1); color: #fff; }
.btn-plain { background: var(--soft); color: var(--ink); }
.btn.disabled { opacity: .4; pointer-events: none; }
.btn-danger-plain { background: none; color: var(--danger); font-size: 14.5px; padding: 12px; }

/* ---------- онбординг: тёмный экран с лучами ---------- */
.ob0 {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.ob0-art { position: relative; flex: 1 1 auto; min-height: 34vh; min-height: 34dvh; overflow: hidden; }
.ob0-art svg.rays { position: absolute; inset: 0; width: 100%; height: 100%; }
.ob0-art .ob0-brand {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  left: 20px;
  color: rgba(255,255,255,.92);
}
.ob0-body {
  position: relative;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: linear-gradient(to top, var(--navy) 82%, rgba(13,22,38,0));
  margin-top: -46px;
}
.ob0 .d1 { font-size: 33px; }
.ob0-sub { color: rgba(255,255,255,.66); font-size: 15px; }
.ob0-sub em { color: rgba(255,255,255,.9); font-style: normal; }
.bullets { display: flex; flex-direction: column; gap: 13px; margin-top: 2px; }
.bullet { display: flex; gap: 13px; align-items: flex-start; }
.bullet-ic {
  width: 36px; height: 36px;
  flex: none;
  border-radius: 11px;
  background: rgba(255,255,255,.09);
  display: flex; align-items: center; justify-content: center;
  color: #f0b451;
}
.bullet:nth-child(2) .bullet-ic { color: #9d7df2; }
.bullet:nth-child(3) .bullet-ic { color: #63c2ba; }
.bullet-ic .icon { width: 19px; height: 19px; }
.bullet-text b { font-size: 15px; font-weight: 800; display: block; }
.bullet-text span { color: rgba(255,255,255,.62); font-size: 13.5px; line-height: 1.4; display: block; margin-top: 1px; }
.ob0-note { color: rgba(255,255,255,.45); font-size: 12.5px; text-align: center; }

/* ---------- онбординг: шаги на белом ---------- */
.ob-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.ob-top {
  display: flex; align-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 12px 6px;
}
.ob-back { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--ink); border-radius: 12px; }
.ob-back:active { background: var(--soft); }
.ob-back .icon { width: 22px; height: 22px; }
.dots { display: flex; gap: 6px; margin: 0 auto; transform: translateX(-20px); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--accent); width: 20px; border-radius: 4px; }
.ob-content { flex: 1; padding: 10px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.ob-cta {
  position: sticky; bottom: 0;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0));
}

/* ---------- формы ---------- */
.form-block {
  background: var(--soft);
  border-radius: 16px;
  padding: 2px 14px 16px;
  margin-top: 14px;
}
.form-block .field input, .form-block .field textarea {
  border: 0;
  transition: box-shadow .15s ease;
}
.form-block .field input:focus, .form-block .field textarea:focus {
  box-shadow: 0 8px 22px rgba(13, 22, 38, .09);
}
.form-block .field input::placeholder, .form-block .field textarea::placeholder {
  color: #a3a7b0;
}
.form-block .chip { background: #fff; border-color: #fff; }
.form-block .chip.on { background: var(--accent); border-color: var(--accent); }

.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 7px; }
.field label small { color: var(--muted); font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  background: #fff;
  outline: none;
  transition: border-color .12s ease;
}
.field textarea { min-height: 88px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  transition: background .1s ease, border-color .1s ease, color .1s ease;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip small { font-weight: 700; opacity: .55; margin-left: 4px; }

/* ---------- «найдите себя» (клейм из книги) ---------- */
.claim-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.claim-row {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  text-align: left;
  width: 100%;
  transition: transform .06s ease, border-color .12s ease;
}
.claim-row:active { transform: scale(.985); border-color: #d8d8e2; }
.claim-info { min-width: 0; }
.pre { white-space: pre-line; }

/* ---------- карточки уровней ---------- */
.lvl-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.lvl {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--soft);
  border-radius: var(--r-lg);
  padding: 16px 15px;
  text-align: left;
  transition: background .12s ease;
}
.lvl.on { background: var(--accent-soft); }
.lvl-ic {
  width: 40px; height: 40px; border-radius: 12px;
  flex: none;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.lvl.on .lvl-ic { background: var(--accent); color: #fff; }
.lvl-ic .icon { width: 21px; height: 21px; }
.lvl-text b { font-size: 15.5px; font-weight: 800; display: block; }
.lvl-text span { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.lvl.on .lvl-text span { color: #4a46a0; }
.lvl-radio {
  margin-left: auto; flex: none; align-self: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #d3d6df;
  background: #fff;
}
.lvl.on .lvl-radio { border: 7px solid var(--accent); background: #fff; }

.rule-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--soft); border-radius: var(--r-md);
  padding: 12px 13px; margin-top: 14px;
  font-size: 13px; color: #565a63; line-height: 1.45;
}
.rule-note .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--accent); }

/* ---------- главный экран ---------- */
.page { padding: calc(14px + env(safe-area-inset-top)) 20px 110px; }

.club-hero {
  position: relative;
  margin: calc(-14px - env(safe-area-inset-top)) -20px 0;
  padding: calc(26px + env(safe-area-inset-top)) 20px 22px;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  border-radius: 0 0 26px 26px;
}
.club-hero .rays-wrap { position: absolute; inset: 0; }
.club-hero .rays-wrap svg { width: 100%; height: 100%; }
.club-hero .hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,22,38,.62), rgba(13,22,38,.18));
}
.club-hero .hero-inner {
  position: relative; z-index: 2;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.club-hero .eyebrow { color: #a99ef7; }
.club-hero .d1 { font-size: 31px; }
.club-hero .me-ava { margin-top: 6px; }
.club-hero .me-ava .ava { box-shadow: 0 0 0 2.5px rgba(255,255,255,.35); }
.club-hero .count-line { color: rgba(255,255,255,.68); margin-top: 7px; }
.club-hero .count-line b { color: #fff; }

.count-line { color: var(--muted); font-size: 14px; }
.count-line b { color: var(--ink); font-weight: 800; }

/* ---------- афиша мероприятий ---------- */
.events-block { margin-top: 18px; }
.events-block > .sec-label { display: block; margin-bottom: 10px; }
.events-row {
  display: flex; gap: 10px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 2px 20px 6px;
  scrollbar-width: none;
}
.events-row::-webkit-scrollbar { display: none; }
.event-card {
  flex: none;
  width: 236px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  padding: 13px 14px;
  text-align: left;
  transition: transform .06s ease, border-color .12s ease;
}
.event-card:active { transform: scale(.985); border-color: #d8d8e2; }
.event-top { display: flex; gap: 11px; align-items: center; }
.event-day {
  width: 46px; height: 46px; flex: none;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1;
}
.event-day b { font-size: 18px; font-weight: 900; }
.event-day span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.event-when b { display: block; font-size: 13.5px; font-weight: 800; }
.event-when span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; text-transform: capitalize; }
.event-title {
  margin-top: 12px;
  font-size: 17px; font-weight: 800; line-height: 1.25;
  letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-speaker { color: var(--accent-deep); font-size: 12.5px; font-weight: 800; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-going { margin-left: auto; align-self: flex-start; width: 19px; height: 19px; color: #2e9e63; }
.speaker-photo { width: 76px; height: 76px; }
.going-line { text-align: center; color: var(--muted); font-size: 13.5px; }
.going-line b { color: var(--ink); }

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--soft);
  border-radius: var(--r-md);
  padding: 0 14px;
  margin-top: 16px;
  transition: background .15s ease, box-shadow .15s ease;
}
.search:focus-within { background: #fff; box-shadow: 0 8px 22px rgba(13, 22, 38, .09); }
.search .icon { width: 20px; height: 20px; color: var(--muted); }
.search input { flex: 1; border: 0; background: none; outline: none; font-size: 16px; padding: 13px 0; }
.search input::placeholder { color: #a3a7b0; }
/* нативный крестик поиска WebKit дублирует наш — прячем */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.search .clear { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 50%; }
.search .clear .icon { width: 16px; height: 16px; }

.chips-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  margin: 12px -20px 0;
  padding: 2px 20px 6px;
  scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }

.note-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: var(--r-md);
  padding: 11px 13px;
  margin-top: 12px;
  font-size: 13.5px; font-weight: 600; line-height: 1.35;
}
.note-banner .icon { width: 18px; height: 18px; flex: none; }
.note-banner button { color: var(--accent); font-weight: 800; font-size: 13.5px; white-space: nowrap; margin-left: auto; }

.people { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.person {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 13px 14px;
  background: #fff;
  text-align: left;
  width: 100%;
  transition: transform .06s ease, border-color .12s ease;
}
.person:active { transform: scale(.985); border-color: #d8d8e2; }
.person-info { flex: 1; min-width: 0; }
.person-name { font-size: 16px; font-weight: 700; }
.person-sub {
  color: var(--muted); font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.person-tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.mini {
  font-size: 11px; font-weight: 700;
  color: #62666f; background: var(--soft);
  border-radius: 6px; padding: 3px 7px;
  white-space: nowrap;
}
.person .lock-mini { color: #c0c3cb; width: 17px; height: 17px; flex: none; }

.ava {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800;
  flex: none;
  overflow: hidden;
  user-select: none;
}
.ava img { width: 100%; height: 100%; object-fit: cover; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; margin: 0 auto 12px; color: #c9ccd4; }
.empty b { color: var(--ink); font-size: 16px; display: block; margin-bottom: 5px; }
.empty p { font-size: 13.5px; line-height: 1.5; }
.empty button { margin-top: 14px; color: var(--accent); font-weight: 800; font-size: 14px; }

/* ---------- закрытый каталог ---------- */
.locked-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  margin-top: 18px;
  padding: 26px 20px 22px;
  text-align: center;
}
.locked-card svg.rays { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }
.locked-inner { position: relative; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.locked-inner .big-ic {
  width: 56px; height: 56px; border-radius: 18px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.locked-inner .big-ic .icon { width: 27px; height: 27px; }
.locked-inner h3 { font-size: 21px; font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.locked-inner p { color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.45; max-width: 320px; }
.locked-inner .btns { display: flex; flex-direction: column; gap: 9px; width: 100%; margin-top: 8px; }

/* ---------- random coffee ---------- */
.coffee-card {
  background: var(--accent-soft);
  border-radius: 20px;
  padding: 16px;
  margin-top: 18px;
}
.coffee-head { display: flex; gap: 13px; align-items: flex-start; }
.coffee-ic {
  width: 42px; height: 42px; flex: none;
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.coffee-ic .icon { width: 22px; height: 22px; }
.coffee-text b { display: block; font-size: 16px; font-weight: 800; }
.coffee-text span { display: block; color: #55519d; font-size: 13.5px; line-height: 1.45; margin-top: 3px; }
.coffee-btn { margin-top: 14px; padding: 13px; }
.coffee-card .person { margin-top: 14px; border: 0; }
.coffee-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.coffee-leave {
  align-self: center;
  color: #7a76c2; font-size: 13px; font-weight: 700;
  padding: 8px;
}

/* ---------- таббар ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: 560px; margin: 0 auto;
  display: flex;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 40;
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 8px;
  color: #a0a4ad;
  font-size: 11px; font-weight: 700;
}
.tab .icon { width: 23px; height: 23px; }
.tab.on { color: var(--accent); }

/* ---------- шторка профиля ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(12,13,18,.52);
  z-index: 50;
  animation: fade .18s ease;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  z-index: 51;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 -18px 60px rgba(13, 22, 38, .35);
  animation: rise .24s cubic-bezier(.2,.9,.3,1);
}
@keyframes rise { from { transform: translateY(60px); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-cover { position: relative; height: 118px; background: var(--navy); overflow: hidden; }
.sheet-cover svg.rays { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-rays { position: absolute; inset: 0; }
.cover-mono { position: absolute; inset: 0; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,22,38,.38), rgba(13,22,38,0) 60%); }
.sheet-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(13,22,38,.45);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.sheet-close .icon { width: 17px; height: 17px; }
.sheet-body { padding: 0 20px calc(24px + env(safe-area-inset-bottom)); }
.sheet-ava-row { display: flex; align-items: flex-end; margin-top: -38px; position: relative; }
.sheet-ava-row .ava { border: 4px solid #fff; }
.self-badge {
  margin: 0 0 6px auto;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 12px; font-weight: 800;
  border-radius: 8px; padding: 5px 9px;
}
.sheet-name { font-size: 23px; font-weight: 900; line-height: 1.1; margin-top: 12px; letter-spacing: -.01em; }
.sheet-sub { color: var(--muted); font-size: 14.5px; margin-top: 3px; }
.sheet-city { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.sheet-city .icon { width: 15px; height: 15px; }
.sheet-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.sheet-chips .mini { font-size: 12px; padding: 5px 9px; border-radius: 8px; }
.sheet-sec { margin-top: 18px; }
.sheet-sec .sec-label { display: block; margin-bottom: 6px; }
.sheet-sec p { font-size: 15px; line-height: 1.5; }

.track { display: flex; flex-direction: column; margin-top: 6px; }
.track-step { display: flex; gap: 12px; align-items: stretch; }
.track-step + .track-step { margin-top: 0; }
.track-marker {
  flex: none;
  width: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
}
.track-dot {
  width: 9px; height: 9px; flex: none;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #c9ccd6;
  box-sizing: border-box;
}
.track-marker.now .track-dot { border-color: var(--accent); background: var(--accent); }
.track-line { flex: 1; width: 2px; background: var(--line); margin-top: 3px; }
.track-text { min-width: 0; padding-bottom: 16px; }
.track-step:last-child .track-text { padding-bottom: 2px; }
.track-text b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.track-co {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-deep);
  letter-spacing: .02em;
  margin-top: 2px;
}
.track-text span { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.sheet-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 9px; }
.msg-off {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--soft); border-radius: var(--r-md);
  padding: 12px 13px;
  color: #565a63; font-size: 13.5px; line-height: 1.45;
}
.msg-off .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: #a0a4ad; }

/* ---------- профиль (моя вкладка) ---------- */
.preview-wrap { margin-top: 16px; }
.preview-hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.profile-sec { margin-top: 26px; }
.profile-sec > .sec-label { display: block; margin-bottom: 4px; }
.save-bar { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); margin-top: 24px; }
.footer-note { text-align: center; color: #b6b9c1; font-size: 12px; margin-top: 26px; line-height: 1.5; }

/* ---------- моя шапка: редактирование на месте ---------- */
.me-head { margin-top: 14px; }
.me-cover {
  position: relative;
  height: 148px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--navy);
}
.edit-fab {
  position: absolute; top: 12px; right: 12px;
  width: 37px; height: 37px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #20222a;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  transition: transform .06s ease, opacity .15s ease;
  z-index: 2;
}
.edit-fab:active { transform: scale(.92); }
.edit-fab .icon { width: 17px; height: 17px; }
@media (hover: hover) {
  .me-cover .edit-fab { opacity: 0; }
  .me-cover:hover .edit-fab, .me-cover .edit-fab:focus-visible { opacity: 1; }
}
.me-ava-wrap { position: relative; width: 92px; margin: -46px 0 0 18px; }
.me-ava-wrap .ava { border: 4px solid #fff; }
.ava-badge {
  position: absolute; right: -3px; bottom: 3px;
  width: 29px; height: 29px;
  border-radius: 50%;
  background: #fff;
  color: #20222a;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.ava-badge:active { transform: scale(.92); }
.ava-badge .icon { width: 14px; height: 14px; }
.me-name { font-size: 22px; font-weight: 900; letter-spacing: -.01em; margin-top: 10px; }
.me-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.me-link { color: var(--accent); font-weight: 700; font-size: 13.5px; margin-top: 10px; display: inline-block; }
.mini-label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 16px 0 8px; }

/* мини-меню снизу */
.msheet-overlay { z-index: 61; }
.msheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto;
  background: #fff;
  border-radius: 22px 22px 0 0;
  z-index: 62;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  animation: rise .22s cubic-bezier(.2,.9,.3,1);
}
.msheet h4 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.msheet-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%;
  padding: 14px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700; font-size: 15px;
  margin-top: 8px;
}
.msheet-btn:active { background: #e0dff8; }
.msheet-btn .icon { width: 19px; height: 19px; }
.msheet-btn.ghost { background: var(--soft); color: #565a63; font-weight: 600; font-size: 14px; }
.cover-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-thumb {
  width: 84px; height: 44px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 2px solid transparent;
  padding: 0;
  background: var(--navy);
  transition: border-color .12s ease, transform .06s ease;
}
.cover-thumb:active { transform: scale(.96); }
.cover-thumb svg { width: 100%; height: 100%; display: block; }
.cover-thumb.on { border-color: var(--accent); }
.cover-thumb.custom {
  background: var(--soft);
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed #d5d5df;
}
.cover-thumb.custom.on { border-style: solid; border-color: var(--accent); }
.cover-thumb.custom img { width: 100%; height: 100%; object-fit: cover; }
.plus-lbl { font-size: 12px; font-weight: 700; color: var(--accent); }

/* ---------- редактор опыта ---------- */
.xp-card {
  background: var(--soft);
  border-radius: 16px;
  padding: 14px;
  margin-top: 10px;
}
.xp-card input, .xp-card textarea {
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 15px;
  background: #fff;
  outline: none;
  margin-top: 8px;
  transition: box-shadow .12s ease;
}
.xp-card textarea { min-height: 56px; resize: vertical; line-height: 1.35; }
.xp-card input:focus, .xp-card textarea:focus { box-shadow: 0 8px 22px rgba(13, 22, 38, .09); }
.xp-head { display: flex; align-items: center; justify-content: space-between; }
.xp-num {
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.xp-num.now { color: var(--accent); }
.xp-ctl { display: flex; gap: 4px; }
.xp-ctl button {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: #fff;
  color: #5a5e68;
}
.xp-ctl button:active { background: #ececf1; }
.xp-ctl button .icon { width: 15px; height: 15px; }
.xp-ctl .xp-del { color: var(--danger); }
.xp-add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  font-weight: 700; font-size: 14.5px;
  color: var(--accent-deep);
}
.xp-add:active { background: #e0dff8; }
.xp-add .icon { width: 17px; height: 17px; }

/* ---------- тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #16181f; color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  z-index: 80;
  max-width: 86vw;
  text-align: center;
  animation: toast-in .2s ease;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
}
.toast.hide { opacity: 0; transition: opacity .3s ease; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- фатальная ошибка ---------- */
.fatal { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; text-align: center; }
.fatal .icon { width: 34px; height: 34px; color: var(--muted); }
.fatal p { color: var(--muted); font-size: 14.5px; max-width: 300px; }
.fatal button { color: var(--accent); font-weight: 800; }
