/* v0.3.19 — адаптация под iOS / Android / iPadOS без изменения backend-логики. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img,
video,
iframe {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.nav-toggle {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .feature-card:hover,
  .related-card-v0396:hover,
  .forum-card:hover,
  .topic-row:hover {
    transform: none;
  }
}

@media (max-width: 980px) {
  .topbar {
    gap: 10px;
    padding: 10px max(12px, env(safe-area-inset-left)) 10px max(12px, env(safe-area-inset-right));
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand > span:last-child {
    min-width: 0;
  }

  .brand strong,
  .brand small,
  .user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-donate {
    order: 2;
  }

  .nav-toggle {
    display: inline-flex;
    order: 3;
    margin-left: 0;
    background: rgba(255,255,255,.06);
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 12px;
  }

  .nav {
    order: 4;
    display: none;
    flex: 0 0 100%;
    width: 100%;
    max-height: min(70dvh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(14,14,18,.97);
    box-shadow: 0 22px 70px rgba(0,0,0,.42);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 11px 12px;
    border-radius: 12px;
  }

  .userbox {
    order: 5;
    flex: 0 0 100%;
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .userbox::-webkit-scrollbar {
    display: none;
  }

  .userbox form,
  .userbox .btn,
  .userbox .avatar,
  .userbox .sound-toggle {
    flex: 0 0 auto;
  }

  .page {
    padding-top: 22px;
  }

  .section-head,
  .channel-head-actions,
  .page-head,
  .ticket-head,
  .post-head,
  .forum-card,
  .topic-row,
  .home-card-actions-v039,
  .home-server-top-v039,
  .servers-status-head-v0393,
  .server-status-top-v0393,
  .article-helpful-v0396,
  .personal-room-head,
  .personal-room-actions {
    min-width: 0;
  }

  .channel-head-actions,
  .section-actions-inline-v0394,
  .personal-room-actions,
  .public-profile-actions,
  .form-actions,
  .form-actions-row-v0311,
  .form-actions-v0395,
  .articles-filter-actions-v0396,
  .helpful-actions-v0396,
  .v029-post-actions,
  .ticket-message-actions {
    flex-wrap: wrap;
  }

  .article-layout,
  .article-layout-v029,
  .article-layout-v0396,
  .channel-layout-v029,
  .rules-layout-v0391,
  .legal-layout-v0317,
  .profile-layout-v0310,
  .profile-layout-three-v0310,
  .profile-secondary-grid-v0310,
  .help-layout-v0311,
  .ticket-detail-layout-v0315,
  .compare-hero-v0394,
  .compare-grid-v0394,
  .events-layout-v0395,
  .event-detail-layout-v0395 {
    grid-template-columns: 1fr !important;
  }

  .article-side,
  .article-side-v029,
  .legal-side-v0317,
  .rules-side-v0391,
  .ticket-admin-sidebar-v0315,
  .event-info-panel-v0395,
  .articles-side-v0396 {
    position: static !important;
    top: auto !important;
  }

  .admin-users-form-panel,
  .admin-users-table-panel {
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .table-panel,
  .admin-users-table-panel,
  .admin-wiki-table-v0396,
  .servers-status-panel-v0393,
  .legal-documents-panel-v0317 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 720px;
  }
}

@media (max-width: 720px) {
  :root {
    --radius: 16px;
  }

  .page,
  .footer {
    width: calc(100% - 20px);
  }

  .page {
    padding-top: 18px;
    padding-bottom: calc(52px + env(safe-area-inset-bottom));
  }

  .footer {
    display: grid;
    gap: 10px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .brand {
    gap: 9px;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    display: block;
    max-width: 42vw;
    font-size: 14px;
  }

  .topbar-donate {
    padding: 9px 11px;
  }

  .userbox .user-name {
    display: none;
  }

  .avatar {
    width: 30px;
    height: 30px;
  }

  .hero h1,
  .page-head h1,
  .home-hero-main-v039 h1,
  .servers-hero-v0393 h1,
  .compare-hero-v0394 h1,
  .channel-head-v029 h1 {
    font-size: clamp(30px, 10vw, 42px);
    line-height: 1.02;
    letter-spacing: -1.2px;
  }

  .hero p,
  .page-head p,
  .home-hero-main-v039 p,
  .servers-hero-v0393 p,
  .compare-hero-v0394 p {
    font-size: 15px;
    line-height: 1.55;
  }

  .panel,
  .home-section-v039,
  .article-panel-v029,
  .home-hero-main-v039,
  .home-hero-side-v039,
  .servers-restart-card-v0393,
  .server-status-card-v0393,
  .home-server-card-v039,
  .feature-card,
  .channel-card,
  .list-card,
  .post.panel,
  .ticket-message.panel,
  .personal-message.panel {
    border-radius: 16px;
  }

  .panel,
  .home-section-v039,
  .article-panel-v029 {
    padding: 16px;
  }

  .hero-actions,
  .home-final-actions-v039,
  .channel-head-actions,
  .personal-room-actions,
  .public-profile-actions,
  .helpful-actions-v0396,
  .articles-filter-actions-v0396,
  .form-actions,
  .form-actions-row-v0311,
  .form-actions-v0395 {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .btn,
  .tab,
  .like-btn,
  .rich-toolbar button,
  .side-chip,
  .copy-button-v0393 {
    min-height: 44px;
  }

  .btn,
  .hero-actions .btn,
  .home-final-actions-v039 .btn,
  .channel-head-actions .btn,
  .personal-room-actions .btn,
  .public-profile-actions .btn,
  .form-actions .btn,
  .form-actions-row-v0311 .btn,
  .form-actions-v0395 .btn,
  .articles-filter-actions-v0396 .btn,
  .helpful-actions-v0396 .btn {
    width: 100%;
  }

  .form input,
  .form select,
  .form textarea,
  .search-form input,
  .articles-filter-form-v0396 input,
  .articles-filter-form-v0396 select,
  .events-filter-form-v0395 input,
  .events-filter-form-v0395 select,
  .rules-search-v0392 input,
  .message-search-form input,
  .message-search-form textarea {
    min-height: 46px;
    font-size: 16px;
    padding: 12px;
  }

  .form textarea,
  .rich-editor,
  .ticket-plain-textarea-v0312,
  .project-rules-textarea-v0392 {
    min-height: 180px;
  }

  .rich-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .rich-toolbar button {
    flex: 0 0 auto;
  }

  .form-grid.two,
  .form-grid.three,
  .form-grid.four,
  .grid.two,
  .grid.three,
  .stats-grid,
  .stats-grid.big,
  .forum-grid,
  .home-hero-v039,
  .home-server-grid-v039,
  .home-intro-grid-v039,
  .home-content-grid-v039,
  .home-mechanics-grid-v039,
  .home-events-grid-v0395,
  .news-grid-v029,
  .article-grid-v029,
  .articles-grid-v0396,
  .events-grid-v0395,
  .servers-summary-grid-v0393,
  .servers-status-grid-v0393,
  .server-status-metrics-v0393,
  .servers-compare-panel-stats-v0394,
  .legal-documents-list,
  .related-grid-v0396,
  .attachments-grid,
  .ticket-attachments-grid,
  .personal-attachments-grid,
  .forum-attachments-grid,
  .checkbox-grid-v0396,
  .status-checkbox-grid {
    grid-template-columns: 1fr !important;
  }

  .articles-filter-form-v0396,
  .events-filter-form-v0395,
  .rules-search-v0392,
  .search-form,
  .message-search-form,
  .profile-game-name-form,
  .profile-nickname-panel .profile-game-name-form,
  .ticket-status-form-v0312,
  .ticket-admin-meta-form-v0312,
  .ticket-internal-note-form-v0312 {
    grid-template-columns: 1fr !important;
  }

  .feature-card,
  .feature-card.primary,
  .media-card,
  .ticket-head,
  .post-head,
  .post-author-block,
  .ticket-author-block,
  .profile-main,
  .home-final-v039,
  .server-status-top-v0393,
  .home-server-top-v039,
  .home-card-actions-v039,
  .servers-status-head-v0393,
  .forum-card,
  .topic-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .post-side-tags,
  .forum-stats,
  .topic-meta,
  .ticket-event-row small {
    text-align: left;
  }

  .channel-feature-strip {
    grid-template-columns: 1fr !important;
  }

  .feature-card img,
  .feature-card.primary img,
  .card-cover,
  .article-card-v0396 .card-cover {
    height: auto;
    max-height: 240px;
  }

  .attachments-grid img,
  .attachments-grid video,
  .ticket-attachments-grid img,
  .ticket-attachments-grid video,
  .personal-attachments-grid img,
  .personal-attachments-grid video,
  .forum-attachments-grid img,
  .forum-attachments-grid video {
    max-height: 260px;
  }

  .side-chip-list,
  .compact-tags-v0396,
  .tabs,
  .admin-nav,
  .home-hero-pills-v039,
  .servers-hero-meta-v0393,
  .article-tags-v0396,
  .article-scope-v0396 {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .side-chip-list::-webkit-scrollbar,
  .compact-tags-v0396::-webkit-scrollbar,
  .tabs::-webkit-scrollbar,
  .admin-nav::-webkit-scrollbar,
  .home-hero-pills-v039::-webkit-scrollbar,
  .servers-hero-meta-v0393::-webkit-scrollbar,
  .article-tags-v0396::-webkit-scrollbar,
  .article-scope-v0396::-webkit-scrollbar {
    display: none;
  }

  .side-chip,
  .tab,
  .admin-nav a,
  .home-hero-pills-v039 span,
  .servers-hero-meta-v0393 span,
  .article-tags-v0396 span,
  .article-tags-v0396 a,
  .article-scope-v0396 span {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-nav a {
    min-width: auto;
  }

  .table-panel::after,
  .admin-users-table-panel::after,
  .admin-wiki-table-v0396::after {
    content: 'Прокрутите таблицу в сторону';
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .page,
  .footer {
    width: calc(100% - 16px);
  }

  .topbar {
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }

  .brand strong {
    max-width: 34vw;
  }

  .topbar-donate {
    padding-left: 9px;
    padding-right: 9px;
  }

  .nav-toggle {
    min-width: 42px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .panel,
  .home-section-v039,
  .article-panel-v029,
  .home-hero-main-v039 {
    padding: 14px;
  }
}

/* v0.3.19.1 — compact topbar for listed mobile/tablet sizes */
.nav-mobile-only {
  display: none;
}

@media (max-width: 1280px) {
  .topbar {
    position: sticky;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: max(8px, env(safe-area-inset-top)) max(50px, calc(env(safe-area-inset-right) + 50px)) 8px max(10px, env(safe-area-inset-left));
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 9px;
  }

  .brand-mark {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    display: block;
    max-width: min(260px, 32vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1.1;
  }

  .topbar-donate {
    flex: 0 0 auto;
    padding: 8px 11px;
    min-height: 38px;
    border-radius: 11px;
    font-size: 12px;
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    margin-left: 0;
    padding: 0;
    background: rgba(255,255,255,.06);
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    font-size: 20px;
    line-height: 1;
  }

  .nav {
    display: none;
    position: absolute;
    z-index: 70;
    top: calc(100% + 1px);
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    flex: none;
    flex-basis: auto;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    max-height: calc(100dvh - 74px - env(safe-area-inset-bottom));
    overflow-y: auto;
    padding: 12px;
    background: rgba(12, 12, 16, .98);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 22px 70px rgba(0,0,0,.55);
    backdrop-filter: blur(18px);
    -webkit-overflow-scrolling: touch;
  }

  .nav.open {
    display: grid;
  }

  .nav a,
  .nav-mobile-logout .btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 42px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.055);
  }

  .nav a:hover,
  .nav-mobile-logout .btn:hover {
    background: rgba(225,25,45,.16);
    border-color: rgba(225,25,45,.32);
  }

  .nav-mobile-only {
    display: flex;
  }

  .nav-mobile-divider {
    grid-column: 1 / -1;
    height: 1px;
    min-height: 1px;
    padding: 0;
    margin: 2px 0;
    background: var(--line);
  }

  .nav-mobile-action {
    font-weight: 800;
  }

  .nav-mobile-logout {
    margin: 0;
  }

  .nav-mobile-logout .btn {
    color: #d8d8dd;
    text-align: left;
    cursor: pointer;
  }

  .userbox {
    flex: 0 0 auto;
    gap: 0;
    flex-basis: auto;
    justify-content: flex-end;
  }

  .topbar-ticket-action,
  .topbar-messages-action,
  .topbar-profile-action,
  .topbar-avatar,
  .topbar-user-name,
  .topbar-logout-form,
  .topbar-login-action {
    display: none !important;
  }

  .topbar-notification-action { display: none !important; }

  .topbar-sound-action {
    position: absolute;
    top: max(7px, env(safe-area-inset-top));
    right: max(7px, env(safe-area-inset-right));
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1;
    z-index: 80;
  }

  body.mobile-nav-open {
    overflow-x: hidden;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 54px;
    gap: 6px;
    padding-top: max(7px, env(safe-area-inset-top));
    padding-bottom: 7px;
  }

  .nav {
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 66px - env(safe-area-inset-bottom));
    padding: 10px;
    border-radius: 15px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand strong {
    max-width: 38vw;
    font-size: 13px;
  }

  .topbar-donate {
    min-height: 36px;
    padding: 8px 10px;
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .topbar-notification-action { display: none !important; }

  .topbar-sound-action {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 13px;
  }
}

@media (max-width: 390px) {
  .topbar {
    gap: 5px;
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(45px, calc(env(safe-area-inset-right) + 45px));
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 13px;
  }

  .brand strong {
    max-width: 34vw;
    font-size: 12px;
  }

  .topbar-donate {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .nav-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
  }
}

@media (max-width: 360px) {
  .brand strong {
    max-width: 31vw;
  }

  .topbar-donate {
    padding-left: 7px;
    padding-right: 7px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .nav.open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-mobile-divider {
    grid-column: 1 / -1;
  }

  .brand strong {
    max-width: 42vw;
  }
}

@media (max-width: 1280px) and (orientation: landscape) {
  .topbar {
    min-height: 52px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .nav {
    max-height: calc(100dvh - 62px);
  }
}

/* v0.3.19.2 — compact nav-toggle concept for portrait and landscape device pairs */
@media (max-width: 1368px) {
  .topbar {
    position: sticky;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-height: 52px;
    padding: max(6px, env(safe-area-inset-top)) max(50px, calc(env(safe-area-inset-right) + 50px)) 6px max(8px, env(safe-area-inset-left));
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 46px);
    gap: 8px;
  }

  .brand-mark {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    display: block;
    max-width: min(300px, 52vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.1;
  }

  .topbar-donate {
    display: none !important;
  }

  .nav-toggle {
    display: inline-flex !important;
    order: 3;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin-left: auto;
    margin-right: 0;
    padding: 0;
    background: rgba(255,255,255,.06);
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    font-size: 19px;
    line-height: 1;
  }

  .userbox {
    order: 4;
    position: static;
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0;
    overflow: visible !important;
    justify-content: flex-end;
  }

  .topbar-ticket-action,
  .topbar-messages-action,
  .topbar-profile-action,
  .topbar-avatar,
  .topbar-user-name,
  .topbar-logout-form,
  .topbar-login-action {
    display: none !important;
  }

  .topbar-notification-action { display: none !important; }

  .topbar-sound-action {
    position: absolute;
    top: max(7px, env(safe-area-inset-top));
    right: max(7px, env(safe-area-inset-right));
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1;
    z-index: 90;
  }

  .nav {
    display: none;
    position: absolute;
    z-index: 80;
    top: calc(100% + 3px);
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    width: auto;
    flex: none;
    flex-basis: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 7px;
    max-height: min(calc(100dvh - 64px - env(safe-area-inset-bottom)), 390px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
    background: rgba(12, 12, 16, .98);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 22px 70px rgba(0,0,0,.55);
    backdrop-filter: blur(18px);
    -webkit-overflow-scrolling: touch;
  }

  .nav.open {
    display: grid;
  }

  .nav a,
  .nav-mobile-logout .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 36px;
    width: 100%;
    padding: 7px 8px;
    border-radius: 11px;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.055);
    color: #f4f4f6;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav a:hover,
  .nav-mobile-logout .btn:hover {
    background: rgba(225,25,45,.16);
    border-color: rgba(225,25,45,.32);
  }

  .nav-mobile-only {
    display: flex;
  }

  .nav-mobile-divider {
    display: none !important;
  }

  .nav-mobile-logout {
    display: block;
    min-width: 0;
    margin: 0;
  }

  .nav-mobile-logout .btn {
    cursor: pointer;
  }

  .nav-mobile-donate {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(225,25,45,.95), rgba(132,16,32,.92)) !important;
    border-color: rgba(255,80,104,.45) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 22px rgba(225,25,45,.16);
  }

  .nav-badge {
    flex: 0 0 auto;
    margin-left: 4px;
  }

  body.mobile-nav-open {
    overflow-x: hidden;
  }
}

@media (max-width: 760px) {
  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(calc(100dvh - 62px - env(safe-area-inset-bottom)), 340px);
    gap: 6px;
    padding: 9px;
    border-radius: 15px;
  }

  .nav a,
  .nav-mobile-logout .btn {
    min-height: 34px;
    padding: 7px 6px;
    border-radius: 10px;
    font-size: 11.5px;
  }
}

@media (min-width: 761px) and (max-width: 1024px) {
  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) and (max-width: 1368px) {
  .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 430px) and (orientation: portrait) {
  .topbar {
    min-height: 50px;
    gap: 5px;
    padding-left: max(7px, env(safe-area-inset-left));
    padding-right: max(46px, calc(env(safe-area-inset-right) + 46px));
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 13px;
  }

  .brand strong {
    max-width: 52vw;
    font-size: 12px;
  }

  .nav-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 10px;
    font-size: 18px;
  }

  .topbar-notification-action { display: none !important; }

  .topbar-sound-action {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 9px;
    font-size: 12px;
  }
}

@media (max-width: 360px) and (orientation: portrait) {
  .brand strong {
    max-width: 48vw;
  }

  .nav {
    left: max(6px, env(safe-area-inset-left));
    right: max(6px, env(safe-area-inset-right));
    padding: 8px;
    gap: 5px;
  }

  .nav a,
  .nav-mobile-logout .btn {
    min-height: 33px;
    padding-left: 5px;
    padding-right: 5px;
    font-size: 11px;
  }
}

@media (max-width: 1368px) and (orientation: landscape) {
  .topbar {
    min-height: 46px;
    padding-top: max(5px, env(safe-area-inset-top));
    padding-bottom: 5px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 9px;
  }

  .brand strong {
    max-width: min(360px, 42vw);
    font-size: 12.5px;
  }

  .nav-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
  }

  .topbar-notification-action { display: none !important; }

  .topbar-sound-action {
    top: max(6px, env(safe-area-inset-top));
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
  }

  .nav {
    top: calc(100% + 2px);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-height: calc(100dvh - 54px - env(safe-area-inset-bottom));
    padding: 8px;
    gap: 6px;
  }

  .nav a,
  .nav-mobile-logout .btn {
    min-height: 32px;
    padding: 6px 7px;
    border-radius: 10px;
    font-size: 11.5px;
  }
}

@media (max-width: 740px) and (orientation: landscape) {
  .brand strong {
    max-width: 38vw;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: calc(100dvh - 52px - env(safe-area-inset-bottom));
  }
}

@media (max-height: 430px) and (orientation: landscape) {
  .topbar {
    min-height: 42px;
    padding-top: max(4px, env(safe-area-inset-top));
    padding-bottom: 4px;
  }

  .brand-mark {
    width: 29px;
    height: 29px;
  }

  .nav-toggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  .topbar-notification-action { display: none !important; }

  .topbar-sound-action {
    top: max(5px, env(safe-area-inset-top));
    right: max(6px, env(safe-area-inset-right));
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
  }

  .nav {
    max-height: calc(100dvh - 48px - env(safe-area-inset-bottom));
    padding: 7px;
    gap: 5px;
  }

  .nav a,
  .nav-mobile-logout .btn {
    min-height: 30px;
    padding: 5px 6px;
    font-size: 11px;
  }
}

/* v0.3.19.3 — iPhone/iPad viewport tuning, iPods intentionally excluded from target matrix */
@media (max-width: 440px), (max-width: 956px) and (max-height: 440px) and (orientation: landscape) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    box-sizing: border-box;
    width: 100%;
  }

  .page,
  .footer.footer-v03172 {
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
  }

  .page {
    padding-top: 12px;
  }

  .hero,
  .page-head,
  .channel-head,
  .channel-head-v029,
  .home-hero-main-v039,
  .servers-hero-v0393,
  .compare-hero-v0394 {
    padding: 18px;
  }

  .hero h1,
  .page-head h1,
  .home-hero-main-v039 h1,
  .servers-hero-v0393 h1,
  .compare-hero-v0394 h1,
  .channel-head-v029 h1 {
    font-size: clamp(26px, 8.8vw, 36px);
    line-height: 1.05;
    letter-spacing: -0.8px;
  }

  .hero p,
  .page-head p,
  .home-hero-main-v039 p,
  .servers-hero-v0393 p,
  .compare-hero-v0394 p,
  .channel-head-v029 p {
    font-size: 14px;
    line-height: 1.48;
  }

  .section-head h2,
  .panel h2,
  .home-section-v039 h2 {
    font-size: clamp(19px, 5.2vw, 24px);
    line-height: 1.15;
  }

  .panel,
  .home-section-v039,
  .article-panel-v029,
  .article-panel-v0396,
  .legal-doc-card,
  .ticket-message.panel,
  .personal-message.panel,
  .post.panel,
  .forum-card,
  .topic-row,
  .list-card,
  .channel-card,
  .feature-card,
  .home-server-card-v039,
  .server-status-card-v0393,
  .servers-restart-card-v0393 {
    padding: 14px;
    border-radius: 15px;
  }

  .nav {
    max-height: min(calc(100dvh - 58px - env(safe-area-inset-bottom)), 52dvh);
  }
}

@media (max-width: 375px) and (orientation: portrait) {
  .brand strong {
    max-width: 46vw;
    font-size: 11.5px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(calc(100dvh - 56px - env(safe-area-inset-bottom)), 300px);
  }

  .nav a,
  .nav-mobile-logout .btn {
    min-height: 32px;
    padding: 6px 5px;
    font-size: 10.8px;
  }

  .btn,
  .tab,
  .like-btn,
  .rich-toolbar button,
  .side-chip,
  .copy-button-v0393 {
    min-height: 40px;
  }
}

@media (min-width: 376px) and (max-width: 440px) and (orientation: portrait) {
  .brand strong {
    max-width: 54vw;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(calc(100dvh - 58px - env(safe-area-inset-bottom)), 330px);
  }
}

@media (min-width: 390px) and (max-width: 440px) and (min-height: 844px) and (orientation: portrait) {
  .page {
    padding-top: 14px;
  }

  .nav {
    max-height: 350px;
  }
}

@media (min-width: 744px) and (max-width: 1032px) and (orientation: portrait) {
  .page,
  .footer.footer-v03172 {
    width: calc(100% - 36px);
    max-width: calc(100% - 36px);
  }

  .topbar {
    min-height: 54px;
  }

  .brand strong {
    max-width: 46vw;
    font-size: 13.5px;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: min(calc(100dvh - 70px - env(safe-area-inset-bottom)), 420px);
  }

  .nav a,
  .nav-mobile-logout .btn {
    min-height: 36px;
    font-size: 12px;
  }

  .home-server-grid-v039,
  .articles-grid-v0396,
  .news-grid-v029,
  .events-grid-v0395,
  .legal-documents-list,
  .related-grid-v0396 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1024px) and (max-width: 1376px) and (orientation: landscape) {
  .page,
  .footer.footer-v03172 {
    width: calc(100% - 44px);
    max-width: calc(100% - 44px);
  }

  .topbar {
    min-height: 48px;
  }

  .brand strong {
    max-width: min(420px, 46vw);
  }

  .nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-height: min(calc(100dvh - 58px - env(safe-area-inset-bottom)), 360px);
  }

  .nav a,
  .nav-mobile-logout .btn {
    min-height: 31px;
    font-size: 11.5px;
  }
}

@media (min-width: 667px) and (max-width: 956px) and (max-height: 440px) and (orientation: landscape) {
  .page,
  .footer.footer-v03172 {
    width: calc(100% - 18px);
    max-width: calc(100% - 18px);
  }

  .page {
    padding-top: 10px;
  }

  .topbar {
    min-height: 40px;
  }

  .brand-mark {
    width: 27px;
    height: 27px;
  }

  .brand strong {
    max-width: 34vw;
    font-size: 11px;
  }

  .nav-toggle {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    font-size: 16px;
  }

  .topbar-notification-action { display: none !important; }

  .topbar-sound-action {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    font-size: 11px;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-height: calc(100dvh - 46px - env(safe-area-inset-bottom));
    padding: 6px;
    gap: 5px;
  }

  .nav a,
  .nav-mobile-logout .btn {
    min-height: 28px;
    padding: 4px 5px;
    font-size: 10.5px;
    border-radius: 9px;
  }

  .hero,
  .page-head,
  .channel-head,
  .channel-head-v029,
  .home-hero-main-v039,
  .servers-hero-v0393,
  .compare-hero-v0394 {
    padding: 14px;
  }

  .hero h1,
  .page-head h1,
  .home-hero-main-v039 h1,
  .servers-hero-v0393 h1,
  .compare-hero-v0394 h1,
  .channel-head-v029 h1 {
    font-size: clamp(24px, 5.6vw, 32px);
  }
}

@media (max-width: 820px), (max-height: 440px) and (orientation: landscape) {
  .footer.footer-v03172 {
    gap: 6px;
    padding-top: 14px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    font-size: 11px;
    line-height: 1.34;
  }

  .footer.footer-v03172 > span {
    font-size: 11px;
    line-height: 1.34;
  }

  .footer.footer-v03172 .footer-links {
    gap: 5px 8px;
    font-size: 10.8px;
    line-height: 1.32;
  }

  .footer.footer-v03172 .footer-links a {
    padding: 1px 0;
  }
}

@media (max-width: 390px) and (orientation: portrait) {
  .footer.footer-v03172,
  .footer.footer-v03172 > span,
  .footer.footer-v03172 .footer-links {
    font-size: 10.4px;
  }

  .footer.footer-v03172 .footer-links {
    gap: 4px 7px;
  }
}

/* v0.3.20 — PWA install/offline support and mobile hero title containment */
.pwa-install-button-v0320 {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(14px, calc(env(safe-area-inset-bottom) + 14px));
  z-index: 120;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(255,80,104,.45);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(225,25,45,.96), rgba(126,13,30,.96));
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 14px 44px rgba(0,0,0,.46), 0 8px 26px rgba(225,25,45,.2);
  cursor: pointer;
}

.pwa-install-button-v0320:hover {
  transform: translateY(-1px);
}

.offline-panel-v0320 {
  max-width: 760px;
  margin: 30px auto;
  padding: clamp(24px, 5vw, 44px);
  text-align: center;
}

.offline-panel-v0320 h1 {
  margin: 10px 0 12px;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1;
  letter-spacing: -1.6px;
}

.offline-panel-v0320 p {
  max-width: 560px;
  margin: 0 auto 22px;
  color: var(--muted);
  line-height: 1.65;
}

.is-standalone-pwa .topbar {
  padding-top: max(8px, env(safe-area-inset-top));
}

@media (max-width: 440px) and (orientation: portrait) {
  .home-hero-main-v039 {
    min-width: 0;
    padding: 20px 18px;
  }

  .home-hero-main-v039::before {
    inset: 10px;
    border-radius: 17px;
  }

  .home-hero-main-v039 h1 {
    max-width: 100%;
    font-size: clamp(25px, 7.25vw, 31px);
    line-height: 1.08;
    letter-spacing: -0.65px;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  .home-hero-main-v039 p {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.5;
  }

  .home-hero-main-v039 .hero-actions {
    gap: 10px;
  }

  .home-hero-main-v039 .btn-xl {
    min-height: 48px;
    padding: 12px 13px;
    font-size: 14px;
  }

  .home-hero-pills-v039 {
    margin-top: 28px;
    padding-right: 4px;
  }
}

@media (max-width: 375px) and (orientation: portrait) {
  .home-hero-main-v039 {
    padding: 18px 16px;
  }

  .home-hero-main-v039 h1 {
    font-size: clamp(24px, 7vw, 28px);
    letter-spacing: -0.5px;
  }

  .home-hero-main-v039 .btn-xl {
    min-height: 46px;
    font-size: 13.5px;
  }
}

@media (max-width: 340px) and (orientation: portrait) {
  .home-hero-main-v039 h1 {
    font-size: 23px;
  }
}

@media (max-width: 956px) and (max-height: 440px) and (orientation: landscape) {
  .pwa-install-button-v0320 {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 11.5px;
  }

  .home-hero-main-v039 h1 {
    font-size: clamp(23px, 5vw, 30px);
    line-height: 1.05;
    letter-spacing: -0.6px;
  }
}

/* v0.3.20.1 — help check panel, profile PWA hub and Enter-submit polish */
.help-before-v03201 {
  display: grid;
  gap: 18px;
}

.help-before-head-v03201 {
  align-items: stretch;
  margin-bottom: 0;
}

.help-before-head-v03201 > div:first-child {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.help-before-head-v03201 h2,
.help-before-head-v03201 p {
  margin: 0;
}

.help-before-head-v03201 p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
}

.help-before-note-v03201 {
  max-width: 360px;
  display: grid;
  gap: 4px;
  align-self: stretch;
  padding: 13px 15px;
  border: 1px solid rgba(225,25,45,.24);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(225,25,45,.12), rgba(255,255,255,.035));
}

.help-before-note-v03201 strong {
  color: #fff;
  font-size: 13px;
}

.help-before-note-v03201 span {
  color: var(--muted);
  line-height: 1.45;
  font-size: 12.5px;
}

.help-check-grid-v03201 a {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 9px;
}

.help-check-grid-v03201 strong {
  display: block;
  line-height: 1.2;
}

.help-check-grid-v03201 span {
  display: block;
  margin-top: 0;
  font-size: 13px;
}

.profile-pwa-panel-v03201 {
  overflow: hidden;
}

.profile-pwa-head-v03201 {
  align-items: flex-start;
}

.profile-pwa-status-v03201 {
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.profile-pwa-actions-v03201 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 14px 0 16px;
}

.profile-pwa-actions-v03201 [hidden] {
  display: none !important;
}

.profile-pwa-actions-v03201 .muted {
  flex: 1 1 280px;
  font-size: 12.5px;
  line-height: 1.45;
}

.profile-pwa-tabs-v03201 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.profile-pwa-tabs-v03201 a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.profile-pwa-tabs-v03201 a:hover {
  border-color: rgba(225,25,45,.44);
  background: rgba(225,25,45,.11);
}

.profile-pwa-grid-v03201 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-pwa-card-v03201 {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.035);
}

.profile-pwa-card-v03201 h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.18;
}

.profile-pwa-card-v03201 p {
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.55;
}

.profile-pwa-card-v03201 small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.pwa-install-button-v0320 {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  box-shadow: none;
}

@media (max-width: 820px) {
  .help-before-head-v03201,
  .profile-pwa-head-v03201 {
    display: grid;
    grid-template-columns: 1fr;
  }

  .help-before-note-v03201,
  .profile-pwa-status-v03201 {
    max-width: none;
  }

  .help-check-grid-v03201,
  .profile-pwa-grid-v03201 {
    grid-template-columns: 1fr;
  }

  .help-check-grid-v03201 a {
    min-height: 0;
  }
}

@media (max-width: 440px) {
  .help-before-v03201,
  .profile-pwa-panel-v03201 {
    padding: 16px;
  }

  .help-before-head-v03201 h2,
  .profile-pwa-panel-v03201 h2 {
    font-size: 22px;
    line-height: 1.1;
  }

  .help-before-head-v03201 p,
  .help-before-note-v03201 span,
  .profile-pwa-status-v03201,
  .profile-pwa-actions-v03201 .muted,
  .profile-pwa-card-v03201 p,
  .profile-pwa-card-v03201 small {
    font-size: 12px;
  }

  .profile-pwa-actions-v03201 .btn {
    flex: 1 1 100%;
    min-height: 42px;
  }

  .profile-pwa-tabs-v03201 {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .profile-pwa-tabs-v03201 a {
    flex: 0 0 auto;
    min-height: 32px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .profile-pwa-card-v03201 {
    padding: 13px;
  }

  .profile-pwa-card-v03201 h3 {
    font-size: 16px;
  }
}

/* v0.3.20.2: компактные ЛС, спокойные бейджи и предпросмотр вложений */
.personal-message.panel {
  padding: 10px 12px;
  gap: 6px;
}
.personal-message.from-me {
  padding-top: 8px;
  padding-bottom: 8px;
}
.personal-message .ticket-head {
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.personal-message .post-author-block {
  gap: 9px;
}
.personal-message .post-author-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  font-size: 13px;
}
.personal-message.from-me .post-author-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
}
.personal-message .ticket-author-block small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
}
.personal-message .content {
  line-height: 1.38;
  font-size: 14px;
}
.personal-message .content p {
  margin: 5px 0;
}
.personal-message .content p:first-child { margin-top: 0; }
.personal-message .content p:last-child { margin-bottom: 0; }
.personal-message-badges {
  margin-top: 4px;
  gap: 5px;
}
.personal-message-badges .user-status-badge {
  padding: 2px 7px;
  font-size: 10px;
  line-height: 1.15;
  background: color-mix(in srgb, var(--badge-bg, #ffffff) 34%, rgba(21, 22, 29, .92));
  color: color-mix(in srgb, var(--badge-text, #ffffff) 74%, #ffffff);
  border-color: rgba(255,255,255,.12);
  box-shadow: none;
  filter: saturate(.72) brightness(.94);
}
.personal-message .role-chip {
  box-shadow: none;
  filter: saturate(.76) brightness(.94);
}
.personal-message .role-chip-owner {
  background: linear-gradient(135deg, rgba(255, 214, 107, .72), rgba(255, 177, 31, .62));
}
.personal-message .role-chip-admin {
  background: linear-gradient(135deg, rgba(225,25,45,.62), rgba(131,35,48,.62));
}
.personal-attachments-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 7px;
  margin-top: 6px;
}
.personal-attachments-grid .attachment-card,
.personal-attachment-card {
  padding: 7px;
  gap: 5px;
  min-width: 0;
}
.personal-attachments-grid img,
.personal-attachments-grid video {
  max-height: 145px;
  min-height: 82px;
  object-fit: cover;
}
.personal-attachment-card.is-previewable {
  cursor: zoom-in;
}
.attachment-action-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.82);
  font-style: normal;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}
.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 9px;
}
.file-preview-grid[hidden] {
  display: none !important;
}
.file-preview-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  min-width: 0;
}
.file-preview-card img,
.file-preview-card video,
.file-preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  object-fit: cover;
  background: rgba(255,255,255,.055);
}
.file-preview-icon {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255,255,255,.16);
  color: rgba(255,255,255,.82);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}
.file-preview-meta {
  min-width: 0;
}
.file-preview-meta strong,
.file-preview-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview-meta strong {
  font-size: 12px;
  line-height: 1.2;
}
.file-preview-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.file-preview-card-v0391 {
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  padding: 6px;
}
.file-preview-card-v0391 .file-preview-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}
.file-preview-remove-v0391 {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  background: rgba(255,255,255,.055);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.file-preview-remove-v0391:hover {
  border-color: rgba(225,25,45,.4);
  background: rgba(225,25,45,.16);
}
.attachment-preview-open {
  overflow: hidden;
}
.attachment-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
.attachment-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(10px);
}
.attachment-preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(980px, 96vw);
  max-height: 92vh;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: rgba(16,16,22,.96);
  box-shadow: 0 26px 80px rgba(0,0,0,.5);
}
.attachment-preview-head,
.attachment-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.attachment-preview-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.attachment-preview-body {
  display: grid;
  place-items: center;
  min-height: 140px;
  overflow: auto;
  border-radius: 14px;
  background: #050506;
}
.attachment-preview-body img,
.attachment-preview-body video {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 12px;
}
@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .personal-message-reply-panel textarea,
  .personal-message-compose textarea {
    min-height: 76px !important;
  }
  .personal-message.panel {
    padding: 8px 9px;
    border-radius: 13px;
  }
  .personal-message .content {
    font-size: 13.5px;
    line-height: 1.34;
  }
  .personal-message .post-author-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
  .personal-message-badges .user-status-badge {
    font-size: 9.5px;
    padding: 2px 6px;
  }
  .personal-attachments-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .personal-attachments-grid img,
  .personal-attachments-grid video {
    max-height: 132px !important;
  }
  .file-preview-grid {
    grid-template-columns: 1fr;
  }
  .file-preview-card-v0391 {
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    gap: 7px;
  }
  .file-preview-card-v0391 .file-preview-icon {
    width: 34px;
    height: 34px;
    font-size: 10px;
  }
  .file-preview-remove-v0391 {
    width: 28px;
    height: 28px;
  }
  .attachment-preview-dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 16px;
  }
  .attachment-preview-head,
  .attachment-preview-actions {
    align-items: stretch;
  }
  .attachment-preview-actions .btn {
    width: 100%;
  }
}
@media (max-width: 370px) {
  .personal-attachments-grid {
    grid-template-columns: 1fr !important;
  }
}

/* v0.3.20.3: PWA status polish and slightly brighter message badge text */
.profile-pwa-state-grid-v03203 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.profile-pwa-state-card-v03203 {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 15px;
  background: rgba(255,255,255,.035);
}

.profile-pwa-state-card-v03203 strong,
.profile-pwa-state-card-v03203 span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-pwa-state-card-v03203 strong {
  color: rgba(255,255,255,.9);
  font-size: 11px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.profile-pwa-state-card-v03203 span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.profile-pwa-state-card-v03203[data-state="good"] {
  border-color: rgba(43,213,118,.24);
  background: linear-gradient(135deg, rgba(43,213,118,.1), rgba(255,255,255,.03));
}

.profile-pwa-state-card-v03203[data-state="good"] span {
  color: rgba(210,255,225,.9);
}

.profile-pwa-state-card-v03203[data-state="warn"] {
  border-color: rgba(255,197,80,.22);
  background: linear-gradient(135deg, rgba(255,197,80,.09), rgba(255,255,255,.03));
}

.profile-pwa-state-card-v03203[data-state="warn"] span {
  color: rgba(255,229,172,.9);
}

.profile-pwa-state-card-v03203[data-state="bad"] {
  border-color: rgba(255,74,96,.23);
  background: linear-gradient(135deg, rgba(255,74,96,.09), rgba(255,255,255,.03));
}

.profile-pwa-state-card-v03203[data-state="bad"] span {
  color: rgba(255,205,212,.9);
}

.personal-message-badges .user-status-badge {
  color: color-mix(in srgb, var(--badge-text, #ffffff) 88%, #ffffff);
  font-weight: 850;
  text-shadow: 0 1px 8px rgba(0,0,0,.28);
  filter: saturate(.82) brightness(1.04);
}

.personal-message-badges .user-status-badge .status-icon {
  opacity: .98;
}

@media (max-width: 720px) {
  .profile-pwa-state-grid-v03203 {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .profile-pwa-state-card-v03203 {
    padding: 10px 11px;
  }
}

/* v0.3.20.4: понятные статусы UI Приложения, защита ЛК и более читаемые бейджи */
.profile-pwa-control-note-v03204 {
  display: grid;
  gap: 4px;
  margin: -2px 0 14px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.profile-pwa-control-note-v03204 strong {
  color: rgba(255,255,255,.94);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.profile-pwa-control-note-v03204 span {
  color: rgba(229,231,235,.82);
  font-size: 12.5px;
  line-height: 1.45;
}

.profile-pwa-state-card-v03203 strong,
.profile-pwa-state-card-v03203 span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.profile-pwa-state-card-v03203 span {
  color: rgba(229,231,235,.84);
}

.profile-pwa-state-card-v03203[data-state="good"] span {
  color: rgba(223,255,235,.96);
}

.profile-pwa-state-card-v03203[data-state="warn"] span {
  color: rgba(255,237,194,.96);
}

.profile-pwa-state-card-v03203[data-state="bad"] span {
  color: rgba(255,220,225,.96);
}

.personal-message-badges .user-status-badge {
  color: color-mix(in srgb, var(--badge-text, #ffffff) 100%, #ffffff);
  text-shadow: 0 1px 8px rgba(0,0,0,.32), 0 0 7px rgba(255,255,255,.16);
  filter: saturate(.96) brightness(1.12);
}

.profile-copy-protected-v03204 {
  -webkit-user-select: none;
  user-select: none;
}

.profile-copy-protected-v03204 input,
.profile-copy-protected-v03204 textarea,
.profile-copy-protected-v03204 select,
.profile-copy-protected-v03204 button,
.profile-copy-protected-v03204 a,
.profile-copy-protected-v03204 label,
.profile-copy-protected-v03204 [contenteditable="true"],
.profile-copy-protected-v03204 .allow-copy,
.profile-copy-protected-v03204 [data-allow-copy] {
  -webkit-user-select: auto;
  user-select: auto;
}

.profile-copy-protected-v03204 img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .profile-pwa-control-note-v03204 {
    padding: 10px 11px;
  }

  .profile-pwa-control-note-v03204 span {
    font-size: 12px;
  }
}


/* v0.3.20.5: ручное управление уведомлениями и компактное UI Приложение */
.topbar-notification-action {
  width: 38px;
  height: 34px;
  min-width: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.nav-mobile-notification-toggle {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: rgba(245,245,247,.94);
  text-align: center;
  cursor: pointer;
}

.nav-mobile-notification-toggle[aria-pressed="false"] {
  color: rgba(229,231,235,.72);
  background: rgba(255,255,255,.025);
}

.profile-ui-app-panel-v03205 {
  padding-bottom: 16px;
}

.profile-ui-app-head-v03205 {
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.profile-ui-app-head-v03205 h2 {
  margin-bottom: 5px;
}

.profile-ui-app-head-v03205 .muted {
  max-width: 760px;
}

.profile-ui-app-quick-v03205 {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.028);
}

.profile-ui-app-quick-v03205 .muted {
  font-size: 12.5px;
  line-height: 1.35;
}

.profile-pwa-details-v03205 {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.profile-pwa-details-v03205[hidden] {
  display: none !important;
}

.profile-pwa-actions-v03205 {
  margin-bottom: 12px;
}

.profile-pwa-control-note-v03205 {
  margin: 0 0 12px;
}

.personal-message-badges .user-status-badge {
  color: color-mix(in srgb, var(--badge-text, #ffffff) 100%, #ffffff);
  filter: saturate(1) brightness(1.15);
}

@media (max-width: 1280px) {
  .topbar-notification-action {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .profile-ui-app-head-v03205 {
    align-items: stretch;
  }

  .profile-ui-app-head-v03205 [data-pwa-details-toggle] {
    width: 100%;
  }

  .profile-ui-app-quick-v03205 {
    padding: 9px 10px;
  }
}

/* v0.3.20.6: тех. настройки в header и лёгкая кнопка «Вернуться вверх» */
.topbar-settings-v03206 {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-settings-toggle-v03206 {
  width: 38px;
  height: 34px;
  min-width: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.topbar-settings-panel-v03206 {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 95;
  display: grid;
  gap: 7px;
  width: 250px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(12,12,16,.985);
  box-shadow: 0 22px 68px rgba(0,0,0,.58);
  backdrop-filter: blur(18px);
}

.topbar-settings-panel-v03206[hidden] {
  display: none !important;
}

.topbar-settings-title-v03206 {
  padding: 2px 4px 5px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar-settings-option-v03206,
.topbar-settings-link-v03206 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 38px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: rgba(245,245,247,.94);
  font: inherit;
  font-size: 12.5px;
  font-weight: 850;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
}

.topbar-settings-option-v03206:hover,
.topbar-settings-link-v03206:hover,
.topbar-settings-v03206.is-open .topbar-settings-toggle-v03206 {
  border-color: rgba(225,25,45,.32);
  background: rgba(225,25,45,.15);
  color: #fff;
}

.topbar-settings-option-v03206.is-off,
.topbar-settings-option-v03206[aria-pressed="false"] {
  color: rgba(229,231,235,.72);
  background: rgba(255,255,255,.025);
}

.personal-message-badges .user-status-badge {
  color: color-mix(in srgb, var(--badge-text, #ffffff) 100%, #ffffff);
  text-shadow: 0 1px 8px rgba(0,0,0,.34), 0 0 9px rgba(255,255,255,.2);
  filter: saturate(1.04) brightness(1.22);
}

.back-to-top-v03206 {
  position: fixed;
  right: max(18px, calc(env(safe-area-inset-right) + 18px));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
  z-index: 64;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  background: rgba(14,14,18,.82);
  color: rgba(255,255,255,.94);
  box-shadow: 0 14px 42px rgba(0,0,0,.38);
  backdrop-filter: blur(14px);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, background .18s ease, border-color .18s ease;
}

.back-to-top-v03206.is-visible {
  opacity: .88;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top-v03206:hover {
  opacity: 1;
  background: rgba(225,25,45,.86);
  border-color: rgba(255,255,255,.2);
}

.mobile-nav-open .back-to-top-v03206 {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1280px) {
  .topbar-settings-v03206 {
    position: absolute;
    top: max(7px, env(safe-area-inset-top));
    right: max(7px, env(safe-area-inset-right));
    z-index: 85;
  }

  .topbar-settings-toggle-v03206 {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 10px;
    font-size: 14px;
  }

  .topbar-settings-panel-v03206 {
    top: calc(100% + 8px);
    right: 0;
    width: min(258px, calc(100vw - 16px));
    max-height: calc(100dvh - 70px - env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .nav-mobile-notification-toggle {
    display: none !important;
  }
}

@media (max-width: 430px) and (orientation: portrait) {
  .topbar-settings-toggle-v03206 {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 9px;
    font-size: 12px;
  }
}

@media (max-width: 720px) {
  .back-to-top-v03206 {
    right: max(12px, calc(env(safe-area-inset-right) + 12px));
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 14px));
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .back-to-top-v03206.is-visible {
    opacity: .82;
  }
}

/* v0.3.20.7: водяной знак, кнопка вверх, мобильная шапка ЛС и локальные даты. */
.has-site-watermark-v03207 .back-to-top-v03206 {
  bottom: max(66px, calc(env(safe-area-inset-bottom) + 66px));
}

@media (max-width: 720px) {
  .has-site-watermark-v03207 .back-to-top-v03206 {
    bottom: max(58px, calc(env(safe-area-inset-bottom) + 58px));
  }
}

.personal-message .ticket-author-block {
  width: 100%;
  min-width: 0;
}

.personal-message-author-info {
  flex: 1 1 auto;
  min-width: 0;
}

.personal-message-author-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.personal-message-author-name {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.personal-message-author-name strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.personal-message-date {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  margin-top: 0 !important;
  text-align: right;
  white-space: nowrap;
  color: rgba(229,231,235,.62);
}

.personal-message-date time {
  color: rgba(229,231,235,.72);
}

.personal-message-side {
  color: rgba(229,231,235,.46);
}

.personal-message-badges .user-status-badge {
  color: color-mix(in srgb, var(--badge-text, #ffffff) 100%, #ffffff);
  text-shadow: 0 1px 8px rgba(0,0,0,.36), 0 0 10px rgba(255,255,255,.24);
  filter: saturate(1.08) brightness(1.28);
}

@media (max-width: 720px) {
  .personal-message .post-author-block {
    align-items: flex-start;
    gap: 8px;
  }

  .personal-message-author-row {
    gap: 7px;
  }

  .personal-message-author-name {
    flex: 1 1 auto;
    min-width: 0;
  }

  .personal-message-author-name strong {
    display: inline-block;
    max-width: 42vw;
    white-space: nowrap;
  }

  .personal-message-date {
    font-size: 10.5px !important;
    line-height: 1.15 !important;
  }

  .personal-message-side {
    display: none;
  }
}

@media (max-width: 380px) {
  .personal-message-author-name strong {
    max-width: 36vw;
  }

  .personal-message-date {
    font-size: 10px !important;
  }
}

/* v0.3.21: фикс портретной мобильной шапки ЛС для iPhone Pro Max и близких размеров. */
@media (max-width: 720px) and (orientation: portrait), (max-width: 480px) {
  .personal-message .ticket-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  .personal-message .post-author-block,
  .personal-message .ticket-author-block {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .personal-message .post-author-avatar,
  .personal-message.from-me .post-author-avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    align-self: center;
  }

  .personal-message-author-info {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .personal-message-author-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 7px;
    width: 100%;
    min-width: 0;
  }

  .personal-message-author-name {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .personal-message-author-name strong {
    display: inline-block;
    max-width: min(48vw, 210px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .personal-message-date {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
  }
}

@media (max-width: 380px) and (orientation: portrait) {
  .personal-message-author-name strong {
    max-width: 40vw;
  }
}

/* v0.3.21: server-side Web Push status in UI Приложение. */
.profile-pwa-state-grid-v03203 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .profile-pwa-state-grid-v03203 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .profile-pwa-state-grid-v03203 {
    grid-template-columns: 1fr;
  }
}


/* v0.3.21.2: проверка iOS-виджета, бейджа приложения и быстрых действий PWA. */
.profile-pwa-widget-card-v03212 {
  border-color: rgba(255,197,80,.16);
  background: linear-gradient(135deg, rgba(255,197,80,.055), rgba(255,255,255,.032));
}

.profile-pwa-widget-card-v03212 .tag {
  background: rgba(255,197,80,.12);
  border-color: rgba(255,197,80,.24);
  color: rgba(255,235,188,.94);
}

.profile-pwa-actions-v03205 [data-pwa-badge-test-action],
.profile-pwa-actions-v03205 [data-pwa-badge-clear-action] {
  min-width: 138px;
}

.profile-pwa-state-grid-v03203 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .profile-pwa-state-grid-v03203 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .profile-pwa-state-grid-v03203 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .profile-pwa-state-grid-v03203 {
    grid-template-columns: 1fr;
  }

  .profile-pwa-actions-v03205 [data-pwa-badge-test-action],
  .profile-pwa-actions-v03205 [data-pwa-badge-clear-action] {
    min-width: 0;
  }
}

/* v0.3.21.4: управление Web Push-устройствами в UI Приложении. */
.profile-pwa-devices-v03214 {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.028);
}

.profile-pwa-devices-head-v03214 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-pwa-devices-head-v03214 strong,
.profile-pwa-devices-head-v03214 span {
  display: block;
}

.profile-pwa-devices-head-v03214 strong {
  color: rgba(255,255,255,.94);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.profile-pwa-devices-head-v03214 span {
  margin-top: 3px;
  color: rgba(229,231,235,.74);
  font-size: 12.5px;
  line-height: 1.35;
}

.profile-pwa-devices-list-v03214 {
  display: grid;
  gap: 8px;
}

.profile-pwa-device-empty-v03214 {
  padding: 11px 12px;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 14px;
  color: rgba(229,231,235,.75);
  font-size: 12.5px;
  line-height: 1.4;
}

.profile-pwa-device-row-v03214 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 15px;
  background: rgba(0,0,0,.14);
}

.profile-pwa-device-row-v03214[data-state="good"] {
  border-color: rgba(43,213,118,.18);
  background: linear-gradient(135deg, rgba(43,213,118,.06), rgba(0,0,0,.12));
}

.profile-pwa-device-row-v03214[data-state="warn"] {
  border-color: rgba(255,197,80,.18);
  background: linear-gradient(135deg, rgba(255,197,80,.055), rgba(0,0,0,.12));
}

.profile-pwa-device-row-v03214[data-state="bad"] {
  border-color: rgba(255,74,96,.2);
  background: linear-gradient(135deg, rgba(255,74,96,.06), rgba(0,0,0,.12));
}

.profile-pwa-device-main-v03214 {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profile-pwa-device-title-v03214 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.profile-pwa-device-title-v03214 strong {
  color: rgba(255,255,255,.95);
  font-size: 13px;
  line-height: 1.2;
}

.profile-pwa-device-chip-v03214 {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: rgba(229,231,235,.86);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 750;
}

.profile-pwa-device-chip-v03214.is-good {
  border-color: rgba(43,213,118,.24);
  background: rgba(43,213,118,.1);
  color: rgba(218,255,232,.95);
}

.profile-pwa-device-chip-v03214.is-muted {
  color: rgba(229,231,235,.68);
  background: rgba(255,255,255,.025);
}

.profile-pwa-device-meta-v03214 {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: rgba(229,231,235,.68);
  font-size: 12px;
  line-height: 1.35;
}

.profile-pwa-device-status-v03214 {
  color: rgba(229,231,235,.82);
  font-size: 12.2px;
  line-height: 1.35;
}

.profile-pwa-device-error-v03214 {
  display: block;
  margin-top: 3px;
  color: rgba(255,210,216,.92);
}

.profile-pwa-device-actions-v03214 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-pwa-device-actions-v03214 .btn {
  min-height: 30px;
  padding-inline: 10px;
}

@media (max-width: 720px) {
  .profile-pwa-devices-head-v03214,
  .profile-pwa-device-row-v03214 {
    grid-template-columns: 1fr;
  }

  .profile-pwa-devices-head-v03214 {
    align-items: stretch;
  }

  .profile-pwa-devices-head-v03214 .btn {
    justify-self: start;
  }

  .profile-pwa-device-actions-v03214 {
    justify-content: flex-start;
  }

  .profile-pwa-device-actions-v03214 .btn {
    flex: 1 1 92px;
  }
}

/* v0.3.21.5: упрощённый блок UI Приложение и синхронные уведомления */
.profile-ui-app-panel-v03215 .profile-ui-app-head-v03205 {
  align-items: center;
  gap: 16px;
}
.profile-ui-app-main-actions-v03215 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}
.profile-ui-app-quick-v03215 {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.profile-pwa-devices-v03215 {
  margin-top: 14px;
}
.profile-pwa-device-row-v03214.is-simple {
  grid-template-columns: 1fr;
}
.profile-pwa-details-v03215 {
  margin-top: 14px;
}
.profile-pwa-grid-v03215 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
@media (max-width: 720px) {
  .profile-ui-app-panel-v03215 .profile-ui-app-head-v03205 {
    align-items: stretch;
  }
  .profile-ui-app-main-actions-v03215 {
    justify-content: stretch;
  }
  .profile-ui-app-main-actions-v03215 .btn {
    flex: 1 1 100%;
  }
}

/* v0.3.21.6: админская push-диагностика без перегруза пользовательского UI */
.admin-push-stats-v03216 .panel strong {
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
}
.admin-push-status-v03216 .section-head,
.admin-push-breakdown-v03216 .section-head,
.admin-push-table-v03216 .section-head {
  align-items: flex-start;
}
.admin-push-summary-v03216,
.admin-push-columns-v03216 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.admin-push-summary-v03216 > div,
.admin-push-columns-v03216 > div {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.admin-push-summary-v03216 strong,
.admin-push-summary-v03216 span,
.admin-push-mini-row-v03216 span,
.admin-push-mini-row-v03216 strong {
  display: block;
}
.admin-push-summary-v03216 strong,
.admin-push-columns-v03216 h3 {
  margin-bottom: 6px;
  color: rgba(255,255,255,.92);
}
.admin-push-summary-v03216 span,
.admin-push-mini-row-v03216 span {
  color: var(--muted);
}
.admin-push-mini-row-v03216 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.admin-push-mini-row-v03216:last-child {
  border-bottom: 0;
}
.admin-push-table-v03216 table small {
  display: block;
  margin-top: 3px;
}
.admin-push-table-v03216 code {
  word-break: break-word;
  white-space: normal;
}
@media (max-width: 720px) {
  .admin-push-summary-v03216,
  .admin-push-columns-v03216 {
    grid-template-columns: 1fr;
  }
}

/* v0.3.21.7: финальная чистка пользовательского UI уведомлений */
.profile-ui-app-panel-v03215 .profile-ui-app-head-v03205 h2 {
  margin-bottom: 6px;
}
.profile-ui-app-panel-v03215 .profile-ui-app-head-v03205 .muted {
  max-width: 680px;
}
.profile-ui-app-quick-v03215 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profile-ui-app-quick-v03215 .muted {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  background: rgba(0,0,0,.11);
}
.profile-pwa-devices-v03215 {
  border-color: rgba(255,255,255,.075);
  background: rgba(255,255,255,.022);
}
.profile-pwa-devices-head-v03214 span {
  max-width: 620px;
}
.profile-pwa-device-row-v03214.is-simple[data-state="bad"],
.profile-pwa-device-row-v03214.is-simple[data-state="warn"] {
  border-color: rgba(255,255,255,.09);
  background: rgba(0,0,0,.14);
}
.profile-pwa-device-meta-v03214 span {
  overflow-wrap: anywhere;
}
.profile-pwa-details-v03215 .profile-pwa-card-v03201 p {
  line-height: 1.48;
}
@media (max-width: 720px) {
  .profile-ui-app-quick-v03215 {
    grid-template-columns: 1fr;
  }
  .profile-pwa-devices-head-v03214 .btn {
    width: auto;
  }
}

/* v0.3.21.8: финальная полировка PWA/Web Push и production-наблюдение */
.profile-ui-app-panel-v03215 .profile-ui-app-head-v03205 .muted {
  color: rgba(229,231,235,.78);
}
.profile-pwa-device-status-v03214 {
  color: rgba(235,237,242,.84);
}
.profile-pwa-device-row-v03214.is-simple[data-state="neutral"] {
  border-color: rgba(255,255,255,.085);
  background: rgba(0,0,0,.12);
}
.profile-pwa-device-chip-v03214.is-muted {
  border-color: rgba(255,255,255,.105);
}
.admin-push-health-v03218 .section-head {
  align-items: flex-start;
}
.admin-push-summary-v03218 {
  margin-top: 10px;
}
.admin-push-health-notes-v03218 {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}
.admin-push-health-notes-v03218 span {
  display: block;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.026);
  color: rgba(229,231,235,.78);
  font-size: 12.5px;
  line-height: 1.35;
}
@media (max-width: 720px) {
  .profile-pwa-devices-v03215 {
    padding: 10px;
  }
  .profile-pwa-device-row-v03214 {
    padding: 10px;
  }
}

/* v0.3.22: профиль и настройки аккаунта */
.profile-nav-v0322 {
  width: min(1520px, calc(100vw - 32px));
  margin: 0 auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
}
.profile-nav-v0322 a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(0,0,0,.12);
  color: rgba(245,245,247,.88);
  font-size: 12.5px;
  line-height: 1.1;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.profile-nav-v0322 a:hover,
.profile-nav-v0322 a:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255,74,96,.32);
  background: rgba(255,74,96,.1);
  color: rgba(255,255,255,.96);
}
.profile-overview-panel-v0322 .stats-grid {
  margin-top: 2px;
}
.profile-account-settings-v0322,
.profile-activity-panel-v0322 {
  margin: 0;
}
.profile-account-grid-v0322 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
  gap: 14px;
  align-items: stretch;
}
.profile-account-card-v0322 {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.028);
}
.profile-account-card-v0322 h3 {
  margin: 0 0 12px;
  color: rgba(255,255,255,.94);
  font-size: 16px;
  line-height: 1.2;
}
.profile-nickname-panel-v0322 {
  display: grid;
  gap: 12px;
}
.profile-nickname-panel-v0322 .form,
.profile-playtime-v0322 .form {
  gap: 9px;
}
.profile-playtime-v0322.panel-soft {
  height: 100%;
  margin: 0;
  display: grid;
  gap: 12px;
  align-content: start;
  border-color: rgba(255,255,255,.08);
  background: rgba(0,0,0,.1);
}
.profile-playtime-v0322 .playtime-value {
  margin: 8px 0 4px;
}
.profile-playtime-v0322 .profile-playtime-actions {
  display: grid;
  gap: 11px;
}
.profile-activity-list-v0322 {
  display: grid;
  gap: 8px;
}
.profile-activity-row-v0322 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  text-decoration: none;
  color: inherit;
}
.profile-activity-row-v0322:hover,
.profile-activity-row-v0322:focus-visible {
  border-color: rgba(255,74,96,.25);
  background: rgba(255,74,96,.055);
}
.profile-activity-row-v0322 strong {
  min-width: 0;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-activity-row-v0322 small {
  color: rgba(229,231,235,.66);
  font-size: 11.5px;
  line-height: 1.2;
  white-space: nowrap;
}
@media (max-width: 1380px) {
  .profile-nav-v0322 {
    width: min(1280px, calc(100vw - 32px));
  }
}
@media (max-width: 1180px) {
  .profile-nav-v0322 {
    width: 100%;
  }
}
@media (max-width: 820px) {
  .profile-nav-v0322 {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .profile-nav-v0322 a {
    flex: 0 0 auto;
  }
  .profile-account-grid-v0322 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .profile-activity-row-v0322 {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .profile-activity-row-v0322 small {
    grid-column: 2;
    white-space: normal;
  }
}

/* v0.3.22.1: профиль — активная навигация, переразводка колонок и компактные настройки */
.profile-nav-v03221 {
  width: min(1520px, calc(100vw - 32px));
  box-sizing: border-box;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  margin-top: -2px;
  margin-bottom: 20px;
}
.profile-nav-v03221 a {
  min-width: 0;
  min-height: 34px;
  padding-inline: 13px;
  white-space: nowrap;
}
.profile-nav-v03221 a.is-active,
.profile-nav-v03221 a[aria-current="true"] {
  border-color: rgba(255,74,96,.52);
  background: linear-gradient(135deg, rgba(255,74,96,.24), rgba(255,255,255,.055));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,74,96,.12), 0 10px 24px rgba(255,74,96,.11);
}
.profile-layout-three-v0310 .panel[id] {
  scroll-margin-top: 118px;
}
.profile-section-active-v03221 {
  animation: profileSectionPulseV03221 1.8s ease;
}
@keyframes profileSectionPulseV03221 {
  0% { box-shadow: 0 0 0 0 rgba(255,74,96,.0); border-color: rgba(255,255,255,.08); }
  18% { box-shadow: 0 0 0 2px rgba(255,74,96,.22), 0 22px 60px rgba(255,74,96,.10); border-color: rgba(255,74,96,.38); }
  100% { box-shadow: inherit; border-color: rgba(255,255,255,.08); }
}
.profile-layout-v0310.profile-layout-three-v0310 {
  grid-template-columns: minmax(270px, 340px) minmax(620px, 1fr) minmax(270px, 340px);
}
.profile-left-column-v0310 .profile-tickets-panel-v0310 {
  padding: 16px;
}
.profile-left-column-v0310 .profile-tickets-panel-v0310 .section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.profile-left-column-v0310 .profile-tickets-panel-v0310 .section-head .btn,
.profile-left-column-v0310 .profile-tickets-panel-v0310 .profile-ticket-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 34px;
}
.profile-left-column-v0310 .profile-tickets-panel-v0310 .topic-list {
  display: grid;
  gap: 8px;
}
.profile-left-column-v0310 .profile-tickets-panel-v0310 .topic-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
}
.profile-left-column-v0310 .profile-tickets-panel-v0310 .topic-row h3 {
  margin: 0 0 4px;
  font-size: 13.5px;
  line-height: 1.25;
}
.profile-left-column-v0310 .profile-tickets-panel-v0310 .topic-row p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-left-column-v0310 .profile-tickets-panel-v0310 .topic-row small {
  font-size: 11px;
  line-height: 1.25;
}
.profile-left-column-v0310 .profile-tickets-panel-v0310 .topic-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  align-items: center;
}
.profile-account-settings-v03221 {
  padding-bottom: 18px;
}
.profile-account-settings-v03221 .section-head {
  margin-bottom: 12px;
}
.profile-account-settings-v03221 .profile-account-grid-v0322 {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 12px;
}
.profile-account-settings-v03221 .profile-account-card-v0322 {
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}
.profile-account-settings-v03221 .profile-account-card-v0322 h3 {
  margin-bottom: 0;
}
.profile-account-settings-v03221 .profile-nickname-panel-v0322 {
  grid-template-columns: minmax(0, 1fr) minmax(210px, .72fr);
  gap: 10px;
  align-items: stretch;
}
.profile-account-settings-v03221 .profile-nickname-panel-v0322 .form,
.profile-account-settings-v03221 .profile-playtime-actions form {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: rgba(0,0,0,.095);
}
.profile-account-settings-v03221 .profile-nickname-panel-v0322 input,
.profile-account-settings-v03221 .profile-nickname-panel-v0322 button,
.profile-account-settings-v03221 .profile-playtime-actions button {
  min-height: 34px;
}
.profile-account-settings-v03221 .profile-playtime-v0322.panel-soft {
  padding: 12px;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.profile-account-settings-v03221 .profile-playtime-v0322 .playtime-value {
  margin: 5px 0 2px;
  font-size: 14px;
}
.profile-account-settings-v03221 .profile-playtime-v0322 .playtime-value strong {
  font-size: 26px;
}
.profile-account-settings-v03221 .profile-playtime-v0322 .profile-playtime-actions {
  gap: 9px;
}
.profile-right-column-v0310 .profile-activity-panel-v0322 {
  padding: 16px;
}
.profile-right-column-v0310 .profile-activity-panel-v0322 .section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.profile-right-column-v0310 .profile-activity-row-v0322 {
  grid-template-columns: 1fr;
  gap: 6px;
  min-height: 0;
  padding: 10px 12px;
}
.profile-right-column-v0310 .profile-activity-row-v0322 strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.profile-right-column-v0310 .profile-activity-row-v0322 small {
  white-space: normal;
}
@media (max-width: 1380px) {
  .profile-layout-v0310.profile-layout-three-v0310 {
    grid-template-columns: minmax(245px, 295px) minmax(560px, 1fr) minmax(245px, 295px);
  }
  .profile-account-settings-v03221 .profile-nickname-panel-v0322 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1180px) {
  .profile-layout-v0310.profile-layout-three-v0310 {
    grid-template-columns: 1fr;
  }
  .profile-layout-three-v0310 .profile-center-column-v0310 { order: 1; }
  .profile-layout-three-v0310 .profile-left-column-v0310 { order: 2; }
  .profile-layout-three-v0310 .profile-right-column-v0310 { order: 3; }
  .profile-account-settings-v03221 .profile-account-grid-v0322 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .profile-nav-v03221 {
    width: min(100%, calc(100vw - 16px));
    margin-bottom: 14px;
    padding: 7px;
    justify-content: flex-start;
  }
  .profile-nav-v03221 a {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
  }
  .profile-layout-three-v0310 .panel[id] {
    scroll-margin-top: 96px;
  }
}

/* v0.3.22.2: профиль — точное выравнивание навигации, стабильная индикация и компактные настройки */
.profile-nav-v03222 {
  width: min(1520px, calc(100vw - 32px));
  max-width: none;
  margin-left: 50%;
  margin-right: 0;
  transform: translateX(-50%);
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
}
.profile-nav-v03222 a {
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.profile-nav-v03222 a.is-active,
.profile-nav-v03222 a[aria-current="true"] {
  transform: translateY(-1px);
}
.profile-layout-three-v0310 .panel.profile-section-active-v03221 {
  animation: profileSectionPulseV03222 1.8s ease;
}
@keyframes profileSectionPulseV03222 {
  0% { box-shadow: 0 0 0 0 rgba(255,74,96,0); }
  14% { box-shadow: 0 0 0 2px rgba(255,74,96,.28), 0 22px 58px rgba(255,74,96,.12); border-color: rgba(255,74,96,.46); }
  100% { box-shadow: inherit; }
}
.profile-account-settings-v03222 {
  padding: 18px;
}
.profile-account-settings-v03222 .section-head {
  margin-bottom: 14px;
  align-items: flex-start;
}
.profile-account-grid-v03222 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  gap: 14px;
  align-items: stretch;
}
.profile-account-card-v03222 {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 18px;
  background: rgba(255,255,255,.026);
}
.profile-account-card-v03222 h3 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.25;
}
.profile-nickname-panel-v03222 {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(240px, .92fr);
  gap: 12px;
  align-items: stretch;
}
.profile-nickname-panel-v03222 .form,
.profile-account-settings-v03222 .profile-playtime-actions form {
  min-width: 0;
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(0,0,0,.10);
}
.profile-nickname-panel-v03222 label,
.profile-account-settings-v03222 label {
  min-width: 0;
}
.profile-nickname-panel-v03222 input {
  width: 100%;
  min-width: 0;
}
.profile-nickname-panel-v03222 .btn,
.profile-account-settings-v03222 .profile-playtime-actions .btn {
  width: fit-content;
  min-width: 150px;
  justify-content: center;
}
.profile-playtime-v03222.panel-soft {
  height: 100%;
  padding: 14px;
  border-radius: 18px;
  background: rgba(0,0,0,.10);
  border-color: rgba(255,255,255,.08);
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: start;
}
.profile-playtime-v03222 .playtime-value {
  margin: 8px 0 4px;
}
.profile-playtime-v03222 .playtime-value strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}
.profile-playtime-v03222 .profile-playtime-actions {
  display: grid;
  gap: 10px;
}
.profile-playtime-v03222 .compact-check {
  align-items: flex-start;
}
@media (max-width: 1380px) {
  .profile-nav-v03222,
  .profile-layout-v0310.profile-layout-three-v0310 {
    width: min(1280px, calc(100vw - 32px));
  }
  .profile-account-grid-v03222 {
    grid-template-columns: 1fr;
  }
  .profile-nickname-panel-v03222,
  .profile-playtime-v03222.panel-soft {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1180px) {
  .profile-nav-v03222,
  .profile-layout-v0310.profile-layout-three-v0310 {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    transform: none;
  }
  .profile-account-settings-v03222 {
    padding: 16px;
  }
  .profile-account-grid-v03222 {
    gap: 12px;
  }
  .profile-nickname-panel-v03222,
  .profile-playtime-v03222.panel-soft {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 740px) and (max-width: 1080px) {
  .profile-account-settings-v03222 .section-head {
    display: grid;
    grid-template-columns: 1fr;
  }
  .profile-account-card-v03222 {
    padding: 13px;
  }
  .profile-nickname-panel-v03222,
  .profile-playtime-v03222.panel-soft {
    gap: 10px;
  }
  .profile-nickname-panel-v03222 .form,
  .profile-account-settings-v03222 .profile-playtime-actions form {
    padding: 11px;
  }
  .profile-nickname-panel-v03222 .btn,
  .profile-account-settings-v03222 .profile-playtime-actions .btn {
    width: 100%;
    min-width: 0;
  }
}
@media (max-width: 720px) {
  .profile-nav-v03222 {
    width: min(100%, calc(100vw - 16px));
    margin-left: auto;
    margin-right: auto;
    transform: none;
    padding: 7px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .profile-nav-v03222 a {
    flex: 0 0 auto;
  }
  .profile-account-settings-v03222 {
    padding: 14px;
  }
  .profile-nickname-panel-v03222,
  .profile-playtime-v03222.panel-soft {
    grid-template-columns: 1fr;
  }
  .profile-account-card-v03222 {
    padding: 12px;
  }
  .profile-nickname-panel-v03222 .btn,
  .profile-account-settings-v03222 .profile-playtime-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* v0.3.22.3: профиль — финальная стабилизация панели настроек аккаунта */
.profile-account-settings-v03223 {
  overflow: hidden;
}
.profile-account-settings-v03223 .section-head {
  margin-bottom: 18px;
}
.profile-account-settings-v03223 .section-head p {
  max-width: 760px;
}
.profile-account-grid-v03223 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, .82fr);
  gap: 16px;
  align-items: stretch;
}
.profile-account-card-v03223 {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
  border-radius: 18px;
}
.profile-account-card-v03223 h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}
.profile-account-settings-v03223 .profile-nickname-panel-v03223 {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: none;
  flex-basis: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}
.profile-account-settings-v03223 .profile-game-name-form,
.profile-account-settings-v03223 .profile-avatar-visibility-form,
.profile-account-settings-v03223 .profile-playtime-actions form {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 16px;
  background: rgba(0,0,0,.105);
  display: grid;
  gap: 10px;
}
.profile-account-settings-v03223 .profile-game-name-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.profile-account-settings-v03223 .profile-game-name-form label {
  min-width: 0;
}
.profile-account-settings-v03223 .profile-game-name-form input {
  width: 100%;
  min-width: 0;
}
.profile-account-settings-v03223 .profile-game-name-form .btn {
  width: auto;
  min-width: 150px;
  align-self: end;
}
.profile-account-settings-v03223 .profile-avatar-visibility-form {
  border-top: 1px solid rgba(255,255,255,.085);
}
.profile-account-settings-v03223 .profile-avatar-visibility-form .checkbox-line,
.profile-account-settings-v03223 .profile-playtime-actions .checkbox-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
}
.profile-account-settings-v03223 .profile-avatar-visibility-form .checkbox-line input,
.profile-account-settings-v03223 .profile-playtime-actions .checkbox-line input {
  margin-top: 2px;
}
.profile-account-settings-v03223 .profile-avatar-visibility-form .checkbox-line span,
.profile-account-settings-v03223 .profile-playtime-actions .checkbox-line span {
  min-width: 0;
  line-height: 1.32;
}
.profile-account-settings-v03223 .profile-avatar-visibility-form small,
.profile-account-settings-v03223 .profile-playtime-actions small {
  display: block;
  max-width: 100%;
  line-height: 1.45;
}
.profile-account-settings-v03223 .profile-avatar-visibility-form .btn,
.profile-account-settings-v03223 .profile-playtime-actions .btn {
  width: fit-content;
  min-width: 160px;
  justify-content: center;
}
.profile-account-settings-v03223 .profile-playtime-v03223.panel-soft {
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}
.profile-account-settings-v03223 .profile-playtime-v03223 > div:first-child {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 16px;
  background: rgba(0,0,0,.105);
}
.profile-account-settings-v03223 .profile-playtime-v03223 .playtime-value {
  margin: 6px 0 4px;
}
.profile-account-settings-v03223 .profile-playtime-v03223 .playtime-value strong {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
}
.profile-account-settings-v03223 .profile-playtime-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 1181px) and (max-width: 1500px) {
  .profile-account-grid-v03223 {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .78fr);
  }
  .profile-account-settings-v03223 .profile-game-name-form {
    grid-template-columns: 1fr;
  }
  .profile-account-settings-v03223 .profile-game-name-form .btn,
  .profile-account-settings-v03223 .profile-avatar-visibility-form .btn,
  .profile-account-settings-v03223 .profile-playtime-actions .btn {
    width: 100%;
    min-width: 0;
  }
}
@media (max-width: 1180px) {
  .profile-account-grid-v03223 {
    grid-template-columns: 1fr;
  }
  .profile-account-card-v03223 {
    padding: 15px;
  }
  .profile-account-settings-v03223 .profile-nickname-panel-v03223 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-account-settings-v03223 .profile-game-name-form {
    grid-template-columns: 1fr;
  }
  .profile-account-settings-v03223 .profile-game-name-form .btn,
  .profile-account-settings-v03223 .profile-avatar-visibility-form .btn,
  .profile-account-settings-v03223 .profile-playtime-actions .btn {
    width: 100%;
    min-width: 0;
  }
  .profile-account-settings-v03223 .profile-playtime-v03223.panel-soft {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 14px;
  }
}
@media (min-width: 740px) and (max-width: 1080px) {
  .profile-account-settings-v03223 {
    padding: 18px;
  }
  .profile-account-grid-v03223 {
    gap: 14px;
  }
  .profile-account-card-v03223 {
    padding: 16px;
  }
  .profile-account-settings-v03223 .profile-nickname-panel-v03223 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .profile-account-settings-v03223 .profile-game-name-form,
  .profile-account-settings-v03223 .profile-avatar-visibility-form,
  .profile-account-settings-v03223 .profile-playtime-actions form,
  .profile-account-settings-v03223 .profile-playtime-v03223 > div:first-child {
    padding: 14px;
  }
  .profile-account-settings-v03223 .profile-playtime-v03223.panel-soft {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  }
}
@media (max-width: 739px) {
  .profile-account-settings-v03223 {
    padding: 14px;
  }
  .profile-account-settings-v03223 .section-head {
    margin-bottom: 14px;
  }
  .profile-account-card-v03223 {
    padding: 12px;
  }
  .profile-account-settings-v03223 .profile-nickname-panel-v03223,
  .profile-account-settings-v03223 .profile-playtime-v03223.panel-soft {
    grid-template-columns: 1fr;
  }
  .profile-account-settings-v03223 .profile-game-name-form,
  .profile-account-settings-v03223 .profile-avatar-visibility-form,
  .profile-account-settings-v03223 .profile-playtime-actions form,
  .profile-account-settings-v03223 .profile-playtime-v03223 > div:first-child {
    padding: 12px;
  }
}
@media (max-width: 420px) {
  .profile-account-settings-v03223 .profile-avatar-visibility-form .checkbox-line,
  .profile-account-settings-v03223 .profile-playtime-actions .checkbox-line {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 8px;
  }
}

/* v0.3.23: вложения 2.0, компактные редакторы, группы сообщений и спокойный цвет своих сообщений. */
.message-compose-row-v0323 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

.message-compose-text-v0323 {
  min-width: 0;
}

.message-compose-text-v0323 textarea,
.message-edit-form-v0323 textarea {
  min-height: 56px !important;
  resize: vertical;
}

.personal-message-reply-panel.panel,
.ticket-reply-panel-top-v0362.panel,
.reply-panel-v029.panel,
.reply-panel-top-v0361.panel {
  padding-block: 12px;
}

.personal-message-reply-panel .section-head,
.ticket-reply-panel-top-v0362 .section-head,
.reply-panel-v029 .section-head,
.reply-panel-top-v0361 .section-head {
  margin-bottom: 7px;
}

.attachment-picker-v0323 {
  display: grid;
  align-items: end;
  gap: 7px;
}

.attachment-plus-btn-v0323 {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.attachment-plus-btn-v0323:hover {
  border-color: rgba(225,25,45,.45);
  background: rgba(225,25,45,.13);
  transform: translateY(-1px);
}

.attachment-plus-btn-v0323 input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.attachment-plus-icon-v0323 {
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}

.attachment-plus-text-v0323 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.attachment-selected-preview-v0323 {
  grid-column: 1 / -1;
  margin-top: 0;
}

.file-error-box {
  grid-column: 1 / -1;
  margin: 0;
}

.rich-wrap-compact-v0323 .rich-editor {
  min-height: 96px;
  padding: 12px;
  line-height: 1.5;
}

.rich-wrap-compact-v0323 .rich-toolbar {
  gap: 5px;
}

.rich-wrap-compact-v0323 .rich-toolbar button {
  padding: 5px 7px;
  font-size: 12px;
}

.rich-wrap-compact-v0323 .rich-help {
  display: none;
}

.personal-message.from-me {
  border-color: rgba(118, 128, 155, .25) !important;
  background: linear-gradient(135deg, rgba(85, 96, 126, .14), rgba(255,255,255,.035)) !important;
}

.personal-message.is-grouped-continuation,
.ticket-message.is-grouped-continuation,
.v029-post-card.is-grouped-continuation {
  margin-top: -4px;
  padding-top: 7px;
  border-top-color: rgba(255,255,255,.055);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.personal-message.is-grouped-continuation > .ticket-head,
.ticket-message.is-grouped-continuation > .ticket-head,
.v029-post-card.is-grouped-continuation > .post-head {
  display: none !important;
}

.message-group-time-v0323,
.message-edited-mark-v0323 {
  display: block;
  color: rgba(229,231,235,.48);
  font-size: 10.5px;
  line-height: 1.25;
  margin-bottom: 2px;
}

.message-edited-mark-v0323 {
  margin-top: -2px;
  margin-bottom: 4px;
  font-style: italic;
}

.message-edit-toggle-v0323 {
  width: max-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(229,231,235,.46);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.message-edit-toggle-v0323:hover,
.message-edit-toggle-v0323.is-active {
  color: rgba(255,255,255,.86);
}

.message-edit-form-v0323 {
  display: grid;
  gap: 8px;
  margin-top: 7px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}

.message-edit-form-v0323[hidden] {
  display: none !important;
}

.message-edit-actions-v0323 {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.attachment-card.is-previewable {
  cursor: zoom-in;
}

.attachment-card .attachment-action-label {
  margin-top: 0;
}

.ticket-create-compose-v0323,
.forum-create-compose-v0323 {
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .message-compose-row-v0323 {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
  }

  .message-send-btn-v0323 {
    grid-column: 1 / -1;
    min-height: 38px;
  }

  .message-compose-text-v0323 textarea,
  .ticket-plain-textarea-v0312 {
    min-height: 64px !important;
  }

  .attachment-plus-btn-v0323 {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .attachment-selected-preview-v0323 {
    grid-column: 1 / -1;
  }
}

/* v0.3.23.1: polish редакторов, вложений и действий ЛС. */
.message-compose-row-v0323 {
  grid-template-columns: minmax(0, 1fr) 42px 108px;
  align-items: end;
  gap: 8px;
}

.message-compose-text-v0323 textarea,
.message-edit-form-v0323 textarea,
.ticket-plain-textarea-v0312 {
  min-height: 40px !important;
  max-height: calc(1.45em * 20 + 22px) !important;
  line-height: 1.45;
  padding-block: 9px !important;
  font-size: 14px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-y: hidden;
}

.message-compose-text-v0323 textarea::placeholder,
.message-edit-form-v0323 textarea::placeholder,
.ticket-plain-textarea-v0312::placeholder,
.rich-editor:empty::before {
  color: rgba(226, 232, 240, .42);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .005em;
}

.personal-message-reply-panel.panel,
.ticket-reply-panel-top-v0362.panel,
.reply-panel-v029.panel,
.reply-panel-top-v0361.panel {
  padding-block: 10px;
}

.personal-message-reply-panel .section-head,
.ticket-reply-panel-top-v0362 .section-head,
.reply-panel-v029 .section-head,
.reply-panel-top-v0361 .section-head {
  margin-bottom: 6px;
}

.message-compose-row-v0323 .btn.message-send-btn-v0323,
.message-send-btn-v0323 {
  min-height: 40px;
  height: 40px;
  padding: 0 16px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  white-space: nowrap;
}

.attachment-picker-v0323 {
  align-self: end;
}

.attachment-plus-btn-v0323 {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.13);
  box-shadow: none;
}

.attachment-plus-btn-v0323:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.22);
  transform: none;
}

.attachment-plus-icon-v0323 {
  font-size: 22px;
  font-weight: 800;
  transform: translateY(-1px);
}

.attachment-selected-preview-v0323 {
  margin-top: 4px;
}

.file-preview-card.is-too-large,
.file-preview-card.is-rejected {
  display: none;
}

.personal-message.from-me {
  border-color: rgba(122, 138, 166, .24) !important;
  background: linear-gradient(135deg, rgba(71, 84, 112, .13), rgba(255,255,255,.034)) !important;
}

.personal-message.is-grouped-continuation,
.ticket-message.is-grouped-continuation,
.v029-post-card.is-grouped-continuation {
  margin-top: -8px;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
  border-top-color: rgba(255,255,255,.04);
  box-shadow: none;
}

.personal-message.has-group-time-split-v03231,
.ticket-message.has-group-time-split-v03231,
.v029-post-card.has-group-time-split-v03231 {
  margin-top: 2px;
  border-top-color: rgba(255,255,255,.08);
}

.message-group-time-v0323[hidden] {
  display: none !important;
}

.message-group-time-v0323 {
  opacity: .82;
  margin-bottom: 4px;
}

.user-action-menu-v03231 {
  position: relative;
  display: inline-block;
}

.user-action-menu-v03231 summary {
  list-style: none;
}

.user-action-menu-v03231 summary::-webkit-details-marker {
  display: none;
}

.user-action-menu-toggle-v03231 {
  min-width: 42px;
  letter-spacing: .08em;
  padding-inline: 12px !important;
}

.user-action-menu-list-v03231 {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 210px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(17, 17, 23, .98);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}

.user-action-menu-item-v03231 {
  display: block;
  box-sizing: border-box;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(238, 242, 247, .84);
  padding: 9px 10px;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.user-action-menu-item-v03231:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.user-action-menu-item-v03231.is-danger:hover {
  background: rgba(225,25,45,.14);
  color: #fff;
}

.public-profile-actions-v03231,
.personal-room-actions-menu-v03231 {
  align-items: center;
  gap: 8px;
}

.rich-wrap-compact-v0323 .rich-editor {
  min-height: 48px;
  max-height: 380px;
  overflow-y: auto;
  padding: 10px 12px;
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .message-compose-row-v0323 {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 7px;
  }

  .message-send-btn-v0323 {
    grid-column: 1 / -1;
    height: 38px;
    min-height: 38px;
  }

  .message-compose-text-v0323 textarea,
  .ticket-plain-textarea-v0312 {
    min-height: 40px !important;
  }

  .user-action-menu-list-v03231 {
    right: 0;
    min-width: min(220px, calc(100vw - 32px));
  }
}

/* v0.3.23.2: стабильная отправка/редактирование сообщений и полировка кнопок редактора. */
.inline-form-error {
  margin-top: 8px;
  animation: inlineErrorSoftFadeV03232 .22s ease both;
}

@keyframes inlineErrorSoftFadeV03232 {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-compose-row-v0323 {
  grid-template-columns: minmax(0, 1fr) 38px 104px;
  gap: 7px;
  align-items: end;
}

.message-compose-row-v0323 .btn.message-send-btn-v0323,
.message-send-btn-v0323 {
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  letter-spacing: .01em;
}

.attachment-plus-btn-v0323 {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,.045);
}

.attachment-plus-icon-v0323 {
  font-size: 20px;
  transform: translateY(-1px);
}

.message-compose-text-v0323 textarea,
.message-edit-form-v0323 textarea,
.ticket-plain-textarea-v0312 {
  min-height: 38px !important;
  height: 38px;
  max-height: calc(1.45em * 20 + 20px) !important;
  padding: 8px 11px !important;
  border-radius: 12px;
}

.message-compose-text-v0323 textarea::placeholder,
.message-edit-form-v0323 textarea::placeholder,
.ticket-plain-textarea-v0312::placeholder,
.rich-editor:empty::before {
  color: rgba(226,232,240,.38);
  font-size: 12.5px;
  font-weight: 500;
}

.message-edit-toggle-v0323 {
  display: none !important;
}

[data-message-edit-target] {
  cursor: context-menu;
}

.message-edit-form-v0323 {
  margin-top: 8px;
}

.message-group-time-v0323 {
  margin: 4px 0 1px;
  text-align: right;
  color: rgba(226,232,240,.52);
  font-size: 10.5px;
}

.personal-message.has-group-time-split-v03231,
.ticket-message.has-group-time-split-v03231,
.v029-post-card.has-group-time-split-v03231 {
  padding-top: 8px;
}

.profile-pwa-card-v03201 {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-pwa-card-v03201 p,
.profile-pwa-card-v03201 small {
  margin-bottom: 0;
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .message-compose-row-v0323 {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 7px;
  }
  .message-send-btn-v0323 {
    grid-column: 1 / -1;
    height: 38px;
    min-height: 38px;
  }
  .message-compose-text-v0323 textarea,
  .message-edit-form-v0323 textarea,
  .ticket-plain-textarea-v0312 {
    min-height: 38px !important;
  }
}

/* v0.3.23.3: компактные ЛС, аккуратное время, PWA install и чистый список переписок. */

.personal-messages-list {
  gap: 6px;
}

.personal-message.panel {
  padding: 9px 11px;
}

.personal-message.is-grouped-continuation {
  margin-top: -6px;
  padding-top: 7px;
}

.personal-message.has-group-time-split-v03231 {
  margin-top: 0;
  padding-top: 8px;
}

.personal-message-body-row-v03233 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
}

.personal-message-body-row-v03233 .content {
  min-width: 0;
}

.personal-message-inline-time-v03233 {
  justify-self: end;
  white-space: nowrap;
  margin: 0;
  color: rgba(226, 232, 240, .54);
  font-size: 10.5px;
  line-height: 1.25;
}

.personal-message:not(.from-me) .personal-message-inline-time-v03233[hidden],
.personal-message.from-me .personal-message-inline-time-v03233[hidden] {
  display: none !important;
}

.personal-message.from-me .personal-message-date {
  display: none;
}

.personal-message.from-me .content {
  padding-right: 0;
}

.messages-list {
  gap: 8px;
}

.messages-list .message-conversation-row {
  padding: 12px 14px;
  gap: 12px;
  min-height: 0;
  align-items: center;
}

.message-conversation-main-v03234 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.message-conversation-copy-v03234 {
  min-width: 0;
}

.message-conversation-avatar-v03234 {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.message-conversation-avatar-v03234.is-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.88);
  font-weight: 900;
}

.messages-list .message-conversation-row h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.2;
}

.messages-list .message-conversation-row p {
  margin: 0 0 4px;
  line-height: 1.35;
  font-size: 13px;
}

.messages-list .message-conversation-row small,
.messages-list .message-conversation-row .topic-meta {
  font-size: 11.5px;
  line-height: 1.25;
}

.profile-pwa-main-install-v03233 {
  border: 1px solid rgba(74, 222, 128, .42);
  background: linear-gradient(135deg, rgba(34, 197, 94, .24), rgba(20, 184, 166, .14));
  color: #ecfdf5;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(20, 184, 166, .12);
}

.profile-pwa-main-install-v03233:hover:not(:disabled) {
  border-color: rgba(134, 239, 172, .68);
  background: linear-gradient(135deg, rgba(34, 197, 94, .32), rgba(20, 184, 166, .2));
  transform: translateY(-1px);
}

.profile-pwa-main-install-v03233:disabled {
  opacity: .62;
  cursor: default;
  transform: none;
}

.profile-pwa-card-v03201[hidden] {
  display: none !important;
}

.profile-pwa-card-v03201.is-current-device-v03233 {
  border-color: rgba(74, 222, 128, .28);
  background: linear-gradient(135deg, rgba(34, 197, 94, .08), rgba(255,255,255,.035));
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .personal-message-body-row-v03233 {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .personal-message-inline-time-v03233 {
    justify-self: end;
    font-size: 10px;
  }

  .personal-message.from-me .personal-message-date {
    display: none;
  }

  .messages-list .message-conversation-row {
    padding: 11px 12px;
  }

  .message-conversation-avatar-v03234 {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 11px;
  }
}

/* v0.3.29: убрать жёсткую рамку у панелей сообщений. */
.personal-message.panel,
.ticket-message.panel,
.v029-post-card.panel {
  border: 0 !important;
}

.personal-message.is-grouped-continuation,
.ticket-message.is-grouped-continuation,
.v029-post-card.is-grouped-continuation {
  border-top: 0 !important;
}

/* v0.3.29: компактные сообщения форума и тикетов без визуальных номеров */
.forum-topic-newest-first.v029-post-list,
.ticket-messages-list {
  gap: 6px;
}

.forum-topic-newest-first .v029-post-card.panel,
.ticket-messages-list .ticket-message.panel {
  padding: 9px 11px;
  gap: 5px;
  border-radius: 13px;
}

.forum-topic-newest-first .v029-post-head,
.ticket-messages-list .ticket-head {
  margin-bottom: 3px;
  gap: 8px;
  align-items: center;
}

.forum-topic-newest-first .post-author-block,
.ticket-messages-list .ticket-author-block {
  gap: 8px;
  align-items: center;
}

.forum-topic-newest-first .post-author-avatar,
.ticket-messages-list .post-author-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 10px;
  font-size: 13px;
}

.forum-topic-newest-first .thread-message-line-v03234,
.ticket-messages-list .thread-message-line-v03234 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.forum-topic-newest-first .thread-message-line-v03234 .content,
.ticket-messages-list .thread-message-line-v03234 .content {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  line-height: 1.38;
  font-size: 14px;
}

.forum-topic-newest-first .thread-message-line-v03234 .content p,
.ticket-messages-list .thread-message-line-v03234 .content p {
  margin: 4px 0;
}

.forum-topic-newest-first .thread-message-line-v03234 .content p:first-child,
.ticket-messages-list .thread-message-line-v03234 .content p:first-child { margin-top: 0; }

.forum-topic-newest-first .thread-message-line-v03234 .content p:last-child,
.ticket-messages-list .thread-message-line-v03234 .content p:last-child { margin-bottom: 0; }

.thread-message-time-v03234 {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  margin-top: 1px;
  text-align: right;
}

.forum-topic-newest-first .v029-post-actions,
.ticket-messages-list .ticket-message-actions {
  margin-top: 5px;
}

.forum-topic-newest-first .is-grouped-continuation,
.ticket-messages-list .is-grouped-continuation {
  padding-top: 7px;
  padding-bottom: 7px;
}

@media (max-width: 720px) {
  .forum-topic-newest-first .v029-post-card.panel,
  .ticket-messages-list .ticket-message.panel {
    padding: 8px 10px;
  }

  .forum-topic-newest-first .thread-message-line-v03234,
  .ticket-messages-list .thread-message-line-v03234 {
    display: block;
  }

  .forum-topic-newest-first .thread-message-line-v03234 .content,
  .ticket-messages-list .thread-message-line-v03234 .content {
    display: inline;
  }

  .forum-topic-newest-first .thread-message-line-v03234 .content p,
  .ticket-messages-list .thread-message-line-v03234 .content p {
    margin: 3px 0;
  }

  .forum-topic-newest-first .thread-message-line-v03234 .content p:last-child,
  .ticket-messages-list .thread-message-line-v03234 .content p:last-child {
    display: inline;
    margin-bottom: 0;
  }

  .thread-message-time-v03234 {
    display: inline-block;
    margin-left: 7px;
    margin-top: 0;
    vertical-align: baseline;
    font-size: 10px;
  }
}

/* v0.3.29: фактическое улучшение списка тем форума, фильтров и статусов. */
.forum-toolbar-v0329 {
  display: grid;
  gap: 12px;
}
.forum-topic-filters-v0329 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.forum-topic-filter-v0329 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.095);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: #ddd;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.forum-topic-filter-v0329:hover,
.forum-topic-filter-v0329.active {
  border-color: rgba(225,25,45,.55);
  background: rgba(225,25,45,.2);
  color: #fff;
}
.forum-topics-panel-v0329 {
  display: grid;
  gap: 12px;
}
.forum-section-head-v0329 {
  margin-bottom: 2px;
}
.forum-topic-list-v0329 {
  gap: 9px;
}
.forum-topic-card-v0329 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  align-items: center;
  gap: 14px;
  min-height: 0;
  padding: 14px 16px 14px 18px;
}
.forum-topic-card-v0329::before {
  width: 3px;
}
.forum-topic-card-v0329.is-pinned {
  border-color: rgba(225,25,45,.38);
  background: linear-gradient(180deg, rgba(225,25,45,.11), rgba(255,255,255,.028));
}
.forum-topic-card-v0329.is-closed {
  opacity: .82;
}
.forum-topic-card-v0329.has-new-reply {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}
.forum-topic-main-v0329 {
  min-width: 0;
}
.forum-topic-tags-v0329 {
  margin-bottom: 6px;
}
.forum-new-reply-tag-v0329 {
  background: rgba(255,255,255,.13);
  color: #fff;
}
.forum-topic-card-v0329 h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.22;
  word-break: break-word;
}
.forum-topic-excerpt-v0329 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.forum-topic-subline-v0329 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 7px;
  color: var(--muted);
}
.forum-topic-last-v0329 {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 8px;
  min-width: 0;
}
.forum-topic-last-author-v0329 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  text-align: right;
}
.forum-topic-last-author-v0329 img,
.forum-topic-last-author-v0329 > span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(225,25,45,.22);
}
.forum-topic-last-author-v0329 > span {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.forum-topic-last-author-v0329 div {
  min-width: 0;
}
.forum-topic-last-author-v0329 small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.forum-topic-last-author-v0329 strong {
  display: block;
  overflow: hidden;
  max-width: 170px;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forum-topic-meta-v0329 {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  text-align: right;
}
.forum-topic-meta-v0329 span {
  color: var(--muted);
  font-size: 12px;
}
.forum-topic-meta-v0329 strong {
  display: inline;
  margin-right: 3px;
  font-size: 15px;
}

@media (max-width: 760px) {
  .forum-topic-card-v0329 {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px 14px 13px 16px;
  }
  .forum-topic-last-v0329 {
    justify-items: start;
  }
  .forum-topic-last-author-v0329 {
    justify-content: flex-start;
    text-align: left;
  }
  .forum-topic-meta-v0329 {
    justify-content: flex-start;
    text-align: left;
  }
  .forum-topic-last-author-v0329 strong {
    max-width: min(260px, 70vw);
  }
}

/* v0.3.29.1: мобильное выравнивание времени сообщений форума и тикетов в одну строку с текстом. */

/* v0.3.30.2 — Новости: фильтр и поиск перенесены в боковой столбец. */
.news-center-hero-v0330 {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.news-center-hero-v0330::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -140px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225,25,45,.22), transparent 65%);
  pointer-events: none;
}
.news-center-actions-v0330 {
  position: relative;
  z-index: 1;
  gap: 8px;
}
.news-center-stats-v0330 div {
  min-height: 82px;
  padding: 14px;
}
.news-section-head-v0330 {
  align-items: flex-start;
  margin-bottom: 10px;
}
.news-section-head-v0330 h2 {
  margin-bottom: 4px;
}
.news-section-head-v0330 p {
  max-width: 760px;
  margin: 0;
}
.news-priority-board-v0330 {
  margin-bottom: 14px;
}
.news-priority-grid-v0330 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.news-priority-card-v0330 {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(225,25,45,.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(225,25,45,.105), rgba(255,255,255,.028));
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}
.news-priority-card-v0330 .channel-card-meta,
.news-card-v0330 .channel-card-meta,
.news-lead-card-v0330 .channel-card-meta,
.news-meta-row-v0330 {
  gap: 6px 8px;
}
.news-priority-card-v0330 h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 17px;
  line-height: 1.18;
  word-break: break-word;
}
.news-priority-card-v0330 p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  line-height: 1.38;
  word-break: break-word;
}
.news-priority-card-v0330 .card-bottom-row {
  margin-top: 4px;
  padding-top: 8px;
}

.news-layout-v03302 {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(620px, 1fr) minmax(240px, 310px);
  gap: 14px;
  align-items: start;
}
.news-main-column-v03302 {
  min-width: 0;
}
.news-sidebar-v03302 {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  padding: 13px;
}
.news-sidebar-section-v03302 {
  display: grid;
  gap: 9px;
}
.news-sidebar-section-v03302 + .news-sidebar-section-v03302 {
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.075);
}
.news-sidebar-section-v03302 h2 {
  margin: -2px 0 0;
  font-size: 18px;
  line-height: 1.15;
}
.news-category-list-v03302 {
  display: grid;
  gap: 7px;
}
.news-category-link-v03302 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  color: #e8e8ed;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.news-category-link-v03302 span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-category-link-v03302 strong {
  flex: 0 0 auto;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}
.news-category-link-v03302:hover,
.news-category-link-v03302.active {
  border-color: rgba(225,25,45,.32);
  background: rgba(225,25,45,.12);
  color: #fff;
}
.news-category-link-v03302.active strong {
  background: rgba(225,25,45,.28);
  color: #fff;
}
.news-sidebar-search-v03302 {
  display: grid;
  gap: 8px;
}
.news-sidebar-search-v03302 input {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  font-size: 14px;
}
.news-sidebar-search-v03302 .btn {
  justify-content: center;
  width: 100%;
  padding-top: 9px;
  padding-bottom: 9px;
}
.news-lead-card-v0330 {
  display: grid;
  gap: 16px;
  margin-bottom: 14px;
  min-height: 250px;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(225,25,45,.16), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
}
.news-lead-card-v0330.has-cover-v0475 {
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  align-items: stretch;
}
.news-lead-content-v0475 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  max-width: 720px;
  padding: 4px 0;
}
.news-lead-cover-v0475 {
  position: relative;
  display: block;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.2);
}
.news-lead-cover-v0475::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.18));
  pointer-events: none;
}
.news-lead-cover-v0475 img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  border: 0;
  border-radius: inherit;
  margin: 0;
}
.news-lead-card-v0330 h2 {
  display: -webkit-box;
  margin: 10px 0 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: clamp(25px, 2.4vw, 36px);
  line-height: 1.06;
  word-break: break-word;
}
.news-lead-card-v0330 p {
  display: -webkit-box;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  max-width: 680px;
  line-height: 1.42;
}
.news-lead-actions-v0330 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}
.news-grid-v0330 {
  gap: 9px;
}
.news-card-v0330 {
  position: relative;
  min-height: 0;
  gap: 8px;
  padding: 10px 12px;
  border-color: rgba(255,255,255,.1);
}
.news-card-v0330.media-card {
  display: block;
  min-height: 152px;
  padding: 13px 14px;
  overflow: hidden;
  border-color: rgba(255,255,255,.16);
  background:
    linear-gradient(90deg, rgba(11,11,16,.96) 0%, rgba(11,11,16,.78) 52%, rgba(11,11,16,.5) 100%),
    var(--news-card-bg) center / cover no-repeat,
    rgba(255,255,255,.035);
}
.news-card-v0330.no-cover-v0475 {
  display: block;
}
.news-card-v0330.has-cover-v0475::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.28));
  pointer-events: none;
}
.news-card-v0330.has-cover-v0475 .channel-card-body {
  position: relative;
  z-index: 1;
  max-width: min(680px, 72%);
}
.news-card-v0330 .card-cover {
  height: 88px;
  border-radius: 10px;
}
.news-card-v0330.important,
.news-card-v0330.pinned {
  border-color: rgba(225,25,45,.28);
}
.news-card-v0330 h3 {
  display: -webkit-box;
  margin: 3px 0 4px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 17px;
  line-height: 1.2;
  word-break: break-word;
}
.news-card-v0330 p {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  line-height: 1.35;
  word-break: break-word;
}
.news-card-v0330 h3 a,
.news-priority-card-v0330 h3 a,
.news-lead-card-v0330 h2 a {
  color: #fff;
  text-decoration: none;
}
.news-card-v0330 h3 a:hover,
.news-priority-card-v0330 h3 a:hover,
.news-lead-card-v0330 h2 a:hover {
  color: var(--red-2);
}
.news-card-bottom-v0330 {
  align-items: center;
  margin-top: 4px;
  padding-top: 6px;
}
.news-read-link-v0473 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid rgba(225,25,45,.28);
  border-radius: 9px;
  background: rgba(225,25,45,.12);
  color: #fff;
  line-height: 1.2;
  text-decoration: none;
}
.news-read-link-v0473:hover {
  border-color: rgba(255,83,101,.45);
  background: rgba(225,25,45,.2);
  color: #fff;
}
.news-mod-updates-v0473 {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  padding: 13px;
}
.news-mod-head-v0473 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.news-mod-head-v0473 h2 {
  margin: 2px 0 0;
  font-size: 19px;
  line-height: 1.15;
}
.news-mod-list-v0473 {
  display: grid;
  gap: 9px;
}
.news-mod-item-v0473 {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
.news-mod-item-v0473 h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 15px;
  line-height: 1.22;
}
.news-mod-item-v0473 h3 a {
  color: #fff;
  text-decoration: none;
}
.news-mod-item-v0473 h3 a:hover {
  color: var(--red-2);
}
.news-mod-item-v0473 p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.34;
}
.news-mod-item-v0473 .btn {
  justify-self: start;
}

