/* ============================================================
   ЛИЧНЫЙ КАБИНЕТ. Те же правила: тёмное стекло, без теней,
   свечений и обводок, сильные скругления, Inter 10–18 px.
   Компьютер: меню разделов слева. Телефон: на весь экран,
   разделы — прокручиваемая строка под заголовком.
   ============================================================ */
#toasts { z-index: 70; }

/* ---------- профиль-меню в игре ---------- */
.user-dot { position: absolute; top: 1px; right: 1px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); pointer-events: none; }
.user-menu { width: 248px; }
button.um-head { width: 100%; border: 0; background: transparent; border-radius: 16px; text-align: left; color: var(--fg); margin-bottom: 2px; }
button.um-head:hover { background: var(--fill); }
.um-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #2A0A0A; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.um-sep { display: block; height: 1px; margin: 4px 10px; background: var(--fill2); }

/* ---------- окно ---------- */
.modal.cab { z-index: 62; padding: 16px; }
.cab-sheet {
  width: min(940px, 100%); height: min(680px, 100%); border-radius: 30px; padding: 0; gap: 0; overflow: hidden;
  display: grid; grid-template-columns: 224px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "nav head" "nav body";
}
.cab-nav { grid-area: nav; background: rgba(255, 255, 255, 0.03); padding: 14px 10px; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.cab-me { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.cab-me .grow { display: flex; flex-direction: column; min-width: 0; gap: 1px; align-items: flex-start; }
.cab-me .grow b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cab-me .link { text-align: left; }
.ava.big.guest { background: var(--fill2); color: var(--muted); }
.cab-links { display: flex; flex-direction: column; gap: 2px; }
.cab-link { height: 38px; border: 0; border-radius: 14px; background: transparent; display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); text-align: left; flex: none; }
.cab-link svg { flex: none; }
.cab-link:hover { background: var(--fill); color: var(--fg); }
.cab-link.on { background: var(--fill2); color: var(--fg); }
.cab-link .cnt { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #2A0A0A; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.cab-head { grid-area: head; display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px 20px; min-width: 0; }
.cab-head #cab-back + #cab-title { margin-left: 2px; }
.cab-body { grid-area: body; overflow-y: auto; overflow-x: hidden; padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: none; overscroll-behavior: contain; animation: paneIn 0.2s ease-out; }
.cab-body::-webkit-scrollbar, .cab-nav::-webkit-scrollbar { display: none; }
.cab-body > * { flex: none; }
.cab-body p { margin: 0; }
.cab .center { text-align: center; }

/* ---------- общие блоки ---------- */
.c-card { background: var(--fill); border-radius: 24px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.c-card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.c-card.flat { padding: 4px; gap: 2px; }
.c-card.danger { background: rgba(255, 122, 122, 0.07); }
.c-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 4px 0; font-size: 15px; font-weight: 600; }
.c-title .muted { font-size: 11px; font-weight: 500; }
.c-title .link { font-size: 11px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.pad4 { padding: 6px 4px 0; display: block; }
.code { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.pos { color: var(--mint); }
.gold { color: #FFD36B; }
.cab .empty { font-size: 13px; line-height: 1.5; padding: 14px; border-radius: 20px; }
.cab .note-box { font-size: 11px; }

.c-hero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 26px; background: linear-gradient(120deg, rgba(25, 230, 140, 0.16), rgba(91, 140, 255, 0.10) 70%); }
.c-hero.alt { background: linear-gradient(120deg, rgba(242, 193, 78, 0.16), rgba(25, 230, 140, 0.08) 70%); }
.c-hero .grow { display: flex; flex-direction: column; gap: 3px; }
.c-hero .grow b.t18 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ava.xl { width: 56px; height: 56px; border-radius: 20px; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; font-size: 18px; font-weight: 700; flex: none; }
.hero-ic { width: 44px; height: 44px; border-radius: 16px; background: var(--fill2); display: grid; place-items: center; flex: none; }

.c-bals { display: grid; grid-template-columns: 1fr; gap: 6px; }
.c-bals > div { background: var(--fill); border-radius: 20px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.c-bals .grow { display: flex; flex-direction: column; gap: 1px; }
.c-bals b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-bals .ic-md { width: 26px; height: 26px; }

.c-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.c-actions.two { grid-template-columns: 1fr 1fr; }
.c-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.c-tiles.g3 { grid-template-columns: repeat(3, 1fr); }
.c-tiles > div { background: var(--fill); border-radius: 18px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c-tiles b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 18px; font-size: 11px; line-height: 1.45; }
.banner svg { flex: none; }
.banner.gold { background: rgba(242, 193, 78, 0.12); color: #FFD36B; }

.btn.red { background: rgba(255, 122, 122, 0.16); color: var(--red); }
.btn.red:hover:not(:disabled) { background: rgba(255, 122, 122, 0.24); }
.chip.on-chip { background: rgba(25, 230, 140, 0.14); color: var(--mint); }
.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x .chip-btn { flex: none; }

/* ---------- достижения ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ach { background: var(--fill); border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ach .t11 { line-height: 1.35; }
/* значок достижения — стеклянный жетон своего цвета (--h): перелив, светлый ободок и блик, как у монеты.
   Это исключение из правила «без градиентов» — по просьбе владельца. Пока достижение не открыто, жетон приглушён */
.ach-ic { position: relative; width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 6px; overflow: hidden;
  background: var(--h); background: linear-gradient(140deg, color-mix(in srgb, var(--h) 48%, #fff) 0%, var(--h) 46%, color-mix(in srgb, var(--h) 62%, #000) 100%);
  color: #0B0C0E; color: color-mix(in srgb, var(--h) 24%, #000); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.26); }
.ach-ic::after { content: ''; position: absolute; left: -12%; top: -26%; width: 80%; height: 58%; border-radius: 50%; background: #fff; opacity: 0.2; transform: rotate(-24deg); }
.ach-ic .ic { position: relative; z-index: 1; }
.ach:not(.got) .ach-ic { opacity: 0.5; filter: saturate(0.75); }
.ach:not(.got) b { color: var(--muted); }
.ach-date { color: #FFD36B; margin-top: auto; padding-top: 4px; }
.bar { display: block; height: 4px; border-radius: 2px; background: var(--fill2); overflow: hidden; margin-top: auto; }
.bar i { display: block; height: 100%; border-radius: 2px; background: var(--mint); }

/* ---------- строки операций и уведомлений ---------- */
.tx, .ntf { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; min-width: 0; }
.ntf { width: 100%; border: 0; background: transparent; text-align: left; align-items: flex-start; color: var(--fg); }
.ntf:hover { background: var(--fill); }
.ntf .tx-ic { margin-top: 1px; }
.tx .grow, .ntf .grow { display: flex; flex-direction: column; gap: 2px; }
.tx .grow > span:first-child, .ntf .grow > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .grow .t10 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; flex: none; }
.tx-ic { width: 32px; height: 32px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.tx-ic.mint { background: rgba(25, 230, 140, 0.14); color: var(--mint); }
.tx-ic.blue { background: rgba(91, 140, 255, 0.16); color: #8FB0FF; }
.tx-ic.gold { background: rgba(242, 193, 78, 0.16); color: #FFD36B; }
.tx-ic.red { background: rgba(255, 122, 122, 0.14); color: var(--red); }
.day { padding: 6px 4px 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.ntf.new { background: rgba(255, 255, 255, 0.035); }
.udot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex: none; margin-top: 6px; }

/* ---------- друзья ---------- */
.copy-row { display: flex; gap: 6px; align-items: center; }
.copy-row .btn { height: 44px; border-radius: 16px; }
.share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.share .soc { text-decoration: none; color: var(--fg); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps > div { background: var(--fill); border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.steps .n { width: 24px; height: 24px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; margin-bottom: 4px; }

/* ---------- настройки ---------- */
.set-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.set-row .grow { display: flex; flex-direction: column; gap: 2px; }
.sw { width: 40px; height: 24px; border: 0; padding: 0; border-radius: 999px; background: var(--fill3); flex: none; }
.sw i { position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.26s cubic-bezier(0.3, 0.7, 0.3, 1.3); }
.sw[aria-checked="true"] { background: var(--mint); }
.sw[aria-checked="true"] i { transform: translateX(16px); }
.sw:disabled { opacity: 0.4; }
.seg4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--fill); }
.seg4 button { height: 30px; border: 0; border-radius: 999px; background: transparent; font-size: 13px; font-weight: 500; color: var(--muted); min-width: 0; padding: 0 4px; }
.seg4 button:hover { color: var(--fg); }
.seg4 { position: relative; isolation: isolate; }
.seg4 button { position: relative; z-index: 1; transition: color 0.25s; }
.seg4 button.on { color: var(--fg); }
.seg4 .thumb { top: 4px; bottom: 4px; }
.field.ro { gap: 8px; }
.cab .fgroup { display: flex; flex-direction: column; }
.cab .flabel { display: block; font-size: 11px; color: var(--muted); padding: 0 4px 6px; }
.cab .field input { font-size: 13px; font-weight: 500; }
.cab .field input::placeholder, .cab textarea::placeholder { color: var(--faint); font-weight: 400; }
.cab .field:focus-within { background: var(--fill2); }
.skin-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.skin { aspect-ratio: 1; border: 0; padding: 0; border-radius: 18px; background: var(--fill); display: grid; place-items: center; }
.skin:hover { background: var(--fill2); }
.skin.on { background: rgba(25, 230, 140, 0.18); }
.skin .pic { width: 100%; height: 100%; display: grid; place-items: center; }
.skin .pic:empty { background: radial-gradient(circle at 50% 40%, var(--fill2) 0 22%, transparent 23%); animation: pulse 1.2s ease-in-out infinite; }
.skin img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.skin .ok { position: absolute; right: 6px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; }

/* ---------- помощь ---------- */
.field.search { gap: 10px; color: var(--muted); }
.field.search input { font-size: 13px; font-weight: 500; }
.field.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.l-faq.wide { max-width: none; }
.faq-cat { padding: 10px 4px 2px; }
.faq-cat:first-child { padding-top: 0; }
.l-faq mark { background: rgba(25, 230, 140, 0.22); color: var(--fg); border-radius: 4px; padding: 0 2px; }
.support .sup-head { display: flex; align-items: center; gap: 12px; }
.support .sup-head .grow { display: flex; flex-direction: column; gap: 2px; }
.contacts { display: flex; flex-wrap: wrap; gap: 6px; }
.contacts a { height: 34px; padding: 0 12px; border-radius: 999px; background: var(--fill); display: inline-flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-size: 13px; transition: background-color 0.2s; }
.contacts a:hover { background: var(--fill2); }
.st { flex: none; height: 22px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; font-weight: 600; white-space: nowrap; }
.st.wait { background: var(--fill2); color: var(--muted); }
.st.ans { background: rgba(25, 230, 140, 0.14); color: var(--mint); }
.st.done { background: var(--fill); color: var(--faint); }
.field.area { height: auto; padding: 12px 14px; align-items: stretch; }
.field.area textarea { flex: 1; min-height: 110px; resize: none; background: transparent; border: 0; outline: none; color: var(--fg); font: 500 13px/1.5 Inter, system-ui, sans-serif; padding: 0; }
.touch .field.area textarea { font-size: 15px; }
.thread { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 20px; display: flex; flex-direction: column; gap: 4px; }
.msg p { font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.me { align-self: flex-end; background: rgba(25, 230, 140, 0.13); border-bottom-right-radius: 8px; }
.msg.support { align-self: flex-start; background: var(--fill2); border-bottom-left-radius: 8px; }
.msg.typing p { display: flex; gap: 4px; padding: 4px 0; }
.msg.typing p i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1s ease-in-out infinite; }
.msg.typing p i:nth-child(2) { animation-delay: 0.15s; } .msg.typing p i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 50% { opacity: 0.25; transform: translateY(-2px); } }
.cab .ferr { padding: 0 4px; }
.cab .ferr.on { padding-top: 0; }

/* ---------- документы ---------- */
.doc { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.doc h3 { margin: 10px 0 0; font-size: 15px; font-weight: 600; }
.doc p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.doc p.faint { color: var(--faint); font-size: 10px; margin-top: 10px; }

/* ---------- лендинг: ссылки на помощь и документы ---------- */
.l-more { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 4px 0; }
.l-foot-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.l-foot a { color: var(--muted); text-decoration: none; }
.l-foot a:hover { color: var(--fg); }
.check .link { font-size: 11px; font-weight: 500; vertical-align: baseline; overflow: visible; }

/* ---------- адаптив ---------- */
@media (max-width: 1023px) {
  .c-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .modal.cab { padding: 8px; }
  .cab-sheet {
    height: 100%; border-radius: 26px;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas: "head" "nav" "body";
  }
  .cab-nav { background: none; padding: 0 0 8px; overflow: visible; }
  .cab-me { display: none; }
  .cab-links { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 0 14px; gap: 4px; }
  .cab-links::-webkit-scrollbar { display: none; }
  .cab-link { height: 34px; border-radius: 999px; padding: 0 12px; gap: 6px; background: var(--fill); }
  .cab-link svg { width: 14px; height: 14px; }
  .cab-link .cnt { margin-left: 2px; }
  .cab-head { padding: 12px 12px 10px 16px; }
  .cab-body { padding: 4px 14px 16px; }
  .scroll-x { margin: 0 -14px; padding: 0 14px; }
  .c-hero { padding: 14px; gap: 12px; }
  .ava.xl { width: 48px; height: 48px; border-radius: 17px; font-size: 15px; }
  .c-bals > div { padding: 8px 12px; }
  .steps { grid-template-columns: 1fr; }
  .steps > div { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
  .steps .n { margin: 0; }
  .steps .t11 { flex-basis: 100%; padding-left: 34px; }
  .skin-grid { grid-template-columns: repeat(4, 1fr); }
  .msg { max-width: 92%; }
  .hide-xs { display: none; }
}
@media (max-width: 419px) {
  .seg4 button { font-size: 11px; }
  .share .soc i { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cab-body, .msg.typing p i, .skin .pic:empty { animation: none; }
}

/* строки и пункты меню: вместо эффекта нажатия (его нет, см. fx.js) — лёгкая подсветка */
.ntf:active, .item:active, .um-item:active, button.um-head:active, .cab-link:active { background: var(--fill2); }

/* ссылка «Админка» в меню профиля — выглядит как остальные пункты */
a.um-item { text-decoration: none; }
